github.com/onosproject/onos-api/go@v0.10.32/onos/fabricsim/devices.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: onos/fabricsim/devices.proto
     3  
     4  package fabricsim
     5  
     6  import (
     7  	context "context"
     8  	fmt "fmt"
     9  	_ "github.com/gogo/protobuf/gogoproto"
    10  	proto "github.com/gogo/protobuf/proto"
    11  	misc "github.com/onosproject/onos-api/go/onos/misc"
    12  	grpc "google.golang.org/grpc"
    13  	codes "google.golang.org/grpc/codes"
    14  	status "google.golang.org/grpc/status"
    15  	io "io"
    16  	math "math"
    17  	math_bits "math/bits"
    18  )
    19  
    20  // Reference imports to suppress errors if they are not otherwise used.
    21  var _ = proto.Marshal
    22  var _ = fmt.Errorf
    23  var _ = math.Inf
    24  
    25  // This is a compile-time assertion to ensure that this generated file
    26  // is compatible with the proto package it is being compiled against.
    27  // A compilation error at this line likely means your copy of the
    28  // proto package needs to be updated.
    29  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    30  
    31  // DeviceType represents type of a device, i.e. switch, IPU, etc.
    32  type DeviceType int32
    33  
    34  const (
    35  	DeviceType_SWITCH DeviceType = 0
    36  	DeviceType_IPU    DeviceType = 1
    37  )
    38  
    39  var DeviceType_name = map[int32]string{
    40  	0: "SWITCH",
    41  	1: "IPU",
    42  }
    43  
    44  var DeviceType_value = map[string]int32{
    45  	"SWITCH": 0,
    46  	"IPU":    1,
    47  }
    48  
    49  func (x DeviceType) String() string {
    50  	return proto.EnumName(DeviceType_name, int32(x))
    51  }
    52  
    53  func (DeviceType) EnumDescriptor() ([]byte, []int) {
    54  	return fileDescriptor_7db16019df22577e, []int{0}
    55  }
    56  
    57  // StopMode indicates whether to simulate orderly (administrative) or chaotic (power off) shutdown
    58  type StopMode int32
    59  
    60  const (
    61  	StopMode_ORDERLY_STOP StopMode = 0
    62  	StopMode_CHAOTIC_STOP StopMode = 1
    63  )
    64  
    65  var StopMode_name = map[int32]string{
    66  	0: "ORDERLY_STOP",
    67  	1: "CHAOTIC_STOP",
    68  }
    69  
    70  var StopMode_value = map[string]int32{
    71  	"ORDERLY_STOP": 0,
    72  	"CHAOTIC_STOP": 1,
    73  }
    74  
    75  func (x StopMode) String() string {
    76  	return proto.EnumName(StopMode_name, int32(x))
    77  }
    78  
    79  func (StopMode) EnumDescriptor() ([]byte, []int) {
    80  	return fileDescriptor_7db16019df22577e, []int{1}
    81  }
    82  
    83  // Device describes a simulated switch or IPU
    84  type Device struct {
    85  	// unique device id and device type
    86  	ID   DeviceID   `protobuf:"bytes,1,opt,name=id,proto3,casttype=DeviceID" json:"id,omitempty"`
    87  	Type DeviceType `protobuf:"varint,2,opt,name=type,proto3,enum=onos.fabricsim.DeviceType" json:"type,omitempty"`
    88  	// list of ports
    89  	Ports []*Port `protobuf:"bytes,3,rep,name=ports,proto3" json:"ports,omitempty"`
    90  	// control port for p4 and gnmi simulation
    91  	ControlPort int32 `protobuf:"varint,4,opt,name=control_port,json=controlPort,proto3" json:"control_port,omitempty"`
    92  	// unique chassis ID
    93  	ChassisID uint64 `protobuf:"varint,5,opt,name=chassis_id,json=chassisId,proto3" json:"chassis_id,omitempty"`
    94  	// forwarding pipeline information
    95  	PipelineInfo *PipelineInfo `protobuf:"bytes,6,opt,name=pipeline_info,json=pipelineInfo,proto3" json:"pipeline_info,omitempty"`
    96  	// Screen coordinates
    97  	Pos *misc.GridPosition `protobuf:"bytes,7,opt,name=pos,proto3" json:"pos,omitempty"`
    98  	// Current connections and total connection count
    99  	Connections      []*misc.Connection `protobuf:"bytes,8,rep,name=connections,proto3" json:"connections,omitempty"`
   100  	TotalConnections int32              `protobuf:"varint,9,opt,name=total_connections,json=totalConnections,proto3" json:"total_connections,omitempty"`
   101  	// Cumulative I/O stats for the device P4Runtime, gNMI and gNOI agent(s)
   102  	IOStats *misc.IOStats `protobuf:"bytes,10,opt,name=io_stats,json=ioStats,proto3" json:"io_stats,omitempty"`
   103  }
   104  
   105  func (m *Device) Reset()         { *m = Device{} }
   106  func (m *Device) String() string { return proto.CompactTextString(m) }
   107  func (*Device) ProtoMessage()    {}
   108  func (*Device) Descriptor() ([]byte, []int) {
   109  	return fileDescriptor_7db16019df22577e, []int{0}
   110  }
   111  func (m *Device) XXX_Unmarshal(b []byte) error {
   112  	return m.Unmarshal(b)
   113  }
   114  func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   115  	if deterministic {
   116  		return xxx_messageInfo_Device.Marshal(b, m, deterministic)
   117  	} else {
   118  		b = b[:cap(b)]
   119  		n, err := m.MarshalToSizedBuffer(b)
   120  		if err != nil {
   121  			return nil, err
   122  		}
   123  		return b[:n], nil
   124  	}
   125  }
   126  func (m *Device) XXX_Merge(src proto.Message) {
   127  	xxx_messageInfo_Device.Merge(m, src)
   128  }
   129  func (m *Device) XXX_Size() int {
   130  	return m.Size()
   131  }
   132  func (m *Device) XXX_DiscardUnknown() {
   133  	xxx_messageInfo_Device.DiscardUnknown(m)
   134  }
   135  
   136  var xxx_messageInfo_Device proto.InternalMessageInfo
   137  
   138  func (m *Device) GetID() DeviceID {
   139  	if m != nil {
   140  		return m.ID
   141  	}
   142  	return ""
   143  }
   144  
   145  func (m *Device) GetType() DeviceType {
   146  	if m != nil {
   147  		return m.Type
   148  	}
   149  	return DeviceType_SWITCH
   150  }
   151  
   152  func (m *Device) GetPorts() []*Port {
   153  	if m != nil {
   154  		return m.Ports
   155  	}
   156  	return nil
   157  }
   158  
   159  func (m *Device) GetControlPort() int32 {
   160  	if m != nil {
   161  		return m.ControlPort
   162  	}
   163  	return 0
   164  }
   165  
   166  func (m *Device) GetChassisID() uint64 {
   167  	if m != nil {
   168  		return m.ChassisID
   169  	}
   170  	return 0
   171  }
   172  
   173  func (m *Device) GetPipelineInfo() *PipelineInfo {
   174  	if m != nil {
   175  		return m.PipelineInfo
   176  	}
   177  	return nil
   178  }
   179  
   180  func (m *Device) GetPos() *misc.GridPosition {
   181  	if m != nil {
   182  		return m.Pos
   183  	}
   184  	return nil
   185  }
   186  
   187  func (m *Device) GetConnections() []*misc.Connection {
   188  	if m != nil {
   189  		return m.Connections
   190  	}
   191  	return nil
   192  }
   193  
   194  func (m *Device) GetTotalConnections() int32 {
   195  	if m != nil {
   196  		return m.TotalConnections
   197  	}
   198  	return 0
   199  }
   200  
   201  func (m *Device) GetIOStats() *misc.IOStats {
   202  	if m != nil {
   203  		return m.IOStats
   204  	}
   205  	return nil
   206  }
   207  
   208  // Port describes a simulated device port
   209  type Port struct {
   210  	// unique port id and port type
   211  	ID PortID `protobuf:"bytes,1,opt,name=id,proto3,casttype=PortID" json:"id,omitempty"`
   212  	// display/friendly name
   213  	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
   214  	// port number
   215  	Number uint32 `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"`
   216  	// sdn/internal port number
   217  	InternalNumber uint32 `protobuf:"varint,5,opt,name=internal_number,json=internalNumber,proto3" json:"internal_number,omitempty"`
   218  	// speed and status
   219  	Speed   string `protobuf:"bytes,6,opt,name=speed,proto3" json:"speed,omitempty"`
   220  	Enabled bool   `protobuf:"varint,7,opt,name=enabled,proto3" json:"enabled,omitempty"`
   221  }
   222  
   223  func (m *Port) Reset()         { *m = Port{} }
   224  func (m *Port) String() string { return proto.CompactTextString(m) }
   225  func (*Port) ProtoMessage()    {}
   226  func (*Port) Descriptor() ([]byte, []int) {
   227  	return fileDescriptor_7db16019df22577e, []int{1}
   228  }
   229  func (m *Port) XXX_Unmarshal(b []byte) error {
   230  	return m.Unmarshal(b)
   231  }
   232  func (m *Port) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   233  	if deterministic {
   234  		return xxx_messageInfo_Port.Marshal(b, m, deterministic)
   235  	} else {
   236  		b = b[:cap(b)]
   237  		n, err := m.MarshalToSizedBuffer(b)
   238  		if err != nil {
   239  			return nil, err
   240  		}
   241  		return b[:n], nil
   242  	}
   243  }
   244  func (m *Port) XXX_Merge(src proto.Message) {
   245  	xxx_messageInfo_Port.Merge(m, src)
   246  }
   247  func (m *Port) XXX_Size() int {
   248  	return m.Size()
   249  }
   250  func (m *Port) XXX_DiscardUnknown() {
   251  	xxx_messageInfo_Port.DiscardUnknown(m)
   252  }
   253  
   254  var xxx_messageInfo_Port proto.InternalMessageInfo
   255  
   256  func (m *Port) GetID() PortID {
   257  	if m != nil {
   258  		return m.ID
   259  	}
   260  	return ""
   261  }
   262  
   263  func (m *Port) GetName() string {
   264  	if m != nil {
   265  		return m.Name
   266  	}
   267  	return ""
   268  }
   269  
   270  func (m *Port) GetNumber() uint32 {
   271  	if m != nil {
   272  		return m.Number
   273  	}
   274  	return 0
   275  }
   276  
   277  func (m *Port) GetInternalNumber() uint32 {
   278  	if m != nil {
   279  		return m.InternalNumber
   280  	}
   281  	return 0
   282  }
   283  
   284  func (m *Port) GetSpeed() string {
   285  	if m != nil {
   286  		return m.Speed
   287  	}
   288  	return ""
   289  }
   290  
   291  func (m *Port) GetEnabled() bool {
   292  	if m != nil {
   293  		return m.Enabled
   294  	}
   295  	return false
   296  }
   297  
   298  // PipelineInfo provides information about the currently deployed forwarding pipeline
   299  type PipelineInfo struct {
   300  	Cookie uint64 `protobuf:"varint,1,opt,name=cookie,proto3" json:"cookie,omitempty"`
   301  	P4Info []byte `protobuf:"bytes,2,opt,name=p4_info,json=p4Info,proto3" json:"p4_info,omitempty"`
   302  	// summary information about tables, counters, meters, groups, etc.
   303  	Tables          []*EntitiesInfo `protobuf:"bytes,3,rep,name=tables,proto3" json:"tables,omitempty"`
   304  	Counters        []*EntitiesInfo `protobuf:"bytes,4,rep,name=counters,proto3" json:"counters,omitempty"`
   305  	Meters          []*EntitiesInfo `protobuf:"bytes,5,rep,name=meters,proto3" json:"meters,omitempty"`
   306  	Groups          []*EntitiesInfo `protobuf:"bytes,6,rep,name=groups,proto3" json:"groups,omitempty"`
   307  	MulticastGroups []*EntitiesInfo `protobuf:"bytes,7,rep,name=multicast_groups,json=multicastGroups,proto3" json:"multicast_groups,omitempty"`
   308  	CloneSessions   []*EntitiesInfo `protobuf:"bytes,8,rep,name=clone_sessions,json=cloneSessions,proto3" json:"clone_sessions,omitempty"`
   309  }
   310  
   311  func (m *PipelineInfo) Reset()         { *m = PipelineInfo{} }
   312  func (m *PipelineInfo) String() string { return proto.CompactTextString(m) }
   313  func (*PipelineInfo) ProtoMessage()    {}
   314  func (*PipelineInfo) Descriptor() ([]byte, []int) {
   315  	return fileDescriptor_7db16019df22577e, []int{2}
   316  }
   317  func (m *PipelineInfo) XXX_Unmarshal(b []byte) error {
   318  	return m.Unmarshal(b)
   319  }
   320  func (m *PipelineInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   321  	if deterministic {
   322  		return xxx_messageInfo_PipelineInfo.Marshal(b, m, deterministic)
   323  	} else {
   324  		b = b[:cap(b)]
   325  		n, err := m.MarshalToSizedBuffer(b)
   326  		if err != nil {
   327  			return nil, err
   328  		}
   329  		return b[:n], nil
   330  	}
   331  }
   332  func (m *PipelineInfo) XXX_Merge(src proto.Message) {
   333  	xxx_messageInfo_PipelineInfo.Merge(m, src)
   334  }
   335  func (m *PipelineInfo) XXX_Size() int {
   336  	return m.Size()
   337  }
   338  func (m *PipelineInfo) XXX_DiscardUnknown() {
   339  	xxx_messageInfo_PipelineInfo.DiscardUnknown(m)
   340  }
   341  
   342  var xxx_messageInfo_PipelineInfo proto.InternalMessageInfo
   343  
   344  func (m *PipelineInfo) GetCookie() uint64 {
   345  	if m != nil {
   346  		return m.Cookie
   347  	}
   348  	return 0
   349  }
   350  
   351  func (m *PipelineInfo) GetP4Info() []byte {
   352  	if m != nil {
   353  		return m.P4Info
   354  	}
   355  	return nil
   356  }
   357  
   358  func (m *PipelineInfo) GetTables() []*EntitiesInfo {
   359  	if m != nil {
   360  		return m.Tables
   361  	}
   362  	return nil
   363  }
   364  
   365  func (m *PipelineInfo) GetCounters() []*EntitiesInfo {
   366  	if m != nil {
   367  		return m.Counters
   368  	}
   369  	return nil
   370  }
   371  
   372  func (m *PipelineInfo) GetMeters() []*EntitiesInfo {
   373  	if m != nil {
   374  		return m.Meters
   375  	}
   376  	return nil
   377  }
   378  
   379  func (m *PipelineInfo) GetGroups() []*EntitiesInfo {
   380  	if m != nil {
   381  		return m.Groups
   382  	}
   383  	return nil
   384  }
   385  
   386  func (m *PipelineInfo) GetMulticastGroups() []*EntitiesInfo {
   387  	if m != nil {
   388  		return m.MulticastGroups
   389  	}
   390  	return nil
   391  }
   392  
   393  func (m *PipelineInfo) GetCloneSessions() []*EntitiesInfo {
   394  	if m != nil {
   395  		return m.CloneSessions
   396  	}
   397  	return nil
   398  }
   399  
   400  // EntitiesInfo provides information about size of pipeline entities, tables, meters, counters
   401  type EntitiesInfo struct {
   402  	ID    uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
   403  	Size_ uint32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
   404  	Name  string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
   405  }
   406  
   407  func (m *EntitiesInfo) Reset()         { *m = EntitiesInfo{} }
   408  func (m *EntitiesInfo) String() string { return proto.CompactTextString(m) }
   409  func (*EntitiesInfo) ProtoMessage()    {}
   410  func (*EntitiesInfo) Descriptor() ([]byte, []int) {
   411  	return fileDescriptor_7db16019df22577e, []int{3}
   412  }
   413  func (m *EntitiesInfo) XXX_Unmarshal(b []byte) error {
   414  	return m.Unmarshal(b)
   415  }
   416  func (m *EntitiesInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   417  	if deterministic {
   418  		return xxx_messageInfo_EntitiesInfo.Marshal(b, m, deterministic)
   419  	} else {
   420  		b = b[:cap(b)]
   421  		n, err := m.MarshalToSizedBuffer(b)
   422  		if err != nil {
   423  			return nil, err
   424  		}
   425  		return b[:n], nil
   426  	}
   427  }
   428  func (m *EntitiesInfo) XXX_Merge(src proto.Message) {
   429  	xxx_messageInfo_EntitiesInfo.Merge(m, src)
   430  }
   431  func (m *EntitiesInfo) XXX_Size() int {
   432  	return m.Size()
   433  }
   434  func (m *EntitiesInfo) XXX_DiscardUnknown() {
   435  	xxx_messageInfo_EntitiesInfo.DiscardUnknown(m)
   436  }
   437  
   438  var xxx_messageInfo_EntitiesInfo proto.InternalMessageInfo
   439  
   440  func (m *EntitiesInfo) GetID() uint32 {
   441  	if m != nil {
   442  		return m.ID
   443  	}
   444  	return 0
   445  }
   446  
   447  func (m *EntitiesInfo) GetSize_() uint32 {
   448  	if m != nil {
   449  		return m.Size_
   450  	}
   451  	return 0
   452  }
   453  
   454  func (m *EntitiesInfo) GetName() string {
   455  	if m != nil {
   456  		return m.Name
   457  	}
   458  	return ""
   459  }
   460  
   461  type GetDevicesRequest struct {
   462  }
   463  
   464  func (m *GetDevicesRequest) Reset()         { *m = GetDevicesRequest{} }
   465  func (m *GetDevicesRequest) String() string { return proto.CompactTextString(m) }
   466  func (*GetDevicesRequest) ProtoMessage()    {}
   467  func (*GetDevicesRequest) Descriptor() ([]byte, []int) {
   468  	return fileDescriptor_7db16019df22577e, []int{4}
   469  }
   470  func (m *GetDevicesRequest) XXX_Unmarshal(b []byte) error {
   471  	return m.Unmarshal(b)
   472  }
   473  func (m *GetDevicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   474  	if deterministic {
   475  		return xxx_messageInfo_GetDevicesRequest.Marshal(b, m, deterministic)
   476  	} else {
   477  		b = b[:cap(b)]
   478  		n, err := m.MarshalToSizedBuffer(b)
   479  		if err != nil {
   480  			return nil, err
   481  		}
   482  		return b[:n], nil
   483  	}
   484  }
   485  func (m *GetDevicesRequest) XXX_Merge(src proto.Message) {
   486  	xxx_messageInfo_GetDevicesRequest.Merge(m, src)
   487  }
   488  func (m *GetDevicesRequest) XXX_Size() int {
   489  	return m.Size()
   490  }
   491  func (m *GetDevicesRequest) XXX_DiscardUnknown() {
   492  	xxx_messageInfo_GetDevicesRequest.DiscardUnknown(m)
   493  }
   494  
   495  var xxx_messageInfo_GetDevicesRequest proto.InternalMessageInfo
   496  
   497  type GetDevicesResponse struct {
   498  	Devices []*Device `protobuf:"bytes,1,rep,name=devices,proto3" json:"devices,omitempty"`
   499  }
   500  
   501  func (m *GetDevicesResponse) Reset()         { *m = GetDevicesResponse{} }
   502  func (m *GetDevicesResponse) String() string { return proto.CompactTextString(m) }
   503  func (*GetDevicesResponse) ProtoMessage()    {}
   504  func (*GetDevicesResponse) Descriptor() ([]byte, []int) {
   505  	return fileDescriptor_7db16019df22577e, []int{5}
   506  }
   507  func (m *GetDevicesResponse) XXX_Unmarshal(b []byte) error {
   508  	return m.Unmarshal(b)
   509  }
   510  func (m *GetDevicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   511  	if deterministic {
   512  		return xxx_messageInfo_GetDevicesResponse.Marshal(b, m, deterministic)
   513  	} else {
   514  		b = b[:cap(b)]
   515  		n, err := m.MarshalToSizedBuffer(b)
   516  		if err != nil {
   517  			return nil, err
   518  		}
   519  		return b[:n], nil
   520  	}
   521  }
   522  func (m *GetDevicesResponse) XXX_Merge(src proto.Message) {
   523  	xxx_messageInfo_GetDevicesResponse.Merge(m, src)
   524  }
   525  func (m *GetDevicesResponse) XXX_Size() int {
   526  	return m.Size()
   527  }
   528  func (m *GetDevicesResponse) XXX_DiscardUnknown() {
   529  	xxx_messageInfo_GetDevicesResponse.DiscardUnknown(m)
   530  }
   531  
   532  var xxx_messageInfo_GetDevicesResponse proto.InternalMessageInfo
   533  
   534  func (m *GetDevicesResponse) GetDevices() []*Device {
   535  	if m != nil {
   536  		return m.Devices
   537  	}
   538  	return nil
   539  }
   540  
   541  type GetDeviceRequest struct {
   542  	ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,casttype=DeviceID" json:"id,omitempty"`
   543  }
   544  
   545  func (m *GetDeviceRequest) Reset()         { *m = GetDeviceRequest{} }
   546  func (m *GetDeviceRequest) String() string { return proto.CompactTextString(m) }
   547  func (*GetDeviceRequest) ProtoMessage()    {}
   548  func (*GetDeviceRequest) Descriptor() ([]byte, []int) {
   549  	return fileDescriptor_7db16019df22577e, []int{6}
   550  }
   551  func (m *GetDeviceRequest) XXX_Unmarshal(b []byte) error {
   552  	return m.Unmarshal(b)
   553  }
   554  func (m *GetDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   555  	if deterministic {
   556  		return xxx_messageInfo_GetDeviceRequest.Marshal(b, m, deterministic)
   557  	} else {
   558  		b = b[:cap(b)]
   559  		n, err := m.MarshalToSizedBuffer(b)
   560  		if err != nil {
   561  			return nil, err
   562  		}
   563  		return b[:n], nil
   564  	}
   565  }
   566  func (m *GetDeviceRequest) XXX_Merge(src proto.Message) {
   567  	xxx_messageInfo_GetDeviceRequest.Merge(m, src)
   568  }
   569  func (m *GetDeviceRequest) XXX_Size() int {
   570  	return m.Size()
   571  }
   572  func (m *GetDeviceRequest) XXX_DiscardUnknown() {
   573  	xxx_messageInfo_GetDeviceRequest.DiscardUnknown(m)
   574  }
   575  
   576  var xxx_messageInfo_GetDeviceRequest proto.InternalMessageInfo
   577  
   578  func (m *GetDeviceRequest) GetID() DeviceID {
   579  	if m != nil {
   580  		return m.ID
   581  	}
   582  	return ""
   583  }
   584  
   585  type GetDeviceResponse struct {
   586  	Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
   587  }
   588  
   589  func (m *GetDeviceResponse) Reset()         { *m = GetDeviceResponse{} }
   590  func (m *GetDeviceResponse) String() string { return proto.CompactTextString(m) }
   591  func (*GetDeviceResponse) ProtoMessage()    {}
   592  func (*GetDeviceResponse) Descriptor() ([]byte, []int) {
   593  	return fileDescriptor_7db16019df22577e, []int{7}
   594  }
   595  func (m *GetDeviceResponse) XXX_Unmarshal(b []byte) error {
   596  	return m.Unmarshal(b)
   597  }
   598  func (m *GetDeviceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   599  	if deterministic {
   600  		return xxx_messageInfo_GetDeviceResponse.Marshal(b, m, deterministic)
   601  	} else {
   602  		b = b[:cap(b)]
   603  		n, err := m.MarshalToSizedBuffer(b)
   604  		if err != nil {
   605  			return nil, err
   606  		}
   607  		return b[:n], nil
   608  	}
   609  }
   610  func (m *GetDeviceResponse) XXX_Merge(src proto.Message) {
   611  	xxx_messageInfo_GetDeviceResponse.Merge(m, src)
   612  }
   613  func (m *GetDeviceResponse) XXX_Size() int {
   614  	return m.Size()
   615  }
   616  func (m *GetDeviceResponse) XXX_DiscardUnknown() {
   617  	xxx_messageInfo_GetDeviceResponse.DiscardUnknown(m)
   618  }
   619  
   620  var xxx_messageInfo_GetDeviceResponse proto.InternalMessageInfo
   621  
   622  func (m *GetDeviceResponse) GetDevice() *Device {
   623  	if m != nil {
   624  		return m.Device
   625  	}
   626  	return nil
   627  }
   628  
   629  type AddDeviceRequest struct {
   630  	Device *Device `protobuf:"bytes,1,opt,name=device,proto3" json:"device,omitempty"`
   631  }
   632  
   633  func (m *AddDeviceRequest) Reset()         { *m = AddDeviceRequest{} }
   634  func (m *AddDeviceRequest) String() string { return proto.CompactTextString(m) }
   635  func (*AddDeviceRequest) ProtoMessage()    {}
   636  func (*AddDeviceRequest) Descriptor() ([]byte, []int) {
   637  	return fileDescriptor_7db16019df22577e, []int{8}
   638  }
   639  func (m *AddDeviceRequest) XXX_Unmarshal(b []byte) error {
   640  	return m.Unmarshal(b)
   641  }
   642  func (m *AddDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   643  	if deterministic {
   644  		return xxx_messageInfo_AddDeviceRequest.Marshal(b, m, deterministic)
   645  	} else {
   646  		b = b[:cap(b)]
   647  		n, err := m.MarshalToSizedBuffer(b)
   648  		if err != nil {
   649  			return nil, err
   650  		}
   651  		return b[:n], nil
   652  	}
   653  }
   654  func (m *AddDeviceRequest) XXX_Merge(src proto.Message) {
   655  	xxx_messageInfo_AddDeviceRequest.Merge(m, src)
   656  }
   657  func (m *AddDeviceRequest) XXX_Size() int {
   658  	return m.Size()
   659  }
   660  func (m *AddDeviceRequest) XXX_DiscardUnknown() {
   661  	xxx_messageInfo_AddDeviceRequest.DiscardUnknown(m)
   662  }
   663  
   664  var xxx_messageInfo_AddDeviceRequest proto.InternalMessageInfo
   665  
   666  func (m *AddDeviceRequest) GetDevice() *Device {
   667  	if m != nil {
   668  		return m.Device
   669  	}
   670  	return nil
   671  }
   672  
   673  type AddDeviceResponse struct {
   674  }
   675  
   676  func (m *AddDeviceResponse) Reset()         { *m = AddDeviceResponse{} }
   677  func (m *AddDeviceResponse) String() string { return proto.CompactTextString(m) }
   678  func (*AddDeviceResponse) ProtoMessage()    {}
   679  func (*AddDeviceResponse) Descriptor() ([]byte, []int) {
   680  	return fileDescriptor_7db16019df22577e, []int{9}
   681  }
   682  func (m *AddDeviceResponse) XXX_Unmarshal(b []byte) error {
   683  	return m.Unmarshal(b)
   684  }
   685  func (m *AddDeviceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   686  	if deterministic {
   687  		return xxx_messageInfo_AddDeviceResponse.Marshal(b, m, deterministic)
   688  	} else {
   689  		b = b[:cap(b)]
   690  		n, err := m.MarshalToSizedBuffer(b)
   691  		if err != nil {
   692  			return nil, err
   693  		}
   694  		return b[:n], nil
   695  	}
   696  }
   697  func (m *AddDeviceResponse) XXX_Merge(src proto.Message) {
   698  	xxx_messageInfo_AddDeviceResponse.Merge(m, src)
   699  }
   700  func (m *AddDeviceResponse) XXX_Size() int {
   701  	return m.Size()
   702  }
   703  func (m *AddDeviceResponse) XXX_DiscardUnknown() {
   704  	xxx_messageInfo_AddDeviceResponse.DiscardUnknown(m)
   705  }
   706  
   707  var xxx_messageInfo_AddDeviceResponse proto.InternalMessageInfo
   708  
   709  type RemoveDeviceRequest struct {
   710  	ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,casttype=DeviceID" json:"id,omitempty"`
   711  }
   712  
   713  func (m *RemoveDeviceRequest) Reset()         { *m = RemoveDeviceRequest{} }
   714  func (m *RemoveDeviceRequest) String() string { return proto.CompactTextString(m) }
   715  func (*RemoveDeviceRequest) ProtoMessage()    {}
   716  func (*RemoveDeviceRequest) Descriptor() ([]byte, []int) {
   717  	return fileDescriptor_7db16019df22577e, []int{10}
   718  }
   719  func (m *RemoveDeviceRequest) XXX_Unmarshal(b []byte) error {
   720  	return m.Unmarshal(b)
   721  }
   722  func (m *RemoveDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   723  	if deterministic {
   724  		return xxx_messageInfo_RemoveDeviceRequest.Marshal(b, m, deterministic)
   725  	} else {
   726  		b = b[:cap(b)]
   727  		n, err := m.MarshalToSizedBuffer(b)
   728  		if err != nil {
   729  			return nil, err
   730  		}
   731  		return b[:n], nil
   732  	}
   733  }
   734  func (m *RemoveDeviceRequest) XXX_Merge(src proto.Message) {
   735  	xxx_messageInfo_RemoveDeviceRequest.Merge(m, src)
   736  }
   737  func (m *RemoveDeviceRequest) XXX_Size() int {
   738  	return m.Size()
   739  }
   740  func (m *RemoveDeviceRequest) XXX_DiscardUnknown() {
   741  	xxx_messageInfo_RemoveDeviceRequest.DiscardUnknown(m)
   742  }
   743  
   744  var xxx_messageInfo_RemoveDeviceRequest proto.InternalMessageInfo
   745  
   746  func (m *RemoveDeviceRequest) GetID() DeviceID {
   747  	if m != nil {
   748  		return m.ID
   749  	}
   750  	return ""
   751  }
   752  
   753  type RemoveDeviceResponse struct {
   754  }
   755  
   756  func (m *RemoveDeviceResponse) Reset()         { *m = RemoveDeviceResponse{} }
   757  func (m *RemoveDeviceResponse) String() string { return proto.CompactTextString(m) }
   758  func (*RemoveDeviceResponse) ProtoMessage()    {}
   759  func (*RemoveDeviceResponse) Descriptor() ([]byte, []int) {
   760  	return fileDescriptor_7db16019df22577e, []int{11}
   761  }
   762  func (m *RemoveDeviceResponse) XXX_Unmarshal(b []byte) error {
   763  	return m.Unmarshal(b)
   764  }
   765  func (m *RemoveDeviceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   766  	if deterministic {
   767  		return xxx_messageInfo_RemoveDeviceResponse.Marshal(b, m, deterministic)
   768  	} else {
   769  		b = b[:cap(b)]
   770  		n, err := m.MarshalToSizedBuffer(b)
   771  		if err != nil {
   772  			return nil, err
   773  		}
   774  		return b[:n], nil
   775  	}
   776  }
   777  func (m *RemoveDeviceResponse) XXX_Merge(src proto.Message) {
   778  	xxx_messageInfo_RemoveDeviceResponse.Merge(m, src)
   779  }
   780  func (m *RemoveDeviceResponse) XXX_Size() int {
   781  	return m.Size()
   782  }
   783  func (m *RemoveDeviceResponse) XXX_DiscardUnknown() {
   784  	xxx_messageInfo_RemoveDeviceResponse.DiscardUnknown(m)
   785  }
   786  
   787  var xxx_messageInfo_RemoveDeviceResponse proto.InternalMessageInfo
   788  
   789  type StopDeviceRequest struct {
   790  	ID   DeviceID `protobuf:"bytes,1,opt,name=id,proto3,casttype=DeviceID" json:"id,omitempty"`
   791  	Mode StopMode `protobuf:"varint,2,opt,name=mode,proto3,enum=onos.fabricsim.StopMode" json:"mode,omitempty"`
   792  }
   793  
   794  func (m *StopDeviceRequest) Reset()         { *m = StopDeviceRequest{} }
   795  func (m *StopDeviceRequest) String() string { return proto.CompactTextString(m) }
   796  func (*StopDeviceRequest) ProtoMessage()    {}
   797  func (*StopDeviceRequest) Descriptor() ([]byte, []int) {
   798  	return fileDescriptor_7db16019df22577e, []int{12}
   799  }
   800  func (m *StopDeviceRequest) XXX_Unmarshal(b []byte) error {
   801  	return m.Unmarshal(b)
   802  }
   803  func (m *StopDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   804  	if deterministic {
   805  		return xxx_messageInfo_StopDeviceRequest.Marshal(b, m, deterministic)
   806  	} else {
   807  		b = b[:cap(b)]
   808  		n, err := m.MarshalToSizedBuffer(b)
   809  		if err != nil {
   810  			return nil, err
   811  		}
   812  		return b[:n], nil
   813  	}
   814  }
   815  func (m *StopDeviceRequest) XXX_Merge(src proto.Message) {
   816  	xxx_messageInfo_StopDeviceRequest.Merge(m, src)
   817  }
   818  func (m *StopDeviceRequest) XXX_Size() int {
   819  	return m.Size()
   820  }
   821  func (m *StopDeviceRequest) XXX_DiscardUnknown() {
   822  	xxx_messageInfo_StopDeviceRequest.DiscardUnknown(m)
   823  }
   824  
   825  var xxx_messageInfo_StopDeviceRequest proto.InternalMessageInfo
   826  
   827  func (m *StopDeviceRequest) GetID() DeviceID {
   828  	if m != nil {
   829  		return m.ID
   830  	}
   831  	return ""
   832  }
   833  
   834  func (m *StopDeviceRequest) GetMode() StopMode {
   835  	if m != nil {
   836  		return m.Mode
   837  	}
   838  	return StopMode_ORDERLY_STOP
   839  }
   840  
   841  type StopDeviceResponse struct {
   842  }
   843  
   844  func (m *StopDeviceResponse) Reset()         { *m = StopDeviceResponse{} }
   845  func (m *StopDeviceResponse) String() string { return proto.CompactTextString(m) }
   846  func (*StopDeviceResponse) ProtoMessage()    {}
   847  func (*StopDeviceResponse) Descriptor() ([]byte, []int) {
   848  	return fileDescriptor_7db16019df22577e, []int{13}
   849  }
   850  func (m *StopDeviceResponse) XXX_Unmarshal(b []byte) error {
   851  	return m.Unmarshal(b)
   852  }
   853  func (m *StopDeviceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   854  	if deterministic {
   855  		return xxx_messageInfo_StopDeviceResponse.Marshal(b, m, deterministic)
   856  	} else {
   857  		b = b[:cap(b)]
   858  		n, err := m.MarshalToSizedBuffer(b)
   859  		if err != nil {
   860  			return nil, err
   861  		}
   862  		return b[:n], nil
   863  	}
   864  }
   865  func (m *StopDeviceResponse) XXX_Merge(src proto.Message) {
   866  	xxx_messageInfo_StopDeviceResponse.Merge(m, src)
   867  }
   868  func (m *StopDeviceResponse) XXX_Size() int {
   869  	return m.Size()
   870  }
   871  func (m *StopDeviceResponse) XXX_DiscardUnknown() {
   872  	xxx_messageInfo_StopDeviceResponse.DiscardUnknown(m)
   873  }
   874  
   875  var xxx_messageInfo_StopDeviceResponse proto.InternalMessageInfo
   876  
   877  type StartDeviceRequest struct {
   878  	ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,casttype=DeviceID" json:"id,omitempty"`
   879  }
   880  
   881  func (m *StartDeviceRequest) Reset()         { *m = StartDeviceRequest{} }
   882  func (m *StartDeviceRequest) String() string { return proto.CompactTextString(m) }
   883  func (*StartDeviceRequest) ProtoMessage()    {}
   884  func (*StartDeviceRequest) Descriptor() ([]byte, []int) {
   885  	return fileDescriptor_7db16019df22577e, []int{14}
   886  }
   887  func (m *StartDeviceRequest) XXX_Unmarshal(b []byte) error {
   888  	return m.Unmarshal(b)
   889  }
   890  func (m *StartDeviceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   891  	if deterministic {
   892  		return xxx_messageInfo_StartDeviceRequest.Marshal(b, m, deterministic)
   893  	} else {
   894  		b = b[:cap(b)]
   895  		n, err := m.MarshalToSizedBuffer(b)
   896  		if err != nil {
   897  			return nil, err
   898  		}
   899  		return b[:n], nil
   900  	}
   901  }
   902  func (m *StartDeviceRequest) XXX_Merge(src proto.Message) {
   903  	xxx_messageInfo_StartDeviceRequest.Merge(m, src)
   904  }
   905  func (m *StartDeviceRequest) XXX_Size() int {
   906  	return m.Size()
   907  }
   908  func (m *StartDeviceRequest) XXX_DiscardUnknown() {
   909  	xxx_messageInfo_StartDeviceRequest.DiscardUnknown(m)
   910  }
   911  
   912  var xxx_messageInfo_StartDeviceRequest proto.InternalMessageInfo
   913  
   914  func (m *StartDeviceRequest) GetID() DeviceID {
   915  	if m != nil {
   916  		return m.ID
   917  	}
   918  	return ""
   919  }
   920  
   921  type StartDeviceResponse struct {
   922  }
   923  
   924  func (m *StartDeviceResponse) Reset()         { *m = StartDeviceResponse{} }
   925  func (m *StartDeviceResponse) String() string { return proto.CompactTextString(m) }
   926  func (*StartDeviceResponse) ProtoMessage()    {}
   927  func (*StartDeviceResponse) Descriptor() ([]byte, []int) {
   928  	return fileDescriptor_7db16019df22577e, []int{15}
   929  }
   930  func (m *StartDeviceResponse) XXX_Unmarshal(b []byte) error {
   931  	return m.Unmarshal(b)
   932  }
   933  func (m *StartDeviceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   934  	if deterministic {
   935  		return xxx_messageInfo_StartDeviceResponse.Marshal(b, m, deterministic)
   936  	} else {
   937  		b = b[:cap(b)]
   938  		n, err := m.MarshalToSizedBuffer(b)
   939  		if err != nil {
   940  			return nil, err
   941  		}
   942  		return b[:n], nil
   943  	}
   944  }
   945  func (m *StartDeviceResponse) XXX_Merge(src proto.Message) {
   946  	xxx_messageInfo_StartDeviceResponse.Merge(m, src)
   947  }
   948  func (m *StartDeviceResponse) XXX_Size() int {
   949  	return m.Size()
   950  }
   951  func (m *StartDeviceResponse) XXX_DiscardUnknown() {
   952  	xxx_messageInfo_StartDeviceResponse.DiscardUnknown(m)
   953  }
   954  
   955  var xxx_messageInfo_StartDeviceResponse proto.InternalMessageInfo
   956  
   957  type DisablePortRequest struct {
   958  	ID   PortID   `protobuf:"bytes,1,opt,name=id,proto3,casttype=PortID" json:"id,omitempty"`
   959  	Mode StopMode `protobuf:"varint,2,opt,name=mode,proto3,enum=onos.fabricsim.StopMode" json:"mode,omitempty"`
   960  }
   961  
   962  func (m *DisablePortRequest) Reset()         { *m = DisablePortRequest{} }
   963  func (m *DisablePortRequest) String() string { return proto.CompactTextString(m) }
   964  func (*DisablePortRequest) ProtoMessage()    {}
   965  func (*DisablePortRequest) Descriptor() ([]byte, []int) {
   966  	return fileDescriptor_7db16019df22577e, []int{16}
   967  }
   968  func (m *DisablePortRequest) XXX_Unmarshal(b []byte) error {
   969  	return m.Unmarshal(b)
   970  }
   971  func (m *DisablePortRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   972  	if deterministic {
   973  		return xxx_messageInfo_DisablePortRequest.Marshal(b, m, deterministic)
   974  	} else {
   975  		b = b[:cap(b)]
   976  		n, err := m.MarshalToSizedBuffer(b)
   977  		if err != nil {
   978  			return nil, err
   979  		}
   980  		return b[:n], nil
   981  	}
   982  }
   983  func (m *DisablePortRequest) XXX_Merge(src proto.Message) {
   984  	xxx_messageInfo_DisablePortRequest.Merge(m, src)
   985  }
   986  func (m *DisablePortRequest) XXX_Size() int {
   987  	return m.Size()
   988  }
   989  func (m *DisablePortRequest) XXX_DiscardUnknown() {
   990  	xxx_messageInfo_DisablePortRequest.DiscardUnknown(m)
   991  }
   992  
   993  var xxx_messageInfo_DisablePortRequest proto.InternalMessageInfo
   994  
   995  func (m *DisablePortRequest) GetID() PortID {
   996  	if m != nil {
   997  		return m.ID
   998  	}
   999  	return ""
  1000  }
  1001  
  1002  func (m *DisablePortRequest) GetMode() StopMode {
  1003  	if m != nil {
  1004  		return m.Mode
  1005  	}
  1006  	return StopMode_ORDERLY_STOP
  1007  }
  1008  
  1009  type DisablePortResponse struct {
  1010  }
  1011  
  1012  func (m *DisablePortResponse) Reset()         { *m = DisablePortResponse{} }
  1013  func (m *DisablePortResponse) String() string { return proto.CompactTextString(m) }
  1014  func (*DisablePortResponse) ProtoMessage()    {}
  1015  func (*DisablePortResponse) Descriptor() ([]byte, []int) {
  1016  	return fileDescriptor_7db16019df22577e, []int{17}
  1017  }
  1018  func (m *DisablePortResponse) XXX_Unmarshal(b []byte) error {
  1019  	return m.Unmarshal(b)
  1020  }
  1021  func (m *DisablePortResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1022  	if deterministic {
  1023  		return xxx_messageInfo_DisablePortResponse.Marshal(b, m, deterministic)
  1024  	} else {
  1025  		b = b[:cap(b)]
  1026  		n, err := m.MarshalToSizedBuffer(b)
  1027  		if err != nil {
  1028  			return nil, err
  1029  		}
  1030  		return b[:n], nil
  1031  	}
  1032  }
  1033  func (m *DisablePortResponse) XXX_Merge(src proto.Message) {
  1034  	xxx_messageInfo_DisablePortResponse.Merge(m, src)
  1035  }
  1036  func (m *DisablePortResponse) XXX_Size() int {
  1037  	return m.Size()
  1038  }
  1039  func (m *DisablePortResponse) XXX_DiscardUnknown() {
  1040  	xxx_messageInfo_DisablePortResponse.DiscardUnknown(m)
  1041  }
  1042  
  1043  var xxx_messageInfo_DisablePortResponse proto.InternalMessageInfo
  1044  
  1045  type EnablePortRequest struct {
  1046  	ID PortID `protobuf:"bytes,1,opt,name=id,proto3,casttype=PortID" json:"id,omitempty"`
  1047  }
  1048  
  1049  func (m *EnablePortRequest) Reset()         { *m = EnablePortRequest{} }
  1050  func (m *EnablePortRequest) String() string { return proto.CompactTextString(m) }
  1051  func (*EnablePortRequest) ProtoMessage()    {}
  1052  func (*EnablePortRequest) Descriptor() ([]byte, []int) {
  1053  	return fileDescriptor_7db16019df22577e, []int{18}
  1054  }
  1055  func (m *EnablePortRequest) XXX_Unmarshal(b []byte) error {
  1056  	return m.Unmarshal(b)
  1057  }
  1058  func (m *EnablePortRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1059  	if deterministic {
  1060  		return xxx_messageInfo_EnablePortRequest.Marshal(b, m, deterministic)
  1061  	} else {
  1062  		b = b[:cap(b)]
  1063  		n, err := m.MarshalToSizedBuffer(b)
  1064  		if err != nil {
  1065  			return nil, err
  1066  		}
  1067  		return b[:n], nil
  1068  	}
  1069  }
  1070  func (m *EnablePortRequest) XXX_Merge(src proto.Message) {
  1071  	xxx_messageInfo_EnablePortRequest.Merge(m, src)
  1072  }
  1073  func (m *EnablePortRequest) XXX_Size() int {
  1074  	return m.Size()
  1075  }
  1076  func (m *EnablePortRequest) XXX_DiscardUnknown() {
  1077  	xxx_messageInfo_EnablePortRequest.DiscardUnknown(m)
  1078  }
  1079  
  1080  var xxx_messageInfo_EnablePortRequest proto.InternalMessageInfo
  1081  
  1082  func (m *EnablePortRequest) GetID() PortID {
  1083  	if m != nil {
  1084  		return m.ID
  1085  	}
  1086  	return ""
  1087  }
  1088  
  1089  type EnablePortResponse struct {
  1090  }
  1091  
  1092  func (m *EnablePortResponse) Reset()         { *m = EnablePortResponse{} }
  1093  func (m *EnablePortResponse) String() string { return proto.CompactTextString(m) }
  1094  func (*EnablePortResponse) ProtoMessage()    {}
  1095  func (*EnablePortResponse) Descriptor() ([]byte, []int) {
  1096  	return fileDescriptor_7db16019df22577e, []int{19}
  1097  }
  1098  func (m *EnablePortResponse) XXX_Unmarshal(b []byte) error {
  1099  	return m.Unmarshal(b)
  1100  }
  1101  func (m *EnablePortResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1102  	if deterministic {
  1103  		return xxx_messageInfo_EnablePortResponse.Marshal(b, m, deterministic)
  1104  	} else {
  1105  		b = b[:cap(b)]
  1106  		n, err := m.MarshalToSizedBuffer(b)
  1107  		if err != nil {
  1108  			return nil, err
  1109  		}
  1110  		return b[:n], nil
  1111  	}
  1112  }
  1113  func (m *EnablePortResponse) XXX_Merge(src proto.Message) {
  1114  	xxx_messageInfo_EnablePortResponse.Merge(m, src)
  1115  }
  1116  func (m *EnablePortResponse) XXX_Size() int {
  1117  	return m.Size()
  1118  }
  1119  func (m *EnablePortResponse) XXX_DiscardUnknown() {
  1120  	xxx_messageInfo_EnablePortResponse.DiscardUnknown(m)
  1121  }
  1122  
  1123  var xxx_messageInfo_EnablePortResponse proto.InternalMessageInfo
  1124  
  1125  type EmitLLDPPacketRequest struct {
  1126  	PortID PortID `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3,casttype=PortID" json:"port_id,omitempty"`
  1127  	Packet []byte `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet,omitempty"`
  1128  }
  1129  
  1130  func (m *EmitLLDPPacketRequest) Reset()         { *m = EmitLLDPPacketRequest{} }
  1131  func (m *EmitLLDPPacketRequest) String() string { return proto.CompactTextString(m) }
  1132  func (*EmitLLDPPacketRequest) ProtoMessage()    {}
  1133  func (*EmitLLDPPacketRequest) Descriptor() ([]byte, []int) {
  1134  	return fileDescriptor_7db16019df22577e, []int{20}
  1135  }
  1136  func (m *EmitLLDPPacketRequest) XXX_Unmarshal(b []byte) error {
  1137  	return m.Unmarshal(b)
  1138  }
  1139  func (m *EmitLLDPPacketRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1140  	if deterministic {
  1141  		return xxx_messageInfo_EmitLLDPPacketRequest.Marshal(b, m, deterministic)
  1142  	} else {
  1143  		b = b[:cap(b)]
  1144  		n, err := m.MarshalToSizedBuffer(b)
  1145  		if err != nil {
  1146  			return nil, err
  1147  		}
  1148  		return b[:n], nil
  1149  	}
  1150  }
  1151  func (m *EmitLLDPPacketRequest) XXX_Merge(src proto.Message) {
  1152  	xxx_messageInfo_EmitLLDPPacketRequest.Merge(m, src)
  1153  }
  1154  func (m *EmitLLDPPacketRequest) XXX_Size() int {
  1155  	return m.Size()
  1156  }
  1157  func (m *EmitLLDPPacketRequest) XXX_DiscardUnknown() {
  1158  	xxx_messageInfo_EmitLLDPPacketRequest.DiscardUnknown(m)
  1159  }
  1160  
  1161  var xxx_messageInfo_EmitLLDPPacketRequest proto.InternalMessageInfo
  1162  
  1163  func (m *EmitLLDPPacketRequest) GetPortID() PortID {
  1164  	if m != nil {
  1165  		return m.PortID
  1166  	}
  1167  	return ""
  1168  }
  1169  
  1170  func (m *EmitLLDPPacketRequest) GetPacket() []byte {
  1171  	if m != nil {
  1172  		return m.Packet
  1173  	}
  1174  	return nil
  1175  }
  1176  
  1177  type EmitLLDPPacketResponse struct {
  1178  }
  1179  
  1180  func (m *EmitLLDPPacketResponse) Reset()         { *m = EmitLLDPPacketResponse{} }
  1181  func (m *EmitLLDPPacketResponse) String() string { return proto.CompactTextString(m) }
  1182  func (*EmitLLDPPacketResponse) ProtoMessage()    {}
  1183  func (*EmitLLDPPacketResponse) Descriptor() ([]byte, []int) {
  1184  	return fileDescriptor_7db16019df22577e, []int{21}
  1185  }
  1186  func (m *EmitLLDPPacketResponse) XXX_Unmarshal(b []byte) error {
  1187  	return m.Unmarshal(b)
  1188  }
  1189  func (m *EmitLLDPPacketResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1190  	if deterministic {
  1191  		return xxx_messageInfo_EmitLLDPPacketResponse.Marshal(b, m, deterministic)
  1192  	} else {
  1193  		b = b[:cap(b)]
  1194  		n, err := m.MarshalToSizedBuffer(b)
  1195  		if err != nil {
  1196  			return nil, err
  1197  		}
  1198  		return b[:n], nil
  1199  	}
  1200  }
  1201  func (m *EmitLLDPPacketResponse) XXX_Merge(src proto.Message) {
  1202  	xxx_messageInfo_EmitLLDPPacketResponse.Merge(m, src)
  1203  }
  1204  func (m *EmitLLDPPacketResponse) XXX_Size() int {
  1205  	return m.Size()
  1206  }
  1207  func (m *EmitLLDPPacketResponse) XXX_DiscardUnknown() {
  1208  	xxx_messageInfo_EmitLLDPPacketResponse.DiscardUnknown(m)
  1209  }
  1210  
  1211  var xxx_messageInfo_EmitLLDPPacketResponse proto.InternalMessageInfo
  1212  
  1213  func init() {
  1214  	proto.RegisterEnum("onos.fabricsim.DeviceType", DeviceType_name, DeviceType_value)
  1215  	proto.RegisterEnum("onos.fabricsim.StopMode", StopMode_name, StopMode_value)
  1216  	proto.RegisterType((*Device)(nil), "onos.fabricsim.Device")
  1217  	proto.RegisterType((*Port)(nil), "onos.fabricsim.Port")
  1218  	proto.RegisterType((*PipelineInfo)(nil), "onos.fabricsim.PipelineInfo")
  1219  	proto.RegisterType((*EntitiesInfo)(nil), "onos.fabricsim.EntitiesInfo")
  1220  	proto.RegisterType((*GetDevicesRequest)(nil), "onos.fabricsim.GetDevicesRequest")
  1221  	proto.RegisterType((*GetDevicesResponse)(nil), "onos.fabricsim.GetDevicesResponse")
  1222  	proto.RegisterType((*GetDeviceRequest)(nil), "onos.fabricsim.GetDeviceRequest")
  1223  	proto.RegisterType((*GetDeviceResponse)(nil), "onos.fabricsim.GetDeviceResponse")
  1224  	proto.RegisterType((*AddDeviceRequest)(nil), "onos.fabricsim.AddDeviceRequest")
  1225  	proto.RegisterType((*AddDeviceResponse)(nil), "onos.fabricsim.AddDeviceResponse")
  1226  	proto.RegisterType((*RemoveDeviceRequest)(nil), "onos.fabricsim.RemoveDeviceRequest")
  1227  	proto.RegisterType((*RemoveDeviceResponse)(nil), "onos.fabricsim.RemoveDeviceResponse")
  1228  	proto.RegisterType((*StopDeviceRequest)(nil), "onos.fabricsim.StopDeviceRequest")
  1229  	proto.RegisterType((*StopDeviceResponse)(nil), "onos.fabricsim.StopDeviceResponse")
  1230  	proto.RegisterType((*StartDeviceRequest)(nil), "onos.fabricsim.StartDeviceRequest")
  1231  	proto.RegisterType((*StartDeviceResponse)(nil), "onos.fabricsim.StartDeviceResponse")
  1232  	proto.RegisterType((*DisablePortRequest)(nil), "onos.fabricsim.DisablePortRequest")
  1233  	proto.RegisterType((*DisablePortResponse)(nil), "onos.fabricsim.DisablePortResponse")
  1234  	proto.RegisterType((*EnablePortRequest)(nil), "onos.fabricsim.EnablePortRequest")
  1235  	proto.RegisterType((*EnablePortResponse)(nil), "onos.fabricsim.EnablePortResponse")
  1236  	proto.RegisterType((*EmitLLDPPacketRequest)(nil), "onos.fabricsim.EmitLLDPPacketRequest")
  1237  	proto.RegisterType((*EmitLLDPPacketResponse)(nil), "onos.fabricsim.EmitLLDPPacketResponse")
  1238  }
  1239  
  1240  func init() { proto.RegisterFile("onos/fabricsim/devices.proto", fileDescriptor_7db16019df22577e) }
  1241  
  1242  var fileDescriptor_7db16019df22577e = []byte{
  1243  	// 1099 bytes of a gzipped FileDescriptorProto
  1244  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x73, 0xda, 0x46,
  1245  	0x14, 0xb7, 0x0c, 0x08, 0x78, 0x06, 0x07, 0xaf, 0xb1, 0xa3, 0x61, 0x32, 0x18, 0x2b, 0xfd, 0x43,
  1246  	0xd3, 0x94, 0x74, 0x5c, 0xb7, 0x4d, 0x7b, 0x33, 0xe0, 0x3a, 0xcc, 0xb8, 0x31, 0xb3, 0xb8, 0xed,
  1247  	0xe4, 0x52, 0x0d, 0x96, 0xd6, 0xee, 0x4e, 0x40, 0xab, 0x6a, 0xe5, 0xcc, 0xa4, 0x9f, 0xa2, 0x9f,
  1248  	0xa0, 0xf7, 0x1e, 0xfa, 0x3d, 0x7a, 0xcc, 0xb1, 0x27, 0x4f, 0x07, 0x9f, 0xfa, 0x15, 0x7a, 0xea,
  1249  	0xec, 0x1f, 0x84, 0x40, 0xc4, 0xb1, 0x7b, 0x61, 0xb4, 0x6f, 0x7f, 0xbf, 0xdf, 0x5b, 0xbd, 0xb7,
  1250  	0xbf, 0x27, 0xe0, 0x01, 0xf3, 0x19, 0x7f, 0x72, 0x3e, 0x3c, 0x0b, 0xa9, 0xcb, 0xe9, 0xf8, 0x89,
  1251  	0x47, 0x5e, 0x51, 0x97, 0xf0, 0x56, 0x10, 0xb2, 0x88, 0xa1, 0x75, 0xb1, 0xdb, 0x8a, 0x77, 0x6b,
  1252  	0xd5, 0x0b, 0x76, 0xc1, 0xe4, 0xd6, 0x13, 0xf1, 0xa4, 0x50, 0xb5, 0xaa, 0xd4, 0x18, 0x53, 0xee,
  1253  	0xca, 0x1f, 0x15, 0xb5, 0xff, 0xc9, 0x80, 0xd9, 0x95, 0x6a, 0xc8, 0x86, 0x55, 0xea, 0x59, 0x46,
  1254  	0xc3, 0x68, 0x16, 0xdb, 0x68, 0x72, 0xb5, 0xb3, 0xda, 0xeb, 0xfe, 0x7b, 0xb5, 0x53, 0x50, 0xbb,
  1255  	0xbd, 0x2e, 0x5e, 0xa5, 0x1e, 0x6a, 0x41, 0x36, 0x7a, 0x1d, 0x10, 0x6b, 0xb5, 0x61, 0x34, 0xd7,
  1256  	0xf7, 0x6a, 0xad, 0xf9, 0xcc, 0x2d, 0x85, 0x3d, 0x7d, 0x1d, 0x10, 0x2c, 0x71, 0xe8, 0x11, 0xe4,
  1257  	0x02, 0x16, 0x46, 0xdc, 0xca, 0x34, 0x32, 0xcd, 0xb5, 0xbd, 0xea, 0x22, 0xa1, 0xcf, 0xc2, 0x08,
  1258  	0x2b, 0x08, 0xda, 0x85, 0x92, 0xcb, 0xfc, 0x28, 0x64, 0x23, 0x47, 0x04, 0xac, 0x6c, 0xc3, 0x68,
  1259  	0xe6, 0xf0, 0x9a, 0x8e, 0x09, 0x24, 0x7a, 0x0c, 0xe0, 0xfe, 0x34, 0xe4, 0x9c, 0x72, 0x87, 0x7a,
  1260  	0x56, 0xae, 0x61, 0x34, 0xb3, 0xed, 0xf2, 0xe4, 0x6a, 0xa7, 0xd8, 0x51, 0xd1, 0x5e, 0x17, 0x17,
  1261  	0x35, 0xa0, 0xe7, 0xa1, 0x03, 0x28, 0x07, 0x34, 0x20, 0x23, 0xea, 0x13, 0x87, 0xfa, 0xe7, 0xcc,
  1262  	0x32, 0x1b, 0x46, 0x73, 0x6d, 0xef, 0x41, 0xea, 0x10, 0x1a, 0xd4, 0xf3, 0xcf, 0x19, 0x2e, 0x05,
  1263  	0x89, 0x15, 0xfa, 0x08, 0x32, 0x01, 0xe3, 0x56, 0x5e, 0x12, 0xef, 0x2b, 0xa2, 0xac, 0xde, 0x51,
  1264  	0x48, 0xbd, 0x3e, 0xe3, 0x34, 0xa2, 0xcc, 0xc7, 0x02, 0x83, 0xbe, 0x04, 0x71, 0x54, 0x9f, 0xb8,
  1265  	0x22, 0xc4, 0xad, 0x82, 0x7c, 0xe1, 0xad, 0x04, 0xa5, 0x13, 0xef, 0xe2, 0x24, 0x12, 0x7d, 0x0c,
  1266  	0x1b, 0x11, 0x8b, 0x86, 0x23, 0x27, 0x49, 0x2f, 0xca, 0x97, 0xaf, 0xc8, 0x8d, 0x4e, 0x02, 0xfc,
  1267  	0x35, 0x14, 0x28, 0x73, 0x78, 0x34, 0x8c, 0xb8, 0x05, 0xf2, 0x54, 0x28, 0x91, 0xa2, 0x77, 0x32,
  1268  	0x10, 0x3b, 0xed, 0xb5, 0xc9, 0xd5, 0x4e, 0x5e, 0x2f, 0x70, 0x9e, 0x32, 0xf9, 0x60, 0xff, 0x61,
  1269  	0x40, 0x56, 0x96, 0xb1, 0x91, 0xe8, 0x74, 0x25, 0xee, 0xb4, 0x29, 0xf6, 0x74, 0x9f, 0x11, 0x64,
  1270  	0xfd, 0xe1, 0x98, 0x58, 0x19, 0x81, 0xc1, 0xf2, 0x19, 0x6d, 0x83, 0xe9, 0x5f, 0x8e, 0xcf, 0x48,
  1271  	0x28, 0x3b, 0x53, 0xc6, 0x7a, 0x85, 0x3e, 0x84, 0x7b, 0xd4, 0x8f, 0x48, 0xe8, 0x0f, 0x47, 0x8e,
  1272  	0x06, 0xe4, 0x24, 0x60, 0x7d, 0x1a, 0x7e, 0xae, 0x80, 0x55, 0xc8, 0xf1, 0x80, 0x10, 0x4f, 0xf6,
  1273  	0xa1, 0x88, 0xd5, 0x02, 0x59, 0x90, 0x27, 0xfe, 0xf0, 0x6c, 0x44, 0x3c, 0x59, 0xe6, 0x02, 0x9e,
  1274  	0x2e, 0xed, 0xdf, 0x33, 0x50, 0x4a, 0xf6, 0x46, 0x9c, 0xc0, 0x65, 0xec, 0x25, 0x25, 0xf2, 0xec,
  1275  	0x59, 0xac, 0x57, 0xe8, 0x3e, 0xe4, 0x83, 0x7d, 0xd5, 0x62, 0x71, 0x31, 0x4b, 0xd8, 0x0c, 0xf6,
  1276  	0x25, 0x61, 0x1f, 0xcc, 0x48, 0x68, 0x4d, 0xef, 0x5f, 0xaa, 0xf5, 0x87, 0x7e, 0x44, 0x23, 0x4a,
  1277  	0xb8, 0x6c, 0xbd, 0xc6, 0xa2, 0xa7, 0x50, 0x70, 0xd9, 0xa5, 0x38, 0x3b, 0xb7, 0xb2, 0xb7, 0xe0,
  1278  	0xc5, 0x68, 0x91, 0x6f, 0x4c, 0x24, 0x2f, 0x77, 0x9b, 0x7c, 0x0a, 0x2b, 0x58, 0x17, 0x21, 0xbb,
  1279  	0x0c, 0xb8, 0x65, 0xde, 0x86, 0xa5, 0xb0, 0xe8, 0x08, 0x2a, 0xe3, 0xcb, 0x51, 0x44, 0xdd, 0x21,
  1280  	0x8f, 0x1c, 0xcd, 0xcf, 0xdf, 0x82, 0x7f, 0x2f, 0x66, 0x1d, 0x29, 0xa1, 0x0e, 0xac, 0xbb, 0x23,
  1281  	0xe6, 0x13, 0x87, 0x13, 0xce, 0x13, 0x77, 0xf7, 0x66, 0x99, 0xb2, 0xe4, 0x0c, 0x34, 0xc5, 0x7e,
  1282  	0x0e, 0xa5, 0xe4, 0x36, 0xda, 0x8e, 0xaf, 0x58, 0xb9, 0x6d, 0xaa, 0x2b, 0x36, 0xbd, 0x58, 0x9c,
  1283  	0xfe, 0xa2, 0x06, 0x48, 0x19, 0xcb, 0xe7, 0x65, 0x97, 0xcd, 0xde, 0x84, 0x8d, 0x23, 0x12, 0xa9,
  1284  	0x79, 0xc2, 0x31, 0xf9, 0xf9, 0x92, 0xf0, 0xc8, 0xfe, 0x06, 0x50, 0x32, 0xc8, 0x03, 0xe6, 0x73,
  1285  	0x82, 0x3e, 0x85, 0xbc, 0x9e, 0x87, 0x96, 0x21, 0x0f, 0xbe, 0xbd, 0x7c, 0x2c, 0xe1, 0x29, 0xcc,
  1286  	0xfe, 0x02, 0x2a, 0xb1, 0x8e, 0xd6, 0xbe, 0xcd, 0xf4, 0xb3, 0x3b, 0x89, 0x43, 0xc5, 0xe9, 0x5b,
  1287  	0x60, 0x2a, 0x5d, 0x49, 0x7e, 0x7b, 0x76, 0x8d, 0xb2, 0xdb, 0x50, 0x39, 0xf0, 0xbc, 0xf9, 0xe4,
  1288  	0x77, 0xd5, 0xd8, 0x84, 0x8d, 0x84, 0x86, 0x3a, 0x88, 0xfd, 0x15, 0x6c, 0x62, 0x32, 0x66, 0xaf,
  1289  	0xc8, 0xdd, 0x5f, 0x6c, 0x1b, 0xaa, 0xf3, 0x54, 0x2d, 0x49, 0x60, 0x63, 0x10, 0xb1, 0xe0, 0xce,
  1290  	0x82, 0xe8, 0x31, 0x64, 0xc7, 0xcc, 0x9b, 0x7e, 0x27, 0xac, 0xc5, 0xd7, 0x11, 0xa2, 0xdf, 0x32,
  1291  	0x8f, 0x60, 0x89, 0xb2, 0xab, 0x80, 0x92, 0x69, 0x74, 0xf2, 0xa7, 0x22, 0x3a, 0x0c, 0xff, 0x47,
  1292  	0x9f, 0xb6, 0x60, 0x73, 0x8e, 0xa9, 0x05, 0x3d, 0x40, 0x5d, 0xca, 0x85, 0xc7, 0xe5, 0x67, 0x47,
  1293  	0x0b, 0xbe, 0x7b, 0x18, 0xde, 0xed, 0x65, 0xb6, 0x60, 0x73, 0x2e, 0x8b, 0x4e, 0xfe, 0x39, 0x6c,
  1294  	0x1c, 0xfa, 0x77, 0xce, 0x2d, 0x4a, 0x93, 0xa4, 0x69, 0xb1, 0x1f, 0x61, 0xeb, 0x70, 0x4c, 0xa3,
  1295  	0xe3, 0xe3, 0x6e, 0xbf, 0x3f, 0x74, 0x5f, 0x92, 0x58, 0xf0, 0x13, 0xc8, 0x8b, 0x6f, 0xa7, 0x13,
  1296  	0xab, 0x56, 0x27, 0xb1, 0x5e, 0x42, 0xd9, 0x14, 0xa0, 0x9e, 0x27, 0x06, 0x6a, 0x20, 0xf9, 0xf1,
  1297  	0xdc, 0x94, 0x2b, 0xdb, 0x82, 0xed, 0x45, 0x7d, 0x95, 0xf9, 0xd1, 0x2e, 0xc0, 0xec, 0x23, 0x8f,
  1298  	0x00, 0xcc, 0xc1, 0x0f, 0xbd, 0xd3, 0xce, 0xb3, 0xca, 0x0a, 0xca, 0x43, 0xa6, 0xd7, 0xff, 0xae,
  1299  	0x62, 0x3c, 0x6a, 0x41, 0x61, 0x5a, 0x12, 0x54, 0x81, 0xd2, 0x09, 0xee, 0x1e, 0xe2, 0xe3, 0x17,
  1300  	0xce, 0xe0, 0xf4, 0xa4, 0x5f, 0x59, 0x11, 0x91, 0xce, 0xb3, 0x83, 0x93, 0xd3, 0x5e, 0x47, 0x45,
  1301  	0x8c, 0xbd, 0xdf, 0x4c, 0x28, 0x2b, 0xcd, 0x01, 0x09, 0xe5, 0x3f, 0x91, 0x01, 0xc0, 0xcc, 0xe7,
  1302  	0x68, 0x77, 0xb1, 0xe0, 0xa9, 0xc1, 0x50, 0xb3, 0x6f, 0x82, 0x68, 0x9f, 0xf6, 0xa1, 0x18, 0x47,
  1303  	0x51, 0xe3, 0xad, 0x84, 0xa9, 0xe4, 0xee, 0x0d, 0x88, 0x99, 0x62, 0xec, 0xc2, 0xb4, 0xe2, 0xa2,
  1304  	0xc9, 0xd3, 0x8a, 0x29, 0x0b, 0xa3, 0x17, 0x50, 0x4a, 0xfa, 0x10, 0x3d, 0x5c, 0xa4, 0x2c, 0x31,
  1305  	0x78, 0xed, 0xbd, 0x9b, 0x41, 0x5a, 0x7a, 0x00, 0x30, 0xf3, 0x58, 0xba, 0xa6, 0x29, 0x9b, 0xa7,
  1306  	0x6b, 0x9a, 0xb6, 0x28, 0xfa, 0x1e, 0xd6, 0x12, 0x46, 0x43, 0x4b, 0x28, 0x8b, 0xfe, 0xad, 0x3d,
  1307  	0xbc, 0x11, 0x33, 0xd3, 0x4d, 0x78, 0x28, 0xad, 0x9b, 0xb6, 0x71, 0x5a, 0x77, 0x89, 0x09, 0x45,
  1308  	0x11, 0x66, 0x6e, 0x4a, 0x17, 0x21, 0x65, 0xd0, 0x74, 0x11, 0xd2, 0x66, 0x44, 0x0e, 0xac, 0xcf,
  1309  	0x9b, 0x05, 0xbd, 0x9f, 0x62, 0x2d, 0x33, 0x6b, 0xed, 0x83, 0x77, 0xc1, 0x54, 0x82, 0xb6, 0xf5,
  1310  	0xe7, 0xa4, 0x6e, 0xbc, 0x99, 0xd4, 0x8d, 0xbf, 0x27, 0x75, 0xe3, 0xd7, 0xeb, 0xfa, 0xca, 0x9b,
  1311  	0xeb, 0xfa, 0xca, 0x5f, 0xd7, 0xf5, 0x95, 0x33, 0x53, 0xfe, 0x89, 0xff, 0xec, 0xbf, 0x00, 0x00,
  1312  	0x00, 0xff, 0xff, 0x80, 0xa9, 0x39, 0x1e, 0x20, 0x0c, 0x00, 0x00,
  1313  }
  1314  
  1315  // Reference imports to suppress errors if they are not otherwise used.
  1316  var _ context.Context
  1317  var _ grpc.ClientConn
  1318  
  1319  // This is a compile-time assertion to ensure that this generated file
  1320  // is compatible with the grpc package it is being compiled against.
  1321  const _ = grpc.SupportPackageIsVersion4
  1322  
  1323  // DeviceServiceClient is the client API for DeviceService service.
  1324  //
  1325  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  1326  type DeviceServiceClient interface {
  1327  	// GetDevices gets a list of all simulated devices (switches and/or IPUs)
  1328  	GetDevices(ctx context.Context, in *GetDevicesRequest, opts ...grpc.CallOption) (*GetDevicesResponse, error)
  1329  	// GetDevice gets a specific device entry
  1330  	GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error)
  1331  	// AddDevice creates a new simulated deviceand start its P4Runtime and gNMI services
  1332  	AddDevice(ctx context.Context, in *AddDeviceRequest, opts ...grpc.CallOption) (*AddDeviceResponse, error)
  1333  	// RemoveDevice removes a simulated device
  1334  	RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error)
  1335  	// StopDevice stops the simulated deviceP4Runtime and gNMI services
  1336  	StopDevice(ctx context.Context, in *StopDeviceRequest, opts ...grpc.CallOption) (*StopDeviceResponse, error)
  1337  	// StartDevice starts the simulated deviceP4Runtime and gNMI services
  1338  	StartDevice(ctx context.Context, in *StartDeviceRequest, opts ...grpc.CallOption) (*StartDeviceResponse, error)
  1339  	// DisablePort disables the specified port
  1340  	DisablePort(ctx context.Context, in *DisablePortRequest, opts ...grpc.CallOption) (*DisablePortResponse, error)
  1341  	// EnablePort enables the specified port
  1342  	EnablePort(ctx context.Context, in *EnablePortRequest, opts ...grpc.CallOption) (*EnablePortResponse, error)
  1343  	// EmitLLDPPacket emits the specified LLDP packet on a given device port.
  1344  	EmitLLDPPacket(ctx context.Context, in *EmitLLDPPacketRequest, opts ...grpc.CallOption) (*EmitLLDPPacketResponse, error)
  1345  }
  1346  
  1347  type deviceServiceClient struct {
  1348  	cc *grpc.ClientConn
  1349  }
  1350  
  1351  func NewDeviceServiceClient(cc *grpc.ClientConn) DeviceServiceClient {
  1352  	return &deviceServiceClient{cc}
  1353  }
  1354  
  1355  func (c *deviceServiceClient) GetDevices(ctx context.Context, in *GetDevicesRequest, opts ...grpc.CallOption) (*GetDevicesResponse, error) {
  1356  	out := new(GetDevicesResponse)
  1357  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/GetDevices", in, out, opts...)
  1358  	if err != nil {
  1359  		return nil, err
  1360  	}
  1361  	return out, nil
  1362  }
  1363  
  1364  func (c *deviceServiceClient) GetDevice(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error) {
  1365  	out := new(GetDeviceResponse)
  1366  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/GetDevice", in, out, opts...)
  1367  	if err != nil {
  1368  		return nil, err
  1369  	}
  1370  	return out, nil
  1371  }
  1372  
  1373  func (c *deviceServiceClient) AddDevice(ctx context.Context, in *AddDeviceRequest, opts ...grpc.CallOption) (*AddDeviceResponse, error) {
  1374  	out := new(AddDeviceResponse)
  1375  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/AddDevice", in, out, opts...)
  1376  	if err != nil {
  1377  		return nil, err
  1378  	}
  1379  	return out, nil
  1380  }
  1381  
  1382  func (c *deviceServiceClient) RemoveDevice(ctx context.Context, in *RemoveDeviceRequest, opts ...grpc.CallOption) (*RemoveDeviceResponse, error) {
  1383  	out := new(RemoveDeviceResponse)
  1384  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/RemoveDevice", in, out, opts...)
  1385  	if err != nil {
  1386  		return nil, err
  1387  	}
  1388  	return out, nil
  1389  }
  1390  
  1391  func (c *deviceServiceClient) StopDevice(ctx context.Context, in *StopDeviceRequest, opts ...grpc.CallOption) (*StopDeviceResponse, error) {
  1392  	out := new(StopDeviceResponse)
  1393  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/StopDevice", in, out, opts...)
  1394  	if err != nil {
  1395  		return nil, err
  1396  	}
  1397  	return out, nil
  1398  }
  1399  
  1400  func (c *deviceServiceClient) StartDevice(ctx context.Context, in *StartDeviceRequest, opts ...grpc.CallOption) (*StartDeviceResponse, error) {
  1401  	out := new(StartDeviceResponse)
  1402  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/StartDevice", in, out, opts...)
  1403  	if err != nil {
  1404  		return nil, err
  1405  	}
  1406  	return out, nil
  1407  }
  1408  
  1409  func (c *deviceServiceClient) DisablePort(ctx context.Context, in *DisablePortRequest, opts ...grpc.CallOption) (*DisablePortResponse, error) {
  1410  	out := new(DisablePortResponse)
  1411  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/DisablePort", in, out, opts...)
  1412  	if err != nil {
  1413  		return nil, err
  1414  	}
  1415  	return out, nil
  1416  }
  1417  
  1418  func (c *deviceServiceClient) EnablePort(ctx context.Context, in *EnablePortRequest, opts ...grpc.CallOption) (*EnablePortResponse, error) {
  1419  	out := new(EnablePortResponse)
  1420  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/EnablePort", in, out, opts...)
  1421  	if err != nil {
  1422  		return nil, err
  1423  	}
  1424  	return out, nil
  1425  }
  1426  
  1427  func (c *deviceServiceClient) EmitLLDPPacket(ctx context.Context, in *EmitLLDPPacketRequest, opts ...grpc.CallOption) (*EmitLLDPPacketResponse, error) {
  1428  	out := new(EmitLLDPPacketResponse)
  1429  	err := c.cc.Invoke(ctx, "/onos.fabricsim.DeviceService/EmitLLDPPacket", in, out, opts...)
  1430  	if err != nil {
  1431  		return nil, err
  1432  	}
  1433  	return out, nil
  1434  }
  1435  
  1436  // DeviceServiceServer is the server API for DeviceService service.
  1437  type DeviceServiceServer interface {
  1438  	// GetDevices gets a list of all simulated devices (switches and/or IPUs)
  1439  	GetDevices(context.Context, *GetDevicesRequest) (*GetDevicesResponse, error)
  1440  	// GetDevice gets a specific device entry
  1441  	GetDevice(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error)
  1442  	// AddDevice creates a new simulated deviceand start its P4Runtime and gNMI services
  1443  	AddDevice(context.Context, *AddDeviceRequest) (*AddDeviceResponse, error)
  1444  	// RemoveDevice removes a simulated device
  1445  	RemoveDevice(context.Context, *RemoveDeviceRequest) (*RemoveDeviceResponse, error)
  1446  	// StopDevice stops the simulated deviceP4Runtime and gNMI services
  1447  	StopDevice(context.Context, *StopDeviceRequest) (*StopDeviceResponse, error)
  1448  	// StartDevice starts the simulated deviceP4Runtime and gNMI services
  1449  	StartDevice(context.Context, *StartDeviceRequest) (*StartDeviceResponse, error)
  1450  	// DisablePort disables the specified port
  1451  	DisablePort(context.Context, *DisablePortRequest) (*DisablePortResponse, error)
  1452  	// EnablePort enables the specified port
  1453  	EnablePort(context.Context, *EnablePortRequest) (*EnablePortResponse, error)
  1454  	// EmitLLDPPacket emits the specified LLDP packet on a given device port.
  1455  	EmitLLDPPacket(context.Context, *EmitLLDPPacketRequest) (*EmitLLDPPacketResponse, error)
  1456  }
  1457  
  1458  // UnimplementedDeviceServiceServer can be embedded to have forward compatible implementations.
  1459  type UnimplementedDeviceServiceServer struct {
  1460  }
  1461  
  1462  func (*UnimplementedDeviceServiceServer) GetDevices(ctx context.Context, req *GetDevicesRequest) (*GetDevicesResponse, error) {
  1463  	return nil, status.Errorf(codes.Unimplemented, "method GetDevices not implemented")
  1464  }
  1465  func (*UnimplementedDeviceServiceServer) GetDevice(ctx context.Context, req *GetDeviceRequest) (*GetDeviceResponse, error) {
  1466  	return nil, status.Errorf(codes.Unimplemented, "method GetDevice not implemented")
  1467  }
  1468  func (*UnimplementedDeviceServiceServer) AddDevice(ctx context.Context, req *AddDeviceRequest) (*AddDeviceResponse, error) {
  1469  	return nil, status.Errorf(codes.Unimplemented, "method AddDevice not implemented")
  1470  }
  1471  func (*UnimplementedDeviceServiceServer) RemoveDevice(ctx context.Context, req *RemoveDeviceRequest) (*RemoveDeviceResponse, error) {
  1472  	return nil, status.Errorf(codes.Unimplemented, "method RemoveDevice not implemented")
  1473  }
  1474  func (*UnimplementedDeviceServiceServer) StopDevice(ctx context.Context, req *StopDeviceRequest) (*StopDeviceResponse, error) {
  1475  	return nil, status.Errorf(codes.Unimplemented, "method StopDevice not implemented")
  1476  }
  1477  func (*UnimplementedDeviceServiceServer) StartDevice(ctx context.Context, req *StartDeviceRequest) (*StartDeviceResponse, error) {
  1478  	return nil, status.Errorf(codes.Unimplemented, "method StartDevice not implemented")
  1479  }
  1480  func (*UnimplementedDeviceServiceServer) DisablePort(ctx context.Context, req *DisablePortRequest) (*DisablePortResponse, error) {
  1481  	return nil, status.Errorf(codes.Unimplemented, "method DisablePort not implemented")
  1482  }
  1483  func (*UnimplementedDeviceServiceServer) EnablePort(ctx context.Context, req *EnablePortRequest) (*EnablePortResponse, error) {
  1484  	return nil, status.Errorf(codes.Unimplemented, "method EnablePort not implemented")
  1485  }
  1486  func (*UnimplementedDeviceServiceServer) EmitLLDPPacket(ctx context.Context, req *EmitLLDPPacketRequest) (*EmitLLDPPacketResponse, error) {
  1487  	return nil, status.Errorf(codes.Unimplemented, "method EmitLLDPPacket not implemented")
  1488  }
  1489  
  1490  func RegisterDeviceServiceServer(s *grpc.Server, srv DeviceServiceServer) {
  1491  	s.RegisterService(&_DeviceService_serviceDesc, srv)
  1492  }
  1493  
  1494  func _DeviceService_GetDevices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1495  	in := new(GetDevicesRequest)
  1496  	if err := dec(in); err != nil {
  1497  		return nil, err
  1498  	}
  1499  	if interceptor == nil {
  1500  		return srv.(DeviceServiceServer).GetDevices(ctx, in)
  1501  	}
  1502  	info := &grpc.UnaryServerInfo{
  1503  		Server:     srv,
  1504  		FullMethod: "/onos.fabricsim.DeviceService/GetDevices",
  1505  	}
  1506  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1507  		return srv.(DeviceServiceServer).GetDevices(ctx, req.(*GetDevicesRequest))
  1508  	}
  1509  	return interceptor(ctx, in, info, handler)
  1510  }
  1511  
  1512  func _DeviceService_GetDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1513  	in := new(GetDeviceRequest)
  1514  	if err := dec(in); err != nil {
  1515  		return nil, err
  1516  	}
  1517  	if interceptor == nil {
  1518  		return srv.(DeviceServiceServer).GetDevice(ctx, in)
  1519  	}
  1520  	info := &grpc.UnaryServerInfo{
  1521  		Server:     srv,
  1522  		FullMethod: "/onos.fabricsim.DeviceService/GetDevice",
  1523  	}
  1524  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1525  		return srv.(DeviceServiceServer).GetDevice(ctx, req.(*GetDeviceRequest))
  1526  	}
  1527  	return interceptor(ctx, in, info, handler)
  1528  }
  1529  
  1530  func _DeviceService_AddDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1531  	in := new(AddDeviceRequest)
  1532  	if err := dec(in); err != nil {
  1533  		return nil, err
  1534  	}
  1535  	if interceptor == nil {
  1536  		return srv.(DeviceServiceServer).AddDevice(ctx, in)
  1537  	}
  1538  	info := &grpc.UnaryServerInfo{
  1539  		Server:     srv,
  1540  		FullMethod: "/onos.fabricsim.DeviceService/AddDevice",
  1541  	}
  1542  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1543  		return srv.(DeviceServiceServer).AddDevice(ctx, req.(*AddDeviceRequest))
  1544  	}
  1545  	return interceptor(ctx, in, info, handler)
  1546  }
  1547  
  1548  func _DeviceService_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1549  	in := new(RemoveDeviceRequest)
  1550  	if err := dec(in); err != nil {
  1551  		return nil, err
  1552  	}
  1553  	if interceptor == nil {
  1554  		return srv.(DeviceServiceServer).RemoveDevice(ctx, in)
  1555  	}
  1556  	info := &grpc.UnaryServerInfo{
  1557  		Server:     srv,
  1558  		FullMethod: "/onos.fabricsim.DeviceService/RemoveDevice",
  1559  	}
  1560  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1561  		return srv.(DeviceServiceServer).RemoveDevice(ctx, req.(*RemoveDeviceRequest))
  1562  	}
  1563  	return interceptor(ctx, in, info, handler)
  1564  }
  1565  
  1566  func _DeviceService_StopDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1567  	in := new(StopDeviceRequest)
  1568  	if err := dec(in); err != nil {
  1569  		return nil, err
  1570  	}
  1571  	if interceptor == nil {
  1572  		return srv.(DeviceServiceServer).StopDevice(ctx, in)
  1573  	}
  1574  	info := &grpc.UnaryServerInfo{
  1575  		Server:     srv,
  1576  		FullMethod: "/onos.fabricsim.DeviceService/StopDevice",
  1577  	}
  1578  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1579  		return srv.(DeviceServiceServer).StopDevice(ctx, req.(*StopDeviceRequest))
  1580  	}
  1581  	return interceptor(ctx, in, info, handler)
  1582  }
  1583  
  1584  func _DeviceService_StartDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1585  	in := new(StartDeviceRequest)
  1586  	if err := dec(in); err != nil {
  1587  		return nil, err
  1588  	}
  1589  	if interceptor == nil {
  1590  		return srv.(DeviceServiceServer).StartDevice(ctx, in)
  1591  	}
  1592  	info := &grpc.UnaryServerInfo{
  1593  		Server:     srv,
  1594  		FullMethod: "/onos.fabricsim.DeviceService/StartDevice",
  1595  	}
  1596  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1597  		return srv.(DeviceServiceServer).StartDevice(ctx, req.(*StartDeviceRequest))
  1598  	}
  1599  	return interceptor(ctx, in, info, handler)
  1600  }
  1601  
  1602  func _DeviceService_DisablePort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1603  	in := new(DisablePortRequest)
  1604  	if err := dec(in); err != nil {
  1605  		return nil, err
  1606  	}
  1607  	if interceptor == nil {
  1608  		return srv.(DeviceServiceServer).DisablePort(ctx, in)
  1609  	}
  1610  	info := &grpc.UnaryServerInfo{
  1611  		Server:     srv,
  1612  		FullMethod: "/onos.fabricsim.DeviceService/DisablePort",
  1613  	}
  1614  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1615  		return srv.(DeviceServiceServer).DisablePort(ctx, req.(*DisablePortRequest))
  1616  	}
  1617  	return interceptor(ctx, in, info, handler)
  1618  }
  1619  
  1620  func _DeviceService_EnablePort_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1621  	in := new(EnablePortRequest)
  1622  	if err := dec(in); err != nil {
  1623  		return nil, err
  1624  	}
  1625  	if interceptor == nil {
  1626  		return srv.(DeviceServiceServer).EnablePort(ctx, in)
  1627  	}
  1628  	info := &grpc.UnaryServerInfo{
  1629  		Server:     srv,
  1630  		FullMethod: "/onos.fabricsim.DeviceService/EnablePort",
  1631  	}
  1632  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1633  		return srv.(DeviceServiceServer).EnablePort(ctx, req.(*EnablePortRequest))
  1634  	}
  1635  	return interceptor(ctx, in, info, handler)
  1636  }
  1637  
  1638  func _DeviceService_EmitLLDPPacket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  1639  	in := new(EmitLLDPPacketRequest)
  1640  	if err := dec(in); err != nil {
  1641  		return nil, err
  1642  	}
  1643  	if interceptor == nil {
  1644  		return srv.(DeviceServiceServer).EmitLLDPPacket(ctx, in)
  1645  	}
  1646  	info := &grpc.UnaryServerInfo{
  1647  		Server:     srv,
  1648  		FullMethod: "/onos.fabricsim.DeviceService/EmitLLDPPacket",
  1649  	}
  1650  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  1651  		return srv.(DeviceServiceServer).EmitLLDPPacket(ctx, req.(*EmitLLDPPacketRequest))
  1652  	}
  1653  	return interceptor(ctx, in, info, handler)
  1654  }
  1655  
  1656  var _DeviceService_serviceDesc = grpc.ServiceDesc{
  1657  	ServiceName: "onos.fabricsim.DeviceService",
  1658  	HandlerType: (*DeviceServiceServer)(nil),
  1659  	Methods: []grpc.MethodDesc{
  1660  		{
  1661  			MethodName: "GetDevices",
  1662  			Handler:    _DeviceService_GetDevices_Handler,
  1663  		},
  1664  		{
  1665  			MethodName: "GetDevice",
  1666  			Handler:    _DeviceService_GetDevice_Handler,
  1667  		},
  1668  		{
  1669  			MethodName: "AddDevice",
  1670  			Handler:    _DeviceService_AddDevice_Handler,
  1671  		},
  1672  		{
  1673  			MethodName: "RemoveDevice",
  1674  			Handler:    _DeviceService_RemoveDevice_Handler,
  1675  		},
  1676  		{
  1677  			MethodName: "StopDevice",
  1678  			Handler:    _DeviceService_StopDevice_Handler,
  1679  		},
  1680  		{
  1681  			MethodName: "StartDevice",
  1682  			Handler:    _DeviceService_StartDevice_Handler,
  1683  		},
  1684  		{
  1685  			MethodName: "DisablePort",
  1686  			Handler:    _DeviceService_DisablePort_Handler,
  1687  		},
  1688  		{
  1689  			MethodName: "EnablePort",
  1690  			Handler:    _DeviceService_EnablePort_Handler,
  1691  		},
  1692  		{
  1693  			MethodName: "EmitLLDPPacket",
  1694  			Handler:    _DeviceService_EmitLLDPPacket_Handler,
  1695  		},
  1696  	},
  1697  	Streams:  []grpc.StreamDesc{},
  1698  	Metadata: "onos/fabricsim/devices.proto",
  1699  }
  1700  
  1701  func (m *Device) Marshal() (dAtA []byte, err error) {
  1702  	size := m.Size()
  1703  	dAtA = make([]byte, size)
  1704  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1705  	if err != nil {
  1706  		return nil, err
  1707  	}
  1708  	return dAtA[:n], nil
  1709  }
  1710  
  1711  func (m *Device) MarshalTo(dAtA []byte) (int, error) {
  1712  	size := m.Size()
  1713  	return m.MarshalToSizedBuffer(dAtA[:size])
  1714  }
  1715  
  1716  func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1717  	i := len(dAtA)
  1718  	_ = i
  1719  	var l int
  1720  	_ = l
  1721  	if m.IOStats != nil {
  1722  		{
  1723  			size, err := m.IOStats.MarshalToSizedBuffer(dAtA[:i])
  1724  			if err != nil {
  1725  				return 0, err
  1726  			}
  1727  			i -= size
  1728  			i = encodeVarintDevices(dAtA, i, uint64(size))
  1729  		}
  1730  		i--
  1731  		dAtA[i] = 0x52
  1732  	}
  1733  	if m.TotalConnections != 0 {
  1734  		i = encodeVarintDevices(dAtA, i, uint64(m.TotalConnections))
  1735  		i--
  1736  		dAtA[i] = 0x48
  1737  	}
  1738  	if len(m.Connections) > 0 {
  1739  		for iNdEx := len(m.Connections) - 1; iNdEx >= 0; iNdEx-- {
  1740  			{
  1741  				size, err := m.Connections[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1742  				if err != nil {
  1743  					return 0, err
  1744  				}
  1745  				i -= size
  1746  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1747  			}
  1748  			i--
  1749  			dAtA[i] = 0x42
  1750  		}
  1751  	}
  1752  	if m.Pos != nil {
  1753  		{
  1754  			size, err := m.Pos.MarshalToSizedBuffer(dAtA[:i])
  1755  			if err != nil {
  1756  				return 0, err
  1757  			}
  1758  			i -= size
  1759  			i = encodeVarintDevices(dAtA, i, uint64(size))
  1760  		}
  1761  		i--
  1762  		dAtA[i] = 0x3a
  1763  	}
  1764  	if m.PipelineInfo != nil {
  1765  		{
  1766  			size, err := m.PipelineInfo.MarshalToSizedBuffer(dAtA[:i])
  1767  			if err != nil {
  1768  				return 0, err
  1769  			}
  1770  			i -= size
  1771  			i = encodeVarintDevices(dAtA, i, uint64(size))
  1772  		}
  1773  		i--
  1774  		dAtA[i] = 0x32
  1775  	}
  1776  	if m.ChassisID != 0 {
  1777  		i = encodeVarintDevices(dAtA, i, uint64(m.ChassisID))
  1778  		i--
  1779  		dAtA[i] = 0x28
  1780  	}
  1781  	if m.ControlPort != 0 {
  1782  		i = encodeVarintDevices(dAtA, i, uint64(m.ControlPort))
  1783  		i--
  1784  		dAtA[i] = 0x20
  1785  	}
  1786  	if len(m.Ports) > 0 {
  1787  		for iNdEx := len(m.Ports) - 1; iNdEx >= 0; iNdEx-- {
  1788  			{
  1789  				size, err := m.Ports[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1790  				if err != nil {
  1791  					return 0, err
  1792  				}
  1793  				i -= size
  1794  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1795  			}
  1796  			i--
  1797  			dAtA[i] = 0x1a
  1798  		}
  1799  	}
  1800  	if m.Type != 0 {
  1801  		i = encodeVarintDevices(dAtA, i, uint64(m.Type))
  1802  		i--
  1803  		dAtA[i] = 0x10
  1804  	}
  1805  	if len(m.ID) > 0 {
  1806  		i -= len(m.ID)
  1807  		copy(dAtA[i:], m.ID)
  1808  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  1809  		i--
  1810  		dAtA[i] = 0xa
  1811  	}
  1812  	return len(dAtA) - i, nil
  1813  }
  1814  
  1815  func (m *Port) Marshal() (dAtA []byte, err error) {
  1816  	size := m.Size()
  1817  	dAtA = make([]byte, size)
  1818  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1819  	if err != nil {
  1820  		return nil, err
  1821  	}
  1822  	return dAtA[:n], nil
  1823  }
  1824  
  1825  func (m *Port) MarshalTo(dAtA []byte) (int, error) {
  1826  	size := m.Size()
  1827  	return m.MarshalToSizedBuffer(dAtA[:size])
  1828  }
  1829  
  1830  func (m *Port) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1831  	i := len(dAtA)
  1832  	_ = i
  1833  	var l int
  1834  	_ = l
  1835  	if m.Enabled {
  1836  		i--
  1837  		if m.Enabled {
  1838  			dAtA[i] = 1
  1839  		} else {
  1840  			dAtA[i] = 0
  1841  		}
  1842  		i--
  1843  		dAtA[i] = 0x38
  1844  	}
  1845  	if len(m.Speed) > 0 {
  1846  		i -= len(m.Speed)
  1847  		copy(dAtA[i:], m.Speed)
  1848  		i = encodeVarintDevices(dAtA, i, uint64(len(m.Speed)))
  1849  		i--
  1850  		dAtA[i] = 0x32
  1851  	}
  1852  	if m.InternalNumber != 0 {
  1853  		i = encodeVarintDevices(dAtA, i, uint64(m.InternalNumber))
  1854  		i--
  1855  		dAtA[i] = 0x28
  1856  	}
  1857  	if m.Number != 0 {
  1858  		i = encodeVarintDevices(dAtA, i, uint64(m.Number))
  1859  		i--
  1860  		dAtA[i] = 0x20
  1861  	}
  1862  	if len(m.Name) > 0 {
  1863  		i -= len(m.Name)
  1864  		copy(dAtA[i:], m.Name)
  1865  		i = encodeVarintDevices(dAtA, i, uint64(len(m.Name)))
  1866  		i--
  1867  		dAtA[i] = 0x1a
  1868  	}
  1869  	if len(m.ID) > 0 {
  1870  		i -= len(m.ID)
  1871  		copy(dAtA[i:], m.ID)
  1872  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  1873  		i--
  1874  		dAtA[i] = 0xa
  1875  	}
  1876  	return len(dAtA) - i, nil
  1877  }
  1878  
  1879  func (m *PipelineInfo) Marshal() (dAtA []byte, err error) {
  1880  	size := m.Size()
  1881  	dAtA = make([]byte, size)
  1882  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1883  	if err != nil {
  1884  		return nil, err
  1885  	}
  1886  	return dAtA[:n], nil
  1887  }
  1888  
  1889  func (m *PipelineInfo) MarshalTo(dAtA []byte) (int, error) {
  1890  	size := m.Size()
  1891  	return m.MarshalToSizedBuffer(dAtA[:size])
  1892  }
  1893  
  1894  func (m *PipelineInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1895  	i := len(dAtA)
  1896  	_ = i
  1897  	var l int
  1898  	_ = l
  1899  	if len(m.CloneSessions) > 0 {
  1900  		for iNdEx := len(m.CloneSessions) - 1; iNdEx >= 0; iNdEx-- {
  1901  			{
  1902  				size, err := m.CloneSessions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1903  				if err != nil {
  1904  					return 0, err
  1905  				}
  1906  				i -= size
  1907  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1908  			}
  1909  			i--
  1910  			dAtA[i] = 0x42
  1911  		}
  1912  	}
  1913  	if len(m.MulticastGroups) > 0 {
  1914  		for iNdEx := len(m.MulticastGroups) - 1; iNdEx >= 0; iNdEx-- {
  1915  			{
  1916  				size, err := m.MulticastGroups[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1917  				if err != nil {
  1918  					return 0, err
  1919  				}
  1920  				i -= size
  1921  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1922  			}
  1923  			i--
  1924  			dAtA[i] = 0x3a
  1925  		}
  1926  	}
  1927  	if len(m.Groups) > 0 {
  1928  		for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- {
  1929  			{
  1930  				size, err := m.Groups[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1931  				if err != nil {
  1932  					return 0, err
  1933  				}
  1934  				i -= size
  1935  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1936  			}
  1937  			i--
  1938  			dAtA[i] = 0x32
  1939  		}
  1940  	}
  1941  	if len(m.Meters) > 0 {
  1942  		for iNdEx := len(m.Meters) - 1; iNdEx >= 0; iNdEx-- {
  1943  			{
  1944  				size, err := m.Meters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1945  				if err != nil {
  1946  					return 0, err
  1947  				}
  1948  				i -= size
  1949  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1950  			}
  1951  			i--
  1952  			dAtA[i] = 0x2a
  1953  		}
  1954  	}
  1955  	if len(m.Counters) > 0 {
  1956  		for iNdEx := len(m.Counters) - 1; iNdEx >= 0; iNdEx-- {
  1957  			{
  1958  				size, err := m.Counters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1959  				if err != nil {
  1960  					return 0, err
  1961  				}
  1962  				i -= size
  1963  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1964  			}
  1965  			i--
  1966  			dAtA[i] = 0x22
  1967  		}
  1968  	}
  1969  	if len(m.Tables) > 0 {
  1970  		for iNdEx := len(m.Tables) - 1; iNdEx >= 0; iNdEx-- {
  1971  			{
  1972  				size, err := m.Tables[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1973  				if err != nil {
  1974  					return 0, err
  1975  				}
  1976  				i -= size
  1977  				i = encodeVarintDevices(dAtA, i, uint64(size))
  1978  			}
  1979  			i--
  1980  			dAtA[i] = 0x1a
  1981  		}
  1982  	}
  1983  	if len(m.P4Info) > 0 {
  1984  		i -= len(m.P4Info)
  1985  		copy(dAtA[i:], m.P4Info)
  1986  		i = encodeVarintDevices(dAtA, i, uint64(len(m.P4Info)))
  1987  		i--
  1988  		dAtA[i] = 0x12
  1989  	}
  1990  	if m.Cookie != 0 {
  1991  		i = encodeVarintDevices(dAtA, i, uint64(m.Cookie))
  1992  		i--
  1993  		dAtA[i] = 0x8
  1994  	}
  1995  	return len(dAtA) - i, nil
  1996  }
  1997  
  1998  func (m *EntitiesInfo) Marshal() (dAtA []byte, err error) {
  1999  	size := m.Size()
  2000  	dAtA = make([]byte, size)
  2001  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2002  	if err != nil {
  2003  		return nil, err
  2004  	}
  2005  	return dAtA[:n], nil
  2006  }
  2007  
  2008  func (m *EntitiesInfo) MarshalTo(dAtA []byte) (int, error) {
  2009  	size := m.Size()
  2010  	return m.MarshalToSizedBuffer(dAtA[:size])
  2011  }
  2012  
  2013  func (m *EntitiesInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2014  	i := len(dAtA)
  2015  	_ = i
  2016  	var l int
  2017  	_ = l
  2018  	if len(m.Name) > 0 {
  2019  		i -= len(m.Name)
  2020  		copy(dAtA[i:], m.Name)
  2021  		i = encodeVarintDevices(dAtA, i, uint64(len(m.Name)))
  2022  		i--
  2023  		dAtA[i] = 0x1a
  2024  	}
  2025  	if m.Size_ != 0 {
  2026  		i = encodeVarintDevices(dAtA, i, uint64(m.Size_))
  2027  		i--
  2028  		dAtA[i] = 0x10
  2029  	}
  2030  	if m.ID != 0 {
  2031  		i = encodeVarintDevices(dAtA, i, uint64(m.ID))
  2032  		i--
  2033  		dAtA[i] = 0x8
  2034  	}
  2035  	return len(dAtA) - i, nil
  2036  }
  2037  
  2038  func (m *GetDevicesRequest) Marshal() (dAtA []byte, err error) {
  2039  	size := m.Size()
  2040  	dAtA = make([]byte, size)
  2041  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2042  	if err != nil {
  2043  		return nil, err
  2044  	}
  2045  	return dAtA[:n], nil
  2046  }
  2047  
  2048  func (m *GetDevicesRequest) MarshalTo(dAtA []byte) (int, error) {
  2049  	size := m.Size()
  2050  	return m.MarshalToSizedBuffer(dAtA[:size])
  2051  }
  2052  
  2053  func (m *GetDevicesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2054  	i := len(dAtA)
  2055  	_ = i
  2056  	var l int
  2057  	_ = l
  2058  	return len(dAtA) - i, nil
  2059  }
  2060  
  2061  func (m *GetDevicesResponse) Marshal() (dAtA []byte, err error) {
  2062  	size := m.Size()
  2063  	dAtA = make([]byte, size)
  2064  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2065  	if err != nil {
  2066  		return nil, err
  2067  	}
  2068  	return dAtA[:n], nil
  2069  }
  2070  
  2071  func (m *GetDevicesResponse) MarshalTo(dAtA []byte) (int, error) {
  2072  	size := m.Size()
  2073  	return m.MarshalToSizedBuffer(dAtA[:size])
  2074  }
  2075  
  2076  func (m *GetDevicesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2077  	i := len(dAtA)
  2078  	_ = i
  2079  	var l int
  2080  	_ = l
  2081  	if len(m.Devices) > 0 {
  2082  		for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  2083  			{
  2084  				size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  2085  				if err != nil {
  2086  					return 0, err
  2087  				}
  2088  				i -= size
  2089  				i = encodeVarintDevices(dAtA, i, uint64(size))
  2090  			}
  2091  			i--
  2092  			dAtA[i] = 0xa
  2093  		}
  2094  	}
  2095  	return len(dAtA) - i, nil
  2096  }
  2097  
  2098  func (m *GetDeviceRequest) Marshal() (dAtA []byte, err error) {
  2099  	size := m.Size()
  2100  	dAtA = make([]byte, size)
  2101  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2102  	if err != nil {
  2103  		return nil, err
  2104  	}
  2105  	return dAtA[:n], nil
  2106  }
  2107  
  2108  func (m *GetDeviceRequest) MarshalTo(dAtA []byte) (int, error) {
  2109  	size := m.Size()
  2110  	return m.MarshalToSizedBuffer(dAtA[:size])
  2111  }
  2112  
  2113  func (m *GetDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2114  	i := len(dAtA)
  2115  	_ = i
  2116  	var l int
  2117  	_ = l
  2118  	if len(m.ID) > 0 {
  2119  		i -= len(m.ID)
  2120  		copy(dAtA[i:], m.ID)
  2121  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  2122  		i--
  2123  		dAtA[i] = 0xa
  2124  	}
  2125  	return len(dAtA) - i, nil
  2126  }
  2127  
  2128  func (m *GetDeviceResponse) Marshal() (dAtA []byte, err error) {
  2129  	size := m.Size()
  2130  	dAtA = make([]byte, size)
  2131  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2132  	if err != nil {
  2133  		return nil, err
  2134  	}
  2135  	return dAtA[:n], nil
  2136  }
  2137  
  2138  func (m *GetDeviceResponse) MarshalTo(dAtA []byte) (int, error) {
  2139  	size := m.Size()
  2140  	return m.MarshalToSizedBuffer(dAtA[:size])
  2141  }
  2142  
  2143  func (m *GetDeviceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2144  	i := len(dAtA)
  2145  	_ = i
  2146  	var l int
  2147  	_ = l
  2148  	if m.Device != nil {
  2149  		{
  2150  			size, err := m.Device.MarshalToSizedBuffer(dAtA[:i])
  2151  			if err != nil {
  2152  				return 0, err
  2153  			}
  2154  			i -= size
  2155  			i = encodeVarintDevices(dAtA, i, uint64(size))
  2156  		}
  2157  		i--
  2158  		dAtA[i] = 0xa
  2159  	}
  2160  	return len(dAtA) - i, nil
  2161  }
  2162  
  2163  func (m *AddDeviceRequest) Marshal() (dAtA []byte, err error) {
  2164  	size := m.Size()
  2165  	dAtA = make([]byte, size)
  2166  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2167  	if err != nil {
  2168  		return nil, err
  2169  	}
  2170  	return dAtA[:n], nil
  2171  }
  2172  
  2173  func (m *AddDeviceRequest) MarshalTo(dAtA []byte) (int, error) {
  2174  	size := m.Size()
  2175  	return m.MarshalToSizedBuffer(dAtA[:size])
  2176  }
  2177  
  2178  func (m *AddDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2179  	i := len(dAtA)
  2180  	_ = i
  2181  	var l int
  2182  	_ = l
  2183  	if m.Device != nil {
  2184  		{
  2185  			size, err := m.Device.MarshalToSizedBuffer(dAtA[:i])
  2186  			if err != nil {
  2187  				return 0, err
  2188  			}
  2189  			i -= size
  2190  			i = encodeVarintDevices(dAtA, i, uint64(size))
  2191  		}
  2192  		i--
  2193  		dAtA[i] = 0xa
  2194  	}
  2195  	return len(dAtA) - i, nil
  2196  }
  2197  
  2198  func (m *AddDeviceResponse) Marshal() (dAtA []byte, err error) {
  2199  	size := m.Size()
  2200  	dAtA = make([]byte, size)
  2201  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2202  	if err != nil {
  2203  		return nil, err
  2204  	}
  2205  	return dAtA[:n], nil
  2206  }
  2207  
  2208  func (m *AddDeviceResponse) MarshalTo(dAtA []byte) (int, error) {
  2209  	size := m.Size()
  2210  	return m.MarshalToSizedBuffer(dAtA[:size])
  2211  }
  2212  
  2213  func (m *AddDeviceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2214  	i := len(dAtA)
  2215  	_ = i
  2216  	var l int
  2217  	_ = l
  2218  	return len(dAtA) - i, nil
  2219  }
  2220  
  2221  func (m *RemoveDeviceRequest) Marshal() (dAtA []byte, err error) {
  2222  	size := m.Size()
  2223  	dAtA = make([]byte, size)
  2224  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2225  	if err != nil {
  2226  		return nil, err
  2227  	}
  2228  	return dAtA[:n], nil
  2229  }
  2230  
  2231  func (m *RemoveDeviceRequest) MarshalTo(dAtA []byte) (int, error) {
  2232  	size := m.Size()
  2233  	return m.MarshalToSizedBuffer(dAtA[:size])
  2234  }
  2235  
  2236  func (m *RemoveDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2237  	i := len(dAtA)
  2238  	_ = i
  2239  	var l int
  2240  	_ = l
  2241  	if len(m.ID) > 0 {
  2242  		i -= len(m.ID)
  2243  		copy(dAtA[i:], m.ID)
  2244  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  2245  		i--
  2246  		dAtA[i] = 0xa
  2247  	}
  2248  	return len(dAtA) - i, nil
  2249  }
  2250  
  2251  func (m *RemoveDeviceResponse) Marshal() (dAtA []byte, err error) {
  2252  	size := m.Size()
  2253  	dAtA = make([]byte, size)
  2254  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2255  	if err != nil {
  2256  		return nil, err
  2257  	}
  2258  	return dAtA[:n], nil
  2259  }
  2260  
  2261  func (m *RemoveDeviceResponse) MarshalTo(dAtA []byte) (int, error) {
  2262  	size := m.Size()
  2263  	return m.MarshalToSizedBuffer(dAtA[:size])
  2264  }
  2265  
  2266  func (m *RemoveDeviceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2267  	i := len(dAtA)
  2268  	_ = i
  2269  	var l int
  2270  	_ = l
  2271  	return len(dAtA) - i, nil
  2272  }
  2273  
  2274  func (m *StopDeviceRequest) Marshal() (dAtA []byte, err error) {
  2275  	size := m.Size()
  2276  	dAtA = make([]byte, size)
  2277  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2278  	if err != nil {
  2279  		return nil, err
  2280  	}
  2281  	return dAtA[:n], nil
  2282  }
  2283  
  2284  func (m *StopDeviceRequest) MarshalTo(dAtA []byte) (int, error) {
  2285  	size := m.Size()
  2286  	return m.MarshalToSizedBuffer(dAtA[:size])
  2287  }
  2288  
  2289  func (m *StopDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2290  	i := len(dAtA)
  2291  	_ = i
  2292  	var l int
  2293  	_ = l
  2294  	if m.Mode != 0 {
  2295  		i = encodeVarintDevices(dAtA, i, uint64(m.Mode))
  2296  		i--
  2297  		dAtA[i] = 0x10
  2298  	}
  2299  	if len(m.ID) > 0 {
  2300  		i -= len(m.ID)
  2301  		copy(dAtA[i:], m.ID)
  2302  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  2303  		i--
  2304  		dAtA[i] = 0xa
  2305  	}
  2306  	return len(dAtA) - i, nil
  2307  }
  2308  
  2309  func (m *StopDeviceResponse) Marshal() (dAtA []byte, err error) {
  2310  	size := m.Size()
  2311  	dAtA = make([]byte, size)
  2312  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2313  	if err != nil {
  2314  		return nil, err
  2315  	}
  2316  	return dAtA[:n], nil
  2317  }
  2318  
  2319  func (m *StopDeviceResponse) MarshalTo(dAtA []byte) (int, error) {
  2320  	size := m.Size()
  2321  	return m.MarshalToSizedBuffer(dAtA[:size])
  2322  }
  2323  
  2324  func (m *StopDeviceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2325  	i := len(dAtA)
  2326  	_ = i
  2327  	var l int
  2328  	_ = l
  2329  	return len(dAtA) - i, nil
  2330  }
  2331  
  2332  func (m *StartDeviceRequest) Marshal() (dAtA []byte, err error) {
  2333  	size := m.Size()
  2334  	dAtA = make([]byte, size)
  2335  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2336  	if err != nil {
  2337  		return nil, err
  2338  	}
  2339  	return dAtA[:n], nil
  2340  }
  2341  
  2342  func (m *StartDeviceRequest) MarshalTo(dAtA []byte) (int, error) {
  2343  	size := m.Size()
  2344  	return m.MarshalToSizedBuffer(dAtA[:size])
  2345  }
  2346  
  2347  func (m *StartDeviceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2348  	i := len(dAtA)
  2349  	_ = i
  2350  	var l int
  2351  	_ = l
  2352  	if len(m.ID) > 0 {
  2353  		i -= len(m.ID)
  2354  		copy(dAtA[i:], m.ID)
  2355  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  2356  		i--
  2357  		dAtA[i] = 0xa
  2358  	}
  2359  	return len(dAtA) - i, nil
  2360  }
  2361  
  2362  func (m *StartDeviceResponse) Marshal() (dAtA []byte, err error) {
  2363  	size := m.Size()
  2364  	dAtA = make([]byte, size)
  2365  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2366  	if err != nil {
  2367  		return nil, err
  2368  	}
  2369  	return dAtA[:n], nil
  2370  }
  2371  
  2372  func (m *StartDeviceResponse) MarshalTo(dAtA []byte) (int, error) {
  2373  	size := m.Size()
  2374  	return m.MarshalToSizedBuffer(dAtA[:size])
  2375  }
  2376  
  2377  func (m *StartDeviceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2378  	i := len(dAtA)
  2379  	_ = i
  2380  	var l int
  2381  	_ = l
  2382  	return len(dAtA) - i, nil
  2383  }
  2384  
  2385  func (m *DisablePortRequest) Marshal() (dAtA []byte, err error) {
  2386  	size := m.Size()
  2387  	dAtA = make([]byte, size)
  2388  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2389  	if err != nil {
  2390  		return nil, err
  2391  	}
  2392  	return dAtA[:n], nil
  2393  }
  2394  
  2395  func (m *DisablePortRequest) MarshalTo(dAtA []byte) (int, error) {
  2396  	size := m.Size()
  2397  	return m.MarshalToSizedBuffer(dAtA[:size])
  2398  }
  2399  
  2400  func (m *DisablePortRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2401  	i := len(dAtA)
  2402  	_ = i
  2403  	var l int
  2404  	_ = l
  2405  	if m.Mode != 0 {
  2406  		i = encodeVarintDevices(dAtA, i, uint64(m.Mode))
  2407  		i--
  2408  		dAtA[i] = 0x10
  2409  	}
  2410  	if len(m.ID) > 0 {
  2411  		i -= len(m.ID)
  2412  		copy(dAtA[i:], m.ID)
  2413  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  2414  		i--
  2415  		dAtA[i] = 0xa
  2416  	}
  2417  	return len(dAtA) - i, nil
  2418  }
  2419  
  2420  func (m *DisablePortResponse) Marshal() (dAtA []byte, err error) {
  2421  	size := m.Size()
  2422  	dAtA = make([]byte, size)
  2423  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2424  	if err != nil {
  2425  		return nil, err
  2426  	}
  2427  	return dAtA[:n], nil
  2428  }
  2429  
  2430  func (m *DisablePortResponse) MarshalTo(dAtA []byte) (int, error) {
  2431  	size := m.Size()
  2432  	return m.MarshalToSizedBuffer(dAtA[:size])
  2433  }
  2434  
  2435  func (m *DisablePortResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2436  	i := len(dAtA)
  2437  	_ = i
  2438  	var l int
  2439  	_ = l
  2440  	return len(dAtA) - i, nil
  2441  }
  2442  
  2443  func (m *EnablePortRequest) Marshal() (dAtA []byte, err error) {
  2444  	size := m.Size()
  2445  	dAtA = make([]byte, size)
  2446  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2447  	if err != nil {
  2448  		return nil, err
  2449  	}
  2450  	return dAtA[:n], nil
  2451  }
  2452  
  2453  func (m *EnablePortRequest) MarshalTo(dAtA []byte) (int, error) {
  2454  	size := m.Size()
  2455  	return m.MarshalToSizedBuffer(dAtA[:size])
  2456  }
  2457  
  2458  func (m *EnablePortRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2459  	i := len(dAtA)
  2460  	_ = i
  2461  	var l int
  2462  	_ = l
  2463  	if len(m.ID) > 0 {
  2464  		i -= len(m.ID)
  2465  		copy(dAtA[i:], m.ID)
  2466  		i = encodeVarintDevices(dAtA, i, uint64(len(m.ID)))
  2467  		i--
  2468  		dAtA[i] = 0xa
  2469  	}
  2470  	return len(dAtA) - i, nil
  2471  }
  2472  
  2473  func (m *EnablePortResponse) Marshal() (dAtA []byte, err error) {
  2474  	size := m.Size()
  2475  	dAtA = make([]byte, size)
  2476  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2477  	if err != nil {
  2478  		return nil, err
  2479  	}
  2480  	return dAtA[:n], nil
  2481  }
  2482  
  2483  func (m *EnablePortResponse) MarshalTo(dAtA []byte) (int, error) {
  2484  	size := m.Size()
  2485  	return m.MarshalToSizedBuffer(dAtA[:size])
  2486  }
  2487  
  2488  func (m *EnablePortResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2489  	i := len(dAtA)
  2490  	_ = i
  2491  	var l int
  2492  	_ = l
  2493  	return len(dAtA) - i, nil
  2494  }
  2495  
  2496  func (m *EmitLLDPPacketRequest) Marshal() (dAtA []byte, err error) {
  2497  	size := m.Size()
  2498  	dAtA = make([]byte, size)
  2499  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2500  	if err != nil {
  2501  		return nil, err
  2502  	}
  2503  	return dAtA[:n], nil
  2504  }
  2505  
  2506  func (m *EmitLLDPPacketRequest) MarshalTo(dAtA []byte) (int, error) {
  2507  	size := m.Size()
  2508  	return m.MarshalToSizedBuffer(dAtA[:size])
  2509  }
  2510  
  2511  func (m *EmitLLDPPacketRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2512  	i := len(dAtA)
  2513  	_ = i
  2514  	var l int
  2515  	_ = l
  2516  	if len(m.Packet) > 0 {
  2517  		i -= len(m.Packet)
  2518  		copy(dAtA[i:], m.Packet)
  2519  		i = encodeVarintDevices(dAtA, i, uint64(len(m.Packet)))
  2520  		i--
  2521  		dAtA[i] = 0x12
  2522  	}
  2523  	if len(m.PortID) > 0 {
  2524  		i -= len(m.PortID)
  2525  		copy(dAtA[i:], m.PortID)
  2526  		i = encodeVarintDevices(dAtA, i, uint64(len(m.PortID)))
  2527  		i--
  2528  		dAtA[i] = 0xa
  2529  	}
  2530  	return len(dAtA) - i, nil
  2531  }
  2532  
  2533  func (m *EmitLLDPPacketResponse) Marshal() (dAtA []byte, err error) {
  2534  	size := m.Size()
  2535  	dAtA = make([]byte, size)
  2536  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2537  	if err != nil {
  2538  		return nil, err
  2539  	}
  2540  	return dAtA[:n], nil
  2541  }
  2542  
  2543  func (m *EmitLLDPPacketResponse) MarshalTo(dAtA []byte) (int, error) {
  2544  	size := m.Size()
  2545  	return m.MarshalToSizedBuffer(dAtA[:size])
  2546  }
  2547  
  2548  func (m *EmitLLDPPacketResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2549  	i := len(dAtA)
  2550  	_ = i
  2551  	var l int
  2552  	_ = l
  2553  	return len(dAtA) - i, nil
  2554  }
  2555  
  2556  func encodeVarintDevices(dAtA []byte, offset int, v uint64) int {
  2557  	offset -= sovDevices(v)
  2558  	base := offset
  2559  	for v >= 1<<7 {
  2560  		dAtA[offset] = uint8(v&0x7f | 0x80)
  2561  		v >>= 7
  2562  		offset++
  2563  	}
  2564  	dAtA[offset] = uint8(v)
  2565  	return base
  2566  }
  2567  func (m *Device) Size() (n int) {
  2568  	if m == nil {
  2569  		return 0
  2570  	}
  2571  	var l int
  2572  	_ = l
  2573  	l = len(m.ID)
  2574  	if l > 0 {
  2575  		n += 1 + l + sovDevices(uint64(l))
  2576  	}
  2577  	if m.Type != 0 {
  2578  		n += 1 + sovDevices(uint64(m.Type))
  2579  	}
  2580  	if len(m.Ports) > 0 {
  2581  		for _, e := range m.Ports {
  2582  			l = e.Size()
  2583  			n += 1 + l + sovDevices(uint64(l))
  2584  		}
  2585  	}
  2586  	if m.ControlPort != 0 {
  2587  		n += 1 + sovDevices(uint64(m.ControlPort))
  2588  	}
  2589  	if m.ChassisID != 0 {
  2590  		n += 1 + sovDevices(uint64(m.ChassisID))
  2591  	}
  2592  	if m.PipelineInfo != nil {
  2593  		l = m.PipelineInfo.Size()
  2594  		n += 1 + l + sovDevices(uint64(l))
  2595  	}
  2596  	if m.Pos != nil {
  2597  		l = m.Pos.Size()
  2598  		n += 1 + l + sovDevices(uint64(l))
  2599  	}
  2600  	if len(m.Connections) > 0 {
  2601  		for _, e := range m.Connections {
  2602  			l = e.Size()
  2603  			n += 1 + l + sovDevices(uint64(l))
  2604  		}
  2605  	}
  2606  	if m.TotalConnections != 0 {
  2607  		n += 1 + sovDevices(uint64(m.TotalConnections))
  2608  	}
  2609  	if m.IOStats != nil {
  2610  		l = m.IOStats.Size()
  2611  		n += 1 + l + sovDevices(uint64(l))
  2612  	}
  2613  	return n
  2614  }
  2615  
  2616  func (m *Port) Size() (n int) {
  2617  	if m == nil {
  2618  		return 0
  2619  	}
  2620  	var l int
  2621  	_ = l
  2622  	l = len(m.ID)
  2623  	if l > 0 {
  2624  		n += 1 + l + sovDevices(uint64(l))
  2625  	}
  2626  	l = len(m.Name)
  2627  	if l > 0 {
  2628  		n += 1 + l + sovDevices(uint64(l))
  2629  	}
  2630  	if m.Number != 0 {
  2631  		n += 1 + sovDevices(uint64(m.Number))
  2632  	}
  2633  	if m.InternalNumber != 0 {
  2634  		n += 1 + sovDevices(uint64(m.InternalNumber))
  2635  	}
  2636  	l = len(m.Speed)
  2637  	if l > 0 {
  2638  		n += 1 + l + sovDevices(uint64(l))
  2639  	}
  2640  	if m.Enabled {
  2641  		n += 2
  2642  	}
  2643  	return n
  2644  }
  2645  
  2646  func (m *PipelineInfo) Size() (n int) {
  2647  	if m == nil {
  2648  		return 0
  2649  	}
  2650  	var l int
  2651  	_ = l
  2652  	if m.Cookie != 0 {
  2653  		n += 1 + sovDevices(uint64(m.Cookie))
  2654  	}
  2655  	l = len(m.P4Info)
  2656  	if l > 0 {
  2657  		n += 1 + l + sovDevices(uint64(l))
  2658  	}
  2659  	if len(m.Tables) > 0 {
  2660  		for _, e := range m.Tables {
  2661  			l = e.Size()
  2662  			n += 1 + l + sovDevices(uint64(l))
  2663  		}
  2664  	}
  2665  	if len(m.Counters) > 0 {
  2666  		for _, e := range m.Counters {
  2667  			l = e.Size()
  2668  			n += 1 + l + sovDevices(uint64(l))
  2669  		}
  2670  	}
  2671  	if len(m.Meters) > 0 {
  2672  		for _, e := range m.Meters {
  2673  			l = e.Size()
  2674  			n += 1 + l + sovDevices(uint64(l))
  2675  		}
  2676  	}
  2677  	if len(m.Groups) > 0 {
  2678  		for _, e := range m.Groups {
  2679  			l = e.Size()
  2680  			n += 1 + l + sovDevices(uint64(l))
  2681  		}
  2682  	}
  2683  	if len(m.MulticastGroups) > 0 {
  2684  		for _, e := range m.MulticastGroups {
  2685  			l = e.Size()
  2686  			n += 1 + l + sovDevices(uint64(l))
  2687  		}
  2688  	}
  2689  	if len(m.CloneSessions) > 0 {
  2690  		for _, e := range m.CloneSessions {
  2691  			l = e.Size()
  2692  			n += 1 + l + sovDevices(uint64(l))
  2693  		}
  2694  	}
  2695  	return n
  2696  }
  2697  
  2698  func (m *EntitiesInfo) Size() (n int) {
  2699  	if m == nil {
  2700  		return 0
  2701  	}
  2702  	var l int
  2703  	_ = l
  2704  	if m.ID != 0 {
  2705  		n += 1 + sovDevices(uint64(m.ID))
  2706  	}
  2707  	if m.Size_ != 0 {
  2708  		n += 1 + sovDevices(uint64(m.Size_))
  2709  	}
  2710  	l = len(m.Name)
  2711  	if l > 0 {
  2712  		n += 1 + l + sovDevices(uint64(l))
  2713  	}
  2714  	return n
  2715  }
  2716  
  2717  func (m *GetDevicesRequest) Size() (n int) {
  2718  	if m == nil {
  2719  		return 0
  2720  	}
  2721  	var l int
  2722  	_ = l
  2723  	return n
  2724  }
  2725  
  2726  func (m *GetDevicesResponse) Size() (n int) {
  2727  	if m == nil {
  2728  		return 0
  2729  	}
  2730  	var l int
  2731  	_ = l
  2732  	if len(m.Devices) > 0 {
  2733  		for _, e := range m.Devices {
  2734  			l = e.Size()
  2735  			n += 1 + l + sovDevices(uint64(l))
  2736  		}
  2737  	}
  2738  	return n
  2739  }
  2740  
  2741  func (m *GetDeviceRequest) Size() (n int) {
  2742  	if m == nil {
  2743  		return 0
  2744  	}
  2745  	var l int
  2746  	_ = l
  2747  	l = len(m.ID)
  2748  	if l > 0 {
  2749  		n += 1 + l + sovDevices(uint64(l))
  2750  	}
  2751  	return n
  2752  }
  2753  
  2754  func (m *GetDeviceResponse) Size() (n int) {
  2755  	if m == nil {
  2756  		return 0
  2757  	}
  2758  	var l int
  2759  	_ = l
  2760  	if m.Device != nil {
  2761  		l = m.Device.Size()
  2762  		n += 1 + l + sovDevices(uint64(l))
  2763  	}
  2764  	return n
  2765  }
  2766  
  2767  func (m *AddDeviceRequest) Size() (n int) {
  2768  	if m == nil {
  2769  		return 0
  2770  	}
  2771  	var l int
  2772  	_ = l
  2773  	if m.Device != nil {
  2774  		l = m.Device.Size()
  2775  		n += 1 + l + sovDevices(uint64(l))
  2776  	}
  2777  	return n
  2778  }
  2779  
  2780  func (m *AddDeviceResponse) Size() (n int) {
  2781  	if m == nil {
  2782  		return 0
  2783  	}
  2784  	var l int
  2785  	_ = l
  2786  	return n
  2787  }
  2788  
  2789  func (m *RemoveDeviceRequest) Size() (n int) {
  2790  	if m == nil {
  2791  		return 0
  2792  	}
  2793  	var l int
  2794  	_ = l
  2795  	l = len(m.ID)
  2796  	if l > 0 {
  2797  		n += 1 + l + sovDevices(uint64(l))
  2798  	}
  2799  	return n
  2800  }
  2801  
  2802  func (m *RemoveDeviceResponse) Size() (n int) {
  2803  	if m == nil {
  2804  		return 0
  2805  	}
  2806  	var l int
  2807  	_ = l
  2808  	return n
  2809  }
  2810  
  2811  func (m *StopDeviceRequest) Size() (n int) {
  2812  	if m == nil {
  2813  		return 0
  2814  	}
  2815  	var l int
  2816  	_ = l
  2817  	l = len(m.ID)
  2818  	if l > 0 {
  2819  		n += 1 + l + sovDevices(uint64(l))
  2820  	}
  2821  	if m.Mode != 0 {
  2822  		n += 1 + sovDevices(uint64(m.Mode))
  2823  	}
  2824  	return n
  2825  }
  2826  
  2827  func (m *StopDeviceResponse) Size() (n int) {
  2828  	if m == nil {
  2829  		return 0
  2830  	}
  2831  	var l int
  2832  	_ = l
  2833  	return n
  2834  }
  2835  
  2836  func (m *StartDeviceRequest) Size() (n int) {
  2837  	if m == nil {
  2838  		return 0
  2839  	}
  2840  	var l int
  2841  	_ = l
  2842  	l = len(m.ID)
  2843  	if l > 0 {
  2844  		n += 1 + l + sovDevices(uint64(l))
  2845  	}
  2846  	return n
  2847  }
  2848  
  2849  func (m *StartDeviceResponse) Size() (n int) {
  2850  	if m == nil {
  2851  		return 0
  2852  	}
  2853  	var l int
  2854  	_ = l
  2855  	return n
  2856  }
  2857  
  2858  func (m *DisablePortRequest) Size() (n int) {
  2859  	if m == nil {
  2860  		return 0
  2861  	}
  2862  	var l int
  2863  	_ = l
  2864  	l = len(m.ID)
  2865  	if l > 0 {
  2866  		n += 1 + l + sovDevices(uint64(l))
  2867  	}
  2868  	if m.Mode != 0 {
  2869  		n += 1 + sovDevices(uint64(m.Mode))
  2870  	}
  2871  	return n
  2872  }
  2873  
  2874  func (m *DisablePortResponse) Size() (n int) {
  2875  	if m == nil {
  2876  		return 0
  2877  	}
  2878  	var l int
  2879  	_ = l
  2880  	return n
  2881  }
  2882  
  2883  func (m *EnablePortRequest) Size() (n int) {
  2884  	if m == nil {
  2885  		return 0
  2886  	}
  2887  	var l int
  2888  	_ = l
  2889  	l = len(m.ID)
  2890  	if l > 0 {
  2891  		n += 1 + l + sovDevices(uint64(l))
  2892  	}
  2893  	return n
  2894  }
  2895  
  2896  func (m *EnablePortResponse) Size() (n int) {
  2897  	if m == nil {
  2898  		return 0
  2899  	}
  2900  	var l int
  2901  	_ = l
  2902  	return n
  2903  }
  2904  
  2905  func (m *EmitLLDPPacketRequest) Size() (n int) {
  2906  	if m == nil {
  2907  		return 0
  2908  	}
  2909  	var l int
  2910  	_ = l
  2911  	l = len(m.PortID)
  2912  	if l > 0 {
  2913  		n += 1 + l + sovDevices(uint64(l))
  2914  	}
  2915  	l = len(m.Packet)
  2916  	if l > 0 {
  2917  		n += 1 + l + sovDevices(uint64(l))
  2918  	}
  2919  	return n
  2920  }
  2921  
  2922  func (m *EmitLLDPPacketResponse) Size() (n int) {
  2923  	if m == nil {
  2924  		return 0
  2925  	}
  2926  	var l int
  2927  	_ = l
  2928  	return n
  2929  }
  2930  
  2931  func sovDevices(x uint64) (n int) {
  2932  	return (math_bits.Len64(x|1) + 6) / 7
  2933  }
  2934  func sozDevices(x uint64) (n int) {
  2935  	return sovDevices(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2936  }
  2937  func (m *Device) Unmarshal(dAtA []byte) error {
  2938  	l := len(dAtA)
  2939  	iNdEx := 0
  2940  	for iNdEx < l {
  2941  		preIndex := iNdEx
  2942  		var wire uint64
  2943  		for shift := uint(0); ; shift += 7 {
  2944  			if shift >= 64 {
  2945  				return ErrIntOverflowDevices
  2946  			}
  2947  			if iNdEx >= l {
  2948  				return io.ErrUnexpectedEOF
  2949  			}
  2950  			b := dAtA[iNdEx]
  2951  			iNdEx++
  2952  			wire |= uint64(b&0x7F) << shift
  2953  			if b < 0x80 {
  2954  				break
  2955  			}
  2956  		}
  2957  		fieldNum := int32(wire >> 3)
  2958  		wireType := int(wire & 0x7)
  2959  		if wireType == 4 {
  2960  			return fmt.Errorf("proto: Device: wiretype end group for non-group")
  2961  		}
  2962  		if fieldNum <= 0 {
  2963  			return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
  2964  		}
  2965  		switch fieldNum {
  2966  		case 1:
  2967  			if wireType != 2 {
  2968  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2969  			}
  2970  			var stringLen uint64
  2971  			for shift := uint(0); ; shift += 7 {
  2972  				if shift >= 64 {
  2973  					return ErrIntOverflowDevices
  2974  				}
  2975  				if iNdEx >= l {
  2976  					return io.ErrUnexpectedEOF
  2977  				}
  2978  				b := dAtA[iNdEx]
  2979  				iNdEx++
  2980  				stringLen |= uint64(b&0x7F) << shift
  2981  				if b < 0x80 {
  2982  					break
  2983  				}
  2984  			}
  2985  			intStringLen := int(stringLen)
  2986  			if intStringLen < 0 {
  2987  				return ErrInvalidLengthDevices
  2988  			}
  2989  			postIndex := iNdEx + intStringLen
  2990  			if postIndex < 0 {
  2991  				return ErrInvalidLengthDevices
  2992  			}
  2993  			if postIndex > l {
  2994  				return io.ErrUnexpectedEOF
  2995  			}
  2996  			m.ID = DeviceID(dAtA[iNdEx:postIndex])
  2997  			iNdEx = postIndex
  2998  		case 2:
  2999  			if wireType != 0 {
  3000  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3001  			}
  3002  			m.Type = 0
  3003  			for shift := uint(0); ; shift += 7 {
  3004  				if shift >= 64 {
  3005  					return ErrIntOverflowDevices
  3006  				}
  3007  				if iNdEx >= l {
  3008  					return io.ErrUnexpectedEOF
  3009  				}
  3010  				b := dAtA[iNdEx]
  3011  				iNdEx++
  3012  				m.Type |= DeviceType(b&0x7F) << shift
  3013  				if b < 0x80 {
  3014  					break
  3015  				}
  3016  			}
  3017  		case 3:
  3018  			if wireType != 2 {
  3019  				return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
  3020  			}
  3021  			var msglen int
  3022  			for shift := uint(0); ; shift += 7 {
  3023  				if shift >= 64 {
  3024  					return ErrIntOverflowDevices
  3025  				}
  3026  				if iNdEx >= l {
  3027  					return io.ErrUnexpectedEOF
  3028  				}
  3029  				b := dAtA[iNdEx]
  3030  				iNdEx++
  3031  				msglen |= int(b&0x7F) << shift
  3032  				if b < 0x80 {
  3033  					break
  3034  				}
  3035  			}
  3036  			if msglen < 0 {
  3037  				return ErrInvalidLengthDevices
  3038  			}
  3039  			postIndex := iNdEx + msglen
  3040  			if postIndex < 0 {
  3041  				return ErrInvalidLengthDevices
  3042  			}
  3043  			if postIndex > l {
  3044  				return io.ErrUnexpectedEOF
  3045  			}
  3046  			m.Ports = append(m.Ports, &Port{})
  3047  			if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3048  				return err
  3049  			}
  3050  			iNdEx = postIndex
  3051  		case 4:
  3052  			if wireType != 0 {
  3053  				return fmt.Errorf("proto: wrong wireType = %d for field ControlPort", wireType)
  3054  			}
  3055  			m.ControlPort = 0
  3056  			for shift := uint(0); ; shift += 7 {
  3057  				if shift >= 64 {
  3058  					return ErrIntOverflowDevices
  3059  				}
  3060  				if iNdEx >= l {
  3061  					return io.ErrUnexpectedEOF
  3062  				}
  3063  				b := dAtA[iNdEx]
  3064  				iNdEx++
  3065  				m.ControlPort |= int32(b&0x7F) << shift
  3066  				if b < 0x80 {
  3067  					break
  3068  				}
  3069  			}
  3070  		case 5:
  3071  			if wireType != 0 {
  3072  				return fmt.Errorf("proto: wrong wireType = %d for field ChassisID", wireType)
  3073  			}
  3074  			m.ChassisID = 0
  3075  			for shift := uint(0); ; shift += 7 {
  3076  				if shift >= 64 {
  3077  					return ErrIntOverflowDevices
  3078  				}
  3079  				if iNdEx >= l {
  3080  					return io.ErrUnexpectedEOF
  3081  				}
  3082  				b := dAtA[iNdEx]
  3083  				iNdEx++
  3084  				m.ChassisID |= uint64(b&0x7F) << shift
  3085  				if b < 0x80 {
  3086  					break
  3087  				}
  3088  			}
  3089  		case 6:
  3090  			if wireType != 2 {
  3091  				return fmt.Errorf("proto: wrong wireType = %d for field PipelineInfo", wireType)
  3092  			}
  3093  			var msglen int
  3094  			for shift := uint(0); ; shift += 7 {
  3095  				if shift >= 64 {
  3096  					return ErrIntOverflowDevices
  3097  				}
  3098  				if iNdEx >= l {
  3099  					return io.ErrUnexpectedEOF
  3100  				}
  3101  				b := dAtA[iNdEx]
  3102  				iNdEx++
  3103  				msglen |= int(b&0x7F) << shift
  3104  				if b < 0x80 {
  3105  					break
  3106  				}
  3107  			}
  3108  			if msglen < 0 {
  3109  				return ErrInvalidLengthDevices
  3110  			}
  3111  			postIndex := iNdEx + msglen
  3112  			if postIndex < 0 {
  3113  				return ErrInvalidLengthDevices
  3114  			}
  3115  			if postIndex > l {
  3116  				return io.ErrUnexpectedEOF
  3117  			}
  3118  			if m.PipelineInfo == nil {
  3119  				m.PipelineInfo = &PipelineInfo{}
  3120  			}
  3121  			if err := m.PipelineInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3122  				return err
  3123  			}
  3124  			iNdEx = postIndex
  3125  		case 7:
  3126  			if wireType != 2 {
  3127  				return fmt.Errorf("proto: wrong wireType = %d for field Pos", wireType)
  3128  			}
  3129  			var msglen int
  3130  			for shift := uint(0); ; shift += 7 {
  3131  				if shift >= 64 {
  3132  					return ErrIntOverflowDevices
  3133  				}
  3134  				if iNdEx >= l {
  3135  					return io.ErrUnexpectedEOF
  3136  				}
  3137  				b := dAtA[iNdEx]
  3138  				iNdEx++
  3139  				msglen |= int(b&0x7F) << shift
  3140  				if b < 0x80 {
  3141  					break
  3142  				}
  3143  			}
  3144  			if msglen < 0 {
  3145  				return ErrInvalidLengthDevices
  3146  			}
  3147  			postIndex := iNdEx + msglen
  3148  			if postIndex < 0 {
  3149  				return ErrInvalidLengthDevices
  3150  			}
  3151  			if postIndex > l {
  3152  				return io.ErrUnexpectedEOF
  3153  			}
  3154  			if m.Pos == nil {
  3155  				m.Pos = &misc.GridPosition{}
  3156  			}
  3157  			if err := m.Pos.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3158  				return err
  3159  			}
  3160  			iNdEx = postIndex
  3161  		case 8:
  3162  			if wireType != 2 {
  3163  				return fmt.Errorf("proto: wrong wireType = %d for field Connections", wireType)
  3164  			}
  3165  			var msglen int
  3166  			for shift := uint(0); ; shift += 7 {
  3167  				if shift >= 64 {
  3168  					return ErrIntOverflowDevices
  3169  				}
  3170  				if iNdEx >= l {
  3171  					return io.ErrUnexpectedEOF
  3172  				}
  3173  				b := dAtA[iNdEx]
  3174  				iNdEx++
  3175  				msglen |= int(b&0x7F) << shift
  3176  				if b < 0x80 {
  3177  					break
  3178  				}
  3179  			}
  3180  			if msglen < 0 {
  3181  				return ErrInvalidLengthDevices
  3182  			}
  3183  			postIndex := iNdEx + msglen
  3184  			if postIndex < 0 {
  3185  				return ErrInvalidLengthDevices
  3186  			}
  3187  			if postIndex > l {
  3188  				return io.ErrUnexpectedEOF
  3189  			}
  3190  			m.Connections = append(m.Connections, &misc.Connection{})
  3191  			if err := m.Connections[len(m.Connections)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3192  				return err
  3193  			}
  3194  			iNdEx = postIndex
  3195  		case 9:
  3196  			if wireType != 0 {
  3197  				return fmt.Errorf("proto: wrong wireType = %d for field TotalConnections", wireType)
  3198  			}
  3199  			m.TotalConnections = 0
  3200  			for shift := uint(0); ; shift += 7 {
  3201  				if shift >= 64 {
  3202  					return ErrIntOverflowDevices
  3203  				}
  3204  				if iNdEx >= l {
  3205  					return io.ErrUnexpectedEOF
  3206  				}
  3207  				b := dAtA[iNdEx]
  3208  				iNdEx++
  3209  				m.TotalConnections |= int32(b&0x7F) << shift
  3210  				if b < 0x80 {
  3211  					break
  3212  				}
  3213  			}
  3214  		case 10:
  3215  			if wireType != 2 {
  3216  				return fmt.Errorf("proto: wrong wireType = %d for field IOStats", wireType)
  3217  			}
  3218  			var msglen int
  3219  			for shift := uint(0); ; shift += 7 {
  3220  				if shift >= 64 {
  3221  					return ErrIntOverflowDevices
  3222  				}
  3223  				if iNdEx >= l {
  3224  					return io.ErrUnexpectedEOF
  3225  				}
  3226  				b := dAtA[iNdEx]
  3227  				iNdEx++
  3228  				msglen |= int(b&0x7F) << shift
  3229  				if b < 0x80 {
  3230  					break
  3231  				}
  3232  			}
  3233  			if msglen < 0 {
  3234  				return ErrInvalidLengthDevices
  3235  			}
  3236  			postIndex := iNdEx + msglen
  3237  			if postIndex < 0 {
  3238  				return ErrInvalidLengthDevices
  3239  			}
  3240  			if postIndex > l {
  3241  				return io.ErrUnexpectedEOF
  3242  			}
  3243  			if m.IOStats == nil {
  3244  				m.IOStats = &misc.IOStats{}
  3245  			}
  3246  			if err := m.IOStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3247  				return err
  3248  			}
  3249  			iNdEx = postIndex
  3250  		default:
  3251  			iNdEx = preIndex
  3252  			skippy, err := skipDevices(dAtA[iNdEx:])
  3253  			if err != nil {
  3254  				return err
  3255  			}
  3256  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3257  				return ErrInvalidLengthDevices
  3258  			}
  3259  			if (iNdEx + skippy) > l {
  3260  				return io.ErrUnexpectedEOF
  3261  			}
  3262  			iNdEx += skippy
  3263  		}
  3264  	}
  3265  
  3266  	if iNdEx > l {
  3267  		return io.ErrUnexpectedEOF
  3268  	}
  3269  	return nil
  3270  }
  3271  func (m *Port) Unmarshal(dAtA []byte) error {
  3272  	l := len(dAtA)
  3273  	iNdEx := 0
  3274  	for iNdEx < l {
  3275  		preIndex := iNdEx
  3276  		var wire uint64
  3277  		for shift := uint(0); ; shift += 7 {
  3278  			if shift >= 64 {
  3279  				return ErrIntOverflowDevices
  3280  			}
  3281  			if iNdEx >= l {
  3282  				return io.ErrUnexpectedEOF
  3283  			}
  3284  			b := dAtA[iNdEx]
  3285  			iNdEx++
  3286  			wire |= uint64(b&0x7F) << shift
  3287  			if b < 0x80 {
  3288  				break
  3289  			}
  3290  		}
  3291  		fieldNum := int32(wire >> 3)
  3292  		wireType := int(wire & 0x7)
  3293  		if wireType == 4 {
  3294  			return fmt.Errorf("proto: Port: wiretype end group for non-group")
  3295  		}
  3296  		if fieldNum <= 0 {
  3297  			return fmt.Errorf("proto: Port: illegal tag %d (wire type %d)", fieldNum, wire)
  3298  		}
  3299  		switch fieldNum {
  3300  		case 1:
  3301  			if wireType != 2 {
  3302  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3303  			}
  3304  			var stringLen uint64
  3305  			for shift := uint(0); ; shift += 7 {
  3306  				if shift >= 64 {
  3307  					return ErrIntOverflowDevices
  3308  				}
  3309  				if iNdEx >= l {
  3310  					return io.ErrUnexpectedEOF
  3311  				}
  3312  				b := dAtA[iNdEx]
  3313  				iNdEx++
  3314  				stringLen |= uint64(b&0x7F) << shift
  3315  				if b < 0x80 {
  3316  					break
  3317  				}
  3318  			}
  3319  			intStringLen := int(stringLen)
  3320  			if intStringLen < 0 {
  3321  				return ErrInvalidLengthDevices
  3322  			}
  3323  			postIndex := iNdEx + intStringLen
  3324  			if postIndex < 0 {
  3325  				return ErrInvalidLengthDevices
  3326  			}
  3327  			if postIndex > l {
  3328  				return io.ErrUnexpectedEOF
  3329  			}
  3330  			m.ID = PortID(dAtA[iNdEx:postIndex])
  3331  			iNdEx = postIndex
  3332  		case 3:
  3333  			if wireType != 2 {
  3334  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3335  			}
  3336  			var stringLen uint64
  3337  			for shift := uint(0); ; shift += 7 {
  3338  				if shift >= 64 {
  3339  					return ErrIntOverflowDevices
  3340  				}
  3341  				if iNdEx >= l {
  3342  					return io.ErrUnexpectedEOF
  3343  				}
  3344  				b := dAtA[iNdEx]
  3345  				iNdEx++
  3346  				stringLen |= uint64(b&0x7F) << shift
  3347  				if b < 0x80 {
  3348  					break
  3349  				}
  3350  			}
  3351  			intStringLen := int(stringLen)
  3352  			if intStringLen < 0 {
  3353  				return ErrInvalidLengthDevices
  3354  			}
  3355  			postIndex := iNdEx + intStringLen
  3356  			if postIndex < 0 {
  3357  				return ErrInvalidLengthDevices
  3358  			}
  3359  			if postIndex > l {
  3360  				return io.ErrUnexpectedEOF
  3361  			}
  3362  			m.Name = string(dAtA[iNdEx:postIndex])
  3363  			iNdEx = postIndex
  3364  		case 4:
  3365  			if wireType != 0 {
  3366  				return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType)
  3367  			}
  3368  			m.Number = 0
  3369  			for shift := uint(0); ; shift += 7 {
  3370  				if shift >= 64 {
  3371  					return ErrIntOverflowDevices
  3372  				}
  3373  				if iNdEx >= l {
  3374  					return io.ErrUnexpectedEOF
  3375  				}
  3376  				b := dAtA[iNdEx]
  3377  				iNdEx++
  3378  				m.Number |= uint32(b&0x7F) << shift
  3379  				if b < 0x80 {
  3380  					break
  3381  				}
  3382  			}
  3383  		case 5:
  3384  			if wireType != 0 {
  3385  				return fmt.Errorf("proto: wrong wireType = %d for field InternalNumber", wireType)
  3386  			}
  3387  			m.InternalNumber = 0
  3388  			for shift := uint(0); ; shift += 7 {
  3389  				if shift >= 64 {
  3390  					return ErrIntOverflowDevices
  3391  				}
  3392  				if iNdEx >= l {
  3393  					return io.ErrUnexpectedEOF
  3394  				}
  3395  				b := dAtA[iNdEx]
  3396  				iNdEx++
  3397  				m.InternalNumber |= uint32(b&0x7F) << shift
  3398  				if b < 0x80 {
  3399  					break
  3400  				}
  3401  			}
  3402  		case 6:
  3403  			if wireType != 2 {
  3404  				return fmt.Errorf("proto: wrong wireType = %d for field Speed", wireType)
  3405  			}
  3406  			var stringLen uint64
  3407  			for shift := uint(0); ; shift += 7 {
  3408  				if shift >= 64 {
  3409  					return ErrIntOverflowDevices
  3410  				}
  3411  				if iNdEx >= l {
  3412  					return io.ErrUnexpectedEOF
  3413  				}
  3414  				b := dAtA[iNdEx]
  3415  				iNdEx++
  3416  				stringLen |= uint64(b&0x7F) << shift
  3417  				if b < 0x80 {
  3418  					break
  3419  				}
  3420  			}
  3421  			intStringLen := int(stringLen)
  3422  			if intStringLen < 0 {
  3423  				return ErrInvalidLengthDevices
  3424  			}
  3425  			postIndex := iNdEx + intStringLen
  3426  			if postIndex < 0 {
  3427  				return ErrInvalidLengthDevices
  3428  			}
  3429  			if postIndex > l {
  3430  				return io.ErrUnexpectedEOF
  3431  			}
  3432  			m.Speed = string(dAtA[iNdEx:postIndex])
  3433  			iNdEx = postIndex
  3434  		case 7:
  3435  			if wireType != 0 {
  3436  				return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
  3437  			}
  3438  			var v int
  3439  			for shift := uint(0); ; shift += 7 {
  3440  				if shift >= 64 {
  3441  					return ErrIntOverflowDevices
  3442  				}
  3443  				if iNdEx >= l {
  3444  					return io.ErrUnexpectedEOF
  3445  				}
  3446  				b := dAtA[iNdEx]
  3447  				iNdEx++
  3448  				v |= int(b&0x7F) << shift
  3449  				if b < 0x80 {
  3450  					break
  3451  				}
  3452  			}
  3453  			m.Enabled = bool(v != 0)
  3454  		default:
  3455  			iNdEx = preIndex
  3456  			skippy, err := skipDevices(dAtA[iNdEx:])
  3457  			if err != nil {
  3458  				return err
  3459  			}
  3460  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3461  				return ErrInvalidLengthDevices
  3462  			}
  3463  			if (iNdEx + skippy) > l {
  3464  				return io.ErrUnexpectedEOF
  3465  			}
  3466  			iNdEx += skippy
  3467  		}
  3468  	}
  3469  
  3470  	if iNdEx > l {
  3471  		return io.ErrUnexpectedEOF
  3472  	}
  3473  	return nil
  3474  }
  3475  func (m *PipelineInfo) Unmarshal(dAtA []byte) error {
  3476  	l := len(dAtA)
  3477  	iNdEx := 0
  3478  	for iNdEx < l {
  3479  		preIndex := iNdEx
  3480  		var wire uint64
  3481  		for shift := uint(0); ; shift += 7 {
  3482  			if shift >= 64 {
  3483  				return ErrIntOverflowDevices
  3484  			}
  3485  			if iNdEx >= l {
  3486  				return io.ErrUnexpectedEOF
  3487  			}
  3488  			b := dAtA[iNdEx]
  3489  			iNdEx++
  3490  			wire |= uint64(b&0x7F) << shift
  3491  			if b < 0x80 {
  3492  				break
  3493  			}
  3494  		}
  3495  		fieldNum := int32(wire >> 3)
  3496  		wireType := int(wire & 0x7)
  3497  		if wireType == 4 {
  3498  			return fmt.Errorf("proto: PipelineInfo: wiretype end group for non-group")
  3499  		}
  3500  		if fieldNum <= 0 {
  3501  			return fmt.Errorf("proto: PipelineInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3502  		}
  3503  		switch fieldNum {
  3504  		case 1:
  3505  			if wireType != 0 {
  3506  				return fmt.Errorf("proto: wrong wireType = %d for field Cookie", wireType)
  3507  			}
  3508  			m.Cookie = 0
  3509  			for shift := uint(0); ; shift += 7 {
  3510  				if shift >= 64 {
  3511  					return ErrIntOverflowDevices
  3512  				}
  3513  				if iNdEx >= l {
  3514  					return io.ErrUnexpectedEOF
  3515  				}
  3516  				b := dAtA[iNdEx]
  3517  				iNdEx++
  3518  				m.Cookie |= uint64(b&0x7F) << shift
  3519  				if b < 0x80 {
  3520  					break
  3521  				}
  3522  			}
  3523  		case 2:
  3524  			if wireType != 2 {
  3525  				return fmt.Errorf("proto: wrong wireType = %d for field P4Info", wireType)
  3526  			}
  3527  			var byteLen int
  3528  			for shift := uint(0); ; shift += 7 {
  3529  				if shift >= 64 {
  3530  					return ErrIntOverflowDevices
  3531  				}
  3532  				if iNdEx >= l {
  3533  					return io.ErrUnexpectedEOF
  3534  				}
  3535  				b := dAtA[iNdEx]
  3536  				iNdEx++
  3537  				byteLen |= int(b&0x7F) << shift
  3538  				if b < 0x80 {
  3539  					break
  3540  				}
  3541  			}
  3542  			if byteLen < 0 {
  3543  				return ErrInvalidLengthDevices
  3544  			}
  3545  			postIndex := iNdEx + byteLen
  3546  			if postIndex < 0 {
  3547  				return ErrInvalidLengthDevices
  3548  			}
  3549  			if postIndex > l {
  3550  				return io.ErrUnexpectedEOF
  3551  			}
  3552  			m.P4Info = append(m.P4Info[:0], dAtA[iNdEx:postIndex]...)
  3553  			if m.P4Info == nil {
  3554  				m.P4Info = []byte{}
  3555  			}
  3556  			iNdEx = postIndex
  3557  		case 3:
  3558  			if wireType != 2 {
  3559  				return fmt.Errorf("proto: wrong wireType = %d for field Tables", wireType)
  3560  			}
  3561  			var msglen int
  3562  			for shift := uint(0); ; shift += 7 {
  3563  				if shift >= 64 {
  3564  					return ErrIntOverflowDevices
  3565  				}
  3566  				if iNdEx >= l {
  3567  					return io.ErrUnexpectedEOF
  3568  				}
  3569  				b := dAtA[iNdEx]
  3570  				iNdEx++
  3571  				msglen |= int(b&0x7F) << shift
  3572  				if b < 0x80 {
  3573  					break
  3574  				}
  3575  			}
  3576  			if msglen < 0 {
  3577  				return ErrInvalidLengthDevices
  3578  			}
  3579  			postIndex := iNdEx + msglen
  3580  			if postIndex < 0 {
  3581  				return ErrInvalidLengthDevices
  3582  			}
  3583  			if postIndex > l {
  3584  				return io.ErrUnexpectedEOF
  3585  			}
  3586  			m.Tables = append(m.Tables, &EntitiesInfo{})
  3587  			if err := m.Tables[len(m.Tables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3588  				return err
  3589  			}
  3590  			iNdEx = postIndex
  3591  		case 4:
  3592  			if wireType != 2 {
  3593  				return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
  3594  			}
  3595  			var msglen int
  3596  			for shift := uint(0); ; shift += 7 {
  3597  				if shift >= 64 {
  3598  					return ErrIntOverflowDevices
  3599  				}
  3600  				if iNdEx >= l {
  3601  					return io.ErrUnexpectedEOF
  3602  				}
  3603  				b := dAtA[iNdEx]
  3604  				iNdEx++
  3605  				msglen |= int(b&0x7F) << shift
  3606  				if b < 0x80 {
  3607  					break
  3608  				}
  3609  			}
  3610  			if msglen < 0 {
  3611  				return ErrInvalidLengthDevices
  3612  			}
  3613  			postIndex := iNdEx + msglen
  3614  			if postIndex < 0 {
  3615  				return ErrInvalidLengthDevices
  3616  			}
  3617  			if postIndex > l {
  3618  				return io.ErrUnexpectedEOF
  3619  			}
  3620  			m.Counters = append(m.Counters, &EntitiesInfo{})
  3621  			if err := m.Counters[len(m.Counters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3622  				return err
  3623  			}
  3624  			iNdEx = postIndex
  3625  		case 5:
  3626  			if wireType != 2 {
  3627  				return fmt.Errorf("proto: wrong wireType = %d for field Meters", wireType)
  3628  			}
  3629  			var msglen int
  3630  			for shift := uint(0); ; shift += 7 {
  3631  				if shift >= 64 {
  3632  					return ErrIntOverflowDevices
  3633  				}
  3634  				if iNdEx >= l {
  3635  					return io.ErrUnexpectedEOF
  3636  				}
  3637  				b := dAtA[iNdEx]
  3638  				iNdEx++
  3639  				msglen |= int(b&0x7F) << shift
  3640  				if b < 0x80 {
  3641  					break
  3642  				}
  3643  			}
  3644  			if msglen < 0 {
  3645  				return ErrInvalidLengthDevices
  3646  			}
  3647  			postIndex := iNdEx + msglen
  3648  			if postIndex < 0 {
  3649  				return ErrInvalidLengthDevices
  3650  			}
  3651  			if postIndex > l {
  3652  				return io.ErrUnexpectedEOF
  3653  			}
  3654  			m.Meters = append(m.Meters, &EntitiesInfo{})
  3655  			if err := m.Meters[len(m.Meters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3656  				return err
  3657  			}
  3658  			iNdEx = postIndex
  3659  		case 6:
  3660  			if wireType != 2 {
  3661  				return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
  3662  			}
  3663  			var msglen int
  3664  			for shift := uint(0); ; shift += 7 {
  3665  				if shift >= 64 {
  3666  					return ErrIntOverflowDevices
  3667  				}
  3668  				if iNdEx >= l {
  3669  					return io.ErrUnexpectedEOF
  3670  				}
  3671  				b := dAtA[iNdEx]
  3672  				iNdEx++
  3673  				msglen |= int(b&0x7F) << shift
  3674  				if b < 0x80 {
  3675  					break
  3676  				}
  3677  			}
  3678  			if msglen < 0 {
  3679  				return ErrInvalidLengthDevices
  3680  			}
  3681  			postIndex := iNdEx + msglen
  3682  			if postIndex < 0 {
  3683  				return ErrInvalidLengthDevices
  3684  			}
  3685  			if postIndex > l {
  3686  				return io.ErrUnexpectedEOF
  3687  			}
  3688  			m.Groups = append(m.Groups, &EntitiesInfo{})
  3689  			if err := m.Groups[len(m.Groups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3690  				return err
  3691  			}
  3692  			iNdEx = postIndex
  3693  		case 7:
  3694  			if wireType != 2 {
  3695  				return fmt.Errorf("proto: wrong wireType = %d for field MulticastGroups", wireType)
  3696  			}
  3697  			var msglen int
  3698  			for shift := uint(0); ; shift += 7 {
  3699  				if shift >= 64 {
  3700  					return ErrIntOverflowDevices
  3701  				}
  3702  				if iNdEx >= l {
  3703  					return io.ErrUnexpectedEOF
  3704  				}
  3705  				b := dAtA[iNdEx]
  3706  				iNdEx++
  3707  				msglen |= int(b&0x7F) << shift
  3708  				if b < 0x80 {
  3709  					break
  3710  				}
  3711  			}
  3712  			if msglen < 0 {
  3713  				return ErrInvalidLengthDevices
  3714  			}
  3715  			postIndex := iNdEx + msglen
  3716  			if postIndex < 0 {
  3717  				return ErrInvalidLengthDevices
  3718  			}
  3719  			if postIndex > l {
  3720  				return io.ErrUnexpectedEOF
  3721  			}
  3722  			m.MulticastGroups = append(m.MulticastGroups, &EntitiesInfo{})
  3723  			if err := m.MulticastGroups[len(m.MulticastGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3724  				return err
  3725  			}
  3726  			iNdEx = postIndex
  3727  		case 8:
  3728  			if wireType != 2 {
  3729  				return fmt.Errorf("proto: wrong wireType = %d for field CloneSessions", wireType)
  3730  			}
  3731  			var msglen int
  3732  			for shift := uint(0); ; shift += 7 {
  3733  				if shift >= 64 {
  3734  					return ErrIntOverflowDevices
  3735  				}
  3736  				if iNdEx >= l {
  3737  					return io.ErrUnexpectedEOF
  3738  				}
  3739  				b := dAtA[iNdEx]
  3740  				iNdEx++
  3741  				msglen |= int(b&0x7F) << shift
  3742  				if b < 0x80 {
  3743  					break
  3744  				}
  3745  			}
  3746  			if msglen < 0 {
  3747  				return ErrInvalidLengthDevices
  3748  			}
  3749  			postIndex := iNdEx + msglen
  3750  			if postIndex < 0 {
  3751  				return ErrInvalidLengthDevices
  3752  			}
  3753  			if postIndex > l {
  3754  				return io.ErrUnexpectedEOF
  3755  			}
  3756  			m.CloneSessions = append(m.CloneSessions, &EntitiesInfo{})
  3757  			if err := m.CloneSessions[len(m.CloneSessions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3758  				return err
  3759  			}
  3760  			iNdEx = postIndex
  3761  		default:
  3762  			iNdEx = preIndex
  3763  			skippy, err := skipDevices(dAtA[iNdEx:])
  3764  			if err != nil {
  3765  				return err
  3766  			}
  3767  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3768  				return ErrInvalidLengthDevices
  3769  			}
  3770  			if (iNdEx + skippy) > l {
  3771  				return io.ErrUnexpectedEOF
  3772  			}
  3773  			iNdEx += skippy
  3774  		}
  3775  	}
  3776  
  3777  	if iNdEx > l {
  3778  		return io.ErrUnexpectedEOF
  3779  	}
  3780  	return nil
  3781  }
  3782  func (m *EntitiesInfo) Unmarshal(dAtA []byte) error {
  3783  	l := len(dAtA)
  3784  	iNdEx := 0
  3785  	for iNdEx < l {
  3786  		preIndex := iNdEx
  3787  		var wire uint64
  3788  		for shift := uint(0); ; shift += 7 {
  3789  			if shift >= 64 {
  3790  				return ErrIntOverflowDevices
  3791  			}
  3792  			if iNdEx >= l {
  3793  				return io.ErrUnexpectedEOF
  3794  			}
  3795  			b := dAtA[iNdEx]
  3796  			iNdEx++
  3797  			wire |= uint64(b&0x7F) << shift
  3798  			if b < 0x80 {
  3799  				break
  3800  			}
  3801  		}
  3802  		fieldNum := int32(wire >> 3)
  3803  		wireType := int(wire & 0x7)
  3804  		if wireType == 4 {
  3805  			return fmt.Errorf("proto: EntitiesInfo: wiretype end group for non-group")
  3806  		}
  3807  		if fieldNum <= 0 {
  3808  			return fmt.Errorf("proto: EntitiesInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3809  		}
  3810  		switch fieldNum {
  3811  		case 1:
  3812  			if wireType != 0 {
  3813  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3814  			}
  3815  			m.ID = 0
  3816  			for shift := uint(0); ; shift += 7 {
  3817  				if shift >= 64 {
  3818  					return ErrIntOverflowDevices
  3819  				}
  3820  				if iNdEx >= l {
  3821  					return io.ErrUnexpectedEOF
  3822  				}
  3823  				b := dAtA[iNdEx]
  3824  				iNdEx++
  3825  				m.ID |= uint32(b&0x7F) << shift
  3826  				if b < 0x80 {
  3827  					break
  3828  				}
  3829  			}
  3830  		case 2:
  3831  			if wireType != 0 {
  3832  				return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType)
  3833  			}
  3834  			m.Size_ = 0
  3835  			for shift := uint(0); ; shift += 7 {
  3836  				if shift >= 64 {
  3837  					return ErrIntOverflowDevices
  3838  				}
  3839  				if iNdEx >= l {
  3840  					return io.ErrUnexpectedEOF
  3841  				}
  3842  				b := dAtA[iNdEx]
  3843  				iNdEx++
  3844  				m.Size_ |= uint32(b&0x7F) << shift
  3845  				if b < 0x80 {
  3846  					break
  3847  				}
  3848  			}
  3849  		case 3:
  3850  			if wireType != 2 {
  3851  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3852  			}
  3853  			var stringLen uint64
  3854  			for shift := uint(0); ; shift += 7 {
  3855  				if shift >= 64 {
  3856  					return ErrIntOverflowDevices
  3857  				}
  3858  				if iNdEx >= l {
  3859  					return io.ErrUnexpectedEOF
  3860  				}
  3861  				b := dAtA[iNdEx]
  3862  				iNdEx++
  3863  				stringLen |= uint64(b&0x7F) << shift
  3864  				if b < 0x80 {
  3865  					break
  3866  				}
  3867  			}
  3868  			intStringLen := int(stringLen)
  3869  			if intStringLen < 0 {
  3870  				return ErrInvalidLengthDevices
  3871  			}
  3872  			postIndex := iNdEx + intStringLen
  3873  			if postIndex < 0 {
  3874  				return ErrInvalidLengthDevices
  3875  			}
  3876  			if postIndex > l {
  3877  				return io.ErrUnexpectedEOF
  3878  			}
  3879  			m.Name = string(dAtA[iNdEx:postIndex])
  3880  			iNdEx = postIndex
  3881  		default:
  3882  			iNdEx = preIndex
  3883  			skippy, err := skipDevices(dAtA[iNdEx:])
  3884  			if err != nil {
  3885  				return err
  3886  			}
  3887  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3888  				return ErrInvalidLengthDevices
  3889  			}
  3890  			if (iNdEx + skippy) > l {
  3891  				return io.ErrUnexpectedEOF
  3892  			}
  3893  			iNdEx += skippy
  3894  		}
  3895  	}
  3896  
  3897  	if iNdEx > l {
  3898  		return io.ErrUnexpectedEOF
  3899  	}
  3900  	return nil
  3901  }
  3902  func (m *GetDevicesRequest) Unmarshal(dAtA []byte) error {
  3903  	l := len(dAtA)
  3904  	iNdEx := 0
  3905  	for iNdEx < l {
  3906  		preIndex := iNdEx
  3907  		var wire uint64
  3908  		for shift := uint(0); ; shift += 7 {
  3909  			if shift >= 64 {
  3910  				return ErrIntOverflowDevices
  3911  			}
  3912  			if iNdEx >= l {
  3913  				return io.ErrUnexpectedEOF
  3914  			}
  3915  			b := dAtA[iNdEx]
  3916  			iNdEx++
  3917  			wire |= uint64(b&0x7F) << shift
  3918  			if b < 0x80 {
  3919  				break
  3920  			}
  3921  		}
  3922  		fieldNum := int32(wire >> 3)
  3923  		wireType := int(wire & 0x7)
  3924  		if wireType == 4 {
  3925  			return fmt.Errorf("proto: GetDevicesRequest: wiretype end group for non-group")
  3926  		}
  3927  		if fieldNum <= 0 {
  3928  			return fmt.Errorf("proto: GetDevicesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  3929  		}
  3930  		switch fieldNum {
  3931  		default:
  3932  			iNdEx = preIndex
  3933  			skippy, err := skipDevices(dAtA[iNdEx:])
  3934  			if err != nil {
  3935  				return err
  3936  			}
  3937  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  3938  				return ErrInvalidLengthDevices
  3939  			}
  3940  			if (iNdEx + skippy) > l {
  3941  				return io.ErrUnexpectedEOF
  3942  			}
  3943  			iNdEx += skippy
  3944  		}
  3945  	}
  3946  
  3947  	if iNdEx > l {
  3948  		return io.ErrUnexpectedEOF
  3949  	}
  3950  	return nil
  3951  }
  3952  func (m *GetDevicesResponse) Unmarshal(dAtA []byte) error {
  3953  	l := len(dAtA)
  3954  	iNdEx := 0
  3955  	for iNdEx < l {
  3956  		preIndex := iNdEx
  3957  		var wire uint64
  3958  		for shift := uint(0); ; shift += 7 {
  3959  			if shift >= 64 {
  3960  				return ErrIntOverflowDevices
  3961  			}
  3962  			if iNdEx >= l {
  3963  				return io.ErrUnexpectedEOF
  3964  			}
  3965  			b := dAtA[iNdEx]
  3966  			iNdEx++
  3967  			wire |= uint64(b&0x7F) << shift
  3968  			if b < 0x80 {
  3969  				break
  3970  			}
  3971  		}
  3972  		fieldNum := int32(wire >> 3)
  3973  		wireType := int(wire & 0x7)
  3974  		if wireType == 4 {
  3975  			return fmt.Errorf("proto: GetDevicesResponse: wiretype end group for non-group")
  3976  		}
  3977  		if fieldNum <= 0 {
  3978  			return fmt.Errorf("proto: GetDevicesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  3979  		}
  3980  		switch fieldNum {
  3981  		case 1:
  3982  			if wireType != 2 {
  3983  				return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  3984  			}
  3985  			var msglen int
  3986  			for shift := uint(0); ; shift += 7 {
  3987  				if shift >= 64 {
  3988  					return ErrIntOverflowDevices
  3989  				}
  3990  				if iNdEx >= l {
  3991  					return io.ErrUnexpectedEOF
  3992  				}
  3993  				b := dAtA[iNdEx]
  3994  				iNdEx++
  3995  				msglen |= int(b&0x7F) << shift
  3996  				if b < 0x80 {
  3997  					break
  3998  				}
  3999  			}
  4000  			if msglen < 0 {
  4001  				return ErrInvalidLengthDevices
  4002  			}
  4003  			postIndex := iNdEx + msglen
  4004  			if postIndex < 0 {
  4005  				return ErrInvalidLengthDevices
  4006  			}
  4007  			if postIndex > l {
  4008  				return io.ErrUnexpectedEOF
  4009  			}
  4010  			m.Devices = append(m.Devices, &Device{})
  4011  			if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4012  				return err
  4013  			}
  4014  			iNdEx = postIndex
  4015  		default:
  4016  			iNdEx = preIndex
  4017  			skippy, err := skipDevices(dAtA[iNdEx:])
  4018  			if err != nil {
  4019  				return err
  4020  			}
  4021  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4022  				return ErrInvalidLengthDevices
  4023  			}
  4024  			if (iNdEx + skippy) > l {
  4025  				return io.ErrUnexpectedEOF
  4026  			}
  4027  			iNdEx += skippy
  4028  		}
  4029  	}
  4030  
  4031  	if iNdEx > l {
  4032  		return io.ErrUnexpectedEOF
  4033  	}
  4034  	return nil
  4035  }
  4036  func (m *GetDeviceRequest) Unmarshal(dAtA []byte) error {
  4037  	l := len(dAtA)
  4038  	iNdEx := 0
  4039  	for iNdEx < l {
  4040  		preIndex := iNdEx
  4041  		var wire uint64
  4042  		for shift := uint(0); ; shift += 7 {
  4043  			if shift >= 64 {
  4044  				return ErrIntOverflowDevices
  4045  			}
  4046  			if iNdEx >= l {
  4047  				return io.ErrUnexpectedEOF
  4048  			}
  4049  			b := dAtA[iNdEx]
  4050  			iNdEx++
  4051  			wire |= uint64(b&0x7F) << shift
  4052  			if b < 0x80 {
  4053  				break
  4054  			}
  4055  		}
  4056  		fieldNum := int32(wire >> 3)
  4057  		wireType := int(wire & 0x7)
  4058  		if wireType == 4 {
  4059  			return fmt.Errorf("proto: GetDeviceRequest: wiretype end group for non-group")
  4060  		}
  4061  		if fieldNum <= 0 {
  4062  			return fmt.Errorf("proto: GetDeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4063  		}
  4064  		switch fieldNum {
  4065  		case 1:
  4066  			if wireType != 2 {
  4067  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4068  			}
  4069  			var stringLen uint64
  4070  			for shift := uint(0); ; shift += 7 {
  4071  				if shift >= 64 {
  4072  					return ErrIntOverflowDevices
  4073  				}
  4074  				if iNdEx >= l {
  4075  					return io.ErrUnexpectedEOF
  4076  				}
  4077  				b := dAtA[iNdEx]
  4078  				iNdEx++
  4079  				stringLen |= uint64(b&0x7F) << shift
  4080  				if b < 0x80 {
  4081  					break
  4082  				}
  4083  			}
  4084  			intStringLen := int(stringLen)
  4085  			if intStringLen < 0 {
  4086  				return ErrInvalidLengthDevices
  4087  			}
  4088  			postIndex := iNdEx + intStringLen
  4089  			if postIndex < 0 {
  4090  				return ErrInvalidLengthDevices
  4091  			}
  4092  			if postIndex > l {
  4093  				return io.ErrUnexpectedEOF
  4094  			}
  4095  			m.ID = DeviceID(dAtA[iNdEx:postIndex])
  4096  			iNdEx = postIndex
  4097  		default:
  4098  			iNdEx = preIndex
  4099  			skippy, err := skipDevices(dAtA[iNdEx:])
  4100  			if err != nil {
  4101  				return err
  4102  			}
  4103  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4104  				return ErrInvalidLengthDevices
  4105  			}
  4106  			if (iNdEx + skippy) > l {
  4107  				return io.ErrUnexpectedEOF
  4108  			}
  4109  			iNdEx += skippy
  4110  		}
  4111  	}
  4112  
  4113  	if iNdEx > l {
  4114  		return io.ErrUnexpectedEOF
  4115  	}
  4116  	return nil
  4117  }
  4118  func (m *GetDeviceResponse) Unmarshal(dAtA []byte) error {
  4119  	l := len(dAtA)
  4120  	iNdEx := 0
  4121  	for iNdEx < l {
  4122  		preIndex := iNdEx
  4123  		var wire uint64
  4124  		for shift := uint(0); ; shift += 7 {
  4125  			if shift >= 64 {
  4126  				return ErrIntOverflowDevices
  4127  			}
  4128  			if iNdEx >= l {
  4129  				return io.ErrUnexpectedEOF
  4130  			}
  4131  			b := dAtA[iNdEx]
  4132  			iNdEx++
  4133  			wire |= uint64(b&0x7F) << shift
  4134  			if b < 0x80 {
  4135  				break
  4136  			}
  4137  		}
  4138  		fieldNum := int32(wire >> 3)
  4139  		wireType := int(wire & 0x7)
  4140  		if wireType == 4 {
  4141  			return fmt.Errorf("proto: GetDeviceResponse: wiretype end group for non-group")
  4142  		}
  4143  		if fieldNum <= 0 {
  4144  			return fmt.Errorf("proto: GetDeviceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4145  		}
  4146  		switch fieldNum {
  4147  		case 1:
  4148  			if wireType != 2 {
  4149  				return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  4150  			}
  4151  			var msglen int
  4152  			for shift := uint(0); ; shift += 7 {
  4153  				if shift >= 64 {
  4154  					return ErrIntOverflowDevices
  4155  				}
  4156  				if iNdEx >= l {
  4157  					return io.ErrUnexpectedEOF
  4158  				}
  4159  				b := dAtA[iNdEx]
  4160  				iNdEx++
  4161  				msglen |= int(b&0x7F) << shift
  4162  				if b < 0x80 {
  4163  					break
  4164  				}
  4165  			}
  4166  			if msglen < 0 {
  4167  				return ErrInvalidLengthDevices
  4168  			}
  4169  			postIndex := iNdEx + msglen
  4170  			if postIndex < 0 {
  4171  				return ErrInvalidLengthDevices
  4172  			}
  4173  			if postIndex > l {
  4174  				return io.ErrUnexpectedEOF
  4175  			}
  4176  			if m.Device == nil {
  4177  				m.Device = &Device{}
  4178  			}
  4179  			if err := m.Device.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4180  				return err
  4181  			}
  4182  			iNdEx = postIndex
  4183  		default:
  4184  			iNdEx = preIndex
  4185  			skippy, err := skipDevices(dAtA[iNdEx:])
  4186  			if err != nil {
  4187  				return err
  4188  			}
  4189  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4190  				return ErrInvalidLengthDevices
  4191  			}
  4192  			if (iNdEx + skippy) > l {
  4193  				return io.ErrUnexpectedEOF
  4194  			}
  4195  			iNdEx += skippy
  4196  		}
  4197  	}
  4198  
  4199  	if iNdEx > l {
  4200  		return io.ErrUnexpectedEOF
  4201  	}
  4202  	return nil
  4203  }
  4204  func (m *AddDeviceRequest) Unmarshal(dAtA []byte) error {
  4205  	l := len(dAtA)
  4206  	iNdEx := 0
  4207  	for iNdEx < l {
  4208  		preIndex := iNdEx
  4209  		var wire uint64
  4210  		for shift := uint(0); ; shift += 7 {
  4211  			if shift >= 64 {
  4212  				return ErrIntOverflowDevices
  4213  			}
  4214  			if iNdEx >= l {
  4215  				return io.ErrUnexpectedEOF
  4216  			}
  4217  			b := dAtA[iNdEx]
  4218  			iNdEx++
  4219  			wire |= uint64(b&0x7F) << shift
  4220  			if b < 0x80 {
  4221  				break
  4222  			}
  4223  		}
  4224  		fieldNum := int32(wire >> 3)
  4225  		wireType := int(wire & 0x7)
  4226  		if wireType == 4 {
  4227  			return fmt.Errorf("proto: AddDeviceRequest: wiretype end group for non-group")
  4228  		}
  4229  		if fieldNum <= 0 {
  4230  			return fmt.Errorf("proto: AddDeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4231  		}
  4232  		switch fieldNum {
  4233  		case 1:
  4234  			if wireType != 2 {
  4235  				return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  4236  			}
  4237  			var msglen int
  4238  			for shift := uint(0); ; shift += 7 {
  4239  				if shift >= 64 {
  4240  					return ErrIntOverflowDevices
  4241  				}
  4242  				if iNdEx >= l {
  4243  					return io.ErrUnexpectedEOF
  4244  				}
  4245  				b := dAtA[iNdEx]
  4246  				iNdEx++
  4247  				msglen |= int(b&0x7F) << shift
  4248  				if b < 0x80 {
  4249  					break
  4250  				}
  4251  			}
  4252  			if msglen < 0 {
  4253  				return ErrInvalidLengthDevices
  4254  			}
  4255  			postIndex := iNdEx + msglen
  4256  			if postIndex < 0 {
  4257  				return ErrInvalidLengthDevices
  4258  			}
  4259  			if postIndex > l {
  4260  				return io.ErrUnexpectedEOF
  4261  			}
  4262  			if m.Device == nil {
  4263  				m.Device = &Device{}
  4264  			}
  4265  			if err := m.Device.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4266  				return err
  4267  			}
  4268  			iNdEx = postIndex
  4269  		default:
  4270  			iNdEx = preIndex
  4271  			skippy, err := skipDevices(dAtA[iNdEx:])
  4272  			if err != nil {
  4273  				return err
  4274  			}
  4275  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4276  				return ErrInvalidLengthDevices
  4277  			}
  4278  			if (iNdEx + skippy) > l {
  4279  				return io.ErrUnexpectedEOF
  4280  			}
  4281  			iNdEx += skippy
  4282  		}
  4283  	}
  4284  
  4285  	if iNdEx > l {
  4286  		return io.ErrUnexpectedEOF
  4287  	}
  4288  	return nil
  4289  }
  4290  func (m *AddDeviceResponse) Unmarshal(dAtA []byte) error {
  4291  	l := len(dAtA)
  4292  	iNdEx := 0
  4293  	for iNdEx < l {
  4294  		preIndex := iNdEx
  4295  		var wire uint64
  4296  		for shift := uint(0); ; shift += 7 {
  4297  			if shift >= 64 {
  4298  				return ErrIntOverflowDevices
  4299  			}
  4300  			if iNdEx >= l {
  4301  				return io.ErrUnexpectedEOF
  4302  			}
  4303  			b := dAtA[iNdEx]
  4304  			iNdEx++
  4305  			wire |= uint64(b&0x7F) << shift
  4306  			if b < 0x80 {
  4307  				break
  4308  			}
  4309  		}
  4310  		fieldNum := int32(wire >> 3)
  4311  		wireType := int(wire & 0x7)
  4312  		if wireType == 4 {
  4313  			return fmt.Errorf("proto: AddDeviceResponse: wiretype end group for non-group")
  4314  		}
  4315  		if fieldNum <= 0 {
  4316  			return fmt.Errorf("proto: AddDeviceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4317  		}
  4318  		switch fieldNum {
  4319  		default:
  4320  			iNdEx = preIndex
  4321  			skippy, err := skipDevices(dAtA[iNdEx:])
  4322  			if err != nil {
  4323  				return err
  4324  			}
  4325  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4326  				return ErrInvalidLengthDevices
  4327  			}
  4328  			if (iNdEx + skippy) > l {
  4329  				return io.ErrUnexpectedEOF
  4330  			}
  4331  			iNdEx += skippy
  4332  		}
  4333  	}
  4334  
  4335  	if iNdEx > l {
  4336  		return io.ErrUnexpectedEOF
  4337  	}
  4338  	return nil
  4339  }
  4340  func (m *RemoveDeviceRequest) Unmarshal(dAtA []byte) error {
  4341  	l := len(dAtA)
  4342  	iNdEx := 0
  4343  	for iNdEx < l {
  4344  		preIndex := iNdEx
  4345  		var wire uint64
  4346  		for shift := uint(0); ; shift += 7 {
  4347  			if shift >= 64 {
  4348  				return ErrIntOverflowDevices
  4349  			}
  4350  			if iNdEx >= l {
  4351  				return io.ErrUnexpectedEOF
  4352  			}
  4353  			b := dAtA[iNdEx]
  4354  			iNdEx++
  4355  			wire |= uint64(b&0x7F) << shift
  4356  			if b < 0x80 {
  4357  				break
  4358  			}
  4359  		}
  4360  		fieldNum := int32(wire >> 3)
  4361  		wireType := int(wire & 0x7)
  4362  		if wireType == 4 {
  4363  			return fmt.Errorf("proto: RemoveDeviceRequest: wiretype end group for non-group")
  4364  		}
  4365  		if fieldNum <= 0 {
  4366  			return fmt.Errorf("proto: RemoveDeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4367  		}
  4368  		switch fieldNum {
  4369  		case 1:
  4370  			if wireType != 2 {
  4371  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4372  			}
  4373  			var stringLen uint64
  4374  			for shift := uint(0); ; shift += 7 {
  4375  				if shift >= 64 {
  4376  					return ErrIntOverflowDevices
  4377  				}
  4378  				if iNdEx >= l {
  4379  					return io.ErrUnexpectedEOF
  4380  				}
  4381  				b := dAtA[iNdEx]
  4382  				iNdEx++
  4383  				stringLen |= uint64(b&0x7F) << shift
  4384  				if b < 0x80 {
  4385  					break
  4386  				}
  4387  			}
  4388  			intStringLen := int(stringLen)
  4389  			if intStringLen < 0 {
  4390  				return ErrInvalidLengthDevices
  4391  			}
  4392  			postIndex := iNdEx + intStringLen
  4393  			if postIndex < 0 {
  4394  				return ErrInvalidLengthDevices
  4395  			}
  4396  			if postIndex > l {
  4397  				return io.ErrUnexpectedEOF
  4398  			}
  4399  			m.ID = DeviceID(dAtA[iNdEx:postIndex])
  4400  			iNdEx = postIndex
  4401  		default:
  4402  			iNdEx = preIndex
  4403  			skippy, err := skipDevices(dAtA[iNdEx:])
  4404  			if err != nil {
  4405  				return err
  4406  			}
  4407  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4408  				return ErrInvalidLengthDevices
  4409  			}
  4410  			if (iNdEx + skippy) > l {
  4411  				return io.ErrUnexpectedEOF
  4412  			}
  4413  			iNdEx += skippy
  4414  		}
  4415  	}
  4416  
  4417  	if iNdEx > l {
  4418  		return io.ErrUnexpectedEOF
  4419  	}
  4420  	return nil
  4421  }
  4422  func (m *RemoveDeviceResponse) Unmarshal(dAtA []byte) error {
  4423  	l := len(dAtA)
  4424  	iNdEx := 0
  4425  	for iNdEx < l {
  4426  		preIndex := iNdEx
  4427  		var wire uint64
  4428  		for shift := uint(0); ; shift += 7 {
  4429  			if shift >= 64 {
  4430  				return ErrIntOverflowDevices
  4431  			}
  4432  			if iNdEx >= l {
  4433  				return io.ErrUnexpectedEOF
  4434  			}
  4435  			b := dAtA[iNdEx]
  4436  			iNdEx++
  4437  			wire |= uint64(b&0x7F) << shift
  4438  			if b < 0x80 {
  4439  				break
  4440  			}
  4441  		}
  4442  		fieldNum := int32(wire >> 3)
  4443  		wireType := int(wire & 0x7)
  4444  		if wireType == 4 {
  4445  			return fmt.Errorf("proto: RemoveDeviceResponse: wiretype end group for non-group")
  4446  		}
  4447  		if fieldNum <= 0 {
  4448  			return fmt.Errorf("proto: RemoveDeviceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4449  		}
  4450  		switch fieldNum {
  4451  		default:
  4452  			iNdEx = preIndex
  4453  			skippy, err := skipDevices(dAtA[iNdEx:])
  4454  			if err != nil {
  4455  				return err
  4456  			}
  4457  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4458  				return ErrInvalidLengthDevices
  4459  			}
  4460  			if (iNdEx + skippy) > l {
  4461  				return io.ErrUnexpectedEOF
  4462  			}
  4463  			iNdEx += skippy
  4464  		}
  4465  	}
  4466  
  4467  	if iNdEx > l {
  4468  		return io.ErrUnexpectedEOF
  4469  	}
  4470  	return nil
  4471  }
  4472  func (m *StopDeviceRequest) Unmarshal(dAtA []byte) error {
  4473  	l := len(dAtA)
  4474  	iNdEx := 0
  4475  	for iNdEx < l {
  4476  		preIndex := iNdEx
  4477  		var wire uint64
  4478  		for shift := uint(0); ; shift += 7 {
  4479  			if shift >= 64 {
  4480  				return ErrIntOverflowDevices
  4481  			}
  4482  			if iNdEx >= l {
  4483  				return io.ErrUnexpectedEOF
  4484  			}
  4485  			b := dAtA[iNdEx]
  4486  			iNdEx++
  4487  			wire |= uint64(b&0x7F) << shift
  4488  			if b < 0x80 {
  4489  				break
  4490  			}
  4491  		}
  4492  		fieldNum := int32(wire >> 3)
  4493  		wireType := int(wire & 0x7)
  4494  		if wireType == 4 {
  4495  			return fmt.Errorf("proto: StopDeviceRequest: wiretype end group for non-group")
  4496  		}
  4497  		if fieldNum <= 0 {
  4498  			return fmt.Errorf("proto: StopDeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4499  		}
  4500  		switch fieldNum {
  4501  		case 1:
  4502  			if wireType != 2 {
  4503  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4504  			}
  4505  			var stringLen uint64
  4506  			for shift := uint(0); ; shift += 7 {
  4507  				if shift >= 64 {
  4508  					return ErrIntOverflowDevices
  4509  				}
  4510  				if iNdEx >= l {
  4511  					return io.ErrUnexpectedEOF
  4512  				}
  4513  				b := dAtA[iNdEx]
  4514  				iNdEx++
  4515  				stringLen |= uint64(b&0x7F) << shift
  4516  				if b < 0x80 {
  4517  					break
  4518  				}
  4519  			}
  4520  			intStringLen := int(stringLen)
  4521  			if intStringLen < 0 {
  4522  				return ErrInvalidLengthDevices
  4523  			}
  4524  			postIndex := iNdEx + intStringLen
  4525  			if postIndex < 0 {
  4526  				return ErrInvalidLengthDevices
  4527  			}
  4528  			if postIndex > l {
  4529  				return io.ErrUnexpectedEOF
  4530  			}
  4531  			m.ID = DeviceID(dAtA[iNdEx:postIndex])
  4532  			iNdEx = postIndex
  4533  		case 2:
  4534  			if wireType != 0 {
  4535  				return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
  4536  			}
  4537  			m.Mode = 0
  4538  			for shift := uint(0); ; shift += 7 {
  4539  				if shift >= 64 {
  4540  					return ErrIntOverflowDevices
  4541  				}
  4542  				if iNdEx >= l {
  4543  					return io.ErrUnexpectedEOF
  4544  				}
  4545  				b := dAtA[iNdEx]
  4546  				iNdEx++
  4547  				m.Mode |= StopMode(b&0x7F) << shift
  4548  				if b < 0x80 {
  4549  					break
  4550  				}
  4551  			}
  4552  		default:
  4553  			iNdEx = preIndex
  4554  			skippy, err := skipDevices(dAtA[iNdEx:])
  4555  			if err != nil {
  4556  				return err
  4557  			}
  4558  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4559  				return ErrInvalidLengthDevices
  4560  			}
  4561  			if (iNdEx + skippy) > l {
  4562  				return io.ErrUnexpectedEOF
  4563  			}
  4564  			iNdEx += skippy
  4565  		}
  4566  	}
  4567  
  4568  	if iNdEx > l {
  4569  		return io.ErrUnexpectedEOF
  4570  	}
  4571  	return nil
  4572  }
  4573  func (m *StopDeviceResponse) Unmarshal(dAtA []byte) error {
  4574  	l := len(dAtA)
  4575  	iNdEx := 0
  4576  	for iNdEx < l {
  4577  		preIndex := iNdEx
  4578  		var wire uint64
  4579  		for shift := uint(0); ; shift += 7 {
  4580  			if shift >= 64 {
  4581  				return ErrIntOverflowDevices
  4582  			}
  4583  			if iNdEx >= l {
  4584  				return io.ErrUnexpectedEOF
  4585  			}
  4586  			b := dAtA[iNdEx]
  4587  			iNdEx++
  4588  			wire |= uint64(b&0x7F) << shift
  4589  			if b < 0x80 {
  4590  				break
  4591  			}
  4592  		}
  4593  		fieldNum := int32(wire >> 3)
  4594  		wireType := int(wire & 0x7)
  4595  		if wireType == 4 {
  4596  			return fmt.Errorf("proto: StopDeviceResponse: wiretype end group for non-group")
  4597  		}
  4598  		if fieldNum <= 0 {
  4599  			return fmt.Errorf("proto: StopDeviceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4600  		}
  4601  		switch fieldNum {
  4602  		default:
  4603  			iNdEx = preIndex
  4604  			skippy, err := skipDevices(dAtA[iNdEx:])
  4605  			if err != nil {
  4606  				return err
  4607  			}
  4608  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4609  				return ErrInvalidLengthDevices
  4610  			}
  4611  			if (iNdEx + skippy) > l {
  4612  				return io.ErrUnexpectedEOF
  4613  			}
  4614  			iNdEx += skippy
  4615  		}
  4616  	}
  4617  
  4618  	if iNdEx > l {
  4619  		return io.ErrUnexpectedEOF
  4620  	}
  4621  	return nil
  4622  }
  4623  func (m *StartDeviceRequest) Unmarshal(dAtA []byte) error {
  4624  	l := len(dAtA)
  4625  	iNdEx := 0
  4626  	for iNdEx < l {
  4627  		preIndex := iNdEx
  4628  		var wire uint64
  4629  		for shift := uint(0); ; shift += 7 {
  4630  			if shift >= 64 {
  4631  				return ErrIntOverflowDevices
  4632  			}
  4633  			if iNdEx >= l {
  4634  				return io.ErrUnexpectedEOF
  4635  			}
  4636  			b := dAtA[iNdEx]
  4637  			iNdEx++
  4638  			wire |= uint64(b&0x7F) << shift
  4639  			if b < 0x80 {
  4640  				break
  4641  			}
  4642  		}
  4643  		fieldNum := int32(wire >> 3)
  4644  		wireType := int(wire & 0x7)
  4645  		if wireType == 4 {
  4646  			return fmt.Errorf("proto: StartDeviceRequest: wiretype end group for non-group")
  4647  		}
  4648  		if fieldNum <= 0 {
  4649  			return fmt.Errorf("proto: StartDeviceRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4650  		}
  4651  		switch fieldNum {
  4652  		case 1:
  4653  			if wireType != 2 {
  4654  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4655  			}
  4656  			var stringLen uint64
  4657  			for shift := uint(0); ; shift += 7 {
  4658  				if shift >= 64 {
  4659  					return ErrIntOverflowDevices
  4660  				}
  4661  				if iNdEx >= l {
  4662  					return io.ErrUnexpectedEOF
  4663  				}
  4664  				b := dAtA[iNdEx]
  4665  				iNdEx++
  4666  				stringLen |= uint64(b&0x7F) << shift
  4667  				if b < 0x80 {
  4668  					break
  4669  				}
  4670  			}
  4671  			intStringLen := int(stringLen)
  4672  			if intStringLen < 0 {
  4673  				return ErrInvalidLengthDevices
  4674  			}
  4675  			postIndex := iNdEx + intStringLen
  4676  			if postIndex < 0 {
  4677  				return ErrInvalidLengthDevices
  4678  			}
  4679  			if postIndex > l {
  4680  				return io.ErrUnexpectedEOF
  4681  			}
  4682  			m.ID = DeviceID(dAtA[iNdEx:postIndex])
  4683  			iNdEx = postIndex
  4684  		default:
  4685  			iNdEx = preIndex
  4686  			skippy, err := skipDevices(dAtA[iNdEx:])
  4687  			if err != nil {
  4688  				return err
  4689  			}
  4690  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4691  				return ErrInvalidLengthDevices
  4692  			}
  4693  			if (iNdEx + skippy) > l {
  4694  				return io.ErrUnexpectedEOF
  4695  			}
  4696  			iNdEx += skippy
  4697  		}
  4698  	}
  4699  
  4700  	if iNdEx > l {
  4701  		return io.ErrUnexpectedEOF
  4702  	}
  4703  	return nil
  4704  }
  4705  func (m *StartDeviceResponse) Unmarshal(dAtA []byte) error {
  4706  	l := len(dAtA)
  4707  	iNdEx := 0
  4708  	for iNdEx < l {
  4709  		preIndex := iNdEx
  4710  		var wire uint64
  4711  		for shift := uint(0); ; shift += 7 {
  4712  			if shift >= 64 {
  4713  				return ErrIntOverflowDevices
  4714  			}
  4715  			if iNdEx >= l {
  4716  				return io.ErrUnexpectedEOF
  4717  			}
  4718  			b := dAtA[iNdEx]
  4719  			iNdEx++
  4720  			wire |= uint64(b&0x7F) << shift
  4721  			if b < 0x80 {
  4722  				break
  4723  			}
  4724  		}
  4725  		fieldNum := int32(wire >> 3)
  4726  		wireType := int(wire & 0x7)
  4727  		if wireType == 4 {
  4728  			return fmt.Errorf("proto: StartDeviceResponse: wiretype end group for non-group")
  4729  		}
  4730  		if fieldNum <= 0 {
  4731  			return fmt.Errorf("proto: StartDeviceResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4732  		}
  4733  		switch fieldNum {
  4734  		default:
  4735  			iNdEx = preIndex
  4736  			skippy, err := skipDevices(dAtA[iNdEx:])
  4737  			if err != nil {
  4738  				return err
  4739  			}
  4740  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4741  				return ErrInvalidLengthDevices
  4742  			}
  4743  			if (iNdEx + skippy) > l {
  4744  				return io.ErrUnexpectedEOF
  4745  			}
  4746  			iNdEx += skippy
  4747  		}
  4748  	}
  4749  
  4750  	if iNdEx > l {
  4751  		return io.ErrUnexpectedEOF
  4752  	}
  4753  	return nil
  4754  }
  4755  func (m *DisablePortRequest) Unmarshal(dAtA []byte) error {
  4756  	l := len(dAtA)
  4757  	iNdEx := 0
  4758  	for iNdEx < l {
  4759  		preIndex := iNdEx
  4760  		var wire uint64
  4761  		for shift := uint(0); ; shift += 7 {
  4762  			if shift >= 64 {
  4763  				return ErrIntOverflowDevices
  4764  			}
  4765  			if iNdEx >= l {
  4766  				return io.ErrUnexpectedEOF
  4767  			}
  4768  			b := dAtA[iNdEx]
  4769  			iNdEx++
  4770  			wire |= uint64(b&0x7F) << shift
  4771  			if b < 0x80 {
  4772  				break
  4773  			}
  4774  		}
  4775  		fieldNum := int32(wire >> 3)
  4776  		wireType := int(wire & 0x7)
  4777  		if wireType == 4 {
  4778  			return fmt.Errorf("proto: DisablePortRequest: wiretype end group for non-group")
  4779  		}
  4780  		if fieldNum <= 0 {
  4781  			return fmt.Errorf("proto: DisablePortRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4782  		}
  4783  		switch fieldNum {
  4784  		case 1:
  4785  			if wireType != 2 {
  4786  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4787  			}
  4788  			var stringLen uint64
  4789  			for shift := uint(0); ; shift += 7 {
  4790  				if shift >= 64 {
  4791  					return ErrIntOverflowDevices
  4792  				}
  4793  				if iNdEx >= l {
  4794  					return io.ErrUnexpectedEOF
  4795  				}
  4796  				b := dAtA[iNdEx]
  4797  				iNdEx++
  4798  				stringLen |= uint64(b&0x7F) << shift
  4799  				if b < 0x80 {
  4800  					break
  4801  				}
  4802  			}
  4803  			intStringLen := int(stringLen)
  4804  			if intStringLen < 0 {
  4805  				return ErrInvalidLengthDevices
  4806  			}
  4807  			postIndex := iNdEx + intStringLen
  4808  			if postIndex < 0 {
  4809  				return ErrInvalidLengthDevices
  4810  			}
  4811  			if postIndex > l {
  4812  				return io.ErrUnexpectedEOF
  4813  			}
  4814  			m.ID = PortID(dAtA[iNdEx:postIndex])
  4815  			iNdEx = postIndex
  4816  		case 2:
  4817  			if wireType != 0 {
  4818  				return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
  4819  			}
  4820  			m.Mode = 0
  4821  			for shift := uint(0); ; shift += 7 {
  4822  				if shift >= 64 {
  4823  					return ErrIntOverflowDevices
  4824  				}
  4825  				if iNdEx >= l {
  4826  					return io.ErrUnexpectedEOF
  4827  				}
  4828  				b := dAtA[iNdEx]
  4829  				iNdEx++
  4830  				m.Mode |= StopMode(b&0x7F) << shift
  4831  				if b < 0x80 {
  4832  					break
  4833  				}
  4834  			}
  4835  		default:
  4836  			iNdEx = preIndex
  4837  			skippy, err := skipDevices(dAtA[iNdEx:])
  4838  			if err != nil {
  4839  				return err
  4840  			}
  4841  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4842  				return ErrInvalidLengthDevices
  4843  			}
  4844  			if (iNdEx + skippy) > l {
  4845  				return io.ErrUnexpectedEOF
  4846  			}
  4847  			iNdEx += skippy
  4848  		}
  4849  	}
  4850  
  4851  	if iNdEx > l {
  4852  		return io.ErrUnexpectedEOF
  4853  	}
  4854  	return nil
  4855  }
  4856  func (m *DisablePortResponse) Unmarshal(dAtA []byte) error {
  4857  	l := len(dAtA)
  4858  	iNdEx := 0
  4859  	for iNdEx < l {
  4860  		preIndex := iNdEx
  4861  		var wire uint64
  4862  		for shift := uint(0); ; shift += 7 {
  4863  			if shift >= 64 {
  4864  				return ErrIntOverflowDevices
  4865  			}
  4866  			if iNdEx >= l {
  4867  				return io.ErrUnexpectedEOF
  4868  			}
  4869  			b := dAtA[iNdEx]
  4870  			iNdEx++
  4871  			wire |= uint64(b&0x7F) << shift
  4872  			if b < 0x80 {
  4873  				break
  4874  			}
  4875  		}
  4876  		fieldNum := int32(wire >> 3)
  4877  		wireType := int(wire & 0x7)
  4878  		if wireType == 4 {
  4879  			return fmt.Errorf("proto: DisablePortResponse: wiretype end group for non-group")
  4880  		}
  4881  		if fieldNum <= 0 {
  4882  			return fmt.Errorf("proto: DisablePortResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  4883  		}
  4884  		switch fieldNum {
  4885  		default:
  4886  			iNdEx = preIndex
  4887  			skippy, err := skipDevices(dAtA[iNdEx:])
  4888  			if err != nil {
  4889  				return err
  4890  			}
  4891  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4892  				return ErrInvalidLengthDevices
  4893  			}
  4894  			if (iNdEx + skippy) > l {
  4895  				return io.ErrUnexpectedEOF
  4896  			}
  4897  			iNdEx += skippy
  4898  		}
  4899  	}
  4900  
  4901  	if iNdEx > l {
  4902  		return io.ErrUnexpectedEOF
  4903  	}
  4904  	return nil
  4905  }
  4906  func (m *EnablePortRequest) Unmarshal(dAtA []byte) error {
  4907  	l := len(dAtA)
  4908  	iNdEx := 0
  4909  	for iNdEx < l {
  4910  		preIndex := iNdEx
  4911  		var wire uint64
  4912  		for shift := uint(0); ; shift += 7 {
  4913  			if shift >= 64 {
  4914  				return ErrIntOverflowDevices
  4915  			}
  4916  			if iNdEx >= l {
  4917  				return io.ErrUnexpectedEOF
  4918  			}
  4919  			b := dAtA[iNdEx]
  4920  			iNdEx++
  4921  			wire |= uint64(b&0x7F) << shift
  4922  			if b < 0x80 {
  4923  				break
  4924  			}
  4925  		}
  4926  		fieldNum := int32(wire >> 3)
  4927  		wireType := int(wire & 0x7)
  4928  		if wireType == 4 {
  4929  			return fmt.Errorf("proto: EnablePortRequest: wiretype end group for non-group")
  4930  		}
  4931  		if fieldNum <= 0 {
  4932  			return fmt.Errorf("proto: EnablePortRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  4933  		}
  4934  		switch fieldNum {
  4935  		case 1:
  4936  			if wireType != 2 {
  4937  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4938  			}
  4939  			var stringLen uint64
  4940  			for shift := uint(0); ; shift += 7 {
  4941  				if shift >= 64 {
  4942  					return ErrIntOverflowDevices
  4943  				}
  4944  				if iNdEx >= l {
  4945  					return io.ErrUnexpectedEOF
  4946  				}
  4947  				b := dAtA[iNdEx]
  4948  				iNdEx++
  4949  				stringLen |= uint64(b&0x7F) << shift
  4950  				if b < 0x80 {
  4951  					break
  4952  				}
  4953  			}
  4954  			intStringLen := int(stringLen)
  4955  			if intStringLen < 0 {
  4956  				return ErrInvalidLengthDevices
  4957  			}
  4958  			postIndex := iNdEx + intStringLen
  4959  			if postIndex < 0 {
  4960  				return ErrInvalidLengthDevices
  4961  			}
  4962  			if postIndex > l {
  4963  				return io.ErrUnexpectedEOF
  4964  			}
  4965  			m.ID = PortID(dAtA[iNdEx:postIndex])
  4966  			iNdEx = postIndex
  4967  		default:
  4968  			iNdEx = preIndex
  4969  			skippy, err := skipDevices(dAtA[iNdEx:])
  4970  			if err != nil {
  4971  				return err
  4972  			}
  4973  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4974  				return ErrInvalidLengthDevices
  4975  			}
  4976  			if (iNdEx + skippy) > l {
  4977  				return io.ErrUnexpectedEOF
  4978  			}
  4979  			iNdEx += skippy
  4980  		}
  4981  	}
  4982  
  4983  	if iNdEx > l {
  4984  		return io.ErrUnexpectedEOF
  4985  	}
  4986  	return nil
  4987  }
  4988  func (m *EnablePortResponse) Unmarshal(dAtA []byte) error {
  4989  	l := len(dAtA)
  4990  	iNdEx := 0
  4991  	for iNdEx < l {
  4992  		preIndex := iNdEx
  4993  		var wire uint64
  4994  		for shift := uint(0); ; shift += 7 {
  4995  			if shift >= 64 {
  4996  				return ErrIntOverflowDevices
  4997  			}
  4998  			if iNdEx >= l {
  4999  				return io.ErrUnexpectedEOF
  5000  			}
  5001  			b := dAtA[iNdEx]
  5002  			iNdEx++
  5003  			wire |= uint64(b&0x7F) << shift
  5004  			if b < 0x80 {
  5005  				break
  5006  			}
  5007  		}
  5008  		fieldNum := int32(wire >> 3)
  5009  		wireType := int(wire & 0x7)
  5010  		if wireType == 4 {
  5011  			return fmt.Errorf("proto: EnablePortResponse: wiretype end group for non-group")
  5012  		}
  5013  		if fieldNum <= 0 {
  5014  			return fmt.Errorf("proto: EnablePortResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  5015  		}
  5016  		switch fieldNum {
  5017  		default:
  5018  			iNdEx = preIndex
  5019  			skippy, err := skipDevices(dAtA[iNdEx:])
  5020  			if err != nil {
  5021  				return err
  5022  			}
  5023  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5024  				return ErrInvalidLengthDevices
  5025  			}
  5026  			if (iNdEx + skippy) > l {
  5027  				return io.ErrUnexpectedEOF
  5028  			}
  5029  			iNdEx += skippy
  5030  		}
  5031  	}
  5032  
  5033  	if iNdEx > l {
  5034  		return io.ErrUnexpectedEOF
  5035  	}
  5036  	return nil
  5037  }
  5038  func (m *EmitLLDPPacketRequest) Unmarshal(dAtA []byte) error {
  5039  	l := len(dAtA)
  5040  	iNdEx := 0
  5041  	for iNdEx < l {
  5042  		preIndex := iNdEx
  5043  		var wire uint64
  5044  		for shift := uint(0); ; shift += 7 {
  5045  			if shift >= 64 {
  5046  				return ErrIntOverflowDevices
  5047  			}
  5048  			if iNdEx >= l {
  5049  				return io.ErrUnexpectedEOF
  5050  			}
  5051  			b := dAtA[iNdEx]
  5052  			iNdEx++
  5053  			wire |= uint64(b&0x7F) << shift
  5054  			if b < 0x80 {
  5055  				break
  5056  			}
  5057  		}
  5058  		fieldNum := int32(wire >> 3)
  5059  		wireType := int(wire & 0x7)
  5060  		if wireType == 4 {
  5061  			return fmt.Errorf("proto: EmitLLDPPacketRequest: wiretype end group for non-group")
  5062  		}
  5063  		if fieldNum <= 0 {
  5064  			return fmt.Errorf("proto: EmitLLDPPacketRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  5065  		}
  5066  		switch fieldNum {
  5067  		case 1:
  5068  			if wireType != 2 {
  5069  				return fmt.Errorf("proto: wrong wireType = %d for field PortID", wireType)
  5070  			}
  5071  			var stringLen uint64
  5072  			for shift := uint(0); ; shift += 7 {
  5073  				if shift >= 64 {
  5074  					return ErrIntOverflowDevices
  5075  				}
  5076  				if iNdEx >= l {
  5077  					return io.ErrUnexpectedEOF
  5078  				}
  5079  				b := dAtA[iNdEx]
  5080  				iNdEx++
  5081  				stringLen |= uint64(b&0x7F) << shift
  5082  				if b < 0x80 {
  5083  					break
  5084  				}
  5085  			}
  5086  			intStringLen := int(stringLen)
  5087  			if intStringLen < 0 {
  5088  				return ErrInvalidLengthDevices
  5089  			}
  5090  			postIndex := iNdEx + intStringLen
  5091  			if postIndex < 0 {
  5092  				return ErrInvalidLengthDevices
  5093  			}
  5094  			if postIndex > l {
  5095  				return io.ErrUnexpectedEOF
  5096  			}
  5097  			m.PortID = PortID(dAtA[iNdEx:postIndex])
  5098  			iNdEx = postIndex
  5099  		case 2:
  5100  			if wireType != 2 {
  5101  				return fmt.Errorf("proto: wrong wireType = %d for field Packet", wireType)
  5102  			}
  5103  			var byteLen int
  5104  			for shift := uint(0); ; shift += 7 {
  5105  				if shift >= 64 {
  5106  					return ErrIntOverflowDevices
  5107  				}
  5108  				if iNdEx >= l {
  5109  					return io.ErrUnexpectedEOF
  5110  				}
  5111  				b := dAtA[iNdEx]
  5112  				iNdEx++
  5113  				byteLen |= int(b&0x7F) << shift
  5114  				if b < 0x80 {
  5115  					break
  5116  				}
  5117  			}
  5118  			if byteLen < 0 {
  5119  				return ErrInvalidLengthDevices
  5120  			}
  5121  			postIndex := iNdEx + byteLen
  5122  			if postIndex < 0 {
  5123  				return ErrInvalidLengthDevices
  5124  			}
  5125  			if postIndex > l {
  5126  				return io.ErrUnexpectedEOF
  5127  			}
  5128  			m.Packet = append(m.Packet[:0], dAtA[iNdEx:postIndex]...)
  5129  			if m.Packet == nil {
  5130  				m.Packet = []byte{}
  5131  			}
  5132  			iNdEx = postIndex
  5133  		default:
  5134  			iNdEx = preIndex
  5135  			skippy, err := skipDevices(dAtA[iNdEx:])
  5136  			if err != nil {
  5137  				return err
  5138  			}
  5139  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5140  				return ErrInvalidLengthDevices
  5141  			}
  5142  			if (iNdEx + skippy) > l {
  5143  				return io.ErrUnexpectedEOF
  5144  			}
  5145  			iNdEx += skippy
  5146  		}
  5147  	}
  5148  
  5149  	if iNdEx > l {
  5150  		return io.ErrUnexpectedEOF
  5151  	}
  5152  	return nil
  5153  }
  5154  func (m *EmitLLDPPacketResponse) Unmarshal(dAtA []byte) error {
  5155  	l := len(dAtA)
  5156  	iNdEx := 0
  5157  	for iNdEx < l {
  5158  		preIndex := iNdEx
  5159  		var wire uint64
  5160  		for shift := uint(0); ; shift += 7 {
  5161  			if shift >= 64 {
  5162  				return ErrIntOverflowDevices
  5163  			}
  5164  			if iNdEx >= l {
  5165  				return io.ErrUnexpectedEOF
  5166  			}
  5167  			b := dAtA[iNdEx]
  5168  			iNdEx++
  5169  			wire |= uint64(b&0x7F) << shift
  5170  			if b < 0x80 {
  5171  				break
  5172  			}
  5173  		}
  5174  		fieldNum := int32(wire >> 3)
  5175  		wireType := int(wire & 0x7)
  5176  		if wireType == 4 {
  5177  			return fmt.Errorf("proto: EmitLLDPPacketResponse: wiretype end group for non-group")
  5178  		}
  5179  		if fieldNum <= 0 {
  5180  			return fmt.Errorf("proto: EmitLLDPPacketResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  5181  		}
  5182  		switch fieldNum {
  5183  		default:
  5184  			iNdEx = preIndex
  5185  			skippy, err := skipDevices(dAtA[iNdEx:])
  5186  			if err != nil {
  5187  				return err
  5188  			}
  5189  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5190  				return ErrInvalidLengthDevices
  5191  			}
  5192  			if (iNdEx + skippy) > l {
  5193  				return io.ErrUnexpectedEOF
  5194  			}
  5195  			iNdEx += skippy
  5196  		}
  5197  	}
  5198  
  5199  	if iNdEx > l {
  5200  		return io.ErrUnexpectedEOF
  5201  	}
  5202  	return nil
  5203  }
  5204  func skipDevices(dAtA []byte) (n int, err error) {
  5205  	l := len(dAtA)
  5206  	iNdEx := 0
  5207  	depth := 0
  5208  	for iNdEx < l {
  5209  		var wire uint64
  5210  		for shift := uint(0); ; shift += 7 {
  5211  			if shift >= 64 {
  5212  				return 0, ErrIntOverflowDevices
  5213  			}
  5214  			if iNdEx >= l {
  5215  				return 0, io.ErrUnexpectedEOF
  5216  			}
  5217  			b := dAtA[iNdEx]
  5218  			iNdEx++
  5219  			wire |= (uint64(b) & 0x7F) << shift
  5220  			if b < 0x80 {
  5221  				break
  5222  			}
  5223  		}
  5224  		wireType := int(wire & 0x7)
  5225  		switch wireType {
  5226  		case 0:
  5227  			for shift := uint(0); ; shift += 7 {
  5228  				if shift >= 64 {
  5229  					return 0, ErrIntOverflowDevices
  5230  				}
  5231  				if iNdEx >= l {
  5232  					return 0, io.ErrUnexpectedEOF
  5233  				}
  5234  				iNdEx++
  5235  				if dAtA[iNdEx-1] < 0x80 {
  5236  					break
  5237  				}
  5238  			}
  5239  		case 1:
  5240  			iNdEx += 8
  5241  		case 2:
  5242  			var length int
  5243  			for shift := uint(0); ; shift += 7 {
  5244  				if shift >= 64 {
  5245  					return 0, ErrIntOverflowDevices
  5246  				}
  5247  				if iNdEx >= l {
  5248  					return 0, io.ErrUnexpectedEOF
  5249  				}
  5250  				b := dAtA[iNdEx]
  5251  				iNdEx++
  5252  				length |= (int(b) & 0x7F) << shift
  5253  				if b < 0x80 {
  5254  					break
  5255  				}
  5256  			}
  5257  			if length < 0 {
  5258  				return 0, ErrInvalidLengthDevices
  5259  			}
  5260  			iNdEx += length
  5261  		case 3:
  5262  			depth++
  5263  		case 4:
  5264  			if depth == 0 {
  5265  				return 0, ErrUnexpectedEndOfGroupDevices
  5266  			}
  5267  			depth--
  5268  		case 5:
  5269  			iNdEx += 4
  5270  		default:
  5271  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  5272  		}
  5273  		if iNdEx < 0 {
  5274  			return 0, ErrInvalidLengthDevices
  5275  		}
  5276  		if depth == 0 {
  5277  			return iNdEx, nil
  5278  		}
  5279  	}
  5280  	return 0, io.ErrUnexpectedEOF
  5281  }
  5282  
  5283  var (
  5284  	ErrInvalidLengthDevices        = fmt.Errorf("proto: negative length found during unmarshaling")
  5285  	ErrIntOverflowDevices          = fmt.Errorf("proto: integer overflow")
  5286  	ErrUnexpectedEndOfGroupDevices = fmt.Errorf("proto: unexpected end of group")
  5287  )