github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/apis/v1/types.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: types.proto
     3  
     4  package v1
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/golang/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // Direction of locs
    27  type LocDirection int32
    28  
    29  const (
    30  	LocDirection_FORWARD LocDirection = 0
    31  	LocDirection_REVERSE LocDirection = 1
    32  )
    33  
    34  var LocDirection_name = map[int32]string{
    35  	0: "FORWARD",
    36  	1: "REVERSE",
    37  }
    38  
    39  var LocDirection_value = map[string]int32{
    40  	"FORWARD": 0,
    41  	"REVERSE": 1,
    42  }
    43  
    44  func (x LocDirection) String() string {
    45  	return proto.EnumName(LocDirection_name, int32(x))
    46  }
    47  
    48  func (LocDirection) EnumDescriptor() ([]byte, []int) {
    49  	return fileDescriptor_d938547f84707355, []int{0}
    50  }
    51  
    52  // Direction of switches
    53  type SwitchDirection int32
    54  
    55  const (
    56  	SwitchDirection_STRAIGHT SwitchDirection = 0
    57  	SwitchDirection_OFF      SwitchDirection = 1
    58  )
    59  
    60  var SwitchDirection_name = map[int32]string{
    61  	0: "STRAIGHT",
    62  	1: "OFF",
    63  }
    64  
    65  var SwitchDirection_value = map[string]int32{
    66  	"STRAIGHT": 0,
    67  	"OFF":      1,
    68  }
    69  
    70  func (x SwitchDirection) String() string {
    71  	return proto.EnumName(SwitchDirection_name, int32(x))
    72  }
    73  
    74  func (SwitchDirection) EnumDescriptor() ([]byte, []int) {
    75  	return fileDescriptor_d938547f84707355, []int{1}
    76  }
    77  
    78  // TimePeriod indicates time of day in 4 periods.
    79  type TimePeriod int32
    80  
    81  const (
    82  	TimePeriod_MORNING   TimePeriod = 0
    83  	TimePeriod_AFTERNOON TimePeriod = 1
    84  	TimePeriod_EVENING   TimePeriod = 2
    85  	TimePeriod_NIGHT     TimePeriod = 3
    86  )
    87  
    88  var TimePeriod_name = map[int32]string{
    89  	0: "MORNING",
    90  	1: "AFTERNOON",
    91  	2: "EVENING",
    92  	3: "NIGHT",
    93  }
    94  
    95  var TimePeriod_value = map[string]int32{
    96  	"MORNING":   0,
    97  	"AFTERNOON": 1,
    98  	"EVENING":   2,
    99  	"NIGHT":     3,
   100  }
   101  
   102  func (x TimePeriod) String() string {
   103  	return proto.EnumName(TimePeriod_name, int32(x))
   104  }
   105  
   106  func (TimePeriod) EnumDescriptor() ([]byte, []int) {
   107  	return fileDescriptor_d938547f84707355, []int{2}
   108  }
   109  
   110  // Empty message
   111  type Empty struct {
   112  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   113  	XXX_unrecognized     []byte   `json:"-"`
   114  	XXX_sizecache        int32    `json:"-"`
   115  }
   116  
   117  func (m *Empty) Reset()         { *m = Empty{} }
   118  func (m *Empty) String() string { return proto.CompactTextString(m) }
   119  func (*Empty) ProtoMessage()    {}
   120  func (*Empty) Descriptor() ([]byte, []int) {
   121  	return fileDescriptor_d938547f84707355, []int{0}
   122  }
   123  func (m *Empty) XXX_Unmarshal(b []byte) error {
   124  	return m.Unmarshal(b)
   125  }
   126  func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   127  	if deterministic {
   128  		return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
   129  	} else {
   130  		b = b[:cap(b)]
   131  		n, err := m.MarshalToSizedBuffer(b)
   132  		if err != nil {
   133  			return nil, err
   134  		}
   135  		return b[:n], nil
   136  	}
   137  }
   138  func (m *Empty) XXX_Merge(src proto.Message) {
   139  	xxx_messageInfo_Empty.Merge(m, src)
   140  }
   141  func (m *Empty) XXX_Size() int {
   142  	return m.Size()
   143  }
   144  func (m *Empty) XXX_DiscardUnknown() {
   145  	xxx_messageInfo_Empty.DiscardUnknown(m)
   146  }
   147  
   148  var xxx_messageInfo_Empty proto.InternalMessageInfo
   149  
   150  // Information about the command station
   151  type CommandStationInfo struct {
   152  	// Unique identifier of the command station
   153  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
   154  	// Human readable description of the command station
   155  	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
   156  	// Version of the command station in semantic versioning format.
   157  	// E.g. 1.0.4
   158  	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
   159  	// Uptime of the command station in seconds.
   160  	Uptime               int64    `protobuf:"varint,4,opt,name=uptime,proto3" json:"uptime,omitempty"`
   161  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   162  	XXX_unrecognized     []byte   `json:"-"`
   163  	XXX_sizecache        int32    `json:"-"`
   164  }
   165  
   166  func (m *CommandStationInfo) Reset()         { *m = CommandStationInfo{} }
   167  func (m *CommandStationInfo) String() string { return proto.CompactTextString(m) }
   168  func (*CommandStationInfo) ProtoMessage()    {}
   169  func (*CommandStationInfo) Descriptor() ([]byte, []int) {
   170  	return fileDescriptor_d938547f84707355, []int{1}
   171  }
   172  func (m *CommandStationInfo) XXX_Unmarshal(b []byte) error {
   173  	return m.Unmarshal(b)
   174  }
   175  func (m *CommandStationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   176  	if deterministic {
   177  		return xxx_messageInfo_CommandStationInfo.Marshal(b, m, deterministic)
   178  	} else {
   179  		b = b[:cap(b)]
   180  		n, err := m.MarshalToSizedBuffer(b)
   181  		if err != nil {
   182  			return nil, err
   183  		}
   184  		return b[:n], nil
   185  	}
   186  }
   187  func (m *CommandStationInfo) XXX_Merge(src proto.Message) {
   188  	xxx_messageInfo_CommandStationInfo.Merge(m, src)
   189  }
   190  func (m *CommandStationInfo) XXX_Size() int {
   191  	return m.Size()
   192  }
   193  func (m *CommandStationInfo) XXX_DiscardUnknown() {
   194  	xxx_messageInfo_CommandStationInfo.DiscardUnknown(m)
   195  }
   196  
   197  var xxx_messageInfo_CommandStationInfo proto.InternalMessageInfo
   198  
   199  func (m *CommandStationInfo) GetId() string {
   200  	if m != nil {
   201  		return m.Id
   202  	}
   203  	return ""
   204  }
   205  
   206  func (m *CommandStationInfo) GetDescription() string {
   207  	if m != nil {
   208  		return m.Description
   209  	}
   210  	return ""
   211  }
   212  
   213  func (m *CommandStationInfo) GetVersion() string {
   214  	if m != nil {
   215  		return m.Version
   216  	}
   217  	return ""
   218  }
   219  
   220  func (m *CommandStationInfo) GetUptime() int64 {
   221  	if m != nil {
   222  		return m.Uptime
   223  	}
   224  	return 0
   225  }
   226  
   227  // Information about the local worker
   228  type LocalWorkerInfo struct {
   229  	// Unique identifier of the local worker
   230  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
   231  	// Human readable description of the local worker
   232  	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
   233  	// Version of the local worker in semantic versioning format.
   234  	// E.g. 1.0.4
   235  	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
   236  	// Uptime of the local worker in seconds.
   237  	Uptime int64 `protobuf:"varint,4,opt,name=uptime,proto3" json:"uptime,omitempty"`
   238  	// Hash of the current configuration
   239  	ConfigHash string `protobuf:"bytes,5,opt,name=config_hash,json=configHash,proto3" json:"config_hash,omitempty"`
   240  	// IDs of all configured devices
   241  	ConfiguredDeviceIds []string `protobuf:"bytes,6,rep,name=configured_device_ids,json=configuredDeviceIds,proto3" json:"configured_device_ids,omitempty"`
   242  	// IDs of all configured objects
   243  	ConfiguredObjectIds []string `protobuf:"bytes,7,rep,name=configured_object_ids,json=configuredObjectIds,proto3" json:"configured_object_ids,omitempty"`
   244  	// IDs of all unconfigured devices
   245  	UnconfiguredDeviceIds []string `protobuf:"bytes,8,rep,name=unconfigured_device_ids,json=unconfiguredDeviceIds,proto3" json:"unconfigured_device_ids,omitempty"`
   246  	// IDs of all unconfigured objects
   247  	UnconfiguredObjectIds []string `protobuf:"bytes,9,rep,name=unconfigured_object_ids,json=unconfiguredObjectIds,proto3" json:"unconfigured_object_ids,omitempty"`
   248  	// HTTP(s) port to serve metrics on
   249  	MetricsPort int32 `protobuf:"varint,10,opt,name=metrics_port,json=metricsPort,proto3" json:"metrics_port,omitempty"`
   250  	// If set to true, metrics are served over HTTPS, otherwise HTTP
   251  	MetricsSecure bool `protobuf:"varint,11,opt,name=metrics_secure,json=metricsSecure,proto3" json:"metrics_secure,omitempty"`
   252  	// Port this local worker is serving the LocalWorkerService on.
   253  	LocalWorkerServicePort int32 `protobuf:"varint,12,opt,name=local_worker_service_port,json=localWorkerServicePort,proto3" json:"local_worker_service_port,omitempty"`
   254  	// If set, LocalWorkerService is served over TLS.
   255  	LocalWorkerServiceSecure bool `protobuf:"varint,13,opt,name=local_worker_service_secure,json=localWorkerServiceSecure,proto3" json:"local_worker_service_secure,omitempty"`
   256  	// If set, local worker implements LocalWorkerService.Reset
   257  	SupportsReset bool `protobuf:"varint,101,opt,name=supports_reset,json=supportsReset,proto3" json:"supports_reset,omitempty"`
   258  	// If set, local worker implements LocalWorkerService.SetLocRequest
   259  	SupportsSetLocRequest bool `protobuf:"varint,102,opt,name=supports_set_loc_request,json=supportsSetLocRequest,proto3" json:"supports_set_loc_request,omitempty"`
   260  	// If set, local worker implements LocalWorkerService.SetPowerRequest
   261  	SupportsSetPowerRequest bool `protobuf:"varint,103,opt,name=supports_set_power_request,json=supportsSetPowerRequest,proto3" json:"supports_set_power_request,omitempty"`
   262  	// If set, local worker implements LocalWorkerService.SetOutputRequest
   263  	SupportsSetOutputRequest bool `protobuf:"varint,104,opt,name=supports_set_output_request,json=supportsSetOutputRequest,proto3" json:"supports_set_output_request,omitempty"`
   264  	// If set, local worker implements LocalWorkerService.SetSwitchRequest
   265  	SupportsSetSwitchRequest bool `protobuf:"varint,105,opt,name=supports_set_switch_request,json=supportsSetSwitchRequest,proto3" json:"supports_set_switch_request,omitempty"`
   266  	// If set, local worker implements LocalWorkerService.SetDeviceDiscoveryRequest
   267  	SupportsSetDeviceDiscoveryRequest bool     `protobuf:"varint,106,opt,name=supports_set_device_discovery_request,json=supportsSetDeviceDiscoveryRequest,proto3" json:"supports_set_device_discovery_request,omitempty"`
   268  	XXX_NoUnkeyedLiteral              struct{} `json:"-"`
   269  	XXX_unrecognized                  []byte   `json:"-"`
   270  	XXX_sizecache                     int32    `json:"-"`
   271  }
   272  
   273  func (m *LocalWorkerInfo) Reset()         { *m = LocalWorkerInfo{} }
   274  func (m *LocalWorkerInfo) String() string { return proto.CompactTextString(m) }
   275  func (*LocalWorkerInfo) ProtoMessage()    {}
   276  func (*LocalWorkerInfo) Descriptor() ([]byte, []int) {
   277  	return fileDescriptor_d938547f84707355, []int{2}
   278  }
   279  func (m *LocalWorkerInfo) XXX_Unmarshal(b []byte) error {
   280  	return m.Unmarshal(b)
   281  }
   282  func (m *LocalWorkerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   283  	if deterministic {
   284  		return xxx_messageInfo_LocalWorkerInfo.Marshal(b, m, deterministic)
   285  	} else {
   286  		b = b[:cap(b)]
   287  		n, err := m.MarshalToSizedBuffer(b)
   288  		if err != nil {
   289  			return nil, err
   290  		}
   291  		return b[:n], nil
   292  	}
   293  }
   294  func (m *LocalWorkerInfo) XXX_Merge(src proto.Message) {
   295  	xxx_messageInfo_LocalWorkerInfo.Merge(m, src)
   296  }
   297  func (m *LocalWorkerInfo) XXX_Size() int {
   298  	return m.Size()
   299  }
   300  func (m *LocalWorkerInfo) XXX_DiscardUnknown() {
   301  	xxx_messageInfo_LocalWorkerInfo.DiscardUnknown(m)
   302  }
   303  
   304  var xxx_messageInfo_LocalWorkerInfo proto.InternalMessageInfo
   305  
   306  func (m *LocalWorkerInfo) GetId() string {
   307  	if m != nil {
   308  		return m.Id
   309  	}
   310  	return ""
   311  }
   312  
   313  func (m *LocalWorkerInfo) GetDescription() string {
   314  	if m != nil {
   315  		return m.Description
   316  	}
   317  	return ""
   318  }
   319  
   320  func (m *LocalWorkerInfo) GetVersion() string {
   321  	if m != nil {
   322  		return m.Version
   323  	}
   324  	return ""
   325  }
   326  
   327  func (m *LocalWorkerInfo) GetUptime() int64 {
   328  	if m != nil {
   329  		return m.Uptime
   330  	}
   331  	return 0
   332  }
   333  
   334  func (m *LocalWorkerInfo) GetConfigHash() string {
   335  	if m != nil {
   336  		return m.ConfigHash
   337  	}
   338  	return ""
   339  }
   340  
   341  func (m *LocalWorkerInfo) GetConfiguredDeviceIds() []string {
   342  	if m != nil {
   343  		return m.ConfiguredDeviceIds
   344  	}
   345  	return nil
   346  }
   347  
   348  func (m *LocalWorkerInfo) GetConfiguredObjectIds() []string {
   349  	if m != nil {
   350  		return m.ConfiguredObjectIds
   351  	}
   352  	return nil
   353  }
   354  
   355  func (m *LocalWorkerInfo) GetUnconfiguredDeviceIds() []string {
   356  	if m != nil {
   357  		return m.UnconfiguredDeviceIds
   358  	}
   359  	return nil
   360  }
   361  
   362  func (m *LocalWorkerInfo) GetUnconfiguredObjectIds() []string {
   363  	if m != nil {
   364  		return m.UnconfiguredObjectIds
   365  	}
   366  	return nil
   367  }
   368  
   369  func (m *LocalWorkerInfo) GetMetricsPort() int32 {
   370  	if m != nil {
   371  		return m.MetricsPort
   372  	}
   373  	return 0
   374  }
   375  
   376  func (m *LocalWorkerInfo) GetMetricsSecure() bool {
   377  	if m != nil {
   378  		return m.MetricsSecure
   379  	}
   380  	return false
   381  }
   382  
   383  func (m *LocalWorkerInfo) GetLocalWorkerServicePort() int32 {
   384  	if m != nil {
   385  		return m.LocalWorkerServicePort
   386  	}
   387  	return 0
   388  }
   389  
   390  func (m *LocalWorkerInfo) GetLocalWorkerServiceSecure() bool {
   391  	if m != nil {
   392  		return m.LocalWorkerServiceSecure
   393  	}
   394  	return false
   395  }
   396  
   397  func (m *LocalWorkerInfo) GetSupportsReset() bool {
   398  	if m != nil {
   399  		return m.SupportsReset
   400  	}
   401  	return false
   402  }
   403  
   404  func (m *LocalWorkerInfo) GetSupportsSetLocRequest() bool {
   405  	if m != nil {
   406  		return m.SupportsSetLocRequest
   407  	}
   408  	return false
   409  }
   410  
   411  func (m *LocalWorkerInfo) GetSupportsSetPowerRequest() bool {
   412  	if m != nil {
   413  		return m.SupportsSetPowerRequest
   414  	}
   415  	return false
   416  }
   417  
   418  func (m *LocalWorkerInfo) GetSupportsSetOutputRequest() bool {
   419  	if m != nil {
   420  		return m.SupportsSetOutputRequest
   421  	}
   422  	return false
   423  }
   424  
   425  func (m *LocalWorkerInfo) GetSupportsSetSwitchRequest() bool {
   426  	if m != nil {
   427  		return m.SupportsSetSwitchRequest
   428  	}
   429  	return false
   430  }
   431  
   432  func (m *LocalWorkerInfo) GetSupportsSetDeviceDiscoveryRequest() bool {
   433  	if m != nil {
   434  		return m.SupportsSetDeviceDiscoveryRequest
   435  	}
   436  	return false
   437  }
   438  
   439  // Request arguments for GetPowerRequests
   440  type PowerRequestsOptions struct {
   441  	// If set, the network master must wait for an actual Power message
   442  	// to confirm the state transition.
   443  	// If not set, the network master assumes the power state is effective directly
   444  	// after sending the message.
   445  	ManualConfirm        bool     `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
   446  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   447  	XXX_unrecognized     []byte   `json:"-"`
   448  	XXX_sizecache        int32    `json:"-"`
   449  }
   450  
   451  func (m *PowerRequestsOptions) Reset()         { *m = PowerRequestsOptions{} }
   452  func (m *PowerRequestsOptions) String() string { return proto.CompactTextString(m) }
   453  func (*PowerRequestsOptions) ProtoMessage()    {}
   454  func (*PowerRequestsOptions) Descriptor() ([]byte, []int) {
   455  	return fileDescriptor_d938547f84707355, []int{3}
   456  }
   457  func (m *PowerRequestsOptions) XXX_Unmarshal(b []byte) error {
   458  	return m.Unmarshal(b)
   459  }
   460  func (m *PowerRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   461  	if deterministic {
   462  		return xxx_messageInfo_PowerRequestsOptions.Marshal(b, m, deterministic)
   463  	} else {
   464  		b = b[:cap(b)]
   465  		n, err := m.MarshalToSizedBuffer(b)
   466  		if err != nil {
   467  			return nil, err
   468  		}
   469  		return b[:n], nil
   470  	}
   471  }
   472  func (m *PowerRequestsOptions) XXX_Merge(src proto.Message) {
   473  	xxx_messageInfo_PowerRequestsOptions.Merge(m, src)
   474  }
   475  func (m *PowerRequestsOptions) XXX_Size() int {
   476  	return m.Size()
   477  }
   478  func (m *PowerRequestsOptions) XXX_DiscardUnknown() {
   479  	xxx_messageInfo_PowerRequestsOptions.DiscardUnknown(m)
   480  }
   481  
   482  var xxx_messageInfo_PowerRequestsOptions proto.InternalMessageInfo
   483  
   484  func (m *PowerRequestsOptions) GetManualConfirm() bool {
   485  	if m != nil {
   486  		return m.ManualConfirm
   487  	}
   488  	return false
   489  }
   490  
   491  // Power message contains the requested & actual state of the power on the track.
   492  type Power struct {
   493  	// Requested power state
   494  	Request *PowerState `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"`
   495  	// Actual power state
   496  	Actual               *PowerState `protobuf:"bytes,2,opt,name=actual,proto3" json:"actual,omitempty"`
   497  	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
   498  	XXX_unrecognized     []byte      `json:"-"`
   499  	XXX_sizecache        int32       `json:"-"`
   500  }
   501  
   502  func (m *Power) Reset()         { *m = Power{} }
   503  func (m *Power) String() string { return proto.CompactTextString(m) }
   504  func (*Power) ProtoMessage()    {}
   505  func (*Power) Descriptor() ([]byte, []int) {
   506  	return fileDescriptor_d938547f84707355, []int{4}
   507  }
   508  func (m *Power) XXX_Unmarshal(b []byte) error {
   509  	return m.Unmarshal(b)
   510  }
   511  func (m *Power) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   512  	if deterministic {
   513  		return xxx_messageInfo_Power.Marshal(b, m, deterministic)
   514  	} else {
   515  		b = b[:cap(b)]
   516  		n, err := m.MarshalToSizedBuffer(b)
   517  		if err != nil {
   518  			return nil, err
   519  		}
   520  		return b[:n], nil
   521  	}
   522  }
   523  func (m *Power) XXX_Merge(src proto.Message) {
   524  	xxx_messageInfo_Power.Merge(m, src)
   525  }
   526  func (m *Power) XXX_Size() int {
   527  	return m.Size()
   528  }
   529  func (m *Power) XXX_DiscardUnknown() {
   530  	xxx_messageInfo_Power.DiscardUnknown(m)
   531  }
   532  
   533  var xxx_messageInfo_Power proto.InternalMessageInfo
   534  
   535  func (m *Power) GetRequest() *PowerState {
   536  	if m != nil {
   537  		return m.Request
   538  	}
   539  	return nil
   540  }
   541  
   542  func (m *Power) GetActual() *PowerState {
   543  	if m != nil {
   544  		return m.Actual
   545  	}
   546  	return nil
   547  }
   548  
   549  // PowerState message contains the requested/actual state of the power on the track.
   550  type PowerState struct {
   551  	// Power on/off
   552  	Enabled              bool     `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
   553  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   554  	XXX_unrecognized     []byte   `json:"-"`
   555  	XXX_sizecache        int32    `json:"-"`
   556  }
   557  
   558  func (m *PowerState) Reset()         { *m = PowerState{} }
   559  func (m *PowerState) String() string { return proto.CompactTextString(m) }
   560  func (*PowerState) ProtoMessage()    {}
   561  func (*PowerState) Descriptor() ([]byte, []int) {
   562  	return fileDescriptor_d938547f84707355, []int{5}
   563  }
   564  func (m *PowerState) XXX_Unmarshal(b []byte) error {
   565  	return m.Unmarshal(b)
   566  }
   567  func (m *PowerState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   568  	if deterministic {
   569  		return xxx_messageInfo_PowerState.Marshal(b, m, deterministic)
   570  	} else {
   571  		b = b[:cap(b)]
   572  		n, err := m.MarshalToSizedBuffer(b)
   573  		if err != nil {
   574  			return nil, err
   575  		}
   576  		return b[:n], nil
   577  	}
   578  }
   579  func (m *PowerState) XXX_Merge(src proto.Message) {
   580  	xxx_messageInfo_PowerState.Merge(m, src)
   581  }
   582  func (m *PowerState) XXX_Size() int {
   583  	return m.Size()
   584  }
   585  func (m *PowerState) XXX_DiscardUnknown() {
   586  	xxx_messageInfo_PowerState.DiscardUnknown(m)
   587  }
   588  
   589  var xxx_messageInfo_PowerState proto.InternalMessageInfo
   590  
   591  func (m *PowerState) GetEnabled() bool {
   592  	if m != nil {
   593  		return m.Enabled
   594  	}
   595  	return false
   596  }
   597  
   598  // Request arguments for GetLocRequests
   599  type LocRequestsOptions struct {
   600  	// If set, the network master must wait for an actual Loc message
   601  	// to confirm the state transition.
   602  	// If not set, the network master assumes the state is effective directly
   603  	// after sending the message.
   604  	ManualConfirm        bool     `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
   605  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   606  	XXX_unrecognized     []byte   `json:"-"`
   607  	XXX_sizecache        int32    `json:"-"`
   608  }
   609  
   610  func (m *LocRequestsOptions) Reset()         { *m = LocRequestsOptions{} }
   611  func (m *LocRequestsOptions) String() string { return proto.CompactTextString(m) }
   612  func (*LocRequestsOptions) ProtoMessage()    {}
   613  func (*LocRequestsOptions) Descriptor() ([]byte, []int) {
   614  	return fileDescriptor_d938547f84707355, []int{6}
   615  }
   616  func (m *LocRequestsOptions) XXX_Unmarshal(b []byte) error {
   617  	return m.Unmarshal(b)
   618  }
   619  func (m *LocRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   620  	if deterministic {
   621  		return xxx_messageInfo_LocRequestsOptions.Marshal(b, m, deterministic)
   622  	} else {
   623  		b = b[:cap(b)]
   624  		n, err := m.MarshalToSizedBuffer(b)
   625  		if err != nil {
   626  			return nil, err
   627  		}
   628  		return b[:n], nil
   629  	}
   630  }
   631  func (m *LocRequestsOptions) XXX_Merge(src proto.Message) {
   632  	xxx_messageInfo_LocRequestsOptions.Merge(m, src)
   633  }
   634  func (m *LocRequestsOptions) XXX_Size() int {
   635  	return m.Size()
   636  }
   637  func (m *LocRequestsOptions) XXX_DiscardUnknown() {
   638  	xxx_messageInfo_LocRequestsOptions.DiscardUnknown(m)
   639  }
   640  
   641  var xxx_messageInfo_LocRequestsOptions proto.InternalMessageInfo
   642  
   643  func (m *LocRequestsOptions) GetManualConfirm() bool {
   644  	if m != nil {
   645  		return m.ManualConfirm
   646  	}
   647  	return false
   648  }
   649  
   650  // Loc message is used to request/report the speed, direction & functions of a loc.
   651  type Loc struct {
   652  	// Addres of the loc
   653  	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
   654  	// Requested state of the loc
   655  	Request *LocState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
   656  	// Actual state of the loc
   657  	Actual               *LocState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
   658  	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
   659  	XXX_unrecognized     []byte    `json:"-"`
   660  	XXX_sizecache        int32     `json:"-"`
   661  }
   662  
   663  func (m *Loc) Reset()         { *m = Loc{} }
   664  func (m *Loc) String() string { return proto.CompactTextString(m) }
   665  func (*Loc) ProtoMessage()    {}
   666  func (*Loc) Descriptor() ([]byte, []int) {
   667  	return fileDescriptor_d938547f84707355, []int{7}
   668  }
   669  func (m *Loc) XXX_Unmarshal(b []byte) error {
   670  	return m.Unmarshal(b)
   671  }
   672  func (m *Loc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   673  	if deterministic {
   674  		return xxx_messageInfo_Loc.Marshal(b, m, deterministic)
   675  	} else {
   676  		b = b[:cap(b)]
   677  		n, err := m.MarshalToSizedBuffer(b)
   678  		if err != nil {
   679  			return nil, err
   680  		}
   681  		return b[:n], nil
   682  	}
   683  }
   684  func (m *Loc) XXX_Merge(src proto.Message) {
   685  	xxx_messageInfo_Loc.Merge(m, src)
   686  }
   687  func (m *Loc) XXX_Size() int {
   688  	return m.Size()
   689  }
   690  func (m *Loc) XXX_DiscardUnknown() {
   691  	xxx_messageInfo_Loc.DiscardUnknown(m)
   692  }
   693  
   694  var xxx_messageInfo_Loc proto.InternalMessageInfo
   695  
   696  func (m *Loc) GetRequest() *LocState {
   697  	if m != nil {
   698  		return m.Request
   699  	}
   700  	return nil
   701  }
   702  
   703  func (m *Loc) GetActual() *LocState {
   704  	if m != nil {
   705  		return m.Actual
   706  	}
   707  	return nil
   708  }
   709  
   710  // LocState message is used to request/report the speed, direction & functions of a loc.
   711  type LocState struct {
   712  	// Speed in steps
   713  	Speed int32 `protobuf:"varint,1,opt,name=speed,proto3" json:"speed,omitempty"`
   714  	// Maximum speed steps of this loc
   715  	SpeedSteps int32 `protobuf:"varint,2,opt,name=speed_steps,json=speedSteps,proto3" json:"speed_steps,omitempty"`
   716  	// Direction "forward|reverse"
   717  	Direction LocDirection `protobuf:"varint,3,opt,name=direction,proto3,enum=binkynet.v1.LocDirection" json:"direction,omitempty"`
   718  	// State of functions
   719  	Functions            map[int32]bool `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
   720  	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
   721  	XXX_unrecognized     []byte         `json:"-"`
   722  	XXX_sizecache        int32          `json:"-"`
   723  }
   724  
   725  func (m *LocState) Reset()         { *m = LocState{} }
   726  func (m *LocState) String() string { return proto.CompactTextString(m) }
   727  func (*LocState) ProtoMessage()    {}
   728  func (*LocState) Descriptor() ([]byte, []int) {
   729  	return fileDescriptor_d938547f84707355, []int{8}
   730  }
   731  func (m *LocState) XXX_Unmarshal(b []byte) error {
   732  	return m.Unmarshal(b)
   733  }
   734  func (m *LocState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   735  	if deterministic {
   736  		return xxx_messageInfo_LocState.Marshal(b, m, deterministic)
   737  	} else {
   738  		b = b[:cap(b)]
   739  		n, err := m.MarshalToSizedBuffer(b)
   740  		if err != nil {
   741  			return nil, err
   742  		}
   743  		return b[:n], nil
   744  	}
   745  }
   746  func (m *LocState) XXX_Merge(src proto.Message) {
   747  	xxx_messageInfo_LocState.Merge(m, src)
   748  }
   749  func (m *LocState) XXX_Size() int {
   750  	return m.Size()
   751  }
   752  func (m *LocState) XXX_DiscardUnknown() {
   753  	xxx_messageInfo_LocState.DiscardUnknown(m)
   754  }
   755  
   756  var xxx_messageInfo_LocState proto.InternalMessageInfo
   757  
   758  func (m *LocState) GetSpeed() int32 {
   759  	if m != nil {
   760  		return m.Speed
   761  	}
   762  	return 0
   763  }
   764  
   765  func (m *LocState) GetSpeedSteps() int32 {
   766  	if m != nil {
   767  		return m.SpeedSteps
   768  	}
   769  	return 0
   770  }
   771  
   772  func (m *LocState) GetDirection() LocDirection {
   773  	if m != nil {
   774  		return m.Direction
   775  	}
   776  	return LocDirection_FORWARD
   777  }
   778  
   779  func (m *LocState) GetFunctions() map[int32]bool {
   780  	if m != nil {
   781  		return m.Functions
   782  	}
   783  	return nil
   784  }
   785  
   786  // Sensor captures the current value of a sensor with specified address
   787  type Sensor struct {
   788  	// Addres of the sensor
   789  	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
   790  	// Current state of the sensor
   791  	Actual               *SensorState `protobuf:"bytes,2,opt,name=actual,proto3" json:"actual,omitempty"`
   792  	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
   793  	XXX_unrecognized     []byte       `json:"-"`
   794  	XXX_sizecache        int32        `json:"-"`
   795  }
   796  
   797  func (m *Sensor) Reset()         { *m = Sensor{} }
   798  func (m *Sensor) String() string { return proto.CompactTextString(m) }
   799  func (*Sensor) ProtoMessage()    {}
   800  func (*Sensor) Descriptor() ([]byte, []int) {
   801  	return fileDescriptor_d938547f84707355, []int{9}
   802  }
   803  func (m *Sensor) XXX_Unmarshal(b []byte) error {
   804  	return m.Unmarshal(b)
   805  }
   806  func (m *Sensor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   807  	if deterministic {
   808  		return xxx_messageInfo_Sensor.Marshal(b, m, deterministic)
   809  	} else {
   810  		b = b[:cap(b)]
   811  		n, err := m.MarshalToSizedBuffer(b)
   812  		if err != nil {
   813  			return nil, err
   814  		}
   815  		return b[:n], nil
   816  	}
   817  }
   818  func (m *Sensor) XXX_Merge(src proto.Message) {
   819  	xxx_messageInfo_Sensor.Merge(m, src)
   820  }
   821  func (m *Sensor) XXX_Size() int {
   822  	return m.Size()
   823  }
   824  func (m *Sensor) XXX_DiscardUnknown() {
   825  	xxx_messageInfo_Sensor.DiscardUnknown(m)
   826  }
   827  
   828  var xxx_messageInfo_Sensor proto.InternalMessageInfo
   829  
   830  func (m *Sensor) GetActual() *SensorState {
   831  	if m != nil {
   832  		return m.Actual
   833  	}
   834  	return nil
   835  }
   836  
   837  // SensorState captures the current value of a sensor
   838  type SensorState struct {
   839  	// Current value of the sensor
   840  	Value                int32    `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
   841  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   842  	XXX_unrecognized     []byte   `json:"-"`
   843  	XXX_sizecache        int32    `json:"-"`
   844  }
   845  
   846  func (m *SensorState) Reset()         { *m = SensorState{} }
   847  func (m *SensorState) String() string { return proto.CompactTextString(m) }
   848  func (*SensorState) ProtoMessage()    {}
   849  func (*SensorState) Descriptor() ([]byte, []int) {
   850  	return fileDescriptor_d938547f84707355, []int{10}
   851  }
   852  func (m *SensorState) XXX_Unmarshal(b []byte) error {
   853  	return m.Unmarshal(b)
   854  }
   855  func (m *SensorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   856  	if deterministic {
   857  		return xxx_messageInfo_SensorState.Marshal(b, m, deterministic)
   858  	} else {
   859  		b = b[:cap(b)]
   860  		n, err := m.MarshalToSizedBuffer(b)
   861  		if err != nil {
   862  			return nil, err
   863  		}
   864  		return b[:n], nil
   865  	}
   866  }
   867  func (m *SensorState) XXX_Merge(src proto.Message) {
   868  	xxx_messageInfo_SensorState.Merge(m, src)
   869  }
   870  func (m *SensorState) XXX_Size() int {
   871  	return m.Size()
   872  }
   873  func (m *SensorState) XXX_DiscardUnknown() {
   874  	xxx_messageInfo_SensorState.DiscardUnknown(m)
   875  }
   876  
   877  var xxx_messageInfo_SensorState proto.InternalMessageInfo
   878  
   879  func (m *SensorState) GetValue() int32 {
   880  	if m != nil {
   881  		return m.Value
   882  	}
   883  	return 0
   884  }
   885  
   886  // Request arguments for GetOutputRequests
   887  type OutputRequestsOptions struct {
   888  	// If set, the network master must wait for an actual Output message
   889  	// to confirm the state transition.
   890  	// If not set, the network master assumes the state is effective directly
   891  	// after sending the message.
   892  	ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
   893  	// If set, pass only output requests that match this module ID.
   894  	ModuleId             string   `protobuf:"bytes,2,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"`
   895  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   896  	XXX_unrecognized     []byte   `json:"-"`
   897  	XXX_sizecache        int32    `json:"-"`
   898  }
   899  
   900  func (m *OutputRequestsOptions) Reset()         { *m = OutputRequestsOptions{} }
   901  func (m *OutputRequestsOptions) String() string { return proto.CompactTextString(m) }
   902  func (*OutputRequestsOptions) ProtoMessage()    {}
   903  func (*OutputRequestsOptions) Descriptor() ([]byte, []int) {
   904  	return fileDescriptor_d938547f84707355, []int{11}
   905  }
   906  func (m *OutputRequestsOptions) XXX_Unmarshal(b []byte) error {
   907  	return m.Unmarshal(b)
   908  }
   909  func (m *OutputRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   910  	if deterministic {
   911  		return xxx_messageInfo_OutputRequestsOptions.Marshal(b, m, deterministic)
   912  	} else {
   913  		b = b[:cap(b)]
   914  		n, err := m.MarshalToSizedBuffer(b)
   915  		if err != nil {
   916  			return nil, err
   917  		}
   918  		return b[:n], nil
   919  	}
   920  }
   921  func (m *OutputRequestsOptions) XXX_Merge(src proto.Message) {
   922  	xxx_messageInfo_OutputRequestsOptions.Merge(m, src)
   923  }
   924  func (m *OutputRequestsOptions) XXX_Size() int {
   925  	return m.Size()
   926  }
   927  func (m *OutputRequestsOptions) XXX_DiscardUnknown() {
   928  	xxx_messageInfo_OutputRequestsOptions.DiscardUnknown(m)
   929  }
   930  
   931  var xxx_messageInfo_OutputRequestsOptions proto.InternalMessageInfo
   932  
   933  func (m *OutputRequestsOptions) GetManualConfirm() bool {
   934  	if m != nil {
   935  		return m.ManualConfirm
   936  	}
   937  	return false
   938  }
   939  
   940  func (m *OutputRequestsOptions) GetModuleId() string {
   941  	if m != nil {
   942  		return m.ModuleId
   943  	}
   944  	return ""
   945  }
   946  
   947  // Output is used to control a generic output device. E.g. a light.
   948  type Output struct {
   949  	// Addres of the output
   950  	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
   951  	// Requested state of the output
   952  	Request *OutputState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
   953  	// Actual state of the output
   954  	Actual               *OutputState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
   955  	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
   956  	XXX_unrecognized     []byte       `json:"-"`
   957  	XXX_sizecache        int32        `json:"-"`
   958  }
   959  
   960  func (m *Output) Reset()         { *m = Output{} }
   961  func (m *Output) String() string { return proto.CompactTextString(m) }
   962  func (*Output) ProtoMessage()    {}
   963  func (*Output) Descriptor() ([]byte, []int) {
   964  	return fileDescriptor_d938547f84707355, []int{12}
   965  }
   966  func (m *Output) XXX_Unmarshal(b []byte) error {
   967  	return m.Unmarshal(b)
   968  }
   969  func (m *Output) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   970  	if deterministic {
   971  		return xxx_messageInfo_Output.Marshal(b, m, deterministic)
   972  	} else {
   973  		b = b[:cap(b)]
   974  		n, err := m.MarshalToSizedBuffer(b)
   975  		if err != nil {
   976  			return nil, err
   977  		}
   978  		return b[:n], nil
   979  	}
   980  }
   981  func (m *Output) XXX_Merge(src proto.Message) {
   982  	xxx_messageInfo_Output.Merge(m, src)
   983  }
   984  func (m *Output) XXX_Size() int {
   985  	return m.Size()
   986  }
   987  func (m *Output) XXX_DiscardUnknown() {
   988  	xxx_messageInfo_Output.DiscardUnknown(m)
   989  }
   990  
   991  var xxx_messageInfo_Output proto.InternalMessageInfo
   992  
   993  func (m *Output) GetRequest() *OutputState {
   994  	if m != nil {
   995  		return m.Request
   996  	}
   997  	return nil
   998  }
   999  
  1000  func (m *Output) GetActual() *OutputState {
  1001  	if m != nil {
  1002  		return m.Actual
  1003  	}
  1004  	return nil
  1005  }
  1006  
  1007  // OutputState is used to request/report the state of a generic output device. E.g. a light.
  1008  type OutputState struct {
  1009  	// Value of the output
  1010  	Value                int32    `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
  1011  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1012  	XXX_unrecognized     []byte   `json:"-"`
  1013  	XXX_sizecache        int32    `json:"-"`
  1014  }
  1015  
  1016  func (m *OutputState) Reset()         { *m = OutputState{} }
  1017  func (m *OutputState) String() string { return proto.CompactTextString(m) }
  1018  func (*OutputState) ProtoMessage()    {}
  1019  func (*OutputState) Descriptor() ([]byte, []int) {
  1020  	return fileDescriptor_d938547f84707355, []int{13}
  1021  }
  1022  func (m *OutputState) XXX_Unmarshal(b []byte) error {
  1023  	return m.Unmarshal(b)
  1024  }
  1025  func (m *OutputState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1026  	if deterministic {
  1027  		return xxx_messageInfo_OutputState.Marshal(b, m, deterministic)
  1028  	} else {
  1029  		b = b[:cap(b)]
  1030  		n, err := m.MarshalToSizedBuffer(b)
  1031  		if err != nil {
  1032  			return nil, err
  1033  		}
  1034  		return b[:n], nil
  1035  	}
  1036  }
  1037  func (m *OutputState) XXX_Merge(src proto.Message) {
  1038  	xxx_messageInfo_OutputState.Merge(m, src)
  1039  }
  1040  func (m *OutputState) XXX_Size() int {
  1041  	return m.Size()
  1042  }
  1043  func (m *OutputState) XXX_DiscardUnknown() {
  1044  	xxx_messageInfo_OutputState.DiscardUnknown(m)
  1045  }
  1046  
  1047  var xxx_messageInfo_OutputState proto.InternalMessageInfo
  1048  
  1049  func (m *OutputState) GetValue() int32 {
  1050  	if m != nil {
  1051  		return m.Value
  1052  	}
  1053  	return 0
  1054  }
  1055  
  1056  // Request arguments for GetSwitchRequests
  1057  type SwitchRequestsOptions struct {
  1058  	// If set, the network master must wait for an actual Output message
  1059  	// to confirm the state transition.
  1060  	// If not set, the network master assumes the state is effective directly
  1061  	// after sending the message.
  1062  	ManualConfirm bool `protobuf:"varint,1,opt,name=manual_confirm,json=manualConfirm,proto3" json:"manual_confirm,omitempty"`
  1063  	// If set, pass only switch requests that match this module ID.
  1064  	ModuleId             string   `protobuf:"bytes,2,opt,name=module_id,json=moduleId,proto3" json:"module_id,omitempty"`
  1065  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1066  	XXX_unrecognized     []byte   `json:"-"`
  1067  	XXX_sizecache        int32    `json:"-"`
  1068  }
  1069  
  1070  func (m *SwitchRequestsOptions) Reset()         { *m = SwitchRequestsOptions{} }
  1071  func (m *SwitchRequestsOptions) String() string { return proto.CompactTextString(m) }
  1072  func (*SwitchRequestsOptions) ProtoMessage()    {}
  1073  func (*SwitchRequestsOptions) Descriptor() ([]byte, []int) {
  1074  	return fileDescriptor_d938547f84707355, []int{14}
  1075  }
  1076  func (m *SwitchRequestsOptions) XXX_Unmarshal(b []byte) error {
  1077  	return m.Unmarshal(b)
  1078  }
  1079  func (m *SwitchRequestsOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1080  	if deterministic {
  1081  		return xxx_messageInfo_SwitchRequestsOptions.Marshal(b, m, deterministic)
  1082  	} else {
  1083  		b = b[:cap(b)]
  1084  		n, err := m.MarshalToSizedBuffer(b)
  1085  		if err != nil {
  1086  			return nil, err
  1087  		}
  1088  		return b[:n], nil
  1089  	}
  1090  }
  1091  func (m *SwitchRequestsOptions) XXX_Merge(src proto.Message) {
  1092  	xxx_messageInfo_SwitchRequestsOptions.Merge(m, src)
  1093  }
  1094  func (m *SwitchRequestsOptions) XXX_Size() int {
  1095  	return m.Size()
  1096  }
  1097  func (m *SwitchRequestsOptions) XXX_DiscardUnknown() {
  1098  	xxx_messageInfo_SwitchRequestsOptions.DiscardUnknown(m)
  1099  }
  1100  
  1101  var xxx_messageInfo_SwitchRequestsOptions proto.InternalMessageInfo
  1102  
  1103  func (m *SwitchRequestsOptions) GetManualConfirm() bool {
  1104  	if m != nil {
  1105  		return m.ManualConfirm
  1106  	}
  1107  	return false
  1108  }
  1109  
  1110  func (m *SwitchRequestsOptions) GetModuleId() string {
  1111  	if m != nil {
  1112  		return m.ModuleId
  1113  	}
  1114  	return ""
  1115  }
  1116  
  1117  // Switch is used to request/report the state of a generic switch.
  1118  type Switch struct {
  1119  	// Addres of the switch
  1120  	Address ObjectAddress `protobuf:"bytes,1,opt,name=address,proto3,customtype=ObjectAddress" json:"address"`
  1121  	// Requested state of the switch
  1122  	Request *SwitchState `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
  1123  	// Actual state of the switch
  1124  	Actual               *SwitchState `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
  1125  	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
  1126  	XXX_unrecognized     []byte       `json:"-"`
  1127  	XXX_sizecache        int32        `json:"-"`
  1128  }
  1129  
  1130  func (m *Switch) Reset()         { *m = Switch{} }
  1131  func (m *Switch) String() string { return proto.CompactTextString(m) }
  1132  func (*Switch) ProtoMessage()    {}
  1133  func (*Switch) Descriptor() ([]byte, []int) {
  1134  	return fileDescriptor_d938547f84707355, []int{15}
  1135  }
  1136  func (m *Switch) XXX_Unmarshal(b []byte) error {
  1137  	return m.Unmarshal(b)
  1138  }
  1139  func (m *Switch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1140  	if deterministic {
  1141  		return xxx_messageInfo_Switch.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 *Switch) XXX_Merge(src proto.Message) {
  1152  	xxx_messageInfo_Switch.Merge(m, src)
  1153  }
  1154  func (m *Switch) XXX_Size() int {
  1155  	return m.Size()
  1156  }
  1157  func (m *Switch) XXX_DiscardUnknown() {
  1158  	xxx_messageInfo_Switch.DiscardUnknown(m)
  1159  }
  1160  
  1161  var xxx_messageInfo_Switch proto.InternalMessageInfo
  1162  
  1163  func (m *Switch) GetRequest() *SwitchState {
  1164  	if m != nil {
  1165  		return m.Request
  1166  	}
  1167  	return nil
  1168  }
  1169  
  1170  func (m *Switch) GetActual() *SwitchState {
  1171  	if m != nil {
  1172  		return m.Actual
  1173  	}
  1174  	return nil
  1175  }
  1176  
  1177  // SwitchState describe the requested/actual state of a generic switch.
  1178  type SwitchState struct {
  1179  	// Requested/current direction of the switch
  1180  	Direction SwitchDirection `protobuf:"varint,1,opt,name=direction,proto3,enum=binkynet.v1.SwitchDirection" json:"direction,omitempty"`
  1181  	// Set if the switch is currently in use.
  1182  	// This can be used to power down a switch if it is not in use.
  1183  	IsUsed               bool     `protobuf:"varint,2,opt,name=is_used,json=isUsed,proto3" json:"is_used,omitempty"`
  1184  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1185  	XXX_unrecognized     []byte   `json:"-"`
  1186  	XXX_sizecache        int32    `json:"-"`
  1187  }
  1188  
  1189  func (m *SwitchState) Reset()         { *m = SwitchState{} }
  1190  func (m *SwitchState) String() string { return proto.CompactTextString(m) }
  1191  func (*SwitchState) ProtoMessage()    {}
  1192  func (*SwitchState) Descriptor() ([]byte, []int) {
  1193  	return fileDescriptor_d938547f84707355, []int{16}
  1194  }
  1195  func (m *SwitchState) XXX_Unmarshal(b []byte) error {
  1196  	return m.Unmarshal(b)
  1197  }
  1198  func (m *SwitchState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1199  	if deterministic {
  1200  		return xxx_messageInfo_SwitchState.Marshal(b, m, deterministic)
  1201  	} else {
  1202  		b = b[:cap(b)]
  1203  		n, err := m.MarshalToSizedBuffer(b)
  1204  		if err != nil {
  1205  			return nil, err
  1206  		}
  1207  		return b[:n], nil
  1208  	}
  1209  }
  1210  func (m *SwitchState) XXX_Merge(src proto.Message) {
  1211  	xxx_messageInfo_SwitchState.Merge(m, src)
  1212  }
  1213  func (m *SwitchState) XXX_Size() int {
  1214  	return m.Size()
  1215  }
  1216  func (m *SwitchState) XXX_DiscardUnknown() {
  1217  	xxx_messageInfo_SwitchState.DiscardUnknown(m)
  1218  }
  1219  
  1220  var xxx_messageInfo_SwitchState proto.InternalMessageInfo
  1221  
  1222  func (m *SwitchState) GetDirection() SwitchDirection {
  1223  	if m != nil {
  1224  		return m.Direction
  1225  	}
  1226  	return SwitchDirection_STRAIGHT
  1227  }
  1228  
  1229  func (m *SwitchState) GetIsUsed() bool {
  1230  	if m != nil {
  1231  		return m.IsUsed
  1232  	}
  1233  	return false
  1234  }
  1235  
  1236  // Clock is used to identity global time.
  1237  type Clock struct {
  1238  	// Current time period.
  1239  	Period TimePeriod `protobuf:"varint,1,opt,name=period,proto3,enum=binkynet.v1.TimePeriod" json:"period,omitempty"`
  1240  	// Current hours (0..23)
  1241  	Hours int32 `protobuf:"varint,2,opt,name=hours,proto3" json:"hours,omitempty"`
  1242  	// Current minutes (0..59)
  1243  	Minutes int32 `protobuf:"varint,3,opt,name=minutes,proto3" json:"minutes,omitempty"`
  1244  	// Current realworld time in seconds elapsed since January 1, 1970 UTC
  1245  	Unixtime             int64    `protobuf:"varint,4,opt,name=unixtime,proto3" json:"unixtime,omitempty"`
  1246  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1247  	XXX_unrecognized     []byte   `json:"-"`
  1248  	XXX_sizecache        int32    `json:"-"`
  1249  }
  1250  
  1251  func (m *Clock) Reset()         { *m = Clock{} }
  1252  func (m *Clock) String() string { return proto.CompactTextString(m) }
  1253  func (*Clock) ProtoMessage()    {}
  1254  func (*Clock) Descriptor() ([]byte, []int) {
  1255  	return fileDescriptor_d938547f84707355, []int{17}
  1256  }
  1257  func (m *Clock) XXX_Unmarshal(b []byte) error {
  1258  	return m.Unmarshal(b)
  1259  }
  1260  func (m *Clock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1261  	if deterministic {
  1262  		return xxx_messageInfo_Clock.Marshal(b, m, deterministic)
  1263  	} else {
  1264  		b = b[:cap(b)]
  1265  		n, err := m.MarshalToSizedBuffer(b)
  1266  		if err != nil {
  1267  			return nil, err
  1268  		}
  1269  		return b[:n], nil
  1270  	}
  1271  }
  1272  func (m *Clock) XXX_Merge(src proto.Message) {
  1273  	xxx_messageInfo_Clock.Merge(m, src)
  1274  }
  1275  func (m *Clock) XXX_Size() int {
  1276  	return m.Size()
  1277  }
  1278  func (m *Clock) XXX_DiscardUnknown() {
  1279  	xxx_messageInfo_Clock.DiscardUnknown(m)
  1280  }
  1281  
  1282  var xxx_messageInfo_Clock proto.InternalMessageInfo
  1283  
  1284  func (m *Clock) GetPeriod() TimePeriod {
  1285  	if m != nil {
  1286  		return m.Period
  1287  	}
  1288  	return TimePeriod_MORNING
  1289  }
  1290  
  1291  func (m *Clock) GetHours() int32 {
  1292  	if m != nil {
  1293  		return m.Hours
  1294  	}
  1295  	return 0
  1296  }
  1297  
  1298  func (m *Clock) GetMinutes() int32 {
  1299  	if m != nil {
  1300  		return m.Minutes
  1301  	}
  1302  	return 0
  1303  }
  1304  
  1305  func (m *Clock) GetUnixtime() int64 {
  1306  	if m != nil {
  1307  		return m.Unixtime
  1308  	}
  1309  	return 0
  1310  }
  1311  
  1312  // Device represents a hardware device such as a I2C chip.
  1313  type Device struct {
  1314  	// ID of the device
  1315  	Id DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id"`
  1316  	// Type of the device.
  1317  	// See devicetypes.go
  1318  	Type DeviceType `protobuf:"bytes,2,opt,name=type,proto3,customtype=DeviceType" json:"type"`
  1319  	// Logical address of the device on the local worker.
  1320  	Address              string   `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
  1321  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1322  	XXX_unrecognized     []byte   `json:"-"`
  1323  	XXX_sizecache        int32    `json:"-"`
  1324  }
  1325  
  1326  func (m *Device) Reset()         { *m = Device{} }
  1327  func (m *Device) String() string { return proto.CompactTextString(m) }
  1328  func (*Device) ProtoMessage()    {}
  1329  func (*Device) Descriptor() ([]byte, []int) {
  1330  	return fileDescriptor_d938547f84707355, []int{18}
  1331  }
  1332  func (m *Device) XXX_Unmarshal(b []byte) error {
  1333  	return m.Unmarshal(b)
  1334  }
  1335  func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1336  	if deterministic {
  1337  		return xxx_messageInfo_Device.Marshal(b, m, deterministic)
  1338  	} else {
  1339  		b = b[:cap(b)]
  1340  		n, err := m.MarshalToSizedBuffer(b)
  1341  		if err != nil {
  1342  			return nil, err
  1343  		}
  1344  		return b[:n], nil
  1345  	}
  1346  }
  1347  func (m *Device) XXX_Merge(src proto.Message) {
  1348  	xxx_messageInfo_Device.Merge(m, src)
  1349  }
  1350  func (m *Device) XXX_Size() int {
  1351  	return m.Size()
  1352  }
  1353  func (m *Device) XXX_DiscardUnknown() {
  1354  	xxx_messageInfo_Device.DiscardUnknown(m)
  1355  }
  1356  
  1357  var xxx_messageInfo_Device proto.InternalMessageInfo
  1358  
  1359  func (m *Device) GetAddress() string {
  1360  	if m != nil {
  1361  		return m.Address
  1362  	}
  1363  	return ""
  1364  }
  1365  
  1366  // Object represents a logical object on the railway such as a switch.
  1367  type Object struct {
  1368  	// ID of the object
  1369  	Id ObjectID `protobuf:"bytes,1,opt,name=id,proto3,customtype=ObjectID" json:"id"`
  1370  	// Type of the object.
  1371  	// See objectypes.go
  1372  	Type ObjectType `protobuf:"bytes,2,opt,name=type,proto3,customtype=ObjectType" json:"type"`
  1373  	// Connections to devices used by this object
  1374  	// The keys used in this map are specific to the type of object.
  1375  	Connections []*Connection `protobuf:"bytes,3,rep,name=connections,proto3" json:"connections,omitempty"`
  1376  	// Optional configuration for this object.
  1377  	// Keys & values are specific to the object type.
  1378  	Configuration        map[ObjectConfigKey]string `protobuf:"bytes,4,rep,name=configuration,proto3,castkey=ObjectConfigKey" json:"configuration,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  1379  	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
  1380  	XXX_unrecognized     []byte                     `json:"-"`
  1381  	XXX_sizecache        int32                      `json:"-"`
  1382  }
  1383  
  1384  func (m *Object) Reset()         { *m = Object{} }
  1385  func (m *Object) String() string { return proto.CompactTextString(m) }
  1386  func (*Object) ProtoMessage()    {}
  1387  func (*Object) Descriptor() ([]byte, []int) {
  1388  	return fileDescriptor_d938547f84707355, []int{19}
  1389  }
  1390  func (m *Object) XXX_Unmarshal(b []byte) error {
  1391  	return m.Unmarshal(b)
  1392  }
  1393  func (m *Object) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1394  	if deterministic {
  1395  		return xxx_messageInfo_Object.Marshal(b, m, deterministic)
  1396  	} else {
  1397  		b = b[:cap(b)]
  1398  		n, err := m.MarshalToSizedBuffer(b)
  1399  		if err != nil {
  1400  			return nil, err
  1401  		}
  1402  		return b[:n], nil
  1403  	}
  1404  }
  1405  func (m *Object) XXX_Merge(src proto.Message) {
  1406  	xxx_messageInfo_Object.Merge(m, src)
  1407  }
  1408  func (m *Object) XXX_Size() int {
  1409  	return m.Size()
  1410  }
  1411  func (m *Object) XXX_DiscardUnknown() {
  1412  	xxx_messageInfo_Object.DiscardUnknown(m)
  1413  }
  1414  
  1415  var xxx_messageInfo_Object proto.InternalMessageInfo
  1416  
  1417  func (m *Object) GetConnections() []*Connection {
  1418  	if m != nil {
  1419  		return m.Connections
  1420  	}
  1421  	return nil
  1422  }
  1423  
  1424  func (m *Object) GetConfiguration() map[ObjectConfigKey]string {
  1425  	if m != nil {
  1426  		return m.Configuration
  1427  	}
  1428  	return nil
  1429  }
  1430  
  1431  // Connection from an Object to a Device.
  1432  type Connection struct {
  1433  	// Key is specific to the type of device.
  1434  	Key ConnectionName `protobuf:"bytes,1,opt,name=key,proto3,customtype=ConnectionName" json:"key"`
  1435  	// Pins of devices to connect to
  1436  	Pins []*DevicePin `protobuf:"bytes,2,rep,name=pins,proto3" json:"pins,omitempty"`
  1437  	// Optional configuration for this connection.
  1438  	// Keys & values are specific to the connection name.
  1439  	Configuration        map[ConfigKey]string `protobuf:"bytes,3,rep,name=configuration,proto3,castkey=ConfigKey" json:"configuration,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  1440  	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
  1441  	XXX_unrecognized     []byte               `json:"-"`
  1442  	XXX_sizecache        int32                `json:"-"`
  1443  }
  1444  
  1445  func (m *Connection) Reset()         { *m = Connection{} }
  1446  func (m *Connection) String() string { return proto.CompactTextString(m) }
  1447  func (*Connection) ProtoMessage()    {}
  1448  func (*Connection) Descriptor() ([]byte, []int) {
  1449  	return fileDescriptor_d938547f84707355, []int{20}
  1450  }
  1451  func (m *Connection) XXX_Unmarshal(b []byte) error {
  1452  	return m.Unmarshal(b)
  1453  }
  1454  func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1455  	if deterministic {
  1456  		return xxx_messageInfo_Connection.Marshal(b, m, deterministic)
  1457  	} else {
  1458  		b = b[:cap(b)]
  1459  		n, err := m.MarshalToSizedBuffer(b)
  1460  		if err != nil {
  1461  			return nil, err
  1462  		}
  1463  		return b[:n], nil
  1464  	}
  1465  }
  1466  func (m *Connection) XXX_Merge(src proto.Message) {
  1467  	xxx_messageInfo_Connection.Merge(m, src)
  1468  }
  1469  func (m *Connection) XXX_Size() int {
  1470  	return m.Size()
  1471  }
  1472  func (m *Connection) XXX_DiscardUnknown() {
  1473  	xxx_messageInfo_Connection.DiscardUnknown(m)
  1474  }
  1475  
  1476  var xxx_messageInfo_Connection proto.InternalMessageInfo
  1477  
  1478  func (m *Connection) GetPins() []*DevicePin {
  1479  	if m != nil {
  1480  		return m.Pins
  1481  	}
  1482  	return nil
  1483  }
  1484  
  1485  func (m *Connection) GetConfiguration() map[ConfigKey]string {
  1486  	if m != nil {
  1487  		return m.Configuration
  1488  	}
  1489  	return nil
  1490  }
  1491  
  1492  // DevicePin identifies a hardware device and an index within that hardware address.
  1493  type DevicePin struct {
  1494  	// Unique identifier of the device that this connection refers to.
  1495  	DeviceId DeviceID `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3,customtype=DeviceID" json:"device"`
  1496  	// Index on the device (1...)
  1497  	Index                DeviceIndex `protobuf:"varint,2,opt,name=index,proto3,customtype=DeviceIndex" json:"index"`
  1498  	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
  1499  	XXX_unrecognized     []byte      `json:"-"`
  1500  	XXX_sizecache        int32       `json:"-"`
  1501  }
  1502  
  1503  func (m *DevicePin) Reset()         { *m = DevicePin{} }
  1504  func (m *DevicePin) String() string { return proto.CompactTextString(m) }
  1505  func (*DevicePin) ProtoMessage()    {}
  1506  func (*DevicePin) Descriptor() ([]byte, []int) {
  1507  	return fileDescriptor_d938547f84707355, []int{21}
  1508  }
  1509  func (m *DevicePin) XXX_Unmarshal(b []byte) error {
  1510  	return m.Unmarshal(b)
  1511  }
  1512  func (m *DevicePin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1513  	if deterministic {
  1514  		return xxx_messageInfo_DevicePin.Marshal(b, m, deterministic)
  1515  	} else {
  1516  		b = b[:cap(b)]
  1517  		n, err := m.MarshalToSizedBuffer(b)
  1518  		if err != nil {
  1519  			return nil, err
  1520  		}
  1521  		return b[:n], nil
  1522  	}
  1523  }
  1524  func (m *DevicePin) XXX_Merge(src proto.Message) {
  1525  	xxx_messageInfo_DevicePin.Merge(m, src)
  1526  }
  1527  func (m *DevicePin) XXX_Size() int {
  1528  	return m.Size()
  1529  }
  1530  func (m *DevicePin) XXX_DiscardUnknown() {
  1531  	xxx_messageInfo_DevicePin.DiscardUnknown(m)
  1532  }
  1533  
  1534  var xxx_messageInfo_DevicePin proto.InternalMessageInfo
  1535  
  1536  // Configuration for a local worker
  1537  type LocalWorkerConfig struct {
  1538  	// Human readable alias for this local worker.
  1539  	Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
  1540  	// List of devices that must be configured on this local worker.
  1541  	Devices []*Device `protobuf:"bytes,2,rep,name=devices,proto3" json:"devices,omitempty"`
  1542  	// List of real world objects controlled by the local worker
  1543  	Objects []*Object `protobuf:"bytes,3,rep,name=objects,proto3" json:"objects,omitempty"`
  1544  	// Timestamp of network manager in seconds since 1970.
  1545  	Unixtime int64 `protobuf:"varint,4,opt,name=unixtime,proto3" json:"unixtime,omitempty"`
  1546  	// Hash of the configuration (excluding unixtime)
  1547  	Hash                 string   `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
  1548  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1549  	XXX_unrecognized     []byte   `json:"-"`
  1550  	XXX_sizecache        int32    `json:"-"`
  1551  }
  1552  
  1553  func (m *LocalWorkerConfig) Reset()         { *m = LocalWorkerConfig{} }
  1554  func (m *LocalWorkerConfig) String() string { return proto.CompactTextString(m) }
  1555  func (*LocalWorkerConfig) ProtoMessage()    {}
  1556  func (*LocalWorkerConfig) Descriptor() ([]byte, []int) {
  1557  	return fileDescriptor_d938547f84707355, []int{22}
  1558  }
  1559  func (m *LocalWorkerConfig) XXX_Unmarshal(b []byte) error {
  1560  	return m.Unmarshal(b)
  1561  }
  1562  func (m *LocalWorkerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1563  	if deterministic {
  1564  		return xxx_messageInfo_LocalWorkerConfig.Marshal(b, m, deterministic)
  1565  	} else {
  1566  		b = b[:cap(b)]
  1567  		n, err := m.MarshalToSizedBuffer(b)
  1568  		if err != nil {
  1569  			return nil, err
  1570  		}
  1571  		return b[:n], nil
  1572  	}
  1573  }
  1574  func (m *LocalWorkerConfig) XXX_Merge(src proto.Message) {
  1575  	xxx_messageInfo_LocalWorkerConfig.Merge(m, src)
  1576  }
  1577  func (m *LocalWorkerConfig) XXX_Size() int {
  1578  	return m.Size()
  1579  }
  1580  func (m *LocalWorkerConfig) XXX_DiscardUnknown() {
  1581  	xxx_messageInfo_LocalWorkerConfig.DiscardUnknown(m)
  1582  }
  1583  
  1584  var xxx_messageInfo_LocalWorkerConfig proto.InternalMessageInfo
  1585  
  1586  func (m *LocalWorkerConfig) GetAlias() string {
  1587  	if m != nil {
  1588  		return m.Alias
  1589  	}
  1590  	return ""
  1591  }
  1592  
  1593  func (m *LocalWorkerConfig) GetDevices() []*Device {
  1594  	if m != nil {
  1595  		return m.Devices
  1596  	}
  1597  	return nil
  1598  }
  1599  
  1600  func (m *LocalWorkerConfig) GetObjects() []*Object {
  1601  	if m != nil {
  1602  		return m.Objects
  1603  	}
  1604  	return nil
  1605  }
  1606  
  1607  func (m *LocalWorkerConfig) GetUnixtime() int64 {
  1608  	if m != nil {
  1609  		return m.Unixtime
  1610  	}
  1611  	return 0
  1612  }
  1613  
  1614  func (m *LocalWorkerConfig) GetHash() string {
  1615  	if m != nil {
  1616  		return m.Hash
  1617  	}
  1618  	return ""
  1619  }
  1620  
  1621  // Requested & actual state of a local worker
  1622  type LocalWorker struct {
  1623  	// Unique identifier of the local worker
  1624  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  1625  	// Requested configuration of the local worker
  1626  	Request *LocalWorkerConfig `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
  1627  	// Actual state of the local worker
  1628  	Actual               *LocalWorkerInfo `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
  1629  	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
  1630  	XXX_unrecognized     []byte           `json:"-"`
  1631  	XXX_sizecache        int32            `json:"-"`
  1632  }
  1633  
  1634  func (m *LocalWorker) Reset()         { *m = LocalWorker{} }
  1635  func (m *LocalWorker) String() string { return proto.CompactTextString(m) }
  1636  func (*LocalWorker) ProtoMessage()    {}
  1637  func (*LocalWorker) Descriptor() ([]byte, []int) {
  1638  	return fileDescriptor_d938547f84707355, []int{23}
  1639  }
  1640  func (m *LocalWorker) XXX_Unmarshal(b []byte) error {
  1641  	return m.Unmarshal(b)
  1642  }
  1643  func (m *LocalWorker) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1644  	if deterministic {
  1645  		return xxx_messageInfo_LocalWorker.Marshal(b, m, deterministic)
  1646  	} else {
  1647  		b = b[:cap(b)]
  1648  		n, err := m.MarshalToSizedBuffer(b)
  1649  		if err != nil {
  1650  			return nil, err
  1651  		}
  1652  		return b[:n], nil
  1653  	}
  1654  }
  1655  func (m *LocalWorker) XXX_Merge(src proto.Message) {
  1656  	xxx_messageInfo_LocalWorker.Merge(m, src)
  1657  }
  1658  func (m *LocalWorker) XXX_Size() int {
  1659  	return m.Size()
  1660  }
  1661  func (m *LocalWorker) XXX_DiscardUnknown() {
  1662  	xxx_messageInfo_LocalWorker.DiscardUnknown(m)
  1663  }
  1664  
  1665  var xxx_messageInfo_LocalWorker proto.InternalMessageInfo
  1666  
  1667  func (m *LocalWorker) GetId() string {
  1668  	if m != nil {
  1669  		return m.Id
  1670  	}
  1671  	return ""
  1672  }
  1673  
  1674  func (m *LocalWorker) GetRequest() *LocalWorkerConfig {
  1675  	if m != nil {
  1676  		return m.Request
  1677  	}
  1678  	return nil
  1679  }
  1680  
  1681  func (m *LocalWorker) GetActual() *LocalWorkerInfo {
  1682  	if m != nil {
  1683  		return m.Actual
  1684  	}
  1685  	return nil
  1686  }
  1687  
  1688  // Request to discover devices on a local worker
  1689  type DeviceDiscovery struct {
  1690  	// ID of the module to perform the request on
  1691  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  1692  	// Requested state of the discovery
  1693  	Request *DiscoverRequest `protobuf:"bytes,2,opt,name=request,proto3" json:"request,omitempty"`
  1694  	// Actual state of the discovery
  1695  	Actual               *DiscoverResult `protobuf:"bytes,3,opt,name=actual,proto3" json:"actual,omitempty"`
  1696  	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
  1697  	XXX_unrecognized     []byte          `json:"-"`
  1698  	XXX_sizecache        int32           `json:"-"`
  1699  }
  1700  
  1701  func (m *DeviceDiscovery) Reset()         { *m = DeviceDiscovery{} }
  1702  func (m *DeviceDiscovery) String() string { return proto.CompactTextString(m) }
  1703  func (*DeviceDiscovery) ProtoMessage()    {}
  1704  func (*DeviceDiscovery) Descriptor() ([]byte, []int) {
  1705  	return fileDescriptor_d938547f84707355, []int{24}
  1706  }
  1707  func (m *DeviceDiscovery) XXX_Unmarshal(b []byte) error {
  1708  	return m.Unmarshal(b)
  1709  }
  1710  func (m *DeviceDiscovery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1711  	if deterministic {
  1712  		return xxx_messageInfo_DeviceDiscovery.Marshal(b, m, deterministic)
  1713  	} else {
  1714  		b = b[:cap(b)]
  1715  		n, err := m.MarshalToSizedBuffer(b)
  1716  		if err != nil {
  1717  			return nil, err
  1718  		}
  1719  		return b[:n], nil
  1720  	}
  1721  }
  1722  func (m *DeviceDiscovery) XXX_Merge(src proto.Message) {
  1723  	xxx_messageInfo_DeviceDiscovery.Merge(m, src)
  1724  }
  1725  func (m *DeviceDiscovery) XXX_Size() int {
  1726  	return m.Size()
  1727  }
  1728  func (m *DeviceDiscovery) XXX_DiscardUnknown() {
  1729  	xxx_messageInfo_DeviceDiscovery.DiscardUnknown(m)
  1730  }
  1731  
  1732  var xxx_messageInfo_DeviceDiscovery proto.InternalMessageInfo
  1733  
  1734  func (m *DeviceDiscovery) GetId() string {
  1735  	if m != nil {
  1736  		return m.Id
  1737  	}
  1738  	return ""
  1739  }
  1740  
  1741  func (m *DeviceDiscovery) GetRequest() *DiscoverRequest {
  1742  	if m != nil {
  1743  		return m.Request
  1744  	}
  1745  	return nil
  1746  }
  1747  
  1748  func (m *DeviceDiscovery) GetActual() *DiscoverResult {
  1749  	if m != nil {
  1750  		return m.Actual
  1751  	}
  1752  	return nil
  1753  }
  1754  
  1755  // DiscoverRequest is sent when the netmanager wants to local worker to
  1756  // probe its locally attached devices.
  1757  type DiscoverRequest struct {
  1758  	// Unique ID of the request
  1759  	RequestId            int32    `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
  1760  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1761  	XXX_unrecognized     []byte   `json:"-"`
  1762  	XXX_sizecache        int32    `json:"-"`
  1763  }
  1764  
  1765  func (m *DiscoverRequest) Reset()         { *m = DiscoverRequest{} }
  1766  func (m *DiscoverRequest) String() string { return proto.CompactTextString(m) }
  1767  func (*DiscoverRequest) ProtoMessage()    {}
  1768  func (*DiscoverRequest) Descriptor() ([]byte, []int) {
  1769  	return fileDescriptor_d938547f84707355, []int{25}
  1770  }
  1771  func (m *DiscoverRequest) XXX_Unmarshal(b []byte) error {
  1772  	return m.Unmarshal(b)
  1773  }
  1774  func (m *DiscoverRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1775  	if deterministic {
  1776  		return xxx_messageInfo_DiscoverRequest.Marshal(b, m, deterministic)
  1777  	} else {
  1778  		b = b[:cap(b)]
  1779  		n, err := m.MarshalToSizedBuffer(b)
  1780  		if err != nil {
  1781  			return nil, err
  1782  		}
  1783  		return b[:n], nil
  1784  	}
  1785  }
  1786  func (m *DiscoverRequest) XXX_Merge(src proto.Message) {
  1787  	xxx_messageInfo_DiscoverRequest.Merge(m, src)
  1788  }
  1789  func (m *DiscoverRequest) XXX_Size() int {
  1790  	return m.Size()
  1791  }
  1792  func (m *DiscoverRequest) XXX_DiscardUnknown() {
  1793  	xxx_messageInfo_DiscoverRequest.DiscardUnknown(m)
  1794  }
  1795  
  1796  var xxx_messageInfo_DiscoverRequest proto.InternalMessageInfo
  1797  
  1798  func (m *DiscoverRequest) GetRequestId() int32 {
  1799  	if m != nil {
  1800  		return m.RequestId
  1801  	}
  1802  	return 0
  1803  }
  1804  
  1805  // DiscoverResult is returned in a response to a discover request by the netmanager.
  1806  type DiscoverResult struct {
  1807  	// ID of local worker
  1808  	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  1809  	// The addresses that were found
  1810  	Addresses            []string `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"`
  1811  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
  1812  	XXX_unrecognized     []byte   `json:"-"`
  1813  	XXX_sizecache        int32    `json:"-"`
  1814  }
  1815  
  1816  func (m *DiscoverResult) Reset()         { *m = DiscoverResult{} }
  1817  func (m *DiscoverResult) String() string { return proto.CompactTextString(m) }
  1818  func (*DiscoverResult) ProtoMessage()    {}
  1819  func (*DiscoverResult) Descriptor() ([]byte, []int) {
  1820  	return fileDescriptor_d938547f84707355, []int{26}
  1821  }
  1822  func (m *DiscoverResult) XXX_Unmarshal(b []byte) error {
  1823  	return m.Unmarshal(b)
  1824  }
  1825  func (m *DiscoverResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1826  	if deterministic {
  1827  		return xxx_messageInfo_DiscoverResult.Marshal(b, m, deterministic)
  1828  	} else {
  1829  		b = b[:cap(b)]
  1830  		n, err := m.MarshalToSizedBuffer(b)
  1831  		if err != nil {
  1832  			return nil, err
  1833  		}
  1834  		return b[:n], nil
  1835  	}
  1836  }
  1837  func (m *DiscoverResult) XXX_Merge(src proto.Message) {
  1838  	xxx_messageInfo_DiscoverResult.Merge(m, src)
  1839  }
  1840  func (m *DiscoverResult) XXX_Size() int {
  1841  	return m.Size()
  1842  }
  1843  func (m *DiscoverResult) XXX_DiscardUnknown() {
  1844  	xxx_messageInfo_DiscoverResult.DiscardUnknown(m)
  1845  }
  1846  
  1847  var xxx_messageInfo_DiscoverResult proto.InternalMessageInfo
  1848  
  1849  func (m *DiscoverResult) GetId() string {
  1850  	if m != nil {
  1851  		return m.Id
  1852  	}
  1853  	return ""
  1854  }
  1855  
  1856  func (m *DiscoverResult) GetAddresses() []string {
  1857  	if m != nil {
  1858  		return m.Addresses
  1859  	}
  1860  	return nil
  1861  }
  1862  
  1863  func init() {
  1864  	proto.RegisterEnum("binkynet.v1.LocDirection", LocDirection_name, LocDirection_value)
  1865  	proto.RegisterEnum("binkynet.v1.SwitchDirection", SwitchDirection_name, SwitchDirection_value)
  1866  	proto.RegisterEnum("binkynet.v1.TimePeriod", TimePeriod_name, TimePeriod_value)
  1867  	proto.RegisterType((*Empty)(nil), "binkynet.v1.Empty")
  1868  	proto.RegisterType((*CommandStationInfo)(nil), "binkynet.v1.CommandStationInfo")
  1869  	proto.RegisterType((*LocalWorkerInfo)(nil), "binkynet.v1.LocalWorkerInfo")
  1870  	proto.RegisterType((*PowerRequestsOptions)(nil), "binkynet.v1.PowerRequestsOptions")
  1871  	proto.RegisterType((*Power)(nil), "binkynet.v1.Power")
  1872  	proto.RegisterType((*PowerState)(nil), "binkynet.v1.PowerState")
  1873  	proto.RegisterType((*LocRequestsOptions)(nil), "binkynet.v1.LocRequestsOptions")
  1874  	proto.RegisterType((*Loc)(nil), "binkynet.v1.Loc")
  1875  	proto.RegisterType((*LocState)(nil), "binkynet.v1.LocState")
  1876  	proto.RegisterMapType((map[int32]bool)(nil), "binkynet.v1.LocState.FunctionsEntry")
  1877  	proto.RegisterType((*Sensor)(nil), "binkynet.v1.Sensor")
  1878  	proto.RegisterType((*SensorState)(nil), "binkynet.v1.SensorState")
  1879  	proto.RegisterType((*OutputRequestsOptions)(nil), "binkynet.v1.OutputRequestsOptions")
  1880  	proto.RegisterType((*Output)(nil), "binkynet.v1.Output")
  1881  	proto.RegisterType((*OutputState)(nil), "binkynet.v1.OutputState")
  1882  	proto.RegisterType((*SwitchRequestsOptions)(nil), "binkynet.v1.SwitchRequestsOptions")
  1883  	proto.RegisterType((*Switch)(nil), "binkynet.v1.Switch")
  1884  	proto.RegisterType((*SwitchState)(nil), "binkynet.v1.SwitchState")
  1885  	proto.RegisterType((*Clock)(nil), "binkynet.v1.Clock")
  1886  	proto.RegisterType((*Device)(nil), "binkynet.v1.Device")
  1887  	proto.RegisterType((*Object)(nil), "binkynet.v1.Object")
  1888  	proto.RegisterMapType((map[ObjectConfigKey]string)(nil), "binkynet.v1.Object.ConfigurationEntry")
  1889  	proto.RegisterType((*Connection)(nil), "binkynet.v1.Connection")
  1890  	proto.RegisterMapType((map[ConfigKey]string)(nil), "binkynet.v1.Connection.ConfigurationEntry")
  1891  	proto.RegisterType((*DevicePin)(nil), "binkynet.v1.DevicePin")
  1892  	proto.RegisterType((*LocalWorkerConfig)(nil), "binkynet.v1.LocalWorkerConfig")
  1893  	proto.RegisterType((*LocalWorker)(nil), "binkynet.v1.LocalWorker")
  1894  	proto.RegisterType((*DeviceDiscovery)(nil), "binkynet.v1.DeviceDiscovery")
  1895  	proto.RegisterType((*DiscoverRequest)(nil), "binkynet.v1.DiscoverRequest")
  1896  	proto.RegisterType((*DiscoverResult)(nil), "binkynet.v1.DiscoverResult")
  1897  }
  1898  
  1899  func init() { proto.RegisterFile("types.proto", fileDescriptor_d938547f84707355) }
  1900  
  1901  var fileDescriptor_d938547f84707355 = []byte{
  1902  	// 1548 bytes of a gzipped FileDescriptorProto
  1903  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x4f, 0x1b, 0xdb,
  1904  	0x19, 0x67, 0x6c, 0xfc, 0xfa, 0xcc, 0xc3, 0x3d, 0x04, 0x70, 0x20, 0x05, 0x67, 0x9a, 0x44, 0x2e,
  1905  	0x52, 0x4c, 0x20, 0x55, 0x9e, 0x4d, 0x15, 0x0c, 0x26, 0x41, 0xa5, 0x18, 0x1d, 0xd3, 0x44, 0x6a,
  1906  	0x17, 0xd6, 0x30, 0x73, 0x80, 0x09, 0xf6, 0xcc, 0x74, 0xce, 0x0c, 0x89, 0xb7, 0x51, 0xbb, 0x6c,
  1907  	0x97, 0x55, 0x77, 0xd9, 0x77, 0xd9, 0x4d, 0xff, 0x85, 0x2c, 0xef, 0xfa, 0x2e, 0x92, 0xab, 0xdc,
  1908  	0xdd, 0xfd, 0x1b, 0xee, 0xe2, 0xea, 0xbc, 0x3c, 0x0f, 0x0c, 0x12, 0x52, 0xee, 0xdd, 0xcd, 0xf7,
  1909  	0xf8, 0x7d, 0xaf, 0xf3, 0x9d, 0xef, 0x7c, 0x36, 0x94, 0x83, 0x81, 0x47, 0x68, 0xc3, 0xf3, 0xdd,
  1910  	0xc0, 0x45, 0xe5, 0x43, 0xdb, 0x39, 0x1d, 0x38, 0x24, 0x68, 0x9c, 0xad, 0x2d, 0xdc, 0x3d, 0xb6,
  1911  	0x83, 0x93, 0xf0, 0xb0, 0x61, 0xba, 0xfd, 0xd5, 0x63, 0xf7, 0xd8, 0x5d, 0xe5, 0x3a, 0x87, 0xe1,
  1912  	0x11, 0xa7, 0x38, 0xc1, 0xbf, 0x04, 0x56, 0x2f, 0x40, 0xae, 0xd5, 0xf7, 0x82, 0x81, 0xfe, 0x0e,
  1913  	0xd0, 0xa6, 0xdb, 0xef, 0x1b, 0x8e, 0xd5, 0x09, 0x8c, 0xc0, 0x76, 0x9d, 0x1d, 0xe7, 0xc8, 0x45,
  1914  	0x53, 0x90, 0xb1, 0xad, 0xaa, 0x56, 0xd3, 0xea, 0x25, 0x9c, 0xb1, 0x2d, 0x54, 0x83, 0xb2, 0x45,
  1915  	0xa8, 0xe9, 0xdb, 0x1e, 0x53, 0xa9, 0x66, 0xb8, 0x20, 0xce, 0x42, 0x55, 0x28, 0x9c, 0x11, 0x9f,
  1916  	0x32, 0x69, 0x96, 0x4b, 0x15, 0x89, 0xe6, 0x20, 0x1f, 0x7a, 0x81, 0xdd, 0x27, 0xd5, 0xf1, 0x9a,
  1917  	0x56, 0xcf, 0x62, 0x49, 0xe9, 0x1f, 0x0a, 0x30, 0xbd, 0xeb, 0x9a, 0x46, 0xef, 0xb5, 0xeb, 0x9f,
  1918  	0x12, 0xff, 0x97, 0xf2, 0x8b, 0x96, 0xa1, 0x6c, 0xba, 0xce, 0x91, 0x7d, 0xdc, 0x3d, 0x31, 0xe8,
  1919  	0x49, 0x35, 0xc7, 0x51, 0x20, 0x58, 0x2f, 0x0d, 0x7a, 0x82, 0xd6, 0x61, 0x56, 0x50, 0xa1, 0x4f,
  1920  	0xac, 0xae, 0x45, 0xce, 0x6c, 0x93, 0x74, 0x6d, 0x8b, 0x56, 0xf3, 0xb5, 0x6c, 0xbd, 0x84, 0x67,
  1921  	0x22, 0xe1, 0x16, 0x97, 0xed, 0x58, 0x34, 0x85, 0x71, 0x0f, 0xdf, 0x10, 0x33, 0xe0, 0x98, 0x42,
  1922  	0x1a, 0xd3, 0xe6, 0x32, 0x86, 0x79, 0x00, 0xf3, 0xa1, 0x33, 0xda, 0x53, 0x91, 0xa3, 0x66, 0xe3,
  1923  	0xe2, 0xc8, 0x57, 0x1a, 0x17, 0xf3, 0x56, 0x3a, 0x8f, 0x8b, 0xfc, 0xdd, 0x84, 0x89, 0x3e, 0x09,
  1924  	0x7c, 0xdb, 0xa4, 0x5d, 0xcf, 0xf5, 0x83, 0x2a, 0xd4, 0xb4, 0x7a, 0x0e, 0x97, 0x25, 0x6f, 0xdf,
  1925  	0xf5, 0x03, 0x74, 0x1b, 0xa6, 0x94, 0x0a, 0x25, 0x66, 0xe8, 0x93, 0x6a, 0xb9, 0xa6, 0xd5, 0x8b,
  1926  	0x78, 0x52, 0x72, 0x3b, 0x9c, 0x89, 0x1e, 0xc3, 0xf5, 0x1e, 0x3b, 0xb9, 0xee, 0x5b, 0x7e, 0x74,
  1927  	0x5d, 0x4a, 0x7c, 0x1e, 0x3a, 0x37, 0x3b, 0xc1, 0xcd, 0xce, 0xf5, 0xa2, 0xa3, 0xed, 0x08, 0x31,
  1928  	0xf7, 0xf0, 0x0c, 0x16, 0x47, 0x42, 0xa5, 0xbb, 0x49, 0xee, 0xae, 0x7a, 0x1e, 0x2c, 0x3d, 0xdf,
  1929  	0x86, 0x29, 0x1a, 0x7a, 0xcc, 0x0f, 0xed, 0xfa, 0x84, 0x92, 0xa0, 0x4a, 0x44, 0x80, 0x8a, 0x8b,
  1930  	0x19, 0x13, 0x3d, 0x84, 0xea, 0x50, 0x8d, 0x92, 0xa0, 0xdb, 0x73, 0xcd, 0xae, 0x4f, 0xfe, 0x16,
  1931  	0x12, 0x1a, 0x54, 0x8f, 0x38, 0x60, 0x56, 0xc9, 0x3b, 0x24, 0xd8, 0x75, 0x4d, 0x2c, 0x84, 0xe8,
  1932  	0x29, 0x2c, 0x24, 0x80, 0x9e, 0xfb, 0x96, 0xf8, 0x43, 0xe8, 0x31, 0x87, 0xce, 0xc7, 0xa0, 0xfb,
  1933  	0x4c, 0xae, 0xc0, 0xcf, 0x60, 0x31, 0x01, 0x76, 0xc3, 0xc0, 0x0b, 0x83, 0x21, 0xfa, 0x44, 0xe4,
  1934  	0x16, 0x43, 0xb7, 0xb9, 0xc2, 0x45, 0x70, 0xfa, 0xd6, 0x0e, 0xcc, 0x93, 0x21, 0xdc, 0x3e, 0x07,
  1935  	0xef, 0x70, 0x05, 0x05, 0xdf, 0x87, 0xdb, 0x09, 0xb8, 0x6c, 0x27, 0xcb, 0xa6, 0xa6, 0x7b, 0x46,
  1936  	0xfc, 0xc1, 0xd0, 0xd0, 0x1b, 0x6e, 0xe8, 0x66, 0xcc, 0x90, 0xe8, 0xad, 0x2d, 0xa5, 0x29, 0x2d,
  1937  	0xea, 0xcf, 0xe0, 0x5a, 0x3c, 0x3f, 0xda, 0xe6, 0x57, 0x8e, 0xf2, 0x2e, 0x31, 0x9c, 0xd0, 0xe8,
  1938  	0x75, 0x79, 0x9b, 0xf9, 0x7d, 0x7e, 0x63, 0x59, 0x97, 0x70, 0xee, 0xa6, 0x60, 0xea, 0xa7, 0x90,
  1939  	0xe3, 0x70, 0xb4, 0x06, 0x05, 0xe5, 0x9b, 0x29, 0x96, 0xd7, 0xe7, 0x1b, 0xb1, 0xd1, 0xd5, 0xe0,
  1940  	0x4a, 0x6c, 0xfa, 0x10, 0xac, 0xf4, 0xd0, 0x2a, 0xe4, 0x0d, 0x33, 0x08, 0x8d, 0x1e, 0xbf, 0xf3,
  1941  	0x97, 0x20, 0xa4, 0x9a, 0x7e, 0x07, 0x20, 0xe2, 0xb2, 0xa9, 0x40, 0x1c, 0xe3, 0xb0, 0x47, 0x2c,
  1942  	0x19, 0x9a, 0x22, 0xf5, 0xa7, 0x80, 0xa2, 0xe3, 0xbe, 0x6a, 0x46, 0xff, 0xd6, 0x20, 0xbb, 0xeb,
  1943  	0x9a, 0x68, 0x15, 0x0a, 0x86, 0x65, 0xf9, 0x84, 0x52, 0x31, 0xab, 0x9a, 0xb3, 0x1f, 0x3f, 0x2d,
  1944  	0x8f, 0x7d, 0xfb, 0x69, 0x79, 0x52, 0xdc, 0xb6, 0x0d, 0x21, 0xc4, 0x4a, 0x8b, 0x01, 0x54, 0x05,
  1945  	0x44, 0x3e, 0xb3, 0x89, 0x7c, 0x76, 0x5d, 0x33, 0x95, 0xff, 0xdd, 0x61, 0xfe, 0xd9, 0xcb, 0xf4,
  1946  	0x55, 0xf6, 0x3f, 0x6a, 0x50, 0x54, 0x4c, 0x74, 0x0d, 0x72, 0xd4, 0x23, 0x32, 0xf5, 0x1c, 0x16,
  1947  	0x04, 0x1b, 0x7b, 0xfc, 0xa3, 0x4b, 0x03, 0xe2, 0x51, 0x1e, 0x46, 0x0e, 0x03, 0x67, 0x75, 0x18,
  1948  	0x07, 0x3d, 0x84, 0x92, 0x65, 0xfb, 0xc4, 0x0c, 0xd4, 0x2c, 0x9d, 0x5a, 0xbf, 0x9e, 0xf6, 0xba,
  1949  	0xa5, 0x14, 0x70, 0xa4, 0x8b, 0x9a, 0x50, 0x3a, 0x0a, 0x1d, 0xfe, 0x4d, 0xab, 0xe3, 0xb5, 0x6c,
  1950  	0xbd, 0xbc, 0x7e, 0x6b, 0x64, 0xb8, 0x8d, 0x6d, 0xa5, 0xd6, 0x72, 0x02, 0x7f, 0x80, 0x23, 0xd8,
  1951  	0xc2, 0xef, 0x61, 0x2a, 0x29, 0x44, 0x15, 0xc8, 0x9e, 0x92, 0x81, 0xcc, 0x81, 0x7d, 0xb2, 0xbc,
  1952  	0xce, 0x8c, 0x5e, 0x48, 0x78, 0xec, 0x45, 0x2c, 0x88, 0x27, 0x99, 0x47, 0x9a, 0x7e, 0x0a, 0xf9,
  1953  	0x0e, 0x71, 0xa8, 0xeb, 0x5f, 0xfd, 0x64, 0xee, 0xa5, 0x1a, 0xad, 0x9a, 0x88, 0x5c, 0x58, 0x4d,
  1954  	0xd6, 0xfa, 0x37, 0x50, 0x8e, 0xb1, 0xa3, 0xa8, 0x64, 0xb5, 0x39, 0xa1, 0xff, 0x15, 0x66, 0x13,
  1955  	0x97, 0xfb, 0x8a, 0x9d, 0x86, 0x16, 0xa1, 0xd4, 0x77, 0xad, 0xb0, 0xc7, 0x9e, 0x03, 0xf9, 0xec,
  1956  	0x15, 0x05, 0x63, 0xc7, 0xd2, 0x3f, 0x68, 0x90, 0x17, 0xd6, 0xaf, 0x9e, 0xef, 0x7a, 0xba, 0x13,
  1957  	0x93, 0x09, 0x0b, 0xb3, 0xa9, 0x66, 0xbc, 0x97, 0x6a, 0xc6, 0x8b, 0x21, 0xb1, 0x1a, 0xc5, 0xd8,
  1958  	0x17, 0xd7, 0x28, 0x31, 0xc1, 0xbe, 0x7a, 0x8d, 0x84, 0xf5, 0xaf, 0x5e, 0x23, 0x61, 0xf6, 0x4a,
  1959  	0x35, 0x8a, 0x43, 0x54, 0x8d, 0x0e, 0xa1, 0x1c, 0x63, 0xa3, 0x27, 0xf1, 0xeb, 0xa7, 0xf1, 0xeb,
  1960  	0x77, 0x63, 0x84, 0x8d, 0x91, 0x37, 0x70, 0x1e, 0x0a, 0x36, 0xed, 0x86, 0x94, 0x58, 0xf2, 0x6e,
  1961  	0xe4, 0x6d, 0xfa, 0x67, 0x4a, 0x2c, 0xfd, 0xef, 0x1a, 0xe4, 0x36, 0x7b, 0xae, 0x79, 0xca, 0x06,
  1962  	0xaa, 0x47, 0x7c, 0xdb, 0xb5, 0xa4, 0xed, 0xe4, 0x40, 0x3d, 0xb0, 0xfb, 0x64, 0x9f, 0x8b, 0xb1,
  1963  	0x54, 0x63, 0x67, 0x76, 0xe2, 0x86, 0xbe, 0x9a, 0x14, 0x82, 0x60, 0x83, 0xb5, 0x6f, 0x3b, 0x61,
  1964  	0x40, 0x28, 0xcf, 0x33, 0x87, 0x15, 0x89, 0x16, 0xa0, 0x18, 0x3a, 0xf6, 0xbb, 0xd8, 0xc2, 0x35,
  1965  	0xa4, 0xf5, 0x1e, 0xe4, 0xc5, 0x13, 0x83, 0x6a, 0xd1, 0x82, 0xd7, 0xac, 0xc8, 0x63, 0x28, 0xca,
  1966  	0xd5, 0x66, 0x8b, 0xaf, 0x7c, 0x77, 0x60, 0x9c, 0x2d, 0xb9, 0xe2, 0x40, 0x9b, 0x48, 0xea, 0x80,
  1967  	0xd0, 0x39, 0x18, 0x78, 0x04, 0x73, 0x39, 0x8b, 0x44, 0x9d, 0xaa, 0x5c, 0xfc, 0x24, 0xa9, 0xff,
  1968  	0x2f, 0x03, 0x79, 0x71, 0xb2, 0xa3, 0xdd, 0xc9, 0x8d, 0xe8, 0x52, 0x77, 0x42, 0x27, 0xe6, 0xee,
  1969  	0x31, 0xdf, 0x1a, 0x1d, 0x22, 0xc7, 0x5c, 0x96, 0x8f, 0xb9, 0x64, 0x11, 0x37, 0x87, 0x72, 0x1c,
  1970  	0xd7, 0x45, 0x06, 0x4c, 0xaa, 0x75, 0x8c, 0x6f, 0xd8, 0x72, 0x46, 0xde, 0x49, 0xde, 0x22, 0xee,
  1971  	0xb0, 0xb1, 0x19, 0x57, 0xe4, 0x83, 0xb0, 0x39, 0xf3, 0xfe, 0xf3, 0xf2, 0xb4, 0x10, 0x0b, 0xe9,
  1972  	0x1f, 0xc9, 0x00, 0x27, 0x2d, 0x2e, 0x3c, 0x67, 0x5b, 0x7c, 0x1a, 0x19, 0x1f, 0xa1, 0xa5, 0x11,
  1973  	0x23, 0xb4, 0x14, 0x1f, 0xa1, 0xff, 0xc8, 0x00, 0x44, 0x09, 0xa0, 0x7a, 0x0c, 0xda, 0x9c, 0x93,
  1974  	0x55, 0x99, 0x8a, 0x14, 0xf6, 0x8c, 0x3e, 0x11, 0x26, 0x57, 0x60, 0xdc, 0xb3, 0x1d, 0xd6, 0x26,
  1975  	0x2c, 0xa9, 0xb9, 0x44, 0x52, 0xe2, 0xd0, 0xf6, 0x6d, 0x07, 0x73, 0x1d, 0xd4, 0x4d, 0x57, 0x42,
  1976  	0x94, 0x71, 0xe5, 0x82, 0x32, 0x8e, 0xaa, 0xc6, 0xe4, 0xfb, 0xcf, 0xcb, 0xa5, 0x9f, 0xb1, 0x0e,
  1977  	0x2e, 0x94, 0x86, 0x51, 0xf3, 0x27, 0x51, 0x2d, 0xe5, 0xb2, 0x16, 0x0b, 0xe9, 0xa6, 0xfd, 0xe1,
  1978  	0xd3, 0x72, 0x5e, 0x28, 0xe1, 0xa2, 0x25, 0x77, 0x74, 0xf4, 0x5b, 0xc8, 0xd9, 0x8e, 0x45, 0xde,
  1979  	0x71, 0xfb, 0xe3, 0xcd, 0x19, 0x09, 0x2a, 0x4b, 0x10, 0x13, 0x61, 0xa1, 0xa1, 0xff, 0x5f, 0x83,
  1980  	0x5f, 0xc5, 0x7e, 0x06, 0x89, 0xf0, 0x59, 0x80, 0x46, 0xcf, 0x36, 0xe4, 0xc4, 0xc2, 0x82, 0x40,
  1981  	0x77, 0xa1, 0x20, 0x5c, 0xa8, 0x72, 0xcf, 0x8c, 0x28, 0x37, 0x56, 0x3a, 0x4c, 0x5d, 0xfc, 0x36,
  1982  	0x50, 0xfd, 0x3a, 0x33, 0xa2, 0xe5, 0xb0, 0xd2, 0xb9, 0xec, 0x06, 0x23, 0x04, 0xe3, 0xb1, 0x5f,
  1983  	0x4b, 0xfc, 0x5b, 0xff, 0xa7, 0x06, 0xe5, 0x58, 0xe4, 0xe7, 0x7e, 0xbc, 0x3d, 0x4a, 0x8f, 0xd1,
  1984  	0xa5, 0xf4, 0x56, 0x90, 0x4c, 0x3a, 0x1a, 0xa6, 0xbf, 0x4b, 0x0d, 0xd3, 0x1b, 0x17, 0x01, 0xd9,
  1985  	0x8f, 0xc6, 0xe1, 0x40, 0xfd, 0x97, 0x06, 0xd3, 0xa9, 0x4d, 0xf6, 0x5c, 0x4c, 0x0f, 0xd2, 0x31,
  1986  	0x25, 0x4d, 0x2b, 0xa0, 0x7c, 0x91, 0xa2, 0x88, 0xee, 0xa7, 0x22, 0x5a, 0xbc, 0x00, 0x46, 0xc3,
  1987  	0x5e, 0x30, 0x0c, 0xe8, 0x1e, 0x4c, 0xa7, 0x0c, 0xa2, 0x5f, 0x03, 0x48, 0x93, 0xaa, 0xa5, 0x72,
  1988  	0xb8, 0x24, 0x39, 0x3b, 0x96, 0xfe, 0x07, 0x98, 0x4a, 0xda, 0x3a, 0x97, 0xc0, 0x0d, 0x28, 0xc9,
  1989  	0x39, 0x27, 0x9b, 0xa0, 0x84, 0x23, 0xc6, 0x4a, 0x1d, 0x26, 0xe2, 0x5b, 0x1a, 0x2a, 0x43, 0x61,
  1990  	0xbb, 0x8d, 0x5f, 0x6f, 0xe0, 0xad, 0xca, 0x18, 0x23, 0x70, 0xeb, 0x55, 0x0b, 0x77, 0x5a, 0x15,
  1991  	0x6d, 0xa5, 0x0e, 0xd3, 0xa9, 0x07, 0x05, 0x4d, 0x40, 0xb1, 0x73, 0x80, 0x37, 0x76, 0x5e, 0xbc,
  1992  	0x3c, 0xa8, 0x8c, 0xa1, 0x02, 0x64, 0xdb, 0xdb, 0xdb, 0x15, 0x6d, 0xe5, 0x39, 0x40, 0xf4, 0x3c,
  1993  	0x30, 0x23, 0x7f, 0x6a, 0xe3, 0xbd, 0x9d, 0xbd, 0x17, 0x95, 0x31, 0x34, 0x09, 0xa5, 0x8d, 0xed,
  1994  	0x83, 0x16, 0xde, 0x6b, 0xb7, 0xf7, 0x2a, 0x1a, 0x93, 0xb5, 0x5e, 0xb5, 0xb8, 0x2c, 0x83, 0x4a,
  1995  	0x90, 0xdb, 0xe3, 0xa6, 0xb2, 0xcd, 0x9d, 0x8f, 0x5f, 0x96, 0xb4, 0x6f, 0xbe, 0x2c, 0x69, 0xdf,
  1996  	0x7d, 0x59, 0xd2, 0xfe, 0xf3, 0xfd, 0xd2, 0xd8, 0x5f, 0x6e, 0xc5, 0xfe, 0xad, 0x50, 0x85, 0x5c,
  1997  	0x6d, 0xb2, 0x8f, 0x3d, 0x12, 0xac, 0x1a, 0x9e, 0x4d, 0x57, 0xcf, 0xd6, 0xfe, 0x9b, 0xa9, 0x28,
  1998  	0x56, 0x63, 0xc3, 0xb3, 0x69, 0xe3, 0xd5, 0xda, 0x61, 0x9e, 0xff, 0x7d, 0x71, 0xff, 0xa7, 0x00,
  1999  	0x00, 0x00, 0xff, 0xff, 0xa5, 0x84, 0x3f, 0xd6, 0x09, 0x11, 0x00, 0x00,
  2000  }
  2001  
  2002  func (m *Empty) Marshal() (dAtA []byte, err error) {
  2003  	size := m.Size()
  2004  	dAtA = make([]byte, size)
  2005  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2006  	if err != nil {
  2007  		return nil, err
  2008  	}
  2009  	return dAtA[:n], nil
  2010  }
  2011  
  2012  func (m *Empty) MarshalTo(dAtA []byte) (int, error) {
  2013  	size := m.Size()
  2014  	return m.MarshalToSizedBuffer(dAtA[:size])
  2015  }
  2016  
  2017  func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2018  	i := len(dAtA)
  2019  	_ = i
  2020  	var l int
  2021  	_ = l
  2022  	if m.XXX_unrecognized != nil {
  2023  		i -= len(m.XXX_unrecognized)
  2024  		copy(dAtA[i:], m.XXX_unrecognized)
  2025  	}
  2026  	return len(dAtA) - i, nil
  2027  }
  2028  
  2029  func (m *CommandStationInfo) Marshal() (dAtA []byte, err error) {
  2030  	size := m.Size()
  2031  	dAtA = make([]byte, size)
  2032  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2033  	if err != nil {
  2034  		return nil, err
  2035  	}
  2036  	return dAtA[:n], nil
  2037  }
  2038  
  2039  func (m *CommandStationInfo) MarshalTo(dAtA []byte) (int, error) {
  2040  	size := m.Size()
  2041  	return m.MarshalToSizedBuffer(dAtA[:size])
  2042  }
  2043  
  2044  func (m *CommandStationInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2045  	i := len(dAtA)
  2046  	_ = i
  2047  	var l int
  2048  	_ = l
  2049  	if m.XXX_unrecognized != nil {
  2050  		i -= len(m.XXX_unrecognized)
  2051  		copy(dAtA[i:], m.XXX_unrecognized)
  2052  	}
  2053  	if m.Uptime != 0 {
  2054  		i = encodeVarintTypes(dAtA, i, uint64(m.Uptime))
  2055  		i--
  2056  		dAtA[i] = 0x20
  2057  	}
  2058  	if len(m.Version) > 0 {
  2059  		i -= len(m.Version)
  2060  		copy(dAtA[i:], m.Version)
  2061  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  2062  		i--
  2063  		dAtA[i] = 0x1a
  2064  	}
  2065  	if len(m.Description) > 0 {
  2066  		i -= len(m.Description)
  2067  		copy(dAtA[i:], m.Description)
  2068  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Description)))
  2069  		i--
  2070  		dAtA[i] = 0x12
  2071  	}
  2072  	if len(m.Id) > 0 {
  2073  		i -= len(m.Id)
  2074  		copy(dAtA[i:], m.Id)
  2075  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
  2076  		i--
  2077  		dAtA[i] = 0xa
  2078  	}
  2079  	return len(dAtA) - i, nil
  2080  }
  2081  
  2082  func (m *LocalWorkerInfo) Marshal() (dAtA []byte, err error) {
  2083  	size := m.Size()
  2084  	dAtA = make([]byte, size)
  2085  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2086  	if err != nil {
  2087  		return nil, err
  2088  	}
  2089  	return dAtA[:n], nil
  2090  }
  2091  
  2092  func (m *LocalWorkerInfo) MarshalTo(dAtA []byte) (int, error) {
  2093  	size := m.Size()
  2094  	return m.MarshalToSizedBuffer(dAtA[:size])
  2095  }
  2096  
  2097  func (m *LocalWorkerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2098  	i := len(dAtA)
  2099  	_ = i
  2100  	var l int
  2101  	_ = l
  2102  	if m.XXX_unrecognized != nil {
  2103  		i -= len(m.XXX_unrecognized)
  2104  		copy(dAtA[i:], m.XXX_unrecognized)
  2105  	}
  2106  	if m.SupportsSetDeviceDiscoveryRequest {
  2107  		i--
  2108  		if m.SupportsSetDeviceDiscoveryRequest {
  2109  			dAtA[i] = 1
  2110  		} else {
  2111  			dAtA[i] = 0
  2112  		}
  2113  		i--
  2114  		dAtA[i] = 0x6
  2115  		i--
  2116  		dAtA[i] = 0xd0
  2117  	}
  2118  	if m.SupportsSetSwitchRequest {
  2119  		i--
  2120  		if m.SupportsSetSwitchRequest {
  2121  			dAtA[i] = 1
  2122  		} else {
  2123  			dAtA[i] = 0
  2124  		}
  2125  		i--
  2126  		dAtA[i] = 0x6
  2127  		i--
  2128  		dAtA[i] = 0xc8
  2129  	}
  2130  	if m.SupportsSetOutputRequest {
  2131  		i--
  2132  		if m.SupportsSetOutputRequest {
  2133  			dAtA[i] = 1
  2134  		} else {
  2135  			dAtA[i] = 0
  2136  		}
  2137  		i--
  2138  		dAtA[i] = 0x6
  2139  		i--
  2140  		dAtA[i] = 0xc0
  2141  	}
  2142  	if m.SupportsSetPowerRequest {
  2143  		i--
  2144  		if m.SupportsSetPowerRequest {
  2145  			dAtA[i] = 1
  2146  		} else {
  2147  			dAtA[i] = 0
  2148  		}
  2149  		i--
  2150  		dAtA[i] = 0x6
  2151  		i--
  2152  		dAtA[i] = 0xb8
  2153  	}
  2154  	if m.SupportsSetLocRequest {
  2155  		i--
  2156  		if m.SupportsSetLocRequest {
  2157  			dAtA[i] = 1
  2158  		} else {
  2159  			dAtA[i] = 0
  2160  		}
  2161  		i--
  2162  		dAtA[i] = 0x6
  2163  		i--
  2164  		dAtA[i] = 0xb0
  2165  	}
  2166  	if m.SupportsReset {
  2167  		i--
  2168  		if m.SupportsReset {
  2169  			dAtA[i] = 1
  2170  		} else {
  2171  			dAtA[i] = 0
  2172  		}
  2173  		i--
  2174  		dAtA[i] = 0x6
  2175  		i--
  2176  		dAtA[i] = 0xa8
  2177  	}
  2178  	if m.LocalWorkerServiceSecure {
  2179  		i--
  2180  		if m.LocalWorkerServiceSecure {
  2181  			dAtA[i] = 1
  2182  		} else {
  2183  			dAtA[i] = 0
  2184  		}
  2185  		i--
  2186  		dAtA[i] = 0x68
  2187  	}
  2188  	if m.LocalWorkerServicePort != 0 {
  2189  		i = encodeVarintTypes(dAtA, i, uint64(m.LocalWorkerServicePort))
  2190  		i--
  2191  		dAtA[i] = 0x60
  2192  	}
  2193  	if m.MetricsSecure {
  2194  		i--
  2195  		if m.MetricsSecure {
  2196  			dAtA[i] = 1
  2197  		} else {
  2198  			dAtA[i] = 0
  2199  		}
  2200  		i--
  2201  		dAtA[i] = 0x58
  2202  	}
  2203  	if m.MetricsPort != 0 {
  2204  		i = encodeVarintTypes(dAtA, i, uint64(m.MetricsPort))
  2205  		i--
  2206  		dAtA[i] = 0x50
  2207  	}
  2208  	if len(m.UnconfiguredObjectIds) > 0 {
  2209  		for iNdEx := len(m.UnconfiguredObjectIds) - 1; iNdEx >= 0; iNdEx-- {
  2210  			i -= len(m.UnconfiguredObjectIds[iNdEx])
  2211  			copy(dAtA[i:], m.UnconfiguredObjectIds[iNdEx])
  2212  			i = encodeVarintTypes(dAtA, i, uint64(len(m.UnconfiguredObjectIds[iNdEx])))
  2213  			i--
  2214  			dAtA[i] = 0x4a
  2215  		}
  2216  	}
  2217  	if len(m.UnconfiguredDeviceIds) > 0 {
  2218  		for iNdEx := len(m.UnconfiguredDeviceIds) - 1; iNdEx >= 0; iNdEx-- {
  2219  			i -= len(m.UnconfiguredDeviceIds[iNdEx])
  2220  			copy(dAtA[i:], m.UnconfiguredDeviceIds[iNdEx])
  2221  			i = encodeVarintTypes(dAtA, i, uint64(len(m.UnconfiguredDeviceIds[iNdEx])))
  2222  			i--
  2223  			dAtA[i] = 0x42
  2224  		}
  2225  	}
  2226  	if len(m.ConfiguredObjectIds) > 0 {
  2227  		for iNdEx := len(m.ConfiguredObjectIds) - 1; iNdEx >= 0; iNdEx-- {
  2228  			i -= len(m.ConfiguredObjectIds[iNdEx])
  2229  			copy(dAtA[i:], m.ConfiguredObjectIds[iNdEx])
  2230  			i = encodeVarintTypes(dAtA, i, uint64(len(m.ConfiguredObjectIds[iNdEx])))
  2231  			i--
  2232  			dAtA[i] = 0x3a
  2233  		}
  2234  	}
  2235  	if len(m.ConfiguredDeviceIds) > 0 {
  2236  		for iNdEx := len(m.ConfiguredDeviceIds) - 1; iNdEx >= 0; iNdEx-- {
  2237  			i -= len(m.ConfiguredDeviceIds[iNdEx])
  2238  			copy(dAtA[i:], m.ConfiguredDeviceIds[iNdEx])
  2239  			i = encodeVarintTypes(dAtA, i, uint64(len(m.ConfiguredDeviceIds[iNdEx])))
  2240  			i--
  2241  			dAtA[i] = 0x32
  2242  		}
  2243  	}
  2244  	if len(m.ConfigHash) > 0 {
  2245  		i -= len(m.ConfigHash)
  2246  		copy(dAtA[i:], m.ConfigHash)
  2247  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ConfigHash)))
  2248  		i--
  2249  		dAtA[i] = 0x2a
  2250  	}
  2251  	if m.Uptime != 0 {
  2252  		i = encodeVarintTypes(dAtA, i, uint64(m.Uptime))
  2253  		i--
  2254  		dAtA[i] = 0x20
  2255  	}
  2256  	if len(m.Version) > 0 {
  2257  		i -= len(m.Version)
  2258  		copy(dAtA[i:], m.Version)
  2259  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Version)))
  2260  		i--
  2261  		dAtA[i] = 0x1a
  2262  	}
  2263  	if len(m.Description) > 0 {
  2264  		i -= len(m.Description)
  2265  		copy(dAtA[i:], m.Description)
  2266  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Description)))
  2267  		i--
  2268  		dAtA[i] = 0x12
  2269  	}
  2270  	if len(m.Id) > 0 {
  2271  		i -= len(m.Id)
  2272  		copy(dAtA[i:], m.Id)
  2273  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
  2274  		i--
  2275  		dAtA[i] = 0xa
  2276  	}
  2277  	return len(dAtA) - i, nil
  2278  }
  2279  
  2280  func (m *PowerRequestsOptions) Marshal() (dAtA []byte, err error) {
  2281  	size := m.Size()
  2282  	dAtA = make([]byte, size)
  2283  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2284  	if err != nil {
  2285  		return nil, err
  2286  	}
  2287  	return dAtA[:n], nil
  2288  }
  2289  
  2290  func (m *PowerRequestsOptions) MarshalTo(dAtA []byte) (int, error) {
  2291  	size := m.Size()
  2292  	return m.MarshalToSizedBuffer(dAtA[:size])
  2293  }
  2294  
  2295  func (m *PowerRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2296  	i := len(dAtA)
  2297  	_ = i
  2298  	var l int
  2299  	_ = l
  2300  	if m.XXX_unrecognized != nil {
  2301  		i -= len(m.XXX_unrecognized)
  2302  		copy(dAtA[i:], m.XXX_unrecognized)
  2303  	}
  2304  	if m.ManualConfirm {
  2305  		i--
  2306  		if m.ManualConfirm {
  2307  			dAtA[i] = 1
  2308  		} else {
  2309  			dAtA[i] = 0
  2310  		}
  2311  		i--
  2312  		dAtA[i] = 0x8
  2313  	}
  2314  	return len(dAtA) - i, nil
  2315  }
  2316  
  2317  func (m *Power) Marshal() (dAtA []byte, err error) {
  2318  	size := m.Size()
  2319  	dAtA = make([]byte, size)
  2320  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2321  	if err != nil {
  2322  		return nil, err
  2323  	}
  2324  	return dAtA[:n], nil
  2325  }
  2326  
  2327  func (m *Power) MarshalTo(dAtA []byte) (int, error) {
  2328  	size := m.Size()
  2329  	return m.MarshalToSizedBuffer(dAtA[:size])
  2330  }
  2331  
  2332  func (m *Power) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2333  	i := len(dAtA)
  2334  	_ = i
  2335  	var l int
  2336  	_ = l
  2337  	if m.XXX_unrecognized != nil {
  2338  		i -= len(m.XXX_unrecognized)
  2339  		copy(dAtA[i:], m.XXX_unrecognized)
  2340  	}
  2341  	if m.Actual != nil {
  2342  		{
  2343  			size, err := m.Actual.MarshalToSizedBuffer(dAtA[:i])
  2344  			if err != nil {
  2345  				return 0, err
  2346  			}
  2347  			i -= size
  2348  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2349  		}
  2350  		i--
  2351  		dAtA[i] = 0x12
  2352  	}
  2353  	if m.Request != nil {
  2354  		{
  2355  			size, err := m.Request.MarshalToSizedBuffer(dAtA[:i])
  2356  			if err != nil {
  2357  				return 0, err
  2358  			}
  2359  			i -= size
  2360  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2361  		}
  2362  		i--
  2363  		dAtA[i] = 0xa
  2364  	}
  2365  	return len(dAtA) - i, nil
  2366  }
  2367  
  2368  func (m *PowerState) Marshal() (dAtA []byte, err error) {
  2369  	size := m.Size()
  2370  	dAtA = make([]byte, size)
  2371  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2372  	if err != nil {
  2373  		return nil, err
  2374  	}
  2375  	return dAtA[:n], nil
  2376  }
  2377  
  2378  func (m *PowerState) MarshalTo(dAtA []byte) (int, error) {
  2379  	size := m.Size()
  2380  	return m.MarshalToSizedBuffer(dAtA[:size])
  2381  }
  2382  
  2383  func (m *PowerState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2384  	i := len(dAtA)
  2385  	_ = i
  2386  	var l int
  2387  	_ = l
  2388  	if m.XXX_unrecognized != nil {
  2389  		i -= len(m.XXX_unrecognized)
  2390  		copy(dAtA[i:], m.XXX_unrecognized)
  2391  	}
  2392  	if m.Enabled {
  2393  		i--
  2394  		if m.Enabled {
  2395  			dAtA[i] = 1
  2396  		} else {
  2397  			dAtA[i] = 0
  2398  		}
  2399  		i--
  2400  		dAtA[i] = 0x8
  2401  	}
  2402  	return len(dAtA) - i, nil
  2403  }
  2404  
  2405  func (m *LocRequestsOptions) Marshal() (dAtA []byte, err error) {
  2406  	size := m.Size()
  2407  	dAtA = make([]byte, size)
  2408  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2409  	if err != nil {
  2410  		return nil, err
  2411  	}
  2412  	return dAtA[:n], nil
  2413  }
  2414  
  2415  func (m *LocRequestsOptions) MarshalTo(dAtA []byte) (int, error) {
  2416  	size := m.Size()
  2417  	return m.MarshalToSizedBuffer(dAtA[:size])
  2418  }
  2419  
  2420  func (m *LocRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2421  	i := len(dAtA)
  2422  	_ = i
  2423  	var l int
  2424  	_ = l
  2425  	if m.XXX_unrecognized != nil {
  2426  		i -= len(m.XXX_unrecognized)
  2427  		copy(dAtA[i:], m.XXX_unrecognized)
  2428  	}
  2429  	if m.ManualConfirm {
  2430  		i--
  2431  		if m.ManualConfirm {
  2432  			dAtA[i] = 1
  2433  		} else {
  2434  			dAtA[i] = 0
  2435  		}
  2436  		i--
  2437  		dAtA[i] = 0x8
  2438  	}
  2439  	return len(dAtA) - i, nil
  2440  }
  2441  
  2442  func (m *Loc) Marshal() (dAtA []byte, err error) {
  2443  	size := m.Size()
  2444  	dAtA = make([]byte, size)
  2445  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2446  	if err != nil {
  2447  		return nil, err
  2448  	}
  2449  	return dAtA[:n], nil
  2450  }
  2451  
  2452  func (m *Loc) MarshalTo(dAtA []byte) (int, error) {
  2453  	size := m.Size()
  2454  	return m.MarshalToSizedBuffer(dAtA[:size])
  2455  }
  2456  
  2457  func (m *Loc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2458  	i := len(dAtA)
  2459  	_ = i
  2460  	var l int
  2461  	_ = l
  2462  	if m.XXX_unrecognized != nil {
  2463  		i -= len(m.XXX_unrecognized)
  2464  		copy(dAtA[i:], m.XXX_unrecognized)
  2465  	}
  2466  	if m.Actual != nil {
  2467  		{
  2468  			size, err := m.Actual.MarshalToSizedBuffer(dAtA[:i])
  2469  			if err != nil {
  2470  				return 0, err
  2471  			}
  2472  			i -= size
  2473  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2474  		}
  2475  		i--
  2476  		dAtA[i] = 0x1a
  2477  	}
  2478  	if m.Request != nil {
  2479  		{
  2480  			size, err := m.Request.MarshalToSizedBuffer(dAtA[:i])
  2481  			if err != nil {
  2482  				return 0, err
  2483  			}
  2484  			i -= size
  2485  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2486  		}
  2487  		i--
  2488  		dAtA[i] = 0x12
  2489  	}
  2490  	if len(m.Address) > 0 {
  2491  		i -= len(m.Address)
  2492  		copy(dAtA[i:], m.Address)
  2493  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  2494  		i--
  2495  		dAtA[i] = 0xa
  2496  	}
  2497  	return len(dAtA) - i, nil
  2498  }
  2499  
  2500  func (m *LocState) Marshal() (dAtA []byte, err error) {
  2501  	size := m.Size()
  2502  	dAtA = make([]byte, size)
  2503  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2504  	if err != nil {
  2505  		return nil, err
  2506  	}
  2507  	return dAtA[:n], nil
  2508  }
  2509  
  2510  func (m *LocState) MarshalTo(dAtA []byte) (int, error) {
  2511  	size := m.Size()
  2512  	return m.MarshalToSizedBuffer(dAtA[:size])
  2513  }
  2514  
  2515  func (m *LocState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2516  	i := len(dAtA)
  2517  	_ = i
  2518  	var l int
  2519  	_ = l
  2520  	if m.XXX_unrecognized != nil {
  2521  		i -= len(m.XXX_unrecognized)
  2522  		copy(dAtA[i:], m.XXX_unrecognized)
  2523  	}
  2524  	if len(m.Functions) > 0 {
  2525  		for k := range m.Functions {
  2526  			v := m.Functions[k]
  2527  			baseI := i
  2528  			i--
  2529  			if v {
  2530  				dAtA[i] = 1
  2531  			} else {
  2532  				dAtA[i] = 0
  2533  			}
  2534  			i--
  2535  			dAtA[i] = 0x10
  2536  			i = encodeVarintTypes(dAtA, i, uint64(k))
  2537  			i--
  2538  			dAtA[i] = 0x8
  2539  			i = encodeVarintTypes(dAtA, i, uint64(baseI-i))
  2540  			i--
  2541  			dAtA[i] = 0x22
  2542  		}
  2543  	}
  2544  	if m.Direction != 0 {
  2545  		i = encodeVarintTypes(dAtA, i, uint64(m.Direction))
  2546  		i--
  2547  		dAtA[i] = 0x18
  2548  	}
  2549  	if m.SpeedSteps != 0 {
  2550  		i = encodeVarintTypes(dAtA, i, uint64(m.SpeedSteps))
  2551  		i--
  2552  		dAtA[i] = 0x10
  2553  	}
  2554  	if m.Speed != 0 {
  2555  		i = encodeVarintTypes(dAtA, i, uint64(m.Speed))
  2556  		i--
  2557  		dAtA[i] = 0x8
  2558  	}
  2559  	return len(dAtA) - i, nil
  2560  }
  2561  
  2562  func (m *Sensor) Marshal() (dAtA []byte, err error) {
  2563  	size := m.Size()
  2564  	dAtA = make([]byte, size)
  2565  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2566  	if err != nil {
  2567  		return nil, err
  2568  	}
  2569  	return dAtA[:n], nil
  2570  }
  2571  
  2572  func (m *Sensor) MarshalTo(dAtA []byte) (int, error) {
  2573  	size := m.Size()
  2574  	return m.MarshalToSizedBuffer(dAtA[:size])
  2575  }
  2576  
  2577  func (m *Sensor) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2578  	i := len(dAtA)
  2579  	_ = i
  2580  	var l int
  2581  	_ = l
  2582  	if m.XXX_unrecognized != nil {
  2583  		i -= len(m.XXX_unrecognized)
  2584  		copy(dAtA[i:], m.XXX_unrecognized)
  2585  	}
  2586  	if m.Actual != nil {
  2587  		{
  2588  			size, err := m.Actual.MarshalToSizedBuffer(dAtA[:i])
  2589  			if err != nil {
  2590  				return 0, err
  2591  			}
  2592  			i -= size
  2593  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2594  		}
  2595  		i--
  2596  		dAtA[i] = 0x12
  2597  	}
  2598  	if len(m.Address) > 0 {
  2599  		i -= len(m.Address)
  2600  		copy(dAtA[i:], m.Address)
  2601  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  2602  		i--
  2603  		dAtA[i] = 0xa
  2604  	}
  2605  	return len(dAtA) - i, nil
  2606  }
  2607  
  2608  func (m *SensorState) Marshal() (dAtA []byte, err error) {
  2609  	size := m.Size()
  2610  	dAtA = make([]byte, size)
  2611  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2612  	if err != nil {
  2613  		return nil, err
  2614  	}
  2615  	return dAtA[:n], nil
  2616  }
  2617  
  2618  func (m *SensorState) MarshalTo(dAtA []byte) (int, error) {
  2619  	size := m.Size()
  2620  	return m.MarshalToSizedBuffer(dAtA[:size])
  2621  }
  2622  
  2623  func (m *SensorState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2624  	i := len(dAtA)
  2625  	_ = i
  2626  	var l int
  2627  	_ = l
  2628  	if m.XXX_unrecognized != nil {
  2629  		i -= len(m.XXX_unrecognized)
  2630  		copy(dAtA[i:], m.XXX_unrecognized)
  2631  	}
  2632  	if m.Value != 0 {
  2633  		i = encodeVarintTypes(dAtA, i, uint64(m.Value))
  2634  		i--
  2635  		dAtA[i] = 0x8
  2636  	}
  2637  	return len(dAtA) - i, nil
  2638  }
  2639  
  2640  func (m *OutputRequestsOptions) Marshal() (dAtA []byte, err error) {
  2641  	size := m.Size()
  2642  	dAtA = make([]byte, size)
  2643  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2644  	if err != nil {
  2645  		return nil, err
  2646  	}
  2647  	return dAtA[:n], nil
  2648  }
  2649  
  2650  func (m *OutputRequestsOptions) MarshalTo(dAtA []byte) (int, error) {
  2651  	size := m.Size()
  2652  	return m.MarshalToSizedBuffer(dAtA[:size])
  2653  }
  2654  
  2655  func (m *OutputRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2656  	i := len(dAtA)
  2657  	_ = i
  2658  	var l int
  2659  	_ = l
  2660  	if m.XXX_unrecognized != nil {
  2661  		i -= len(m.XXX_unrecognized)
  2662  		copy(dAtA[i:], m.XXX_unrecognized)
  2663  	}
  2664  	if len(m.ModuleId) > 0 {
  2665  		i -= len(m.ModuleId)
  2666  		copy(dAtA[i:], m.ModuleId)
  2667  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ModuleId)))
  2668  		i--
  2669  		dAtA[i] = 0x12
  2670  	}
  2671  	if m.ManualConfirm {
  2672  		i--
  2673  		if m.ManualConfirm {
  2674  			dAtA[i] = 1
  2675  		} else {
  2676  			dAtA[i] = 0
  2677  		}
  2678  		i--
  2679  		dAtA[i] = 0x8
  2680  	}
  2681  	return len(dAtA) - i, nil
  2682  }
  2683  
  2684  func (m *Output) Marshal() (dAtA []byte, err error) {
  2685  	size := m.Size()
  2686  	dAtA = make([]byte, size)
  2687  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2688  	if err != nil {
  2689  		return nil, err
  2690  	}
  2691  	return dAtA[:n], nil
  2692  }
  2693  
  2694  func (m *Output) MarshalTo(dAtA []byte) (int, error) {
  2695  	size := m.Size()
  2696  	return m.MarshalToSizedBuffer(dAtA[:size])
  2697  }
  2698  
  2699  func (m *Output) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2700  	i := len(dAtA)
  2701  	_ = i
  2702  	var l int
  2703  	_ = l
  2704  	if m.XXX_unrecognized != nil {
  2705  		i -= len(m.XXX_unrecognized)
  2706  		copy(dAtA[i:], m.XXX_unrecognized)
  2707  	}
  2708  	if m.Actual != nil {
  2709  		{
  2710  			size, err := m.Actual.MarshalToSizedBuffer(dAtA[:i])
  2711  			if err != nil {
  2712  				return 0, err
  2713  			}
  2714  			i -= size
  2715  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2716  		}
  2717  		i--
  2718  		dAtA[i] = 0x1a
  2719  	}
  2720  	if m.Request != nil {
  2721  		{
  2722  			size, err := m.Request.MarshalToSizedBuffer(dAtA[:i])
  2723  			if err != nil {
  2724  				return 0, err
  2725  			}
  2726  			i -= size
  2727  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2728  		}
  2729  		i--
  2730  		dAtA[i] = 0x12
  2731  	}
  2732  	if len(m.Address) > 0 {
  2733  		i -= len(m.Address)
  2734  		copy(dAtA[i:], m.Address)
  2735  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  2736  		i--
  2737  		dAtA[i] = 0xa
  2738  	}
  2739  	return len(dAtA) - i, nil
  2740  }
  2741  
  2742  func (m *OutputState) Marshal() (dAtA []byte, err error) {
  2743  	size := m.Size()
  2744  	dAtA = make([]byte, size)
  2745  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2746  	if err != nil {
  2747  		return nil, err
  2748  	}
  2749  	return dAtA[:n], nil
  2750  }
  2751  
  2752  func (m *OutputState) MarshalTo(dAtA []byte) (int, error) {
  2753  	size := m.Size()
  2754  	return m.MarshalToSizedBuffer(dAtA[:size])
  2755  }
  2756  
  2757  func (m *OutputState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2758  	i := len(dAtA)
  2759  	_ = i
  2760  	var l int
  2761  	_ = l
  2762  	if m.XXX_unrecognized != nil {
  2763  		i -= len(m.XXX_unrecognized)
  2764  		copy(dAtA[i:], m.XXX_unrecognized)
  2765  	}
  2766  	if m.Value != 0 {
  2767  		i = encodeVarintTypes(dAtA, i, uint64(m.Value))
  2768  		i--
  2769  		dAtA[i] = 0x8
  2770  	}
  2771  	return len(dAtA) - i, nil
  2772  }
  2773  
  2774  func (m *SwitchRequestsOptions) Marshal() (dAtA []byte, err error) {
  2775  	size := m.Size()
  2776  	dAtA = make([]byte, size)
  2777  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2778  	if err != nil {
  2779  		return nil, err
  2780  	}
  2781  	return dAtA[:n], nil
  2782  }
  2783  
  2784  func (m *SwitchRequestsOptions) MarshalTo(dAtA []byte) (int, error) {
  2785  	size := m.Size()
  2786  	return m.MarshalToSizedBuffer(dAtA[:size])
  2787  }
  2788  
  2789  func (m *SwitchRequestsOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2790  	i := len(dAtA)
  2791  	_ = i
  2792  	var l int
  2793  	_ = l
  2794  	if m.XXX_unrecognized != nil {
  2795  		i -= len(m.XXX_unrecognized)
  2796  		copy(dAtA[i:], m.XXX_unrecognized)
  2797  	}
  2798  	if len(m.ModuleId) > 0 {
  2799  		i -= len(m.ModuleId)
  2800  		copy(dAtA[i:], m.ModuleId)
  2801  		i = encodeVarintTypes(dAtA, i, uint64(len(m.ModuleId)))
  2802  		i--
  2803  		dAtA[i] = 0x12
  2804  	}
  2805  	if m.ManualConfirm {
  2806  		i--
  2807  		if m.ManualConfirm {
  2808  			dAtA[i] = 1
  2809  		} else {
  2810  			dAtA[i] = 0
  2811  		}
  2812  		i--
  2813  		dAtA[i] = 0x8
  2814  	}
  2815  	return len(dAtA) - i, nil
  2816  }
  2817  
  2818  func (m *Switch) Marshal() (dAtA []byte, err error) {
  2819  	size := m.Size()
  2820  	dAtA = make([]byte, size)
  2821  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2822  	if err != nil {
  2823  		return nil, err
  2824  	}
  2825  	return dAtA[:n], nil
  2826  }
  2827  
  2828  func (m *Switch) MarshalTo(dAtA []byte) (int, error) {
  2829  	size := m.Size()
  2830  	return m.MarshalToSizedBuffer(dAtA[:size])
  2831  }
  2832  
  2833  func (m *Switch) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2834  	i := len(dAtA)
  2835  	_ = i
  2836  	var l int
  2837  	_ = l
  2838  	if m.XXX_unrecognized != nil {
  2839  		i -= len(m.XXX_unrecognized)
  2840  		copy(dAtA[i:], m.XXX_unrecognized)
  2841  	}
  2842  	if m.Actual != nil {
  2843  		{
  2844  			size, err := m.Actual.MarshalToSizedBuffer(dAtA[:i])
  2845  			if err != nil {
  2846  				return 0, err
  2847  			}
  2848  			i -= size
  2849  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2850  		}
  2851  		i--
  2852  		dAtA[i] = 0x1a
  2853  	}
  2854  	if m.Request != nil {
  2855  		{
  2856  			size, err := m.Request.MarshalToSizedBuffer(dAtA[:i])
  2857  			if err != nil {
  2858  				return 0, err
  2859  			}
  2860  			i -= size
  2861  			i = encodeVarintTypes(dAtA, i, uint64(size))
  2862  		}
  2863  		i--
  2864  		dAtA[i] = 0x12
  2865  	}
  2866  	if len(m.Address) > 0 {
  2867  		i -= len(m.Address)
  2868  		copy(dAtA[i:], m.Address)
  2869  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  2870  		i--
  2871  		dAtA[i] = 0xa
  2872  	}
  2873  	return len(dAtA) - i, nil
  2874  }
  2875  
  2876  func (m *SwitchState) Marshal() (dAtA []byte, err error) {
  2877  	size := m.Size()
  2878  	dAtA = make([]byte, size)
  2879  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2880  	if err != nil {
  2881  		return nil, err
  2882  	}
  2883  	return dAtA[:n], nil
  2884  }
  2885  
  2886  func (m *SwitchState) MarshalTo(dAtA []byte) (int, error) {
  2887  	size := m.Size()
  2888  	return m.MarshalToSizedBuffer(dAtA[:size])
  2889  }
  2890  
  2891  func (m *SwitchState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2892  	i := len(dAtA)
  2893  	_ = i
  2894  	var l int
  2895  	_ = l
  2896  	if m.XXX_unrecognized != nil {
  2897  		i -= len(m.XXX_unrecognized)
  2898  		copy(dAtA[i:], m.XXX_unrecognized)
  2899  	}
  2900  	if m.IsUsed {
  2901  		i--
  2902  		if m.IsUsed {
  2903  			dAtA[i] = 1
  2904  		} else {
  2905  			dAtA[i] = 0
  2906  		}
  2907  		i--
  2908  		dAtA[i] = 0x10
  2909  	}
  2910  	if m.Direction != 0 {
  2911  		i = encodeVarintTypes(dAtA, i, uint64(m.Direction))
  2912  		i--
  2913  		dAtA[i] = 0x8
  2914  	}
  2915  	return len(dAtA) - i, nil
  2916  }
  2917  
  2918  func (m *Clock) Marshal() (dAtA []byte, err error) {
  2919  	size := m.Size()
  2920  	dAtA = make([]byte, size)
  2921  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2922  	if err != nil {
  2923  		return nil, err
  2924  	}
  2925  	return dAtA[:n], nil
  2926  }
  2927  
  2928  func (m *Clock) MarshalTo(dAtA []byte) (int, error) {
  2929  	size := m.Size()
  2930  	return m.MarshalToSizedBuffer(dAtA[:size])
  2931  }
  2932  
  2933  func (m *Clock) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2934  	i := len(dAtA)
  2935  	_ = i
  2936  	var l int
  2937  	_ = l
  2938  	if m.XXX_unrecognized != nil {
  2939  		i -= len(m.XXX_unrecognized)
  2940  		copy(dAtA[i:], m.XXX_unrecognized)
  2941  	}
  2942  	if m.Unixtime != 0 {
  2943  		i = encodeVarintTypes(dAtA, i, uint64(m.Unixtime))
  2944  		i--
  2945  		dAtA[i] = 0x20
  2946  	}
  2947  	if m.Minutes != 0 {
  2948  		i = encodeVarintTypes(dAtA, i, uint64(m.Minutes))
  2949  		i--
  2950  		dAtA[i] = 0x18
  2951  	}
  2952  	if m.Hours != 0 {
  2953  		i = encodeVarintTypes(dAtA, i, uint64(m.Hours))
  2954  		i--
  2955  		dAtA[i] = 0x10
  2956  	}
  2957  	if m.Period != 0 {
  2958  		i = encodeVarintTypes(dAtA, i, uint64(m.Period))
  2959  		i--
  2960  		dAtA[i] = 0x8
  2961  	}
  2962  	return len(dAtA) - i, nil
  2963  }
  2964  
  2965  func (m *Device) Marshal() (dAtA []byte, err error) {
  2966  	size := m.Size()
  2967  	dAtA = make([]byte, size)
  2968  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  2969  	if err != nil {
  2970  		return nil, err
  2971  	}
  2972  	return dAtA[:n], nil
  2973  }
  2974  
  2975  func (m *Device) MarshalTo(dAtA []byte) (int, error) {
  2976  	size := m.Size()
  2977  	return m.MarshalToSizedBuffer(dAtA[:size])
  2978  }
  2979  
  2980  func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  2981  	i := len(dAtA)
  2982  	_ = i
  2983  	var l int
  2984  	_ = l
  2985  	if m.XXX_unrecognized != nil {
  2986  		i -= len(m.XXX_unrecognized)
  2987  		copy(dAtA[i:], m.XXX_unrecognized)
  2988  	}
  2989  	if len(m.Address) > 0 {
  2990  		i -= len(m.Address)
  2991  		copy(dAtA[i:], m.Address)
  2992  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Address)))
  2993  		i--
  2994  		dAtA[i] = 0x1a
  2995  	}
  2996  	if len(m.Type) > 0 {
  2997  		i -= len(m.Type)
  2998  		copy(dAtA[i:], m.Type)
  2999  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  3000  		i--
  3001  		dAtA[i] = 0x12
  3002  	}
  3003  	if len(m.Id) > 0 {
  3004  		i -= len(m.Id)
  3005  		copy(dAtA[i:], m.Id)
  3006  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
  3007  		i--
  3008  		dAtA[i] = 0xa
  3009  	}
  3010  	return len(dAtA) - i, nil
  3011  }
  3012  
  3013  func (m *Object) Marshal() (dAtA []byte, err error) {
  3014  	size := m.Size()
  3015  	dAtA = make([]byte, size)
  3016  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3017  	if err != nil {
  3018  		return nil, err
  3019  	}
  3020  	return dAtA[:n], nil
  3021  }
  3022  
  3023  func (m *Object) MarshalTo(dAtA []byte) (int, error) {
  3024  	size := m.Size()
  3025  	return m.MarshalToSizedBuffer(dAtA[:size])
  3026  }
  3027  
  3028  func (m *Object) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3029  	i := len(dAtA)
  3030  	_ = i
  3031  	var l int
  3032  	_ = l
  3033  	if m.XXX_unrecognized != nil {
  3034  		i -= len(m.XXX_unrecognized)
  3035  		copy(dAtA[i:], m.XXX_unrecognized)
  3036  	}
  3037  	if len(m.Configuration) > 0 {
  3038  		for k := range m.Configuration {
  3039  			v := m.Configuration[k]
  3040  			baseI := i
  3041  			i -= len(v)
  3042  			copy(dAtA[i:], v)
  3043  			i = encodeVarintTypes(dAtA, i, uint64(len(v)))
  3044  			i--
  3045  			dAtA[i] = 0x12
  3046  			i -= len(k)
  3047  			copy(dAtA[i:], k)
  3048  			i = encodeVarintTypes(dAtA, i, uint64(len(k)))
  3049  			i--
  3050  			dAtA[i] = 0xa
  3051  			i = encodeVarintTypes(dAtA, i, uint64(baseI-i))
  3052  			i--
  3053  			dAtA[i] = 0x22
  3054  		}
  3055  	}
  3056  	if len(m.Connections) > 0 {
  3057  		for iNdEx := len(m.Connections) - 1; iNdEx >= 0; iNdEx-- {
  3058  			{
  3059  				size, err := m.Connections[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3060  				if err != nil {
  3061  					return 0, err
  3062  				}
  3063  				i -= size
  3064  				i = encodeVarintTypes(dAtA, i, uint64(size))
  3065  			}
  3066  			i--
  3067  			dAtA[i] = 0x1a
  3068  		}
  3069  	}
  3070  	if len(m.Type) > 0 {
  3071  		i -= len(m.Type)
  3072  		copy(dAtA[i:], m.Type)
  3073  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Type)))
  3074  		i--
  3075  		dAtA[i] = 0x12
  3076  	}
  3077  	if len(m.Id) > 0 {
  3078  		i -= len(m.Id)
  3079  		copy(dAtA[i:], m.Id)
  3080  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
  3081  		i--
  3082  		dAtA[i] = 0xa
  3083  	}
  3084  	return len(dAtA) - i, nil
  3085  }
  3086  
  3087  func (m *Connection) Marshal() (dAtA []byte, err error) {
  3088  	size := m.Size()
  3089  	dAtA = make([]byte, size)
  3090  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3091  	if err != nil {
  3092  		return nil, err
  3093  	}
  3094  	return dAtA[:n], nil
  3095  }
  3096  
  3097  func (m *Connection) MarshalTo(dAtA []byte) (int, error) {
  3098  	size := m.Size()
  3099  	return m.MarshalToSizedBuffer(dAtA[:size])
  3100  }
  3101  
  3102  func (m *Connection) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3103  	i := len(dAtA)
  3104  	_ = i
  3105  	var l int
  3106  	_ = l
  3107  	if m.XXX_unrecognized != nil {
  3108  		i -= len(m.XXX_unrecognized)
  3109  		copy(dAtA[i:], m.XXX_unrecognized)
  3110  	}
  3111  	if len(m.Configuration) > 0 {
  3112  		for k := range m.Configuration {
  3113  			v := m.Configuration[k]
  3114  			baseI := i
  3115  			i -= len(v)
  3116  			copy(dAtA[i:], v)
  3117  			i = encodeVarintTypes(dAtA, i, uint64(len(v)))
  3118  			i--
  3119  			dAtA[i] = 0x12
  3120  			i -= len(k)
  3121  			copy(dAtA[i:], k)
  3122  			i = encodeVarintTypes(dAtA, i, uint64(len(k)))
  3123  			i--
  3124  			dAtA[i] = 0xa
  3125  			i = encodeVarintTypes(dAtA, i, uint64(baseI-i))
  3126  			i--
  3127  			dAtA[i] = 0x1a
  3128  		}
  3129  	}
  3130  	if len(m.Pins) > 0 {
  3131  		for iNdEx := len(m.Pins) - 1; iNdEx >= 0; iNdEx-- {
  3132  			{
  3133  				size, err := m.Pins[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3134  				if err != nil {
  3135  					return 0, err
  3136  				}
  3137  				i -= size
  3138  				i = encodeVarintTypes(dAtA, i, uint64(size))
  3139  			}
  3140  			i--
  3141  			dAtA[i] = 0x12
  3142  		}
  3143  	}
  3144  	if len(m.Key) > 0 {
  3145  		i -= len(m.Key)
  3146  		copy(dAtA[i:], m.Key)
  3147  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Key)))
  3148  		i--
  3149  		dAtA[i] = 0xa
  3150  	}
  3151  	return len(dAtA) - i, nil
  3152  }
  3153  
  3154  func (m *DevicePin) Marshal() (dAtA []byte, err error) {
  3155  	size := m.Size()
  3156  	dAtA = make([]byte, size)
  3157  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3158  	if err != nil {
  3159  		return nil, err
  3160  	}
  3161  	return dAtA[:n], nil
  3162  }
  3163  
  3164  func (m *DevicePin) MarshalTo(dAtA []byte) (int, error) {
  3165  	size := m.Size()
  3166  	return m.MarshalToSizedBuffer(dAtA[:size])
  3167  }
  3168  
  3169  func (m *DevicePin) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3170  	i := len(dAtA)
  3171  	_ = i
  3172  	var l int
  3173  	_ = l
  3174  	if m.XXX_unrecognized != nil {
  3175  		i -= len(m.XXX_unrecognized)
  3176  		copy(dAtA[i:], m.XXX_unrecognized)
  3177  	}
  3178  	if m.Index != 0 {
  3179  		i = encodeVarintTypes(dAtA, i, uint64(m.Index))
  3180  		i--
  3181  		dAtA[i] = 0x10
  3182  	}
  3183  	if len(m.DeviceId) > 0 {
  3184  		i -= len(m.DeviceId)
  3185  		copy(dAtA[i:], m.DeviceId)
  3186  		i = encodeVarintTypes(dAtA, i, uint64(len(m.DeviceId)))
  3187  		i--
  3188  		dAtA[i] = 0xa
  3189  	}
  3190  	return len(dAtA) - i, nil
  3191  }
  3192  
  3193  func (m *LocalWorkerConfig) Marshal() (dAtA []byte, err error) {
  3194  	size := m.Size()
  3195  	dAtA = make([]byte, size)
  3196  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3197  	if err != nil {
  3198  		return nil, err
  3199  	}
  3200  	return dAtA[:n], nil
  3201  }
  3202  
  3203  func (m *LocalWorkerConfig) MarshalTo(dAtA []byte) (int, error) {
  3204  	size := m.Size()
  3205  	return m.MarshalToSizedBuffer(dAtA[:size])
  3206  }
  3207  
  3208  func (m *LocalWorkerConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3209  	i := len(dAtA)
  3210  	_ = i
  3211  	var l int
  3212  	_ = l
  3213  	if m.XXX_unrecognized != nil {
  3214  		i -= len(m.XXX_unrecognized)
  3215  		copy(dAtA[i:], m.XXX_unrecognized)
  3216  	}
  3217  	if len(m.Hash) > 0 {
  3218  		i -= len(m.Hash)
  3219  		copy(dAtA[i:], m.Hash)
  3220  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Hash)))
  3221  		i--
  3222  		dAtA[i] = 0x2a
  3223  	}
  3224  	if m.Unixtime != 0 {
  3225  		i = encodeVarintTypes(dAtA, i, uint64(m.Unixtime))
  3226  		i--
  3227  		dAtA[i] = 0x20
  3228  	}
  3229  	if len(m.Objects) > 0 {
  3230  		for iNdEx := len(m.Objects) - 1; iNdEx >= 0; iNdEx-- {
  3231  			{
  3232  				size, err := m.Objects[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3233  				if err != nil {
  3234  					return 0, err
  3235  				}
  3236  				i -= size
  3237  				i = encodeVarintTypes(dAtA, i, uint64(size))
  3238  			}
  3239  			i--
  3240  			dAtA[i] = 0x1a
  3241  		}
  3242  	}
  3243  	if len(m.Devices) > 0 {
  3244  		for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  3245  			{
  3246  				size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  3247  				if err != nil {
  3248  					return 0, err
  3249  				}
  3250  				i -= size
  3251  				i = encodeVarintTypes(dAtA, i, uint64(size))
  3252  			}
  3253  			i--
  3254  			dAtA[i] = 0x12
  3255  		}
  3256  	}
  3257  	if len(m.Alias) > 0 {
  3258  		i -= len(m.Alias)
  3259  		copy(dAtA[i:], m.Alias)
  3260  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Alias)))
  3261  		i--
  3262  		dAtA[i] = 0xa
  3263  	}
  3264  	return len(dAtA) - i, nil
  3265  }
  3266  
  3267  func (m *LocalWorker) Marshal() (dAtA []byte, err error) {
  3268  	size := m.Size()
  3269  	dAtA = make([]byte, size)
  3270  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3271  	if err != nil {
  3272  		return nil, err
  3273  	}
  3274  	return dAtA[:n], nil
  3275  }
  3276  
  3277  func (m *LocalWorker) MarshalTo(dAtA []byte) (int, error) {
  3278  	size := m.Size()
  3279  	return m.MarshalToSizedBuffer(dAtA[:size])
  3280  }
  3281  
  3282  func (m *LocalWorker) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3283  	i := len(dAtA)
  3284  	_ = i
  3285  	var l int
  3286  	_ = l
  3287  	if m.XXX_unrecognized != nil {
  3288  		i -= len(m.XXX_unrecognized)
  3289  		copy(dAtA[i:], m.XXX_unrecognized)
  3290  	}
  3291  	if m.Actual != nil {
  3292  		{
  3293  			size, err := m.Actual.MarshalToSizedBuffer(dAtA[:i])
  3294  			if err != nil {
  3295  				return 0, err
  3296  			}
  3297  			i -= size
  3298  			i = encodeVarintTypes(dAtA, i, uint64(size))
  3299  		}
  3300  		i--
  3301  		dAtA[i] = 0x1a
  3302  	}
  3303  	if m.Request != nil {
  3304  		{
  3305  			size, err := m.Request.MarshalToSizedBuffer(dAtA[:i])
  3306  			if err != nil {
  3307  				return 0, err
  3308  			}
  3309  			i -= size
  3310  			i = encodeVarintTypes(dAtA, i, uint64(size))
  3311  		}
  3312  		i--
  3313  		dAtA[i] = 0x12
  3314  	}
  3315  	if len(m.Id) > 0 {
  3316  		i -= len(m.Id)
  3317  		copy(dAtA[i:], m.Id)
  3318  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
  3319  		i--
  3320  		dAtA[i] = 0xa
  3321  	}
  3322  	return len(dAtA) - i, nil
  3323  }
  3324  
  3325  func (m *DeviceDiscovery) Marshal() (dAtA []byte, err error) {
  3326  	size := m.Size()
  3327  	dAtA = make([]byte, size)
  3328  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3329  	if err != nil {
  3330  		return nil, err
  3331  	}
  3332  	return dAtA[:n], nil
  3333  }
  3334  
  3335  func (m *DeviceDiscovery) MarshalTo(dAtA []byte) (int, error) {
  3336  	size := m.Size()
  3337  	return m.MarshalToSizedBuffer(dAtA[:size])
  3338  }
  3339  
  3340  func (m *DeviceDiscovery) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3341  	i := len(dAtA)
  3342  	_ = i
  3343  	var l int
  3344  	_ = l
  3345  	if m.XXX_unrecognized != nil {
  3346  		i -= len(m.XXX_unrecognized)
  3347  		copy(dAtA[i:], m.XXX_unrecognized)
  3348  	}
  3349  	if m.Actual != nil {
  3350  		{
  3351  			size, err := m.Actual.MarshalToSizedBuffer(dAtA[:i])
  3352  			if err != nil {
  3353  				return 0, err
  3354  			}
  3355  			i -= size
  3356  			i = encodeVarintTypes(dAtA, i, uint64(size))
  3357  		}
  3358  		i--
  3359  		dAtA[i] = 0x1a
  3360  	}
  3361  	if m.Request != nil {
  3362  		{
  3363  			size, err := m.Request.MarshalToSizedBuffer(dAtA[:i])
  3364  			if err != nil {
  3365  				return 0, err
  3366  			}
  3367  			i -= size
  3368  			i = encodeVarintTypes(dAtA, i, uint64(size))
  3369  		}
  3370  		i--
  3371  		dAtA[i] = 0x12
  3372  	}
  3373  	if len(m.Id) > 0 {
  3374  		i -= len(m.Id)
  3375  		copy(dAtA[i:], m.Id)
  3376  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
  3377  		i--
  3378  		dAtA[i] = 0xa
  3379  	}
  3380  	return len(dAtA) - i, nil
  3381  }
  3382  
  3383  func (m *DiscoverRequest) Marshal() (dAtA []byte, err error) {
  3384  	size := m.Size()
  3385  	dAtA = make([]byte, size)
  3386  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3387  	if err != nil {
  3388  		return nil, err
  3389  	}
  3390  	return dAtA[:n], nil
  3391  }
  3392  
  3393  func (m *DiscoverRequest) MarshalTo(dAtA []byte) (int, error) {
  3394  	size := m.Size()
  3395  	return m.MarshalToSizedBuffer(dAtA[:size])
  3396  }
  3397  
  3398  func (m *DiscoverRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3399  	i := len(dAtA)
  3400  	_ = i
  3401  	var l int
  3402  	_ = l
  3403  	if m.XXX_unrecognized != nil {
  3404  		i -= len(m.XXX_unrecognized)
  3405  		copy(dAtA[i:], m.XXX_unrecognized)
  3406  	}
  3407  	if m.RequestId != 0 {
  3408  		i = encodeVarintTypes(dAtA, i, uint64(m.RequestId))
  3409  		i--
  3410  		dAtA[i] = 0x8
  3411  	}
  3412  	return len(dAtA) - i, nil
  3413  }
  3414  
  3415  func (m *DiscoverResult) Marshal() (dAtA []byte, err error) {
  3416  	size := m.Size()
  3417  	dAtA = make([]byte, size)
  3418  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  3419  	if err != nil {
  3420  		return nil, err
  3421  	}
  3422  	return dAtA[:n], nil
  3423  }
  3424  
  3425  func (m *DiscoverResult) MarshalTo(dAtA []byte) (int, error) {
  3426  	size := m.Size()
  3427  	return m.MarshalToSizedBuffer(dAtA[:size])
  3428  }
  3429  
  3430  func (m *DiscoverResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  3431  	i := len(dAtA)
  3432  	_ = i
  3433  	var l int
  3434  	_ = l
  3435  	if m.XXX_unrecognized != nil {
  3436  		i -= len(m.XXX_unrecognized)
  3437  		copy(dAtA[i:], m.XXX_unrecognized)
  3438  	}
  3439  	if len(m.Addresses) > 0 {
  3440  		for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
  3441  			i -= len(m.Addresses[iNdEx])
  3442  			copy(dAtA[i:], m.Addresses[iNdEx])
  3443  			i = encodeVarintTypes(dAtA, i, uint64(len(m.Addresses[iNdEx])))
  3444  			i--
  3445  			dAtA[i] = 0x12
  3446  		}
  3447  	}
  3448  	if len(m.Id) > 0 {
  3449  		i -= len(m.Id)
  3450  		copy(dAtA[i:], m.Id)
  3451  		i = encodeVarintTypes(dAtA, i, uint64(len(m.Id)))
  3452  		i--
  3453  		dAtA[i] = 0xa
  3454  	}
  3455  	return len(dAtA) - i, nil
  3456  }
  3457  
  3458  func encodeVarintTypes(dAtA []byte, offset int, v uint64) int {
  3459  	offset -= sovTypes(v)
  3460  	base := offset
  3461  	for v >= 1<<7 {
  3462  		dAtA[offset] = uint8(v&0x7f | 0x80)
  3463  		v >>= 7
  3464  		offset++
  3465  	}
  3466  	dAtA[offset] = uint8(v)
  3467  	return base
  3468  }
  3469  func (m *Empty) Size() (n int) {
  3470  	if m == nil {
  3471  		return 0
  3472  	}
  3473  	var l int
  3474  	_ = l
  3475  	if m.XXX_unrecognized != nil {
  3476  		n += len(m.XXX_unrecognized)
  3477  	}
  3478  	return n
  3479  }
  3480  
  3481  func (m *CommandStationInfo) Size() (n int) {
  3482  	if m == nil {
  3483  		return 0
  3484  	}
  3485  	var l int
  3486  	_ = l
  3487  	l = len(m.Id)
  3488  	if l > 0 {
  3489  		n += 1 + l + sovTypes(uint64(l))
  3490  	}
  3491  	l = len(m.Description)
  3492  	if l > 0 {
  3493  		n += 1 + l + sovTypes(uint64(l))
  3494  	}
  3495  	l = len(m.Version)
  3496  	if l > 0 {
  3497  		n += 1 + l + sovTypes(uint64(l))
  3498  	}
  3499  	if m.Uptime != 0 {
  3500  		n += 1 + sovTypes(uint64(m.Uptime))
  3501  	}
  3502  	if m.XXX_unrecognized != nil {
  3503  		n += len(m.XXX_unrecognized)
  3504  	}
  3505  	return n
  3506  }
  3507  
  3508  func (m *LocalWorkerInfo) Size() (n int) {
  3509  	if m == nil {
  3510  		return 0
  3511  	}
  3512  	var l int
  3513  	_ = l
  3514  	l = len(m.Id)
  3515  	if l > 0 {
  3516  		n += 1 + l + sovTypes(uint64(l))
  3517  	}
  3518  	l = len(m.Description)
  3519  	if l > 0 {
  3520  		n += 1 + l + sovTypes(uint64(l))
  3521  	}
  3522  	l = len(m.Version)
  3523  	if l > 0 {
  3524  		n += 1 + l + sovTypes(uint64(l))
  3525  	}
  3526  	if m.Uptime != 0 {
  3527  		n += 1 + sovTypes(uint64(m.Uptime))
  3528  	}
  3529  	l = len(m.ConfigHash)
  3530  	if l > 0 {
  3531  		n += 1 + l + sovTypes(uint64(l))
  3532  	}
  3533  	if len(m.ConfiguredDeviceIds) > 0 {
  3534  		for _, s := range m.ConfiguredDeviceIds {
  3535  			l = len(s)
  3536  			n += 1 + l + sovTypes(uint64(l))
  3537  		}
  3538  	}
  3539  	if len(m.ConfiguredObjectIds) > 0 {
  3540  		for _, s := range m.ConfiguredObjectIds {
  3541  			l = len(s)
  3542  			n += 1 + l + sovTypes(uint64(l))
  3543  		}
  3544  	}
  3545  	if len(m.UnconfiguredDeviceIds) > 0 {
  3546  		for _, s := range m.UnconfiguredDeviceIds {
  3547  			l = len(s)
  3548  			n += 1 + l + sovTypes(uint64(l))
  3549  		}
  3550  	}
  3551  	if len(m.UnconfiguredObjectIds) > 0 {
  3552  		for _, s := range m.UnconfiguredObjectIds {
  3553  			l = len(s)
  3554  			n += 1 + l + sovTypes(uint64(l))
  3555  		}
  3556  	}
  3557  	if m.MetricsPort != 0 {
  3558  		n += 1 + sovTypes(uint64(m.MetricsPort))
  3559  	}
  3560  	if m.MetricsSecure {
  3561  		n += 2
  3562  	}
  3563  	if m.LocalWorkerServicePort != 0 {
  3564  		n += 1 + sovTypes(uint64(m.LocalWorkerServicePort))
  3565  	}
  3566  	if m.LocalWorkerServiceSecure {
  3567  		n += 2
  3568  	}
  3569  	if m.SupportsReset {
  3570  		n += 3
  3571  	}
  3572  	if m.SupportsSetLocRequest {
  3573  		n += 3
  3574  	}
  3575  	if m.SupportsSetPowerRequest {
  3576  		n += 3
  3577  	}
  3578  	if m.SupportsSetOutputRequest {
  3579  		n += 3
  3580  	}
  3581  	if m.SupportsSetSwitchRequest {
  3582  		n += 3
  3583  	}
  3584  	if m.SupportsSetDeviceDiscoveryRequest {
  3585  		n += 3
  3586  	}
  3587  	if m.XXX_unrecognized != nil {
  3588  		n += len(m.XXX_unrecognized)
  3589  	}
  3590  	return n
  3591  }
  3592  
  3593  func (m *PowerRequestsOptions) Size() (n int) {
  3594  	if m == nil {
  3595  		return 0
  3596  	}
  3597  	var l int
  3598  	_ = l
  3599  	if m.ManualConfirm {
  3600  		n += 2
  3601  	}
  3602  	if m.XXX_unrecognized != nil {
  3603  		n += len(m.XXX_unrecognized)
  3604  	}
  3605  	return n
  3606  }
  3607  
  3608  func (m *Power) Size() (n int) {
  3609  	if m == nil {
  3610  		return 0
  3611  	}
  3612  	var l int
  3613  	_ = l
  3614  	if m.Request != nil {
  3615  		l = m.Request.Size()
  3616  		n += 1 + l + sovTypes(uint64(l))
  3617  	}
  3618  	if m.Actual != nil {
  3619  		l = m.Actual.Size()
  3620  		n += 1 + l + sovTypes(uint64(l))
  3621  	}
  3622  	if m.XXX_unrecognized != nil {
  3623  		n += len(m.XXX_unrecognized)
  3624  	}
  3625  	return n
  3626  }
  3627  
  3628  func (m *PowerState) Size() (n int) {
  3629  	if m == nil {
  3630  		return 0
  3631  	}
  3632  	var l int
  3633  	_ = l
  3634  	if m.Enabled {
  3635  		n += 2
  3636  	}
  3637  	if m.XXX_unrecognized != nil {
  3638  		n += len(m.XXX_unrecognized)
  3639  	}
  3640  	return n
  3641  }
  3642  
  3643  func (m *LocRequestsOptions) Size() (n int) {
  3644  	if m == nil {
  3645  		return 0
  3646  	}
  3647  	var l int
  3648  	_ = l
  3649  	if m.ManualConfirm {
  3650  		n += 2
  3651  	}
  3652  	if m.XXX_unrecognized != nil {
  3653  		n += len(m.XXX_unrecognized)
  3654  	}
  3655  	return n
  3656  }
  3657  
  3658  func (m *Loc) Size() (n int) {
  3659  	if m == nil {
  3660  		return 0
  3661  	}
  3662  	var l int
  3663  	_ = l
  3664  	l = len(m.Address)
  3665  	if l > 0 {
  3666  		n += 1 + l + sovTypes(uint64(l))
  3667  	}
  3668  	if m.Request != nil {
  3669  		l = m.Request.Size()
  3670  		n += 1 + l + sovTypes(uint64(l))
  3671  	}
  3672  	if m.Actual != nil {
  3673  		l = m.Actual.Size()
  3674  		n += 1 + l + sovTypes(uint64(l))
  3675  	}
  3676  	if m.XXX_unrecognized != nil {
  3677  		n += len(m.XXX_unrecognized)
  3678  	}
  3679  	return n
  3680  }
  3681  
  3682  func (m *LocState) Size() (n int) {
  3683  	if m == nil {
  3684  		return 0
  3685  	}
  3686  	var l int
  3687  	_ = l
  3688  	if m.Speed != 0 {
  3689  		n += 1 + sovTypes(uint64(m.Speed))
  3690  	}
  3691  	if m.SpeedSteps != 0 {
  3692  		n += 1 + sovTypes(uint64(m.SpeedSteps))
  3693  	}
  3694  	if m.Direction != 0 {
  3695  		n += 1 + sovTypes(uint64(m.Direction))
  3696  	}
  3697  	if len(m.Functions) > 0 {
  3698  		for k, v := range m.Functions {
  3699  			_ = k
  3700  			_ = v
  3701  			mapEntrySize := 1 + sovTypes(uint64(k)) + 1 + 1
  3702  			n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
  3703  		}
  3704  	}
  3705  	if m.XXX_unrecognized != nil {
  3706  		n += len(m.XXX_unrecognized)
  3707  	}
  3708  	return n
  3709  }
  3710  
  3711  func (m *Sensor) Size() (n int) {
  3712  	if m == nil {
  3713  		return 0
  3714  	}
  3715  	var l int
  3716  	_ = l
  3717  	l = len(m.Address)
  3718  	if l > 0 {
  3719  		n += 1 + l + sovTypes(uint64(l))
  3720  	}
  3721  	if m.Actual != nil {
  3722  		l = m.Actual.Size()
  3723  		n += 1 + l + sovTypes(uint64(l))
  3724  	}
  3725  	if m.XXX_unrecognized != nil {
  3726  		n += len(m.XXX_unrecognized)
  3727  	}
  3728  	return n
  3729  }
  3730  
  3731  func (m *SensorState) Size() (n int) {
  3732  	if m == nil {
  3733  		return 0
  3734  	}
  3735  	var l int
  3736  	_ = l
  3737  	if m.Value != 0 {
  3738  		n += 1 + sovTypes(uint64(m.Value))
  3739  	}
  3740  	if m.XXX_unrecognized != nil {
  3741  		n += len(m.XXX_unrecognized)
  3742  	}
  3743  	return n
  3744  }
  3745  
  3746  func (m *OutputRequestsOptions) Size() (n int) {
  3747  	if m == nil {
  3748  		return 0
  3749  	}
  3750  	var l int
  3751  	_ = l
  3752  	if m.ManualConfirm {
  3753  		n += 2
  3754  	}
  3755  	l = len(m.ModuleId)
  3756  	if l > 0 {
  3757  		n += 1 + l + sovTypes(uint64(l))
  3758  	}
  3759  	if m.XXX_unrecognized != nil {
  3760  		n += len(m.XXX_unrecognized)
  3761  	}
  3762  	return n
  3763  }
  3764  
  3765  func (m *Output) Size() (n int) {
  3766  	if m == nil {
  3767  		return 0
  3768  	}
  3769  	var l int
  3770  	_ = l
  3771  	l = len(m.Address)
  3772  	if l > 0 {
  3773  		n += 1 + l + sovTypes(uint64(l))
  3774  	}
  3775  	if m.Request != nil {
  3776  		l = m.Request.Size()
  3777  		n += 1 + l + sovTypes(uint64(l))
  3778  	}
  3779  	if m.Actual != nil {
  3780  		l = m.Actual.Size()
  3781  		n += 1 + l + sovTypes(uint64(l))
  3782  	}
  3783  	if m.XXX_unrecognized != nil {
  3784  		n += len(m.XXX_unrecognized)
  3785  	}
  3786  	return n
  3787  }
  3788  
  3789  func (m *OutputState) Size() (n int) {
  3790  	if m == nil {
  3791  		return 0
  3792  	}
  3793  	var l int
  3794  	_ = l
  3795  	if m.Value != 0 {
  3796  		n += 1 + sovTypes(uint64(m.Value))
  3797  	}
  3798  	if m.XXX_unrecognized != nil {
  3799  		n += len(m.XXX_unrecognized)
  3800  	}
  3801  	return n
  3802  }
  3803  
  3804  func (m *SwitchRequestsOptions) Size() (n int) {
  3805  	if m == nil {
  3806  		return 0
  3807  	}
  3808  	var l int
  3809  	_ = l
  3810  	if m.ManualConfirm {
  3811  		n += 2
  3812  	}
  3813  	l = len(m.ModuleId)
  3814  	if l > 0 {
  3815  		n += 1 + l + sovTypes(uint64(l))
  3816  	}
  3817  	if m.XXX_unrecognized != nil {
  3818  		n += len(m.XXX_unrecognized)
  3819  	}
  3820  	return n
  3821  }
  3822  
  3823  func (m *Switch) Size() (n int) {
  3824  	if m == nil {
  3825  		return 0
  3826  	}
  3827  	var l int
  3828  	_ = l
  3829  	l = len(m.Address)
  3830  	if l > 0 {
  3831  		n += 1 + l + sovTypes(uint64(l))
  3832  	}
  3833  	if m.Request != nil {
  3834  		l = m.Request.Size()
  3835  		n += 1 + l + sovTypes(uint64(l))
  3836  	}
  3837  	if m.Actual != nil {
  3838  		l = m.Actual.Size()
  3839  		n += 1 + l + sovTypes(uint64(l))
  3840  	}
  3841  	if m.XXX_unrecognized != nil {
  3842  		n += len(m.XXX_unrecognized)
  3843  	}
  3844  	return n
  3845  }
  3846  
  3847  func (m *SwitchState) Size() (n int) {
  3848  	if m == nil {
  3849  		return 0
  3850  	}
  3851  	var l int
  3852  	_ = l
  3853  	if m.Direction != 0 {
  3854  		n += 1 + sovTypes(uint64(m.Direction))
  3855  	}
  3856  	if m.IsUsed {
  3857  		n += 2
  3858  	}
  3859  	if m.XXX_unrecognized != nil {
  3860  		n += len(m.XXX_unrecognized)
  3861  	}
  3862  	return n
  3863  }
  3864  
  3865  func (m *Clock) Size() (n int) {
  3866  	if m == nil {
  3867  		return 0
  3868  	}
  3869  	var l int
  3870  	_ = l
  3871  	if m.Period != 0 {
  3872  		n += 1 + sovTypes(uint64(m.Period))
  3873  	}
  3874  	if m.Hours != 0 {
  3875  		n += 1 + sovTypes(uint64(m.Hours))
  3876  	}
  3877  	if m.Minutes != 0 {
  3878  		n += 1 + sovTypes(uint64(m.Minutes))
  3879  	}
  3880  	if m.Unixtime != 0 {
  3881  		n += 1 + sovTypes(uint64(m.Unixtime))
  3882  	}
  3883  	if m.XXX_unrecognized != nil {
  3884  		n += len(m.XXX_unrecognized)
  3885  	}
  3886  	return n
  3887  }
  3888  
  3889  func (m *Device) Size() (n int) {
  3890  	if m == nil {
  3891  		return 0
  3892  	}
  3893  	var l int
  3894  	_ = l
  3895  	l = len(m.Id)
  3896  	if l > 0 {
  3897  		n += 1 + l + sovTypes(uint64(l))
  3898  	}
  3899  	l = len(m.Type)
  3900  	if l > 0 {
  3901  		n += 1 + l + sovTypes(uint64(l))
  3902  	}
  3903  	l = len(m.Address)
  3904  	if l > 0 {
  3905  		n += 1 + l + sovTypes(uint64(l))
  3906  	}
  3907  	if m.XXX_unrecognized != nil {
  3908  		n += len(m.XXX_unrecognized)
  3909  	}
  3910  	return n
  3911  }
  3912  
  3913  func (m *Object) Size() (n int) {
  3914  	if m == nil {
  3915  		return 0
  3916  	}
  3917  	var l int
  3918  	_ = l
  3919  	l = len(m.Id)
  3920  	if l > 0 {
  3921  		n += 1 + l + sovTypes(uint64(l))
  3922  	}
  3923  	l = len(m.Type)
  3924  	if l > 0 {
  3925  		n += 1 + l + sovTypes(uint64(l))
  3926  	}
  3927  	if len(m.Connections) > 0 {
  3928  		for _, e := range m.Connections {
  3929  			l = e.Size()
  3930  			n += 1 + l + sovTypes(uint64(l))
  3931  		}
  3932  	}
  3933  	if len(m.Configuration) > 0 {
  3934  		for k, v := range m.Configuration {
  3935  			_ = k
  3936  			_ = v
  3937  			mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
  3938  			n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
  3939  		}
  3940  	}
  3941  	if m.XXX_unrecognized != nil {
  3942  		n += len(m.XXX_unrecognized)
  3943  	}
  3944  	return n
  3945  }
  3946  
  3947  func (m *Connection) Size() (n int) {
  3948  	if m == nil {
  3949  		return 0
  3950  	}
  3951  	var l int
  3952  	_ = l
  3953  	l = len(m.Key)
  3954  	if l > 0 {
  3955  		n += 1 + l + sovTypes(uint64(l))
  3956  	}
  3957  	if len(m.Pins) > 0 {
  3958  		for _, e := range m.Pins {
  3959  			l = e.Size()
  3960  			n += 1 + l + sovTypes(uint64(l))
  3961  		}
  3962  	}
  3963  	if len(m.Configuration) > 0 {
  3964  		for k, v := range m.Configuration {
  3965  			_ = k
  3966  			_ = v
  3967  			mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v)))
  3968  			n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize))
  3969  		}
  3970  	}
  3971  	if m.XXX_unrecognized != nil {
  3972  		n += len(m.XXX_unrecognized)
  3973  	}
  3974  	return n
  3975  }
  3976  
  3977  func (m *DevicePin) Size() (n int) {
  3978  	if m == nil {
  3979  		return 0
  3980  	}
  3981  	var l int
  3982  	_ = l
  3983  	l = len(m.DeviceId)
  3984  	if l > 0 {
  3985  		n += 1 + l + sovTypes(uint64(l))
  3986  	}
  3987  	if m.Index != 0 {
  3988  		n += 1 + sovTypes(uint64(m.Index))
  3989  	}
  3990  	if m.XXX_unrecognized != nil {
  3991  		n += len(m.XXX_unrecognized)
  3992  	}
  3993  	return n
  3994  }
  3995  
  3996  func (m *LocalWorkerConfig) Size() (n int) {
  3997  	if m == nil {
  3998  		return 0
  3999  	}
  4000  	var l int
  4001  	_ = l
  4002  	l = len(m.Alias)
  4003  	if l > 0 {
  4004  		n += 1 + l + sovTypes(uint64(l))
  4005  	}
  4006  	if len(m.Devices) > 0 {
  4007  		for _, e := range m.Devices {
  4008  			l = e.Size()
  4009  			n += 1 + l + sovTypes(uint64(l))
  4010  		}
  4011  	}
  4012  	if len(m.Objects) > 0 {
  4013  		for _, e := range m.Objects {
  4014  			l = e.Size()
  4015  			n += 1 + l + sovTypes(uint64(l))
  4016  		}
  4017  	}
  4018  	if m.Unixtime != 0 {
  4019  		n += 1 + sovTypes(uint64(m.Unixtime))
  4020  	}
  4021  	l = len(m.Hash)
  4022  	if l > 0 {
  4023  		n += 1 + l + sovTypes(uint64(l))
  4024  	}
  4025  	if m.XXX_unrecognized != nil {
  4026  		n += len(m.XXX_unrecognized)
  4027  	}
  4028  	return n
  4029  }
  4030  
  4031  func (m *LocalWorker) Size() (n int) {
  4032  	if m == nil {
  4033  		return 0
  4034  	}
  4035  	var l int
  4036  	_ = l
  4037  	l = len(m.Id)
  4038  	if l > 0 {
  4039  		n += 1 + l + sovTypes(uint64(l))
  4040  	}
  4041  	if m.Request != nil {
  4042  		l = m.Request.Size()
  4043  		n += 1 + l + sovTypes(uint64(l))
  4044  	}
  4045  	if m.Actual != nil {
  4046  		l = m.Actual.Size()
  4047  		n += 1 + l + sovTypes(uint64(l))
  4048  	}
  4049  	if m.XXX_unrecognized != nil {
  4050  		n += len(m.XXX_unrecognized)
  4051  	}
  4052  	return n
  4053  }
  4054  
  4055  func (m *DeviceDiscovery) Size() (n int) {
  4056  	if m == nil {
  4057  		return 0
  4058  	}
  4059  	var l int
  4060  	_ = l
  4061  	l = len(m.Id)
  4062  	if l > 0 {
  4063  		n += 1 + l + sovTypes(uint64(l))
  4064  	}
  4065  	if m.Request != nil {
  4066  		l = m.Request.Size()
  4067  		n += 1 + l + sovTypes(uint64(l))
  4068  	}
  4069  	if m.Actual != nil {
  4070  		l = m.Actual.Size()
  4071  		n += 1 + l + sovTypes(uint64(l))
  4072  	}
  4073  	if m.XXX_unrecognized != nil {
  4074  		n += len(m.XXX_unrecognized)
  4075  	}
  4076  	return n
  4077  }
  4078  
  4079  func (m *DiscoverRequest) Size() (n int) {
  4080  	if m == nil {
  4081  		return 0
  4082  	}
  4083  	var l int
  4084  	_ = l
  4085  	if m.RequestId != 0 {
  4086  		n += 1 + sovTypes(uint64(m.RequestId))
  4087  	}
  4088  	if m.XXX_unrecognized != nil {
  4089  		n += len(m.XXX_unrecognized)
  4090  	}
  4091  	return n
  4092  }
  4093  
  4094  func (m *DiscoverResult) Size() (n int) {
  4095  	if m == nil {
  4096  		return 0
  4097  	}
  4098  	var l int
  4099  	_ = l
  4100  	l = len(m.Id)
  4101  	if l > 0 {
  4102  		n += 1 + l + sovTypes(uint64(l))
  4103  	}
  4104  	if len(m.Addresses) > 0 {
  4105  		for _, s := range m.Addresses {
  4106  			l = len(s)
  4107  			n += 1 + l + sovTypes(uint64(l))
  4108  		}
  4109  	}
  4110  	if m.XXX_unrecognized != nil {
  4111  		n += len(m.XXX_unrecognized)
  4112  	}
  4113  	return n
  4114  }
  4115  
  4116  func sovTypes(x uint64) (n int) {
  4117  	return (math_bits.Len64(x|1) + 6) / 7
  4118  }
  4119  func sozTypes(x uint64) (n int) {
  4120  	return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  4121  }
  4122  func (m *Empty) Unmarshal(dAtA []byte) error {
  4123  	l := len(dAtA)
  4124  	iNdEx := 0
  4125  	for iNdEx < l {
  4126  		preIndex := iNdEx
  4127  		var wire uint64
  4128  		for shift := uint(0); ; shift += 7 {
  4129  			if shift >= 64 {
  4130  				return ErrIntOverflowTypes
  4131  			}
  4132  			if iNdEx >= l {
  4133  				return io.ErrUnexpectedEOF
  4134  			}
  4135  			b := dAtA[iNdEx]
  4136  			iNdEx++
  4137  			wire |= uint64(b&0x7F) << shift
  4138  			if b < 0x80 {
  4139  				break
  4140  			}
  4141  		}
  4142  		fieldNum := int32(wire >> 3)
  4143  		wireType := int(wire & 0x7)
  4144  		if wireType == 4 {
  4145  			return fmt.Errorf("proto: Empty: wiretype end group for non-group")
  4146  		}
  4147  		if fieldNum <= 0 {
  4148  			return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire)
  4149  		}
  4150  		switch fieldNum {
  4151  		default:
  4152  			iNdEx = preIndex
  4153  			skippy, err := skipTypes(dAtA[iNdEx:])
  4154  			if err != nil {
  4155  				return err
  4156  			}
  4157  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4158  				return ErrInvalidLengthTypes
  4159  			}
  4160  			if (iNdEx + skippy) > l {
  4161  				return io.ErrUnexpectedEOF
  4162  			}
  4163  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4164  			iNdEx += skippy
  4165  		}
  4166  	}
  4167  
  4168  	if iNdEx > l {
  4169  		return io.ErrUnexpectedEOF
  4170  	}
  4171  	return nil
  4172  }
  4173  func (m *CommandStationInfo) Unmarshal(dAtA []byte) error {
  4174  	l := len(dAtA)
  4175  	iNdEx := 0
  4176  	for iNdEx < l {
  4177  		preIndex := iNdEx
  4178  		var wire uint64
  4179  		for shift := uint(0); ; shift += 7 {
  4180  			if shift >= 64 {
  4181  				return ErrIntOverflowTypes
  4182  			}
  4183  			if iNdEx >= l {
  4184  				return io.ErrUnexpectedEOF
  4185  			}
  4186  			b := dAtA[iNdEx]
  4187  			iNdEx++
  4188  			wire |= uint64(b&0x7F) << shift
  4189  			if b < 0x80 {
  4190  				break
  4191  			}
  4192  		}
  4193  		fieldNum := int32(wire >> 3)
  4194  		wireType := int(wire & 0x7)
  4195  		if wireType == 4 {
  4196  			return fmt.Errorf("proto: CommandStationInfo: wiretype end group for non-group")
  4197  		}
  4198  		if fieldNum <= 0 {
  4199  			return fmt.Errorf("proto: CommandStationInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  4200  		}
  4201  		switch fieldNum {
  4202  		case 1:
  4203  			if wireType != 2 {
  4204  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  4205  			}
  4206  			var stringLen uint64
  4207  			for shift := uint(0); ; shift += 7 {
  4208  				if shift >= 64 {
  4209  					return ErrIntOverflowTypes
  4210  				}
  4211  				if iNdEx >= l {
  4212  					return io.ErrUnexpectedEOF
  4213  				}
  4214  				b := dAtA[iNdEx]
  4215  				iNdEx++
  4216  				stringLen |= uint64(b&0x7F) << shift
  4217  				if b < 0x80 {
  4218  					break
  4219  				}
  4220  			}
  4221  			intStringLen := int(stringLen)
  4222  			if intStringLen < 0 {
  4223  				return ErrInvalidLengthTypes
  4224  			}
  4225  			postIndex := iNdEx + intStringLen
  4226  			if postIndex < 0 {
  4227  				return ErrInvalidLengthTypes
  4228  			}
  4229  			if postIndex > l {
  4230  				return io.ErrUnexpectedEOF
  4231  			}
  4232  			m.Id = string(dAtA[iNdEx:postIndex])
  4233  			iNdEx = postIndex
  4234  		case 2:
  4235  			if wireType != 2 {
  4236  				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
  4237  			}
  4238  			var stringLen uint64
  4239  			for shift := uint(0); ; shift += 7 {
  4240  				if shift >= 64 {
  4241  					return ErrIntOverflowTypes
  4242  				}
  4243  				if iNdEx >= l {
  4244  					return io.ErrUnexpectedEOF
  4245  				}
  4246  				b := dAtA[iNdEx]
  4247  				iNdEx++
  4248  				stringLen |= uint64(b&0x7F) << shift
  4249  				if b < 0x80 {
  4250  					break
  4251  				}
  4252  			}
  4253  			intStringLen := int(stringLen)
  4254  			if intStringLen < 0 {
  4255  				return ErrInvalidLengthTypes
  4256  			}
  4257  			postIndex := iNdEx + intStringLen
  4258  			if postIndex < 0 {
  4259  				return ErrInvalidLengthTypes
  4260  			}
  4261  			if postIndex > l {
  4262  				return io.ErrUnexpectedEOF
  4263  			}
  4264  			m.Description = string(dAtA[iNdEx:postIndex])
  4265  			iNdEx = postIndex
  4266  		case 3:
  4267  			if wireType != 2 {
  4268  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  4269  			}
  4270  			var stringLen uint64
  4271  			for shift := uint(0); ; shift += 7 {
  4272  				if shift >= 64 {
  4273  					return ErrIntOverflowTypes
  4274  				}
  4275  				if iNdEx >= l {
  4276  					return io.ErrUnexpectedEOF
  4277  				}
  4278  				b := dAtA[iNdEx]
  4279  				iNdEx++
  4280  				stringLen |= uint64(b&0x7F) << shift
  4281  				if b < 0x80 {
  4282  					break
  4283  				}
  4284  			}
  4285  			intStringLen := int(stringLen)
  4286  			if intStringLen < 0 {
  4287  				return ErrInvalidLengthTypes
  4288  			}
  4289  			postIndex := iNdEx + intStringLen
  4290  			if postIndex < 0 {
  4291  				return ErrInvalidLengthTypes
  4292  			}
  4293  			if postIndex > l {
  4294  				return io.ErrUnexpectedEOF
  4295  			}
  4296  			m.Version = string(dAtA[iNdEx:postIndex])
  4297  			iNdEx = postIndex
  4298  		case 4:
  4299  			if wireType != 0 {
  4300  				return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType)
  4301  			}
  4302  			m.Uptime = 0
  4303  			for shift := uint(0); ; shift += 7 {
  4304  				if shift >= 64 {
  4305  					return ErrIntOverflowTypes
  4306  				}
  4307  				if iNdEx >= l {
  4308  					return io.ErrUnexpectedEOF
  4309  				}
  4310  				b := dAtA[iNdEx]
  4311  				iNdEx++
  4312  				m.Uptime |= int64(b&0x7F) << shift
  4313  				if b < 0x80 {
  4314  					break
  4315  				}
  4316  			}
  4317  		default:
  4318  			iNdEx = preIndex
  4319  			skippy, err := skipTypes(dAtA[iNdEx:])
  4320  			if err != nil {
  4321  				return err
  4322  			}
  4323  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4324  				return ErrInvalidLengthTypes
  4325  			}
  4326  			if (iNdEx + skippy) > l {
  4327  				return io.ErrUnexpectedEOF
  4328  			}
  4329  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4330  			iNdEx += skippy
  4331  		}
  4332  	}
  4333  
  4334  	if iNdEx > l {
  4335  		return io.ErrUnexpectedEOF
  4336  	}
  4337  	return nil
  4338  }
  4339  func (m *LocalWorkerInfo) Unmarshal(dAtA []byte) error {
  4340  	l := len(dAtA)
  4341  	iNdEx := 0
  4342  	for iNdEx < l {
  4343  		preIndex := iNdEx
  4344  		var wire uint64
  4345  		for shift := uint(0); ; shift += 7 {
  4346  			if shift >= 64 {
  4347  				return ErrIntOverflowTypes
  4348  			}
  4349  			if iNdEx >= l {
  4350  				return io.ErrUnexpectedEOF
  4351  			}
  4352  			b := dAtA[iNdEx]
  4353  			iNdEx++
  4354  			wire |= uint64(b&0x7F) << shift
  4355  			if b < 0x80 {
  4356  				break
  4357  			}
  4358  		}
  4359  		fieldNum := int32(wire >> 3)
  4360  		wireType := int(wire & 0x7)
  4361  		if wireType == 4 {
  4362  			return fmt.Errorf("proto: LocalWorkerInfo: wiretype end group for non-group")
  4363  		}
  4364  		if fieldNum <= 0 {
  4365  			return fmt.Errorf("proto: LocalWorkerInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  4366  		}
  4367  		switch fieldNum {
  4368  		case 1:
  4369  			if wireType != 2 {
  4370  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  4371  			}
  4372  			var stringLen uint64
  4373  			for shift := uint(0); ; shift += 7 {
  4374  				if shift >= 64 {
  4375  					return ErrIntOverflowTypes
  4376  				}
  4377  				if iNdEx >= l {
  4378  					return io.ErrUnexpectedEOF
  4379  				}
  4380  				b := dAtA[iNdEx]
  4381  				iNdEx++
  4382  				stringLen |= uint64(b&0x7F) << shift
  4383  				if b < 0x80 {
  4384  					break
  4385  				}
  4386  			}
  4387  			intStringLen := int(stringLen)
  4388  			if intStringLen < 0 {
  4389  				return ErrInvalidLengthTypes
  4390  			}
  4391  			postIndex := iNdEx + intStringLen
  4392  			if postIndex < 0 {
  4393  				return ErrInvalidLengthTypes
  4394  			}
  4395  			if postIndex > l {
  4396  				return io.ErrUnexpectedEOF
  4397  			}
  4398  			m.Id = string(dAtA[iNdEx:postIndex])
  4399  			iNdEx = postIndex
  4400  		case 2:
  4401  			if wireType != 2 {
  4402  				return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
  4403  			}
  4404  			var stringLen uint64
  4405  			for shift := uint(0); ; shift += 7 {
  4406  				if shift >= 64 {
  4407  					return ErrIntOverflowTypes
  4408  				}
  4409  				if iNdEx >= l {
  4410  					return io.ErrUnexpectedEOF
  4411  				}
  4412  				b := dAtA[iNdEx]
  4413  				iNdEx++
  4414  				stringLen |= uint64(b&0x7F) << shift
  4415  				if b < 0x80 {
  4416  					break
  4417  				}
  4418  			}
  4419  			intStringLen := int(stringLen)
  4420  			if intStringLen < 0 {
  4421  				return ErrInvalidLengthTypes
  4422  			}
  4423  			postIndex := iNdEx + intStringLen
  4424  			if postIndex < 0 {
  4425  				return ErrInvalidLengthTypes
  4426  			}
  4427  			if postIndex > l {
  4428  				return io.ErrUnexpectedEOF
  4429  			}
  4430  			m.Description = string(dAtA[iNdEx:postIndex])
  4431  			iNdEx = postIndex
  4432  		case 3:
  4433  			if wireType != 2 {
  4434  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  4435  			}
  4436  			var stringLen uint64
  4437  			for shift := uint(0); ; shift += 7 {
  4438  				if shift >= 64 {
  4439  					return ErrIntOverflowTypes
  4440  				}
  4441  				if iNdEx >= l {
  4442  					return io.ErrUnexpectedEOF
  4443  				}
  4444  				b := dAtA[iNdEx]
  4445  				iNdEx++
  4446  				stringLen |= uint64(b&0x7F) << shift
  4447  				if b < 0x80 {
  4448  					break
  4449  				}
  4450  			}
  4451  			intStringLen := int(stringLen)
  4452  			if intStringLen < 0 {
  4453  				return ErrInvalidLengthTypes
  4454  			}
  4455  			postIndex := iNdEx + intStringLen
  4456  			if postIndex < 0 {
  4457  				return ErrInvalidLengthTypes
  4458  			}
  4459  			if postIndex > l {
  4460  				return io.ErrUnexpectedEOF
  4461  			}
  4462  			m.Version = string(dAtA[iNdEx:postIndex])
  4463  			iNdEx = postIndex
  4464  		case 4:
  4465  			if wireType != 0 {
  4466  				return fmt.Errorf("proto: wrong wireType = %d for field Uptime", wireType)
  4467  			}
  4468  			m.Uptime = 0
  4469  			for shift := uint(0); ; shift += 7 {
  4470  				if shift >= 64 {
  4471  					return ErrIntOverflowTypes
  4472  				}
  4473  				if iNdEx >= l {
  4474  					return io.ErrUnexpectedEOF
  4475  				}
  4476  				b := dAtA[iNdEx]
  4477  				iNdEx++
  4478  				m.Uptime |= int64(b&0x7F) << shift
  4479  				if b < 0x80 {
  4480  					break
  4481  				}
  4482  			}
  4483  		case 5:
  4484  			if wireType != 2 {
  4485  				return fmt.Errorf("proto: wrong wireType = %d for field ConfigHash", wireType)
  4486  			}
  4487  			var stringLen uint64
  4488  			for shift := uint(0); ; shift += 7 {
  4489  				if shift >= 64 {
  4490  					return ErrIntOverflowTypes
  4491  				}
  4492  				if iNdEx >= l {
  4493  					return io.ErrUnexpectedEOF
  4494  				}
  4495  				b := dAtA[iNdEx]
  4496  				iNdEx++
  4497  				stringLen |= uint64(b&0x7F) << shift
  4498  				if b < 0x80 {
  4499  					break
  4500  				}
  4501  			}
  4502  			intStringLen := int(stringLen)
  4503  			if intStringLen < 0 {
  4504  				return ErrInvalidLengthTypes
  4505  			}
  4506  			postIndex := iNdEx + intStringLen
  4507  			if postIndex < 0 {
  4508  				return ErrInvalidLengthTypes
  4509  			}
  4510  			if postIndex > l {
  4511  				return io.ErrUnexpectedEOF
  4512  			}
  4513  			m.ConfigHash = string(dAtA[iNdEx:postIndex])
  4514  			iNdEx = postIndex
  4515  		case 6:
  4516  			if wireType != 2 {
  4517  				return fmt.Errorf("proto: wrong wireType = %d for field ConfiguredDeviceIds", wireType)
  4518  			}
  4519  			var stringLen uint64
  4520  			for shift := uint(0); ; shift += 7 {
  4521  				if shift >= 64 {
  4522  					return ErrIntOverflowTypes
  4523  				}
  4524  				if iNdEx >= l {
  4525  					return io.ErrUnexpectedEOF
  4526  				}
  4527  				b := dAtA[iNdEx]
  4528  				iNdEx++
  4529  				stringLen |= uint64(b&0x7F) << shift
  4530  				if b < 0x80 {
  4531  					break
  4532  				}
  4533  			}
  4534  			intStringLen := int(stringLen)
  4535  			if intStringLen < 0 {
  4536  				return ErrInvalidLengthTypes
  4537  			}
  4538  			postIndex := iNdEx + intStringLen
  4539  			if postIndex < 0 {
  4540  				return ErrInvalidLengthTypes
  4541  			}
  4542  			if postIndex > l {
  4543  				return io.ErrUnexpectedEOF
  4544  			}
  4545  			m.ConfiguredDeviceIds = append(m.ConfiguredDeviceIds, string(dAtA[iNdEx:postIndex]))
  4546  			iNdEx = postIndex
  4547  		case 7:
  4548  			if wireType != 2 {
  4549  				return fmt.Errorf("proto: wrong wireType = %d for field ConfiguredObjectIds", wireType)
  4550  			}
  4551  			var stringLen uint64
  4552  			for shift := uint(0); ; shift += 7 {
  4553  				if shift >= 64 {
  4554  					return ErrIntOverflowTypes
  4555  				}
  4556  				if iNdEx >= l {
  4557  					return io.ErrUnexpectedEOF
  4558  				}
  4559  				b := dAtA[iNdEx]
  4560  				iNdEx++
  4561  				stringLen |= uint64(b&0x7F) << shift
  4562  				if b < 0x80 {
  4563  					break
  4564  				}
  4565  			}
  4566  			intStringLen := int(stringLen)
  4567  			if intStringLen < 0 {
  4568  				return ErrInvalidLengthTypes
  4569  			}
  4570  			postIndex := iNdEx + intStringLen
  4571  			if postIndex < 0 {
  4572  				return ErrInvalidLengthTypes
  4573  			}
  4574  			if postIndex > l {
  4575  				return io.ErrUnexpectedEOF
  4576  			}
  4577  			m.ConfiguredObjectIds = append(m.ConfiguredObjectIds, string(dAtA[iNdEx:postIndex]))
  4578  			iNdEx = postIndex
  4579  		case 8:
  4580  			if wireType != 2 {
  4581  				return fmt.Errorf("proto: wrong wireType = %d for field UnconfiguredDeviceIds", wireType)
  4582  			}
  4583  			var stringLen uint64
  4584  			for shift := uint(0); ; shift += 7 {
  4585  				if shift >= 64 {
  4586  					return ErrIntOverflowTypes
  4587  				}
  4588  				if iNdEx >= l {
  4589  					return io.ErrUnexpectedEOF
  4590  				}
  4591  				b := dAtA[iNdEx]
  4592  				iNdEx++
  4593  				stringLen |= uint64(b&0x7F) << shift
  4594  				if b < 0x80 {
  4595  					break
  4596  				}
  4597  			}
  4598  			intStringLen := int(stringLen)
  4599  			if intStringLen < 0 {
  4600  				return ErrInvalidLengthTypes
  4601  			}
  4602  			postIndex := iNdEx + intStringLen
  4603  			if postIndex < 0 {
  4604  				return ErrInvalidLengthTypes
  4605  			}
  4606  			if postIndex > l {
  4607  				return io.ErrUnexpectedEOF
  4608  			}
  4609  			m.UnconfiguredDeviceIds = append(m.UnconfiguredDeviceIds, string(dAtA[iNdEx:postIndex]))
  4610  			iNdEx = postIndex
  4611  		case 9:
  4612  			if wireType != 2 {
  4613  				return fmt.Errorf("proto: wrong wireType = %d for field UnconfiguredObjectIds", wireType)
  4614  			}
  4615  			var stringLen uint64
  4616  			for shift := uint(0); ; shift += 7 {
  4617  				if shift >= 64 {
  4618  					return ErrIntOverflowTypes
  4619  				}
  4620  				if iNdEx >= l {
  4621  					return io.ErrUnexpectedEOF
  4622  				}
  4623  				b := dAtA[iNdEx]
  4624  				iNdEx++
  4625  				stringLen |= uint64(b&0x7F) << shift
  4626  				if b < 0x80 {
  4627  					break
  4628  				}
  4629  			}
  4630  			intStringLen := int(stringLen)
  4631  			if intStringLen < 0 {
  4632  				return ErrInvalidLengthTypes
  4633  			}
  4634  			postIndex := iNdEx + intStringLen
  4635  			if postIndex < 0 {
  4636  				return ErrInvalidLengthTypes
  4637  			}
  4638  			if postIndex > l {
  4639  				return io.ErrUnexpectedEOF
  4640  			}
  4641  			m.UnconfiguredObjectIds = append(m.UnconfiguredObjectIds, string(dAtA[iNdEx:postIndex]))
  4642  			iNdEx = postIndex
  4643  		case 10:
  4644  			if wireType != 0 {
  4645  				return fmt.Errorf("proto: wrong wireType = %d for field MetricsPort", wireType)
  4646  			}
  4647  			m.MetricsPort = 0
  4648  			for shift := uint(0); ; shift += 7 {
  4649  				if shift >= 64 {
  4650  					return ErrIntOverflowTypes
  4651  				}
  4652  				if iNdEx >= l {
  4653  					return io.ErrUnexpectedEOF
  4654  				}
  4655  				b := dAtA[iNdEx]
  4656  				iNdEx++
  4657  				m.MetricsPort |= int32(b&0x7F) << shift
  4658  				if b < 0x80 {
  4659  					break
  4660  				}
  4661  			}
  4662  		case 11:
  4663  			if wireType != 0 {
  4664  				return fmt.Errorf("proto: wrong wireType = %d for field MetricsSecure", wireType)
  4665  			}
  4666  			var v int
  4667  			for shift := uint(0); ; shift += 7 {
  4668  				if shift >= 64 {
  4669  					return ErrIntOverflowTypes
  4670  				}
  4671  				if iNdEx >= l {
  4672  					return io.ErrUnexpectedEOF
  4673  				}
  4674  				b := dAtA[iNdEx]
  4675  				iNdEx++
  4676  				v |= int(b&0x7F) << shift
  4677  				if b < 0x80 {
  4678  					break
  4679  				}
  4680  			}
  4681  			m.MetricsSecure = bool(v != 0)
  4682  		case 12:
  4683  			if wireType != 0 {
  4684  				return fmt.Errorf("proto: wrong wireType = %d for field LocalWorkerServicePort", wireType)
  4685  			}
  4686  			m.LocalWorkerServicePort = 0
  4687  			for shift := uint(0); ; shift += 7 {
  4688  				if shift >= 64 {
  4689  					return ErrIntOverflowTypes
  4690  				}
  4691  				if iNdEx >= l {
  4692  					return io.ErrUnexpectedEOF
  4693  				}
  4694  				b := dAtA[iNdEx]
  4695  				iNdEx++
  4696  				m.LocalWorkerServicePort |= int32(b&0x7F) << shift
  4697  				if b < 0x80 {
  4698  					break
  4699  				}
  4700  			}
  4701  		case 13:
  4702  			if wireType != 0 {
  4703  				return fmt.Errorf("proto: wrong wireType = %d for field LocalWorkerServiceSecure", wireType)
  4704  			}
  4705  			var v int
  4706  			for shift := uint(0); ; shift += 7 {
  4707  				if shift >= 64 {
  4708  					return ErrIntOverflowTypes
  4709  				}
  4710  				if iNdEx >= l {
  4711  					return io.ErrUnexpectedEOF
  4712  				}
  4713  				b := dAtA[iNdEx]
  4714  				iNdEx++
  4715  				v |= int(b&0x7F) << shift
  4716  				if b < 0x80 {
  4717  					break
  4718  				}
  4719  			}
  4720  			m.LocalWorkerServiceSecure = bool(v != 0)
  4721  		case 101:
  4722  			if wireType != 0 {
  4723  				return fmt.Errorf("proto: wrong wireType = %d for field SupportsReset", wireType)
  4724  			}
  4725  			var v int
  4726  			for shift := uint(0); ; shift += 7 {
  4727  				if shift >= 64 {
  4728  					return ErrIntOverflowTypes
  4729  				}
  4730  				if iNdEx >= l {
  4731  					return io.ErrUnexpectedEOF
  4732  				}
  4733  				b := dAtA[iNdEx]
  4734  				iNdEx++
  4735  				v |= int(b&0x7F) << shift
  4736  				if b < 0x80 {
  4737  					break
  4738  				}
  4739  			}
  4740  			m.SupportsReset = bool(v != 0)
  4741  		case 102:
  4742  			if wireType != 0 {
  4743  				return fmt.Errorf("proto: wrong wireType = %d for field SupportsSetLocRequest", wireType)
  4744  			}
  4745  			var v int
  4746  			for shift := uint(0); ; shift += 7 {
  4747  				if shift >= 64 {
  4748  					return ErrIntOverflowTypes
  4749  				}
  4750  				if iNdEx >= l {
  4751  					return io.ErrUnexpectedEOF
  4752  				}
  4753  				b := dAtA[iNdEx]
  4754  				iNdEx++
  4755  				v |= int(b&0x7F) << shift
  4756  				if b < 0x80 {
  4757  					break
  4758  				}
  4759  			}
  4760  			m.SupportsSetLocRequest = bool(v != 0)
  4761  		case 103:
  4762  			if wireType != 0 {
  4763  				return fmt.Errorf("proto: wrong wireType = %d for field SupportsSetPowerRequest", wireType)
  4764  			}
  4765  			var v int
  4766  			for shift := uint(0); ; shift += 7 {
  4767  				if shift >= 64 {
  4768  					return ErrIntOverflowTypes
  4769  				}
  4770  				if iNdEx >= l {
  4771  					return io.ErrUnexpectedEOF
  4772  				}
  4773  				b := dAtA[iNdEx]
  4774  				iNdEx++
  4775  				v |= int(b&0x7F) << shift
  4776  				if b < 0x80 {
  4777  					break
  4778  				}
  4779  			}
  4780  			m.SupportsSetPowerRequest = bool(v != 0)
  4781  		case 104:
  4782  			if wireType != 0 {
  4783  				return fmt.Errorf("proto: wrong wireType = %d for field SupportsSetOutputRequest", wireType)
  4784  			}
  4785  			var v int
  4786  			for shift := uint(0); ; shift += 7 {
  4787  				if shift >= 64 {
  4788  					return ErrIntOverflowTypes
  4789  				}
  4790  				if iNdEx >= l {
  4791  					return io.ErrUnexpectedEOF
  4792  				}
  4793  				b := dAtA[iNdEx]
  4794  				iNdEx++
  4795  				v |= int(b&0x7F) << shift
  4796  				if b < 0x80 {
  4797  					break
  4798  				}
  4799  			}
  4800  			m.SupportsSetOutputRequest = bool(v != 0)
  4801  		case 105:
  4802  			if wireType != 0 {
  4803  				return fmt.Errorf("proto: wrong wireType = %d for field SupportsSetSwitchRequest", wireType)
  4804  			}
  4805  			var v int
  4806  			for shift := uint(0); ; shift += 7 {
  4807  				if shift >= 64 {
  4808  					return ErrIntOverflowTypes
  4809  				}
  4810  				if iNdEx >= l {
  4811  					return io.ErrUnexpectedEOF
  4812  				}
  4813  				b := dAtA[iNdEx]
  4814  				iNdEx++
  4815  				v |= int(b&0x7F) << shift
  4816  				if b < 0x80 {
  4817  					break
  4818  				}
  4819  			}
  4820  			m.SupportsSetSwitchRequest = bool(v != 0)
  4821  		case 106:
  4822  			if wireType != 0 {
  4823  				return fmt.Errorf("proto: wrong wireType = %d for field SupportsSetDeviceDiscoveryRequest", wireType)
  4824  			}
  4825  			var v int
  4826  			for shift := uint(0); ; shift += 7 {
  4827  				if shift >= 64 {
  4828  					return ErrIntOverflowTypes
  4829  				}
  4830  				if iNdEx >= l {
  4831  					return io.ErrUnexpectedEOF
  4832  				}
  4833  				b := dAtA[iNdEx]
  4834  				iNdEx++
  4835  				v |= int(b&0x7F) << shift
  4836  				if b < 0x80 {
  4837  					break
  4838  				}
  4839  			}
  4840  			m.SupportsSetDeviceDiscoveryRequest = bool(v != 0)
  4841  		default:
  4842  			iNdEx = preIndex
  4843  			skippy, err := skipTypes(dAtA[iNdEx:])
  4844  			if err != nil {
  4845  				return err
  4846  			}
  4847  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4848  				return ErrInvalidLengthTypes
  4849  			}
  4850  			if (iNdEx + skippy) > l {
  4851  				return io.ErrUnexpectedEOF
  4852  			}
  4853  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4854  			iNdEx += skippy
  4855  		}
  4856  	}
  4857  
  4858  	if iNdEx > l {
  4859  		return io.ErrUnexpectedEOF
  4860  	}
  4861  	return nil
  4862  }
  4863  func (m *PowerRequestsOptions) Unmarshal(dAtA []byte) error {
  4864  	l := len(dAtA)
  4865  	iNdEx := 0
  4866  	for iNdEx < l {
  4867  		preIndex := iNdEx
  4868  		var wire uint64
  4869  		for shift := uint(0); ; shift += 7 {
  4870  			if shift >= 64 {
  4871  				return ErrIntOverflowTypes
  4872  			}
  4873  			if iNdEx >= l {
  4874  				return io.ErrUnexpectedEOF
  4875  			}
  4876  			b := dAtA[iNdEx]
  4877  			iNdEx++
  4878  			wire |= uint64(b&0x7F) << shift
  4879  			if b < 0x80 {
  4880  				break
  4881  			}
  4882  		}
  4883  		fieldNum := int32(wire >> 3)
  4884  		wireType := int(wire & 0x7)
  4885  		if wireType == 4 {
  4886  			return fmt.Errorf("proto: PowerRequestsOptions: wiretype end group for non-group")
  4887  		}
  4888  		if fieldNum <= 0 {
  4889  			return fmt.Errorf("proto: PowerRequestsOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  4890  		}
  4891  		switch fieldNum {
  4892  		case 1:
  4893  			if wireType != 0 {
  4894  				return fmt.Errorf("proto: wrong wireType = %d for field ManualConfirm", wireType)
  4895  			}
  4896  			var v int
  4897  			for shift := uint(0); ; shift += 7 {
  4898  				if shift >= 64 {
  4899  					return ErrIntOverflowTypes
  4900  				}
  4901  				if iNdEx >= l {
  4902  					return io.ErrUnexpectedEOF
  4903  				}
  4904  				b := dAtA[iNdEx]
  4905  				iNdEx++
  4906  				v |= int(b&0x7F) << shift
  4907  				if b < 0x80 {
  4908  					break
  4909  				}
  4910  			}
  4911  			m.ManualConfirm = bool(v != 0)
  4912  		default:
  4913  			iNdEx = preIndex
  4914  			skippy, err := skipTypes(dAtA[iNdEx:])
  4915  			if err != nil {
  4916  				return err
  4917  			}
  4918  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  4919  				return ErrInvalidLengthTypes
  4920  			}
  4921  			if (iNdEx + skippy) > l {
  4922  				return io.ErrUnexpectedEOF
  4923  			}
  4924  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  4925  			iNdEx += skippy
  4926  		}
  4927  	}
  4928  
  4929  	if iNdEx > l {
  4930  		return io.ErrUnexpectedEOF
  4931  	}
  4932  	return nil
  4933  }
  4934  func (m *Power) Unmarshal(dAtA []byte) error {
  4935  	l := len(dAtA)
  4936  	iNdEx := 0
  4937  	for iNdEx < l {
  4938  		preIndex := iNdEx
  4939  		var wire uint64
  4940  		for shift := uint(0); ; shift += 7 {
  4941  			if shift >= 64 {
  4942  				return ErrIntOverflowTypes
  4943  			}
  4944  			if iNdEx >= l {
  4945  				return io.ErrUnexpectedEOF
  4946  			}
  4947  			b := dAtA[iNdEx]
  4948  			iNdEx++
  4949  			wire |= uint64(b&0x7F) << shift
  4950  			if b < 0x80 {
  4951  				break
  4952  			}
  4953  		}
  4954  		fieldNum := int32(wire >> 3)
  4955  		wireType := int(wire & 0x7)
  4956  		if wireType == 4 {
  4957  			return fmt.Errorf("proto: Power: wiretype end group for non-group")
  4958  		}
  4959  		if fieldNum <= 0 {
  4960  			return fmt.Errorf("proto: Power: illegal tag %d (wire type %d)", fieldNum, wire)
  4961  		}
  4962  		switch fieldNum {
  4963  		case 1:
  4964  			if wireType != 2 {
  4965  				return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
  4966  			}
  4967  			var msglen int
  4968  			for shift := uint(0); ; shift += 7 {
  4969  				if shift >= 64 {
  4970  					return ErrIntOverflowTypes
  4971  				}
  4972  				if iNdEx >= l {
  4973  					return io.ErrUnexpectedEOF
  4974  				}
  4975  				b := dAtA[iNdEx]
  4976  				iNdEx++
  4977  				msglen |= int(b&0x7F) << shift
  4978  				if b < 0x80 {
  4979  					break
  4980  				}
  4981  			}
  4982  			if msglen < 0 {
  4983  				return ErrInvalidLengthTypes
  4984  			}
  4985  			postIndex := iNdEx + msglen
  4986  			if postIndex < 0 {
  4987  				return ErrInvalidLengthTypes
  4988  			}
  4989  			if postIndex > l {
  4990  				return io.ErrUnexpectedEOF
  4991  			}
  4992  			if m.Request == nil {
  4993  				m.Request = &PowerState{}
  4994  			}
  4995  			if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4996  				return err
  4997  			}
  4998  			iNdEx = postIndex
  4999  		case 2:
  5000  			if wireType != 2 {
  5001  				return fmt.Errorf("proto: wrong wireType = %d for field Actual", wireType)
  5002  			}
  5003  			var msglen int
  5004  			for shift := uint(0); ; shift += 7 {
  5005  				if shift >= 64 {
  5006  					return ErrIntOverflowTypes
  5007  				}
  5008  				if iNdEx >= l {
  5009  					return io.ErrUnexpectedEOF
  5010  				}
  5011  				b := dAtA[iNdEx]
  5012  				iNdEx++
  5013  				msglen |= int(b&0x7F) << shift
  5014  				if b < 0x80 {
  5015  					break
  5016  				}
  5017  			}
  5018  			if msglen < 0 {
  5019  				return ErrInvalidLengthTypes
  5020  			}
  5021  			postIndex := iNdEx + msglen
  5022  			if postIndex < 0 {
  5023  				return ErrInvalidLengthTypes
  5024  			}
  5025  			if postIndex > l {
  5026  				return io.ErrUnexpectedEOF
  5027  			}
  5028  			if m.Actual == nil {
  5029  				m.Actual = &PowerState{}
  5030  			}
  5031  			if err := m.Actual.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5032  				return err
  5033  			}
  5034  			iNdEx = postIndex
  5035  		default:
  5036  			iNdEx = preIndex
  5037  			skippy, err := skipTypes(dAtA[iNdEx:])
  5038  			if err != nil {
  5039  				return err
  5040  			}
  5041  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5042  				return ErrInvalidLengthTypes
  5043  			}
  5044  			if (iNdEx + skippy) > l {
  5045  				return io.ErrUnexpectedEOF
  5046  			}
  5047  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5048  			iNdEx += skippy
  5049  		}
  5050  	}
  5051  
  5052  	if iNdEx > l {
  5053  		return io.ErrUnexpectedEOF
  5054  	}
  5055  	return nil
  5056  }
  5057  func (m *PowerState) Unmarshal(dAtA []byte) error {
  5058  	l := len(dAtA)
  5059  	iNdEx := 0
  5060  	for iNdEx < l {
  5061  		preIndex := iNdEx
  5062  		var wire uint64
  5063  		for shift := uint(0); ; shift += 7 {
  5064  			if shift >= 64 {
  5065  				return ErrIntOverflowTypes
  5066  			}
  5067  			if iNdEx >= l {
  5068  				return io.ErrUnexpectedEOF
  5069  			}
  5070  			b := dAtA[iNdEx]
  5071  			iNdEx++
  5072  			wire |= uint64(b&0x7F) << shift
  5073  			if b < 0x80 {
  5074  				break
  5075  			}
  5076  		}
  5077  		fieldNum := int32(wire >> 3)
  5078  		wireType := int(wire & 0x7)
  5079  		if wireType == 4 {
  5080  			return fmt.Errorf("proto: PowerState: wiretype end group for non-group")
  5081  		}
  5082  		if fieldNum <= 0 {
  5083  			return fmt.Errorf("proto: PowerState: illegal tag %d (wire type %d)", fieldNum, wire)
  5084  		}
  5085  		switch fieldNum {
  5086  		case 1:
  5087  			if wireType != 0 {
  5088  				return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
  5089  			}
  5090  			var v int
  5091  			for shift := uint(0); ; shift += 7 {
  5092  				if shift >= 64 {
  5093  					return ErrIntOverflowTypes
  5094  				}
  5095  				if iNdEx >= l {
  5096  					return io.ErrUnexpectedEOF
  5097  				}
  5098  				b := dAtA[iNdEx]
  5099  				iNdEx++
  5100  				v |= int(b&0x7F) << shift
  5101  				if b < 0x80 {
  5102  					break
  5103  				}
  5104  			}
  5105  			m.Enabled = bool(v != 0)
  5106  		default:
  5107  			iNdEx = preIndex
  5108  			skippy, err := skipTypes(dAtA[iNdEx:])
  5109  			if err != nil {
  5110  				return err
  5111  			}
  5112  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5113  				return ErrInvalidLengthTypes
  5114  			}
  5115  			if (iNdEx + skippy) > l {
  5116  				return io.ErrUnexpectedEOF
  5117  			}
  5118  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5119  			iNdEx += skippy
  5120  		}
  5121  	}
  5122  
  5123  	if iNdEx > l {
  5124  		return io.ErrUnexpectedEOF
  5125  	}
  5126  	return nil
  5127  }
  5128  func (m *LocRequestsOptions) Unmarshal(dAtA []byte) error {
  5129  	l := len(dAtA)
  5130  	iNdEx := 0
  5131  	for iNdEx < l {
  5132  		preIndex := iNdEx
  5133  		var wire uint64
  5134  		for shift := uint(0); ; shift += 7 {
  5135  			if shift >= 64 {
  5136  				return ErrIntOverflowTypes
  5137  			}
  5138  			if iNdEx >= l {
  5139  				return io.ErrUnexpectedEOF
  5140  			}
  5141  			b := dAtA[iNdEx]
  5142  			iNdEx++
  5143  			wire |= uint64(b&0x7F) << shift
  5144  			if b < 0x80 {
  5145  				break
  5146  			}
  5147  		}
  5148  		fieldNum := int32(wire >> 3)
  5149  		wireType := int(wire & 0x7)
  5150  		if wireType == 4 {
  5151  			return fmt.Errorf("proto: LocRequestsOptions: wiretype end group for non-group")
  5152  		}
  5153  		if fieldNum <= 0 {
  5154  			return fmt.Errorf("proto: LocRequestsOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  5155  		}
  5156  		switch fieldNum {
  5157  		case 1:
  5158  			if wireType != 0 {
  5159  				return fmt.Errorf("proto: wrong wireType = %d for field ManualConfirm", wireType)
  5160  			}
  5161  			var v int
  5162  			for shift := uint(0); ; shift += 7 {
  5163  				if shift >= 64 {
  5164  					return ErrIntOverflowTypes
  5165  				}
  5166  				if iNdEx >= l {
  5167  					return io.ErrUnexpectedEOF
  5168  				}
  5169  				b := dAtA[iNdEx]
  5170  				iNdEx++
  5171  				v |= int(b&0x7F) << shift
  5172  				if b < 0x80 {
  5173  					break
  5174  				}
  5175  			}
  5176  			m.ManualConfirm = bool(v != 0)
  5177  		default:
  5178  			iNdEx = preIndex
  5179  			skippy, err := skipTypes(dAtA[iNdEx:])
  5180  			if err != nil {
  5181  				return err
  5182  			}
  5183  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5184  				return ErrInvalidLengthTypes
  5185  			}
  5186  			if (iNdEx + skippy) > l {
  5187  				return io.ErrUnexpectedEOF
  5188  			}
  5189  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5190  			iNdEx += skippy
  5191  		}
  5192  	}
  5193  
  5194  	if iNdEx > l {
  5195  		return io.ErrUnexpectedEOF
  5196  	}
  5197  	return nil
  5198  }
  5199  func (m *Loc) Unmarshal(dAtA []byte) error {
  5200  	l := len(dAtA)
  5201  	iNdEx := 0
  5202  	for iNdEx < l {
  5203  		preIndex := iNdEx
  5204  		var wire uint64
  5205  		for shift := uint(0); ; shift += 7 {
  5206  			if shift >= 64 {
  5207  				return ErrIntOverflowTypes
  5208  			}
  5209  			if iNdEx >= l {
  5210  				return io.ErrUnexpectedEOF
  5211  			}
  5212  			b := dAtA[iNdEx]
  5213  			iNdEx++
  5214  			wire |= uint64(b&0x7F) << shift
  5215  			if b < 0x80 {
  5216  				break
  5217  			}
  5218  		}
  5219  		fieldNum := int32(wire >> 3)
  5220  		wireType := int(wire & 0x7)
  5221  		if wireType == 4 {
  5222  			return fmt.Errorf("proto: Loc: wiretype end group for non-group")
  5223  		}
  5224  		if fieldNum <= 0 {
  5225  			return fmt.Errorf("proto: Loc: illegal tag %d (wire type %d)", fieldNum, wire)
  5226  		}
  5227  		switch fieldNum {
  5228  		case 1:
  5229  			if wireType != 2 {
  5230  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  5231  			}
  5232  			var stringLen uint64
  5233  			for shift := uint(0); ; shift += 7 {
  5234  				if shift >= 64 {
  5235  					return ErrIntOverflowTypes
  5236  				}
  5237  				if iNdEx >= l {
  5238  					return io.ErrUnexpectedEOF
  5239  				}
  5240  				b := dAtA[iNdEx]
  5241  				iNdEx++
  5242  				stringLen |= uint64(b&0x7F) << shift
  5243  				if b < 0x80 {
  5244  					break
  5245  				}
  5246  			}
  5247  			intStringLen := int(stringLen)
  5248  			if intStringLen < 0 {
  5249  				return ErrInvalidLengthTypes
  5250  			}
  5251  			postIndex := iNdEx + intStringLen
  5252  			if postIndex < 0 {
  5253  				return ErrInvalidLengthTypes
  5254  			}
  5255  			if postIndex > l {
  5256  				return io.ErrUnexpectedEOF
  5257  			}
  5258  			m.Address = ObjectAddress(dAtA[iNdEx:postIndex])
  5259  			iNdEx = postIndex
  5260  		case 2:
  5261  			if wireType != 2 {
  5262  				return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
  5263  			}
  5264  			var msglen int
  5265  			for shift := uint(0); ; shift += 7 {
  5266  				if shift >= 64 {
  5267  					return ErrIntOverflowTypes
  5268  				}
  5269  				if iNdEx >= l {
  5270  					return io.ErrUnexpectedEOF
  5271  				}
  5272  				b := dAtA[iNdEx]
  5273  				iNdEx++
  5274  				msglen |= int(b&0x7F) << shift
  5275  				if b < 0x80 {
  5276  					break
  5277  				}
  5278  			}
  5279  			if msglen < 0 {
  5280  				return ErrInvalidLengthTypes
  5281  			}
  5282  			postIndex := iNdEx + msglen
  5283  			if postIndex < 0 {
  5284  				return ErrInvalidLengthTypes
  5285  			}
  5286  			if postIndex > l {
  5287  				return io.ErrUnexpectedEOF
  5288  			}
  5289  			if m.Request == nil {
  5290  				m.Request = &LocState{}
  5291  			}
  5292  			if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5293  				return err
  5294  			}
  5295  			iNdEx = postIndex
  5296  		case 3:
  5297  			if wireType != 2 {
  5298  				return fmt.Errorf("proto: wrong wireType = %d for field Actual", wireType)
  5299  			}
  5300  			var msglen int
  5301  			for shift := uint(0); ; shift += 7 {
  5302  				if shift >= 64 {
  5303  					return ErrIntOverflowTypes
  5304  				}
  5305  				if iNdEx >= l {
  5306  					return io.ErrUnexpectedEOF
  5307  				}
  5308  				b := dAtA[iNdEx]
  5309  				iNdEx++
  5310  				msglen |= int(b&0x7F) << shift
  5311  				if b < 0x80 {
  5312  					break
  5313  				}
  5314  			}
  5315  			if msglen < 0 {
  5316  				return ErrInvalidLengthTypes
  5317  			}
  5318  			postIndex := iNdEx + msglen
  5319  			if postIndex < 0 {
  5320  				return ErrInvalidLengthTypes
  5321  			}
  5322  			if postIndex > l {
  5323  				return io.ErrUnexpectedEOF
  5324  			}
  5325  			if m.Actual == nil {
  5326  				m.Actual = &LocState{}
  5327  			}
  5328  			if err := m.Actual.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5329  				return err
  5330  			}
  5331  			iNdEx = postIndex
  5332  		default:
  5333  			iNdEx = preIndex
  5334  			skippy, err := skipTypes(dAtA[iNdEx:])
  5335  			if err != nil {
  5336  				return err
  5337  			}
  5338  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5339  				return ErrInvalidLengthTypes
  5340  			}
  5341  			if (iNdEx + skippy) > l {
  5342  				return io.ErrUnexpectedEOF
  5343  			}
  5344  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5345  			iNdEx += skippy
  5346  		}
  5347  	}
  5348  
  5349  	if iNdEx > l {
  5350  		return io.ErrUnexpectedEOF
  5351  	}
  5352  	return nil
  5353  }
  5354  func (m *LocState) Unmarshal(dAtA []byte) error {
  5355  	l := len(dAtA)
  5356  	iNdEx := 0
  5357  	for iNdEx < l {
  5358  		preIndex := iNdEx
  5359  		var wire uint64
  5360  		for shift := uint(0); ; shift += 7 {
  5361  			if shift >= 64 {
  5362  				return ErrIntOverflowTypes
  5363  			}
  5364  			if iNdEx >= l {
  5365  				return io.ErrUnexpectedEOF
  5366  			}
  5367  			b := dAtA[iNdEx]
  5368  			iNdEx++
  5369  			wire |= uint64(b&0x7F) << shift
  5370  			if b < 0x80 {
  5371  				break
  5372  			}
  5373  		}
  5374  		fieldNum := int32(wire >> 3)
  5375  		wireType := int(wire & 0x7)
  5376  		if wireType == 4 {
  5377  			return fmt.Errorf("proto: LocState: wiretype end group for non-group")
  5378  		}
  5379  		if fieldNum <= 0 {
  5380  			return fmt.Errorf("proto: LocState: illegal tag %d (wire type %d)", fieldNum, wire)
  5381  		}
  5382  		switch fieldNum {
  5383  		case 1:
  5384  			if wireType != 0 {
  5385  				return fmt.Errorf("proto: wrong wireType = %d for field Speed", wireType)
  5386  			}
  5387  			m.Speed = 0
  5388  			for shift := uint(0); ; shift += 7 {
  5389  				if shift >= 64 {
  5390  					return ErrIntOverflowTypes
  5391  				}
  5392  				if iNdEx >= l {
  5393  					return io.ErrUnexpectedEOF
  5394  				}
  5395  				b := dAtA[iNdEx]
  5396  				iNdEx++
  5397  				m.Speed |= int32(b&0x7F) << shift
  5398  				if b < 0x80 {
  5399  					break
  5400  				}
  5401  			}
  5402  		case 2:
  5403  			if wireType != 0 {
  5404  				return fmt.Errorf("proto: wrong wireType = %d for field SpeedSteps", wireType)
  5405  			}
  5406  			m.SpeedSteps = 0
  5407  			for shift := uint(0); ; shift += 7 {
  5408  				if shift >= 64 {
  5409  					return ErrIntOverflowTypes
  5410  				}
  5411  				if iNdEx >= l {
  5412  					return io.ErrUnexpectedEOF
  5413  				}
  5414  				b := dAtA[iNdEx]
  5415  				iNdEx++
  5416  				m.SpeedSteps |= int32(b&0x7F) << shift
  5417  				if b < 0x80 {
  5418  					break
  5419  				}
  5420  			}
  5421  		case 3:
  5422  			if wireType != 0 {
  5423  				return fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType)
  5424  			}
  5425  			m.Direction = 0
  5426  			for shift := uint(0); ; shift += 7 {
  5427  				if shift >= 64 {
  5428  					return ErrIntOverflowTypes
  5429  				}
  5430  				if iNdEx >= l {
  5431  					return io.ErrUnexpectedEOF
  5432  				}
  5433  				b := dAtA[iNdEx]
  5434  				iNdEx++
  5435  				m.Direction |= LocDirection(b&0x7F) << shift
  5436  				if b < 0x80 {
  5437  					break
  5438  				}
  5439  			}
  5440  		case 4:
  5441  			if wireType != 2 {
  5442  				return fmt.Errorf("proto: wrong wireType = %d for field Functions", wireType)
  5443  			}
  5444  			var msglen int
  5445  			for shift := uint(0); ; shift += 7 {
  5446  				if shift >= 64 {
  5447  					return ErrIntOverflowTypes
  5448  				}
  5449  				if iNdEx >= l {
  5450  					return io.ErrUnexpectedEOF
  5451  				}
  5452  				b := dAtA[iNdEx]
  5453  				iNdEx++
  5454  				msglen |= int(b&0x7F) << shift
  5455  				if b < 0x80 {
  5456  					break
  5457  				}
  5458  			}
  5459  			if msglen < 0 {
  5460  				return ErrInvalidLengthTypes
  5461  			}
  5462  			postIndex := iNdEx + msglen
  5463  			if postIndex < 0 {
  5464  				return ErrInvalidLengthTypes
  5465  			}
  5466  			if postIndex > l {
  5467  				return io.ErrUnexpectedEOF
  5468  			}
  5469  			if m.Functions == nil {
  5470  				m.Functions = make(map[int32]bool)
  5471  			}
  5472  			var mapkey int32
  5473  			var mapvalue bool
  5474  			for iNdEx < postIndex {
  5475  				entryPreIndex := iNdEx
  5476  				var wire uint64
  5477  				for shift := uint(0); ; shift += 7 {
  5478  					if shift >= 64 {
  5479  						return ErrIntOverflowTypes
  5480  					}
  5481  					if iNdEx >= l {
  5482  						return io.ErrUnexpectedEOF
  5483  					}
  5484  					b := dAtA[iNdEx]
  5485  					iNdEx++
  5486  					wire |= uint64(b&0x7F) << shift
  5487  					if b < 0x80 {
  5488  						break
  5489  					}
  5490  				}
  5491  				fieldNum := int32(wire >> 3)
  5492  				if fieldNum == 1 {
  5493  					for shift := uint(0); ; shift += 7 {
  5494  						if shift >= 64 {
  5495  							return ErrIntOverflowTypes
  5496  						}
  5497  						if iNdEx >= l {
  5498  							return io.ErrUnexpectedEOF
  5499  						}
  5500  						b := dAtA[iNdEx]
  5501  						iNdEx++
  5502  						mapkey |= int32(b&0x7F) << shift
  5503  						if b < 0x80 {
  5504  							break
  5505  						}
  5506  					}
  5507  				} else if fieldNum == 2 {
  5508  					var mapvaluetemp int
  5509  					for shift := uint(0); ; shift += 7 {
  5510  						if shift >= 64 {
  5511  							return ErrIntOverflowTypes
  5512  						}
  5513  						if iNdEx >= l {
  5514  							return io.ErrUnexpectedEOF
  5515  						}
  5516  						b := dAtA[iNdEx]
  5517  						iNdEx++
  5518  						mapvaluetemp |= int(b&0x7F) << shift
  5519  						if b < 0x80 {
  5520  							break
  5521  						}
  5522  					}
  5523  					mapvalue = bool(mapvaluetemp != 0)
  5524  				} else {
  5525  					iNdEx = entryPreIndex
  5526  					skippy, err := skipTypes(dAtA[iNdEx:])
  5527  					if err != nil {
  5528  						return err
  5529  					}
  5530  					if (skippy < 0) || (iNdEx+skippy) < 0 {
  5531  						return ErrInvalidLengthTypes
  5532  					}
  5533  					if (iNdEx + skippy) > postIndex {
  5534  						return io.ErrUnexpectedEOF
  5535  					}
  5536  					iNdEx += skippy
  5537  				}
  5538  			}
  5539  			m.Functions[mapkey] = mapvalue
  5540  			iNdEx = postIndex
  5541  		default:
  5542  			iNdEx = preIndex
  5543  			skippy, err := skipTypes(dAtA[iNdEx:])
  5544  			if err != nil {
  5545  				return err
  5546  			}
  5547  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5548  				return ErrInvalidLengthTypes
  5549  			}
  5550  			if (iNdEx + skippy) > l {
  5551  				return io.ErrUnexpectedEOF
  5552  			}
  5553  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5554  			iNdEx += skippy
  5555  		}
  5556  	}
  5557  
  5558  	if iNdEx > l {
  5559  		return io.ErrUnexpectedEOF
  5560  	}
  5561  	return nil
  5562  }
  5563  func (m *Sensor) Unmarshal(dAtA []byte) error {
  5564  	l := len(dAtA)
  5565  	iNdEx := 0
  5566  	for iNdEx < l {
  5567  		preIndex := iNdEx
  5568  		var wire uint64
  5569  		for shift := uint(0); ; shift += 7 {
  5570  			if shift >= 64 {
  5571  				return ErrIntOverflowTypes
  5572  			}
  5573  			if iNdEx >= l {
  5574  				return io.ErrUnexpectedEOF
  5575  			}
  5576  			b := dAtA[iNdEx]
  5577  			iNdEx++
  5578  			wire |= uint64(b&0x7F) << shift
  5579  			if b < 0x80 {
  5580  				break
  5581  			}
  5582  		}
  5583  		fieldNum := int32(wire >> 3)
  5584  		wireType := int(wire & 0x7)
  5585  		if wireType == 4 {
  5586  			return fmt.Errorf("proto: Sensor: wiretype end group for non-group")
  5587  		}
  5588  		if fieldNum <= 0 {
  5589  			return fmt.Errorf("proto: Sensor: illegal tag %d (wire type %d)", fieldNum, wire)
  5590  		}
  5591  		switch fieldNum {
  5592  		case 1:
  5593  			if wireType != 2 {
  5594  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  5595  			}
  5596  			var stringLen uint64
  5597  			for shift := uint(0); ; shift += 7 {
  5598  				if shift >= 64 {
  5599  					return ErrIntOverflowTypes
  5600  				}
  5601  				if iNdEx >= l {
  5602  					return io.ErrUnexpectedEOF
  5603  				}
  5604  				b := dAtA[iNdEx]
  5605  				iNdEx++
  5606  				stringLen |= uint64(b&0x7F) << shift
  5607  				if b < 0x80 {
  5608  					break
  5609  				}
  5610  			}
  5611  			intStringLen := int(stringLen)
  5612  			if intStringLen < 0 {
  5613  				return ErrInvalidLengthTypes
  5614  			}
  5615  			postIndex := iNdEx + intStringLen
  5616  			if postIndex < 0 {
  5617  				return ErrInvalidLengthTypes
  5618  			}
  5619  			if postIndex > l {
  5620  				return io.ErrUnexpectedEOF
  5621  			}
  5622  			m.Address = ObjectAddress(dAtA[iNdEx:postIndex])
  5623  			iNdEx = postIndex
  5624  		case 2:
  5625  			if wireType != 2 {
  5626  				return fmt.Errorf("proto: wrong wireType = %d for field Actual", wireType)
  5627  			}
  5628  			var msglen int
  5629  			for shift := uint(0); ; shift += 7 {
  5630  				if shift >= 64 {
  5631  					return ErrIntOverflowTypes
  5632  				}
  5633  				if iNdEx >= l {
  5634  					return io.ErrUnexpectedEOF
  5635  				}
  5636  				b := dAtA[iNdEx]
  5637  				iNdEx++
  5638  				msglen |= int(b&0x7F) << shift
  5639  				if b < 0x80 {
  5640  					break
  5641  				}
  5642  			}
  5643  			if msglen < 0 {
  5644  				return ErrInvalidLengthTypes
  5645  			}
  5646  			postIndex := iNdEx + msglen
  5647  			if postIndex < 0 {
  5648  				return ErrInvalidLengthTypes
  5649  			}
  5650  			if postIndex > l {
  5651  				return io.ErrUnexpectedEOF
  5652  			}
  5653  			if m.Actual == nil {
  5654  				m.Actual = &SensorState{}
  5655  			}
  5656  			if err := m.Actual.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5657  				return err
  5658  			}
  5659  			iNdEx = postIndex
  5660  		default:
  5661  			iNdEx = preIndex
  5662  			skippy, err := skipTypes(dAtA[iNdEx:])
  5663  			if err != nil {
  5664  				return err
  5665  			}
  5666  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5667  				return ErrInvalidLengthTypes
  5668  			}
  5669  			if (iNdEx + skippy) > l {
  5670  				return io.ErrUnexpectedEOF
  5671  			}
  5672  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5673  			iNdEx += skippy
  5674  		}
  5675  	}
  5676  
  5677  	if iNdEx > l {
  5678  		return io.ErrUnexpectedEOF
  5679  	}
  5680  	return nil
  5681  }
  5682  func (m *SensorState) Unmarshal(dAtA []byte) error {
  5683  	l := len(dAtA)
  5684  	iNdEx := 0
  5685  	for iNdEx < l {
  5686  		preIndex := iNdEx
  5687  		var wire uint64
  5688  		for shift := uint(0); ; shift += 7 {
  5689  			if shift >= 64 {
  5690  				return ErrIntOverflowTypes
  5691  			}
  5692  			if iNdEx >= l {
  5693  				return io.ErrUnexpectedEOF
  5694  			}
  5695  			b := dAtA[iNdEx]
  5696  			iNdEx++
  5697  			wire |= uint64(b&0x7F) << shift
  5698  			if b < 0x80 {
  5699  				break
  5700  			}
  5701  		}
  5702  		fieldNum := int32(wire >> 3)
  5703  		wireType := int(wire & 0x7)
  5704  		if wireType == 4 {
  5705  			return fmt.Errorf("proto: SensorState: wiretype end group for non-group")
  5706  		}
  5707  		if fieldNum <= 0 {
  5708  			return fmt.Errorf("proto: SensorState: illegal tag %d (wire type %d)", fieldNum, wire)
  5709  		}
  5710  		switch fieldNum {
  5711  		case 1:
  5712  			if wireType != 0 {
  5713  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  5714  			}
  5715  			m.Value = 0
  5716  			for shift := uint(0); ; shift += 7 {
  5717  				if shift >= 64 {
  5718  					return ErrIntOverflowTypes
  5719  				}
  5720  				if iNdEx >= l {
  5721  					return io.ErrUnexpectedEOF
  5722  				}
  5723  				b := dAtA[iNdEx]
  5724  				iNdEx++
  5725  				m.Value |= int32(b&0x7F) << shift
  5726  				if b < 0x80 {
  5727  					break
  5728  				}
  5729  			}
  5730  		default:
  5731  			iNdEx = preIndex
  5732  			skippy, err := skipTypes(dAtA[iNdEx:])
  5733  			if err != nil {
  5734  				return err
  5735  			}
  5736  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5737  				return ErrInvalidLengthTypes
  5738  			}
  5739  			if (iNdEx + skippy) > l {
  5740  				return io.ErrUnexpectedEOF
  5741  			}
  5742  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5743  			iNdEx += skippy
  5744  		}
  5745  	}
  5746  
  5747  	if iNdEx > l {
  5748  		return io.ErrUnexpectedEOF
  5749  	}
  5750  	return nil
  5751  }
  5752  func (m *OutputRequestsOptions) Unmarshal(dAtA []byte) error {
  5753  	l := len(dAtA)
  5754  	iNdEx := 0
  5755  	for iNdEx < l {
  5756  		preIndex := iNdEx
  5757  		var wire uint64
  5758  		for shift := uint(0); ; shift += 7 {
  5759  			if shift >= 64 {
  5760  				return ErrIntOverflowTypes
  5761  			}
  5762  			if iNdEx >= l {
  5763  				return io.ErrUnexpectedEOF
  5764  			}
  5765  			b := dAtA[iNdEx]
  5766  			iNdEx++
  5767  			wire |= uint64(b&0x7F) << shift
  5768  			if b < 0x80 {
  5769  				break
  5770  			}
  5771  		}
  5772  		fieldNum := int32(wire >> 3)
  5773  		wireType := int(wire & 0x7)
  5774  		if wireType == 4 {
  5775  			return fmt.Errorf("proto: OutputRequestsOptions: wiretype end group for non-group")
  5776  		}
  5777  		if fieldNum <= 0 {
  5778  			return fmt.Errorf("proto: OutputRequestsOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  5779  		}
  5780  		switch fieldNum {
  5781  		case 1:
  5782  			if wireType != 0 {
  5783  				return fmt.Errorf("proto: wrong wireType = %d for field ManualConfirm", wireType)
  5784  			}
  5785  			var v int
  5786  			for shift := uint(0); ; shift += 7 {
  5787  				if shift >= 64 {
  5788  					return ErrIntOverflowTypes
  5789  				}
  5790  				if iNdEx >= l {
  5791  					return io.ErrUnexpectedEOF
  5792  				}
  5793  				b := dAtA[iNdEx]
  5794  				iNdEx++
  5795  				v |= int(b&0x7F) << shift
  5796  				if b < 0x80 {
  5797  					break
  5798  				}
  5799  			}
  5800  			m.ManualConfirm = bool(v != 0)
  5801  		case 2:
  5802  			if wireType != 2 {
  5803  				return fmt.Errorf("proto: wrong wireType = %d for field ModuleId", wireType)
  5804  			}
  5805  			var stringLen uint64
  5806  			for shift := uint(0); ; shift += 7 {
  5807  				if shift >= 64 {
  5808  					return ErrIntOverflowTypes
  5809  				}
  5810  				if iNdEx >= l {
  5811  					return io.ErrUnexpectedEOF
  5812  				}
  5813  				b := dAtA[iNdEx]
  5814  				iNdEx++
  5815  				stringLen |= uint64(b&0x7F) << shift
  5816  				if b < 0x80 {
  5817  					break
  5818  				}
  5819  			}
  5820  			intStringLen := int(stringLen)
  5821  			if intStringLen < 0 {
  5822  				return ErrInvalidLengthTypes
  5823  			}
  5824  			postIndex := iNdEx + intStringLen
  5825  			if postIndex < 0 {
  5826  				return ErrInvalidLengthTypes
  5827  			}
  5828  			if postIndex > l {
  5829  				return io.ErrUnexpectedEOF
  5830  			}
  5831  			m.ModuleId = string(dAtA[iNdEx:postIndex])
  5832  			iNdEx = postIndex
  5833  		default:
  5834  			iNdEx = preIndex
  5835  			skippy, err := skipTypes(dAtA[iNdEx:])
  5836  			if err != nil {
  5837  				return err
  5838  			}
  5839  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5840  				return ErrInvalidLengthTypes
  5841  			}
  5842  			if (iNdEx + skippy) > l {
  5843  				return io.ErrUnexpectedEOF
  5844  			}
  5845  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  5846  			iNdEx += skippy
  5847  		}
  5848  	}
  5849  
  5850  	if iNdEx > l {
  5851  		return io.ErrUnexpectedEOF
  5852  	}
  5853  	return nil
  5854  }
  5855  func (m *Output) Unmarshal(dAtA []byte) error {
  5856  	l := len(dAtA)
  5857  	iNdEx := 0
  5858  	for iNdEx < l {
  5859  		preIndex := iNdEx
  5860  		var wire uint64
  5861  		for shift := uint(0); ; shift += 7 {
  5862  			if shift >= 64 {
  5863  				return ErrIntOverflowTypes
  5864  			}
  5865  			if iNdEx >= l {
  5866  				return io.ErrUnexpectedEOF
  5867  			}
  5868  			b := dAtA[iNdEx]
  5869  			iNdEx++
  5870  			wire |= uint64(b&0x7F) << shift
  5871  			if b < 0x80 {
  5872  				break
  5873  			}
  5874  		}
  5875  		fieldNum := int32(wire >> 3)
  5876  		wireType := int(wire & 0x7)
  5877  		if wireType == 4 {
  5878  			return fmt.Errorf("proto: Output: wiretype end group for non-group")
  5879  		}
  5880  		if fieldNum <= 0 {
  5881  			return fmt.Errorf("proto: Output: illegal tag %d (wire type %d)", fieldNum, wire)
  5882  		}
  5883  		switch fieldNum {
  5884  		case 1:
  5885  			if wireType != 2 {
  5886  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  5887  			}
  5888  			var stringLen uint64
  5889  			for shift := uint(0); ; shift += 7 {
  5890  				if shift >= 64 {
  5891  					return ErrIntOverflowTypes
  5892  				}
  5893  				if iNdEx >= l {
  5894  					return io.ErrUnexpectedEOF
  5895  				}
  5896  				b := dAtA[iNdEx]
  5897  				iNdEx++
  5898  				stringLen |= uint64(b&0x7F) << shift
  5899  				if b < 0x80 {
  5900  					break
  5901  				}
  5902  			}
  5903  			intStringLen := int(stringLen)
  5904  			if intStringLen < 0 {
  5905  				return ErrInvalidLengthTypes
  5906  			}
  5907  			postIndex := iNdEx + intStringLen
  5908  			if postIndex < 0 {
  5909  				return ErrInvalidLengthTypes
  5910  			}
  5911  			if postIndex > l {
  5912  				return io.ErrUnexpectedEOF
  5913  			}
  5914  			m.Address = ObjectAddress(dAtA[iNdEx:postIndex])
  5915  			iNdEx = postIndex
  5916  		case 2:
  5917  			if wireType != 2 {
  5918  				return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
  5919  			}
  5920  			var msglen int
  5921  			for shift := uint(0); ; shift += 7 {
  5922  				if shift >= 64 {
  5923  					return ErrIntOverflowTypes
  5924  				}
  5925  				if iNdEx >= l {
  5926  					return io.ErrUnexpectedEOF
  5927  				}
  5928  				b := dAtA[iNdEx]
  5929  				iNdEx++
  5930  				msglen |= int(b&0x7F) << shift
  5931  				if b < 0x80 {
  5932  					break
  5933  				}
  5934  			}
  5935  			if msglen < 0 {
  5936  				return ErrInvalidLengthTypes
  5937  			}
  5938  			postIndex := iNdEx + msglen
  5939  			if postIndex < 0 {
  5940  				return ErrInvalidLengthTypes
  5941  			}
  5942  			if postIndex > l {
  5943  				return io.ErrUnexpectedEOF
  5944  			}
  5945  			if m.Request == nil {
  5946  				m.Request = &OutputState{}
  5947  			}
  5948  			if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5949  				return err
  5950  			}
  5951  			iNdEx = postIndex
  5952  		case 3:
  5953  			if wireType != 2 {
  5954  				return fmt.Errorf("proto: wrong wireType = %d for field Actual", wireType)
  5955  			}
  5956  			var msglen int
  5957  			for shift := uint(0); ; shift += 7 {
  5958  				if shift >= 64 {
  5959  					return ErrIntOverflowTypes
  5960  				}
  5961  				if iNdEx >= l {
  5962  					return io.ErrUnexpectedEOF
  5963  				}
  5964  				b := dAtA[iNdEx]
  5965  				iNdEx++
  5966  				msglen |= int(b&0x7F) << shift
  5967  				if b < 0x80 {
  5968  					break
  5969  				}
  5970  			}
  5971  			if msglen < 0 {
  5972  				return ErrInvalidLengthTypes
  5973  			}
  5974  			postIndex := iNdEx + msglen
  5975  			if postIndex < 0 {
  5976  				return ErrInvalidLengthTypes
  5977  			}
  5978  			if postIndex > l {
  5979  				return io.ErrUnexpectedEOF
  5980  			}
  5981  			if m.Actual == nil {
  5982  				m.Actual = &OutputState{}
  5983  			}
  5984  			if err := m.Actual.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5985  				return err
  5986  			}
  5987  			iNdEx = postIndex
  5988  		default:
  5989  			iNdEx = preIndex
  5990  			skippy, err := skipTypes(dAtA[iNdEx:])
  5991  			if err != nil {
  5992  				return err
  5993  			}
  5994  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  5995  				return ErrInvalidLengthTypes
  5996  			}
  5997  			if (iNdEx + skippy) > l {
  5998  				return io.ErrUnexpectedEOF
  5999  			}
  6000  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6001  			iNdEx += skippy
  6002  		}
  6003  	}
  6004  
  6005  	if iNdEx > l {
  6006  		return io.ErrUnexpectedEOF
  6007  	}
  6008  	return nil
  6009  }
  6010  func (m *OutputState) Unmarshal(dAtA []byte) error {
  6011  	l := len(dAtA)
  6012  	iNdEx := 0
  6013  	for iNdEx < l {
  6014  		preIndex := iNdEx
  6015  		var wire uint64
  6016  		for shift := uint(0); ; shift += 7 {
  6017  			if shift >= 64 {
  6018  				return ErrIntOverflowTypes
  6019  			}
  6020  			if iNdEx >= l {
  6021  				return io.ErrUnexpectedEOF
  6022  			}
  6023  			b := dAtA[iNdEx]
  6024  			iNdEx++
  6025  			wire |= uint64(b&0x7F) << shift
  6026  			if b < 0x80 {
  6027  				break
  6028  			}
  6029  		}
  6030  		fieldNum := int32(wire >> 3)
  6031  		wireType := int(wire & 0x7)
  6032  		if wireType == 4 {
  6033  			return fmt.Errorf("proto: OutputState: wiretype end group for non-group")
  6034  		}
  6035  		if fieldNum <= 0 {
  6036  			return fmt.Errorf("proto: OutputState: illegal tag %d (wire type %d)", fieldNum, wire)
  6037  		}
  6038  		switch fieldNum {
  6039  		case 1:
  6040  			if wireType != 0 {
  6041  				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  6042  			}
  6043  			m.Value = 0
  6044  			for shift := uint(0); ; shift += 7 {
  6045  				if shift >= 64 {
  6046  					return ErrIntOverflowTypes
  6047  				}
  6048  				if iNdEx >= l {
  6049  					return io.ErrUnexpectedEOF
  6050  				}
  6051  				b := dAtA[iNdEx]
  6052  				iNdEx++
  6053  				m.Value |= int32(b&0x7F) << shift
  6054  				if b < 0x80 {
  6055  					break
  6056  				}
  6057  			}
  6058  		default:
  6059  			iNdEx = preIndex
  6060  			skippy, err := skipTypes(dAtA[iNdEx:])
  6061  			if err != nil {
  6062  				return err
  6063  			}
  6064  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  6065  				return ErrInvalidLengthTypes
  6066  			}
  6067  			if (iNdEx + skippy) > l {
  6068  				return io.ErrUnexpectedEOF
  6069  			}
  6070  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6071  			iNdEx += skippy
  6072  		}
  6073  	}
  6074  
  6075  	if iNdEx > l {
  6076  		return io.ErrUnexpectedEOF
  6077  	}
  6078  	return nil
  6079  }
  6080  func (m *SwitchRequestsOptions) Unmarshal(dAtA []byte) error {
  6081  	l := len(dAtA)
  6082  	iNdEx := 0
  6083  	for iNdEx < l {
  6084  		preIndex := iNdEx
  6085  		var wire uint64
  6086  		for shift := uint(0); ; shift += 7 {
  6087  			if shift >= 64 {
  6088  				return ErrIntOverflowTypes
  6089  			}
  6090  			if iNdEx >= l {
  6091  				return io.ErrUnexpectedEOF
  6092  			}
  6093  			b := dAtA[iNdEx]
  6094  			iNdEx++
  6095  			wire |= uint64(b&0x7F) << shift
  6096  			if b < 0x80 {
  6097  				break
  6098  			}
  6099  		}
  6100  		fieldNum := int32(wire >> 3)
  6101  		wireType := int(wire & 0x7)
  6102  		if wireType == 4 {
  6103  			return fmt.Errorf("proto: SwitchRequestsOptions: wiretype end group for non-group")
  6104  		}
  6105  		if fieldNum <= 0 {
  6106  			return fmt.Errorf("proto: SwitchRequestsOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  6107  		}
  6108  		switch fieldNum {
  6109  		case 1:
  6110  			if wireType != 0 {
  6111  				return fmt.Errorf("proto: wrong wireType = %d for field ManualConfirm", wireType)
  6112  			}
  6113  			var v int
  6114  			for shift := uint(0); ; shift += 7 {
  6115  				if shift >= 64 {
  6116  					return ErrIntOverflowTypes
  6117  				}
  6118  				if iNdEx >= l {
  6119  					return io.ErrUnexpectedEOF
  6120  				}
  6121  				b := dAtA[iNdEx]
  6122  				iNdEx++
  6123  				v |= int(b&0x7F) << shift
  6124  				if b < 0x80 {
  6125  					break
  6126  				}
  6127  			}
  6128  			m.ManualConfirm = bool(v != 0)
  6129  		case 2:
  6130  			if wireType != 2 {
  6131  				return fmt.Errorf("proto: wrong wireType = %d for field ModuleId", wireType)
  6132  			}
  6133  			var stringLen uint64
  6134  			for shift := uint(0); ; shift += 7 {
  6135  				if shift >= 64 {
  6136  					return ErrIntOverflowTypes
  6137  				}
  6138  				if iNdEx >= l {
  6139  					return io.ErrUnexpectedEOF
  6140  				}
  6141  				b := dAtA[iNdEx]
  6142  				iNdEx++
  6143  				stringLen |= uint64(b&0x7F) << shift
  6144  				if b < 0x80 {
  6145  					break
  6146  				}
  6147  			}
  6148  			intStringLen := int(stringLen)
  6149  			if intStringLen < 0 {
  6150  				return ErrInvalidLengthTypes
  6151  			}
  6152  			postIndex := iNdEx + intStringLen
  6153  			if postIndex < 0 {
  6154  				return ErrInvalidLengthTypes
  6155  			}
  6156  			if postIndex > l {
  6157  				return io.ErrUnexpectedEOF
  6158  			}
  6159  			m.ModuleId = string(dAtA[iNdEx:postIndex])
  6160  			iNdEx = postIndex
  6161  		default:
  6162  			iNdEx = preIndex
  6163  			skippy, err := skipTypes(dAtA[iNdEx:])
  6164  			if err != nil {
  6165  				return err
  6166  			}
  6167  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  6168  				return ErrInvalidLengthTypes
  6169  			}
  6170  			if (iNdEx + skippy) > l {
  6171  				return io.ErrUnexpectedEOF
  6172  			}
  6173  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6174  			iNdEx += skippy
  6175  		}
  6176  	}
  6177  
  6178  	if iNdEx > l {
  6179  		return io.ErrUnexpectedEOF
  6180  	}
  6181  	return nil
  6182  }
  6183  func (m *Switch) Unmarshal(dAtA []byte) error {
  6184  	l := len(dAtA)
  6185  	iNdEx := 0
  6186  	for iNdEx < l {
  6187  		preIndex := iNdEx
  6188  		var wire uint64
  6189  		for shift := uint(0); ; shift += 7 {
  6190  			if shift >= 64 {
  6191  				return ErrIntOverflowTypes
  6192  			}
  6193  			if iNdEx >= l {
  6194  				return io.ErrUnexpectedEOF
  6195  			}
  6196  			b := dAtA[iNdEx]
  6197  			iNdEx++
  6198  			wire |= uint64(b&0x7F) << shift
  6199  			if b < 0x80 {
  6200  				break
  6201  			}
  6202  		}
  6203  		fieldNum := int32(wire >> 3)
  6204  		wireType := int(wire & 0x7)
  6205  		if wireType == 4 {
  6206  			return fmt.Errorf("proto: Switch: wiretype end group for non-group")
  6207  		}
  6208  		if fieldNum <= 0 {
  6209  			return fmt.Errorf("proto: Switch: illegal tag %d (wire type %d)", fieldNum, wire)
  6210  		}
  6211  		switch fieldNum {
  6212  		case 1:
  6213  			if wireType != 2 {
  6214  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  6215  			}
  6216  			var stringLen uint64
  6217  			for shift := uint(0); ; shift += 7 {
  6218  				if shift >= 64 {
  6219  					return ErrIntOverflowTypes
  6220  				}
  6221  				if iNdEx >= l {
  6222  					return io.ErrUnexpectedEOF
  6223  				}
  6224  				b := dAtA[iNdEx]
  6225  				iNdEx++
  6226  				stringLen |= uint64(b&0x7F) << shift
  6227  				if b < 0x80 {
  6228  					break
  6229  				}
  6230  			}
  6231  			intStringLen := int(stringLen)
  6232  			if intStringLen < 0 {
  6233  				return ErrInvalidLengthTypes
  6234  			}
  6235  			postIndex := iNdEx + intStringLen
  6236  			if postIndex < 0 {
  6237  				return ErrInvalidLengthTypes
  6238  			}
  6239  			if postIndex > l {
  6240  				return io.ErrUnexpectedEOF
  6241  			}
  6242  			m.Address = ObjectAddress(dAtA[iNdEx:postIndex])
  6243  			iNdEx = postIndex
  6244  		case 2:
  6245  			if wireType != 2 {
  6246  				return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
  6247  			}
  6248  			var msglen int
  6249  			for shift := uint(0); ; shift += 7 {
  6250  				if shift >= 64 {
  6251  					return ErrIntOverflowTypes
  6252  				}
  6253  				if iNdEx >= l {
  6254  					return io.ErrUnexpectedEOF
  6255  				}
  6256  				b := dAtA[iNdEx]
  6257  				iNdEx++
  6258  				msglen |= int(b&0x7F) << shift
  6259  				if b < 0x80 {
  6260  					break
  6261  				}
  6262  			}
  6263  			if msglen < 0 {
  6264  				return ErrInvalidLengthTypes
  6265  			}
  6266  			postIndex := iNdEx + msglen
  6267  			if postIndex < 0 {
  6268  				return ErrInvalidLengthTypes
  6269  			}
  6270  			if postIndex > l {
  6271  				return io.ErrUnexpectedEOF
  6272  			}
  6273  			if m.Request == nil {
  6274  				m.Request = &SwitchState{}
  6275  			}
  6276  			if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6277  				return err
  6278  			}
  6279  			iNdEx = postIndex
  6280  		case 3:
  6281  			if wireType != 2 {
  6282  				return fmt.Errorf("proto: wrong wireType = %d for field Actual", wireType)
  6283  			}
  6284  			var msglen int
  6285  			for shift := uint(0); ; shift += 7 {
  6286  				if shift >= 64 {
  6287  					return ErrIntOverflowTypes
  6288  				}
  6289  				if iNdEx >= l {
  6290  					return io.ErrUnexpectedEOF
  6291  				}
  6292  				b := dAtA[iNdEx]
  6293  				iNdEx++
  6294  				msglen |= int(b&0x7F) << shift
  6295  				if b < 0x80 {
  6296  					break
  6297  				}
  6298  			}
  6299  			if msglen < 0 {
  6300  				return ErrInvalidLengthTypes
  6301  			}
  6302  			postIndex := iNdEx + msglen
  6303  			if postIndex < 0 {
  6304  				return ErrInvalidLengthTypes
  6305  			}
  6306  			if postIndex > l {
  6307  				return io.ErrUnexpectedEOF
  6308  			}
  6309  			if m.Actual == nil {
  6310  				m.Actual = &SwitchState{}
  6311  			}
  6312  			if err := m.Actual.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6313  				return err
  6314  			}
  6315  			iNdEx = postIndex
  6316  		default:
  6317  			iNdEx = preIndex
  6318  			skippy, err := skipTypes(dAtA[iNdEx:])
  6319  			if err != nil {
  6320  				return err
  6321  			}
  6322  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  6323  				return ErrInvalidLengthTypes
  6324  			}
  6325  			if (iNdEx + skippy) > l {
  6326  				return io.ErrUnexpectedEOF
  6327  			}
  6328  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6329  			iNdEx += skippy
  6330  		}
  6331  	}
  6332  
  6333  	if iNdEx > l {
  6334  		return io.ErrUnexpectedEOF
  6335  	}
  6336  	return nil
  6337  }
  6338  func (m *SwitchState) Unmarshal(dAtA []byte) error {
  6339  	l := len(dAtA)
  6340  	iNdEx := 0
  6341  	for iNdEx < l {
  6342  		preIndex := iNdEx
  6343  		var wire uint64
  6344  		for shift := uint(0); ; shift += 7 {
  6345  			if shift >= 64 {
  6346  				return ErrIntOverflowTypes
  6347  			}
  6348  			if iNdEx >= l {
  6349  				return io.ErrUnexpectedEOF
  6350  			}
  6351  			b := dAtA[iNdEx]
  6352  			iNdEx++
  6353  			wire |= uint64(b&0x7F) << shift
  6354  			if b < 0x80 {
  6355  				break
  6356  			}
  6357  		}
  6358  		fieldNum := int32(wire >> 3)
  6359  		wireType := int(wire & 0x7)
  6360  		if wireType == 4 {
  6361  			return fmt.Errorf("proto: SwitchState: wiretype end group for non-group")
  6362  		}
  6363  		if fieldNum <= 0 {
  6364  			return fmt.Errorf("proto: SwitchState: illegal tag %d (wire type %d)", fieldNum, wire)
  6365  		}
  6366  		switch fieldNum {
  6367  		case 1:
  6368  			if wireType != 0 {
  6369  				return fmt.Errorf("proto: wrong wireType = %d for field Direction", wireType)
  6370  			}
  6371  			m.Direction = 0
  6372  			for shift := uint(0); ; shift += 7 {
  6373  				if shift >= 64 {
  6374  					return ErrIntOverflowTypes
  6375  				}
  6376  				if iNdEx >= l {
  6377  					return io.ErrUnexpectedEOF
  6378  				}
  6379  				b := dAtA[iNdEx]
  6380  				iNdEx++
  6381  				m.Direction |= SwitchDirection(b&0x7F) << shift
  6382  				if b < 0x80 {
  6383  					break
  6384  				}
  6385  			}
  6386  		case 2:
  6387  			if wireType != 0 {
  6388  				return fmt.Errorf("proto: wrong wireType = %d for field IsUsed", wireType)
  6389  			}
  6390  			var v int
  6391  			for shift := uint(0); ; shift += 7 {
  6392  				if shift >= 64 {
  6393  					return ErrIntOverflowTypes
  6394  				}
  6395  				if iNdEx >= l {
  6396  					return io.ErrUnexpectedEOF
  6397  				}
  6398  				b := dAtA[iNdEx]
  6399  				iNdEx++
  6400  				v |= int(b&0x7F) << shift
  6401  				if b < 0x80 {
  6402  					break
  6403  				}
  6404  			}
  6405  			m.IsUsed = bool(v != 0)
  6406  		default:
  6407  			iNdEx = preIndex
  6408  			skippy, err := skipTypes(dAtA[iNdEx:])
  6409  			if err != nil {
  6410  				return err
  6411  			}
  6412  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  6413  				return ErrInvalidLengthTypes
  6414  			}
  6415  			if (iNdEx + skippy) > l {
  6416  				return io.ErrUnexpectedEOF
  6417  			}
  6418  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6419  			iNdEx += skippy
  6420  		}
  6421  	}
  6422  
  6423  	if iNdEx > l {
  6424  		return io.ErrUnexpectedEOF
  6425  	}
  6426  	return nil
  6427  }
  6428  func (m *Clock) Unmarshal(dAtA []byte) error {
  6429  	l := len(dAtA)
  6430  	iNdEx := 0
  6431  	for iNdEx < l {
  6432  		preIndex := iNdEx
  6433  		var wire uint64
  6434  		for shift := uint(0); ; shift += 7 {
  6435  			if shift >= 64 {
  6436  				return ErrIntOverflowTypes
  6437  			}
  6438  			if iNdEx >= l {
  6439  				return io.ErrUnexpectedEOF
  6440  			}
  6441  			b := dAtA[iNdEx]
  6442  			iNdEx++
  6443  			wire |= uint64(b&0x7F) << shift
  6444  			if b < 0x80 {
  6445  				break
  6446  			}
  6447  		}
  6448  		fieldNum := int32(wire >> 3)
  6449  		wireType := int(wire & 0x7)
  6450  		if wireType == 4 {
  6451  			return fmt.Errorf("proto: Clock: wiretype end group for non-group")
  6452  		}
  6453  		if fieldNum <= 0 {
  6454  			return fmt.Errorf("proto: Clock: illegal tag %d (wire type %d)", fieldNum, wire)
  6455  		}
  6456  		switch fieldNum {
  6457  		case 1:
  6458  			if wireType != 0 {
  6459  				return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType)
  6460  			}
  6461  			m.Period = 0
  6462  			for shift := uint(0); ; shift += 7 {
  6463  				if shift >= 64 {
  6464  					return ErrIntOverflowTypes
  6465  				}
  6466  				if iNdEx >= l {
  6467  					return io.ErrUnexpectedEOF
  6468  				}
  6469  				b := dAtA[iNdEx]
  6470  				iNdEx++
  6471  				m.Period |= TimePeriod(b&0x7F) << shift
  6472  				if b < 0x80 {
  6473  					break
  6474  				}
  6475  			}
  6476  		case 2:
  6477  			if wireType != 0 {
  6478  				return fmt.Errorf("proto: wrong wireType = %d for field Hours", wireType)
  6479  			}
  6480  			m.Hours = 0
  6481  			for shift := uint(0); ; shift += 7 {
  6482  				if shift >= 64 {
  6483  					return ErrIntOverflowTypes
  6484  				}
  6485  				if iNdEx >= l {
  6486  					return io.ErrUnexpectedEOF
  6487  				}
  6488  				b := dAtA[iNdEx]
  6489  				iNdEx++
  6490  				m.Hours |= int32(b&0x7F) << shift
  6491  				if b < 0x80 {
  6492  					break
  6493  				}
  6494  			}
  6495  		case 3:
  6496  			if wireType != 0 {
  6497  				return fmt.Errorf("proto: wrong wireType = %d for field Minutes", wireType)
  6498  			}
  6499  			m.Minutes = 0
  6500  			for shift := uint(0); ; shift += 7 {
  6501  				if shift >= 64 {
  6502  					return ErrIntOverflowTypes
  6503  				}
  6504  				if iNdEx >= l {
  6505  					return io.ErrUnexpectedEOF
  6506  				}
  6507  				b := dAtA[iNdEx]
  6508  				iNdEx++
  6509  				m.Minutes |= int32(b&0x7F) << shift
  6510  				if b < 0x80 {
  6511  					break
  6512  				}
  6513  			}
  6514  		case 4:
  6515  			if wireType != 0 {
  6516  				return fmt.Errorf("proto: wrong wireType = %d for field Unixtime", wireType)
  6517  			}
  6518  			m.Unixtime = 0
  6519  			for shift := uint(0); ; shift += 7 {
  6520  				if shift >= 64 {
  6521  					return ErrIntOverflowTypes
  6522  				}
  6523  				if iNdEx >= l {
  6524  					return io.ErrUnexpectedEOF
  6525  				}
  6526  				b := dAtA[iNdEx]
  6527  				iNdEx++
  6528  				m.Unixtime |= int64(b&0x7F) << shift
  6529  				if b < 0x80 {
  6530  					break
  6531  				}
  6532  			}
  6533  		default:
  6534  			iNdEx = preIndex
  6535  			skippy, err := skipTypes(dAtA[iNdEx:])
  6536  			if err != nil {
  6537  				return err
  6538  			}
  6539  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  6540  				return ErrInvalidLengthTypes
  6541  			}
  6542  			if (iNdEx + skippy) > l {
  6543  				return io.ErrUnexpectedEOF
  6544  			}
  6545  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6546  			iNdEx += skippy
  6547  		}
  6548  	}
  6549  
  6550  	if iNdEx > l {
  6551  		return io.ErrUnexpectedEOF
  6552  	}
  6553  	return nil
  6554  }
  6555  func (m *Device) Unmarshal(dAtA []byte) error {
  6556  	l := len(dAtA)
  6557  	iNdEx := 0
  6558  	for iNdEx < l {
  6559  		preIndex := iNdEx
  6560  		var wire uint64
  6561  		for shift := uint(0); ; shift += 7 {
  6562  			if shift >= 64 {
  6563  				return ErrIntOverflowTypes
  6564  			}
  6565  			if iNdEx >= l {
  6566  				return io.ErrUnexpectedEOF
  6567  			}
  6568  			b := dAtA[iNdEx]
  6569  			iNdEx++
  6570  			wire |= uint64(b&0x7F) << shift
  6571  			if b < 0x80 {
  6572  				break
  6573  			}
  6574  		}
  6575  		fieldNum := int32(wire >> 3)
  6576  		wireType := int(wire & 0x7)
  6577  		if wireType == 4 {
  6578  			return fmt.Errorf("proto: Device: wiretype end group for non-group")
  6579  		}
  6580  		if fieldNum <= 0 {
  6581  			return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
  6582  		}
  6583  		switch fieldNum {
  6584  		case 1:
  6585  			if wireType != 2 {
  6586  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  6587  			}
  6588  			var stringLen uint64
  6589  			for shift := uint(0); ; shift += 7 {
  6590  				if shift >= 64 {
  6591  					return ErrIntOverflowTypes
  6592  				}
  6593  				if iNdEx >= l {
  6594  					return io.ErrUnexpectedEOF
  6595  				}
  6596  				b := dAtA[iNdEx]
  6597  				iNdEx++
  6598  				stringLen |= uint64(b&0x7F) << shift
  6599  				if b < 0x80 {
  6600  					break
  6601  				}
  6602  			}
  6603  			intStringLen := int(stringLen)
  6604  			if intStringLen < 0 {
  6605  				return ErrInvalidLengthTypes
  6606  			}
  6607  			postIndex := iNdEx + intStringLen
  6608  			if postIndex < 0 {
  6609  				return ErrInvalidLengthTypes
  6610  			}
  6611  			if postIndex > l {
  6612  				return io.ErrUnexpectedEOF
  6613  			}
  6614  			m.Id = DeviceID(dAtA[iNdEx:postIndex])
  6615  			iNdEx = postIndex
  6616  		case 2:
  6617  			if wireType != 2 {
  6618  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  6619  			}
  6620  			var stringLen uint64
  6621  			for shift := uint(0); ; shift += 7 {
  6622  				if shift >= 64 {
  6623  					return ErrIntOverflowTypes
  6624  				}
  6625  				if iNdEx >= l {
  6626  					return io.ErrUnexpectedEOF
  6627  				}
  6628  				b := dAtA[iNdEx]
  6629  				iNdEx++
  6630  				stringLen |= uint64(b&0x7F) << shift
  6631  				if b < 0x80 {
  6632  					break
  6633  				}
  6634  			}
  6635  			intStringLen := int(stringLen)
  6636  			if intStringLen < 0 {
  6637  				return ErrInvalidLengthTypes
  6638  			}
  6639  			postIndex := iNdEx + intStringLen
  6640  			if postIndex < 0 {
  6641  				return ErrInvalidLengthTypes
  6642  			}
  6643  			if postIndex > l {
  6644  				return io.ErrUnexpectedEOF
  6645  			}
  6646  			m.Type = DeviceType(dAtA[iNdEx:postIndex])
  6647  			iNdEx = postIndex
  6648  		case 3:
  6649  			if wireType != 2 {
  6650  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  6651  			}
  6652  			var stringLen uint64
  6653  			for shift := uint(0); ; shift += 7 {
  6654  				if shift >= 64 {
  6655  					return ErrIntOverflowTypes
  6656  				}
  6657  				if iNdEx >= l {
  6658  					return io.ErrUnexpectedEOF
  6659  				}
  6660  				b := dAtA[iNdEx]
  6661  				iNdEx++
  6662  				stringLen |= uint64(b&0x7F) << shift
  6663  				if b < 0x80 {
  6664  					break
  6665  				}
  6666  			}
  6667  			intStringLen := int(stringLen)
  6668  			if intStringLen < 0 {
  6669  				return ErrInvalidLengthTypes
  6670  			}
  6671  			postIndex := iNdEx + intStringLen
  6672  			if postIndex < 0 {
  6673  				return ErrInvalidLengthTypes
  6674  			}
  6675  			if postIndex > l {
  6676  				return io.ErrUnexpectedEOF
  6677  			}
  6678  			m.Address = string(dAtA[iNdEx:postIndex])
  6679  			iNdEx = postIndex
  6680  		default:
  6681  			iNdEx = preIndex
  6682  			skippy, err := skipTypes(dAtA[iNdEx:])
  6683  			if err != nil {
  6684  				return err
  6685  			}
  6686  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  6687  				return ErrInvalidLengthTypes
  6688  			}
  6689  			if (iNdEx + skippy) > l {
  6690  				return io.ErrUnexpectedEOF
  6691  			}
  6692  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6693  			iNdEx += skippy
  6694  		}
  6695  	}
  6696  
  6697  	if iNdEx > l {
  6698  		return io.ErrUnexpectedEOF
  6699  	}
  6700  	return nil
  6701  }
  6702  func (m *Object) Unmarshal(dAtA []byte) error {
  6703  	l := len(dAtA)
  6704  	iNdEx := 0
  6705  	for iNdEx < l {
  6706  		preIndex := iNdEx
  6707  		var wire uint64
  6708  		for shift := uint(0); ; shift += 7 {
  6709  			if shift >= 64 {
  6710  				return ErrIntOverflowTypes
  6711  			}
  6712  			if iNdEx >= l {
  6713  				return io.ErrUnexpectedEOF
  6714  			}
  6715  			b := dAtA[iNdEx]
  6716  			iNdEx++
  6717  			wire |= uint64(b&0x7F) << shift
  6718  			if b < 0x80 {
  6719  				break
  6720  			}
  6721  		}
  6722  		fieldNum := int32(wire >> 3)
  6723  		wireType := int(wire & 0x7)
  6724  		if wireType == 4 {
  6725  			return fmt.Errorf("proto: Object: wiretype end group for non-group")
  6726  		}
  6727  		if fieldNum <= 0 {
  6728  			return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire)
  6729  		}
  6730  		switch fieldNum {
  6731  		case 1:
  6732  			if wireType != 2 {
  6733  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  6734  			}
  6735  			var stringLen uint64
  6736  			for shift := uint(0); ; shift += 7 {
  6737  				if shift >= 64 {
  6738  					return ErrIntOverflowTypes
  6739  				}
  6740  				if iNdEx >= l {
  6741  					return io.ErrUnexpectedEOF
  6742  				}
  6743  				b := dAtA[iNdEx]
  6744  				iNdEx++
  6745  				stringLen |= uint64(b&0x7F) << shift
  6746  				if b < 0x80 {
  6747  					break
  6748  				}
  6749  			}
  6750  			intStringLen := int(stringLen)
  6751  			if intStringLen < 0 {
  6752  				return ErrInvalidLengthTypes
  6753  			}
  6754  			postIndex := iNdEx + intStringLen
  6755  			if postIndex < 0 {
  6756  				return ErrInvalidLengthTypes
  6757  			}
  6758  			if postIndex > l {
  6759  				return io.ErrUnexpectedEOF
  6760  			}
  6761  			m.Id = ObjectID(dAtA[iNdEx:postIndex])
  6762  			iNdEx = postIndex
  6763  		case 2:
  6764  			if wireType != 2 {
  6765  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  6766  			}
  6767  			var stringLen uint64
  6768  			for shift := uint(0); ; shift += 7 {
  6769  				if shift >= 64 {
  6770  					return ErrIntOverflowTypes
  6771  				}
  6772  				if iNdEx >= l {
  6773  					return io.ErrUnexpectedEOF
  6774  				}
  6775  				b := dAtA[iNdEx]
  6776  				iNdEx++
  6777  				stringLen |= uint64(b&0x7F) << shift
  6778  				if b < 0x80 {
  6779  					break
  6780  				}
  6781  			}
  6782  			intStringLen := int(stringLen)
  6783  			if intStringLen < 0 {
  6784  				return ErrInvalidLengthTypes
  6785  			}
  6786  			postIndex := iNdEx + intStringLen
  6787  			if postIndex < 0 {
  6788  				return ErrInvalidLengthTypes
  6789  			}
  6790  			if postIndex > l {
  6791  				return io.ErrUnexpectedEOF
  6792  			}
  6793  			m.Type = ObjectType(dAtA[iNdEx:postIndex])
  6794  			iNdEx = postIndex
  6795  		case 3:
  6796  			if wireType != 2 {
  6797  				return fmt.Errorf("proto: wrong wireType = %d for field Connections", wireType)
  6798  			}
  6799  			var msglen int
  6800  			for shift := uint(0); ; shift += 7 {
  6801  				if shift >= 64 {
  6802  					return ErrIntOverflowTypes
  6803  				}
  6804  				if iNdEx >= l {
  6805  					return io.ErrUnexpectedEOF
  6806  				}
  6807  				b := dAtA[iNdEx]
  6808  				iNdEx++
  6809  				msglen |= int(b&0x7F) << shift
  6810  				if b < 0x80 {
  6811  					break
  6812  				}
  6813  			}
  6814  			if msglen < 0 {
  6815  				return ErrInvalidLengthTypes
  6816  			}
  6817  			postIndex := iNdEx + msglen
  6818  			if postIndex < 0 {
  6819  				return ErrInvalidLengthTypes
  6820  			}
  6821  			if postIndex > l {
  6822  				return io.ErrUnexpectedEOF
  6823  			}
  6824  			m.Connections = append(m.Connections, &Connection{})
  6825  			if err := m.Connections[len(m.Connections)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6826  				return err
  6827  			}
  6828  			iNdEx = postIndex
  6829  		case 4:
  6830  			if wireType != 2 {
  6831  				return fmt.Errorf("proto: wrong wireType = %d for field Configuration", wireType)
  6832  			}
  6833  			var msglen int
  6834  			for shift := uint(0); ; shift += 7 {
  6835  				if shift >= 64 {
  6836  					return ErrIntOverflowTypes
  6837  				}
  6838  				if iNdEx >= l {
  6839  					return io.ErrUnexpectedEOF
  6840  				}
  6841  				b := dAtA[iNdEx]
  6842  				iNdEx++
  6843  				msglen |= int(b&0x7F) << shift
  6844  				if b < 0x80 {
  6845  					break
  6846  				}
  6847  			}
  6848  			if msglen < 0 {
  6849  				return ErrInvalidLengthTypes
  6850  			}
  6851  			postIndex := iNdEx + msglen
  6852  			if postIndex < 0 {
  6853  				return ErrInvalidLengthTypes
  6854  			}
  6855  			if postIndex > l {
  6856  				return io.ErrUnexpectedEOF
  6857  			}
  6858  			if m.Configuration == nil {
  6859  				m.Configuration = make(map[ObjectConfigKey]string)
  6860  			}
  6861  			var mapkey ObjectConfigKey
  6862  			var mapvalue string
  6863  			for iNdEx < postIndex {
  6864  				entryPreIndex := iNdEx
  6865  				var wire uint64
  6866  				for shift := uint(0); ; shift += 7 {
  6867  					if shift >= 64 {
  6868  						return ErrIntOverflowTypes
  6869  					}
  6870  					if iNdEx >= l {
  6871  						return io.ErrUnexpectedEOF
  6872  					}
  6873  					b := dAtA[iNdEx]
  6874  					iNdEx++
  6875  					wire |= uint64(b&0x7F) << shift
  6876  					if b < 0x80 {
  6877  						break
  6878  					}
  6879  				}
  6880  				fieldNum := int32(wire >> 3)
  6881  				if fieldNum == 1 {
  6882  					var stringLenmapkey uint64
  6883  					for shift := uint(0); ; shift += 7 {
  6884  						if shift >= 64 {
  6885  							return ErrIntOverflowTypes
  6886  						}
  6887  						if iNdEx >= l {
  6888  							return io.ErrUnexpectedEOF
  6889  						}
  6890  						b := dAtA[iNdEx]
  6891  						iNdEx++
  6892  						stringLenmapkey |= uint64(b&0x7F) << shift
  6893  						if b < 0x80 {
  6894  							break
  6895  						}
  6896  					}
  6897  					intStringLenmapkey := int(stringLenmapkey)
  6898  					if intStringLenmapkey < 0 {
  6899  						return ErrInvalidLengthTypes
  6900  					}
  6901  					postStringIndexmapkey := iNdEx + intStringLenmapkey
  6902  					if postStringIndexmapkey < 0 {
  6903  						return ErrInvalidLengthTypes
  6904  					}
  6905  					if postStringIndexmapkey > l {
  6906  						return io.ErrUnexpectedEOF
  6907  					}
  6908  					mapkey = ObjectConfigKey(dAtA[iNdEx:postStringIndexmapkey])
  6909  					iNdEx = postStringIndexmapkey
  6910  				} else if fieldNum == 2 {
  6911  					var stringLenmapvalue uint64
  6912  					for shift := uint(0); ; shift += 7 {
  6913  						if shift >= 64 {
  6914  							return ErrIntOverflowTypes
  6915  						}
  6916  						if iNdEx >= l {
  6917  							return io.ErrUnexpectedEOF
  6918  						}
  6919  						b := dAtA[iNdEx]
  6920  						iNdEx++
  6921  						stringLenmapvalue |= uint64(b&0x7F) << shift
  6922  						if b < 0x80 {
  6923  							break
  6924  						}
  6925  					}
  6926  					intStringLenmapvalue := int(stringLenmapvalue)
  6927  					if intStringLenmapvalue < 0 {
  6928  						return ErrInvalidLengthTypes
  6929  					}
  6930  					postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  6931  					if postStringIndexmapvalue < 0 {
  6932  						return ErrInvalidLengthTypes
  6933  					}
  6934  					if postStringIndexmapvalue > l {
  6935  						return io.ErrUnexpectedEOF
  6936  					}
  6937  					mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  6938  					iNdEx = postStringIndexmapvalue
  6939  				} else {
  6940  					iNdEx = entryPreIndex
  6941  					skippy, err := skipTypes(dAtA[iNdEx:])
  6942  					if err != nil {
  6943  						return err
  6944  					}
  6945  					if (skippy < 0) || (iNdEx+skippy) < 0 {
  6946  						return ErrInvalidLengthTypes
  6947  					}
  6948  					if (iNdEx + skippy) > postIndex {
  6949  						return io.ErrUnexpectedEOF
  6950  					}
  6951  					iNdEx += skippy
  6952  				}
  6953  			}
  6954  			m.Configuration[ObjectConfigKey(mapkey)] = mapvalue
  6955  			iNdEx = postIndex
  6956  		default:
  6957  			iNdEx = preIndex
  6958  			skippy, err := skipTypes(dAtA[iNdEx:])
  6959  			if err != nil {
  6960  				return err
  6961  			}
  6962  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  6963  				return ErrInvalidLengthTypes
  6964  			}
  6965  			if (iNdEx + skippy) > l {
  6966  				return io.ErrUnexpectedEOF
  6967  			}
  6968  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  6969  			iNdEx += skippy
  6970  		}
  6971  	}
  6972  
  6973  	if iNdEx > l {
  6974  		return io.ErrUnexpectedEOF
  6975  	}
  6976  	return nil
  6977  }
  6978  func (m *Connection) Unmarshal(dAtA []byte) error {
  6979  	l := len(dAtA)
  6980  	iNdEx := 0
  6981  	for iNdEx < l {
  6982  		preIndex := iNdEx
  6983  		var wire uint64
  6984  		for shift := uint(0); ; shift += 7 {
  6985  			if shift >= 64 {
  6986  				return ErrIntOverflowTypes
  6987  			}
  6988  			if iNdEx >= l {
  6989  				return io.ErrUnexpectedEOF
  6990  			}
  6991  			b := dAtA[iNdEx]
  6992  			iNdEx++
  6993  			wire |= uint64(b&0x7F) << shift
  6994  			if b < 0x80 {
  6995  				break
  6996  			}
  6997  		}
  6998  		fieldNum := int32(wire >> 3)
  6999  		wireType := int(wire & 0x7)
  7000  		if wireType == 4 {
  7001  			return fmt.Errorf("proto: Connection: wiretype end group for non-group")
  7002  		}
  7003  		if fieldNum <= 0 {
  7004  			return fmt.Errorf("proto: Connection: illegal tag %d (wire type %d)", fieldNum, wire)
  7005  		}
  7006  		switch fieldNum {
  7007  		case 1:
  7008  			if wireType != 2 {
  7009  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  7010  			}
  7011  			var stringLen uint64
  7012  			for shift := uint(0); ; shift += 7 {
  7013  				if shift >= 64 {
  7014  					return ErrIntOverflowTypes
  7015  				}
  7016  				if iNdEx >= l {
  7017  					return io.ErrUnexpectedEOF
  7018  				}
  7019  				b := dAtA[iNdEx]
  7020  				iNdEx++
  7021  				stringLen |= uint64(b&0x7F) << shift
  7022  				if b < 0x80 {
  7023  					break
  7024  				}
  7025  			}
  7026  			intStringLen := int(stringLen)
  7027  			if intStringLen < 0 {
  7028  				return ErrInvalidLengthTypes
  7029  			}
  7030  			postIndex := iNdEx + intStringLen
  7031  			if postIndex < 0 {
  7032  				return ErrInvalidLengthTypes
  7033  			}
  7034  			if postIndex > l {
  7035  				return io.ErrUnexpectedEOF
  7036  			}
  7037  			m.Key = ConnectionName(dAtA[iNdEx:postIndex])
  7038  			iNdEx = postIndex
  7039  		case 2:
  7040  			if wireType != 2 {
  7041  				return fmt.Errorf("proto: wrong wireType = %d for field Pins", wireType)
  7042  			}
  7043  			var msglen int
  7044  			for shift := uint(0); ; shift += 7 {
  7045  				if shift >= 64 {
  7046  					return ErrIntOverflowTypes
  7047  				}
  7048  				if iNdEx >= l {
  7049  					return io.ErrUnexpectedEOF
  7050  				}
  7051  				b := dAtA[iNdEx]
  7052  				iNdEx++
  7053  				msglen |= int(b&0x7F) << shift
  7054  				if b < 0x80 {
  7055  					break
  7056  				}
  7057  			}
  7058  			if msglen < 0 {
  7059  				return ErrInvalidLengthTypes
  7060  			}
  7061  			postIndex := iNdEx + msglen
  7062  			if postIndex < 0 {
  7063  				return ErrInvalidLengthTypes
  7064  			}
  7065  			if postIndex > l {
  7066  				return io.ErrUnexpectedEOF
  7067  			}
  7068  			m.Pins = append(m.Pins, &DevicePin{})
  7069  			if err := m.Pins[len(m.Pins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7070  				return err
  7071  			}
  7072  			iNdEx = postIndex
  7073  		case 3:
  7074  			if wireType != 2 {
  7075  				return fmt.Errorf("proto: wrong wireType = %d for field Configuration", wireType)
  7076  			}
  7077  			var msglen int
  7078  			for shift := uint(0); ; shift += 7 {
  7079  				if shift >= 64 {
  7080  					return ErrIntOverflowTypes
  7081  				}
  7082  				if iNdEx >= l {
  7083  					return io.ErrUnexpectedEOF
  7084  				}
  7085  				b := dAtA[iNdEx]
  7086  				iNdEx++
  7087  				msglen |= int(b&0x7F) << shift
  7088  				if b < 0x80 {
  7089  					break
  7090  				}
  7091  			}
  7092  			if msglen < 0 {
  7093  				return ErrInvalidLengthTypes
  7094  			}
  7095  			postIndex := iNdEx + msglen
  7096  			if postIndex < 0 {
  7097  				return ErrInvalidLengthTypes
  7098  			}
  7099  			if postIndex > l {
  7100  				return io.ErrUnexpectedEOF
  7101  			}
  7102  			if m.Configuration == nil {
  7103  				m.Configuration = make(map[ConfigKey]string)
  7104  			}
  7105  			var mapkey ConfigKey
  7106  			var mapvalue string
  7107  			for iNdEx < postIndex {
  7108  				entryPreIndex := iNdEx
  7109  				var wire uint64
  7110  				for shift := uint(0); ; shift += 7 {
  7111  					if shift >= 64 {
  7112  						return ErrIntOverflowTypes
  7113  					}
  7114  					if iNdEx >= l {
  7115  						return io.ErrUnexpectedEOF
  7116  					}
  7117  					b := dAtA[iNdEx]
  7118  					iNdEx++
  7119  					wire |= uint64(b&0x7F) << shift
  7120  					if b < 0x80 {
  7121  						break
  7122  					}
  7123  				}
  7124  				fieldNum := int32(wire >> 3)
  7125  				if fieldNum == 1 {
  7126  					var stringLenmapkey uint64
  7127  					for shift := uint(0); ; shift += 7 {
  7128  						if shift >= 64 {
  7129  							return ErrIntOverflowTypes
  7130  						}
  7131  						if iNdEx >= l {
  7132  							return io.ErrUnexpectedEOF
  7133  						}
  7134  						b := dAtA[iNdEx]
  7135  						iNdEx++
  7136  						stringLenmapkey |= uint64(b&0x7F) << shift
  7137  						if b < 0x80 {
  7138  							break
  7139  						}
  7140  					}
  7141  					intStringLenmapkey := int(stringLenmapkey)
  7142  					if intStringLenmapkey < 0 {
  7143  						return ErrInvalidLengthTypes
  7144  					}
  7145  					postStringIndexmapkey := iNdEx + intStringLenmapkey
  7146  					if postStringIndexmapkey < 0 {
  7147  						return ErrInvalidLengthTypes
  7148  					}
  7149  					if postStringIndexmapkey > l {
  7150  						return io.ErrUnexpectedEOF
  7151  					}
  7152  					mapkey = ConfigKey(dAtA[iNdEx:postStringIndexmapkey])
  7153  					iNdEx = postStringIndexmapkey
  7154  				} else if fieldNum == 2 {
  7155  					var stringLenmapvalue uint64
  7156  					for shift := uint(0); ; shift += 7 {
  7157  						if shift >= 64 {
  7158  							return ErrIntOverflowTypes
  7159  						}
  7160  						if iNdEx >= l {
  7161  							return io.ErrUnexpectedEOF
  7162  						}
  7163  						b := dAtA[iNdEx]
  7164  						iNdEx++
  7165  						stringLenmapvalue |= uint64(b&0x7F) << shift
  7166  						if b < 0x80 {
  7167  							break
  7168  						}
  7169  					}
  7170  					intStringLenmapvalue := int(stringLenmapvalue)
  7171  					if intStringLenmapvalue < 0 {
  7172  						return ErrInvalidLengthTypes
  7173  					}
  7174  					postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  7175  					if postStringIndexmapvalue < 0 {
  7176  						return ErrInvalidLengthTypes
  7177  					}
  7178  					if postStringIndexmapvalue > l {
  7179  						return io.ErrUnexpectedEOF
  7180  					}
  7181  					mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  7182  					iNdEx = postStringIndexmapvalue
  7183  				} else {
  7184  					iNdEx = entryPreIndex
  7185  					skippy, err := skipTypes(dAtA[iNdEx:])
  7186  					if err != nil {
  7187  						return err
  7188  					}
  7189  					if (skippy < 0) || (iNdEx+skippy) < 0 {
  7190  						return ErrInvalidLengthTypes
  7191  					}
  7192  					if (iNdEx + skippy) > postIndex {
  7193  						return io.ErrUnexpectedEOF
  7194  					}
  7195  					iNdEx += skippy
  7196  				}
  7197  			}
  7198  			m.Configuration[ConfigKey(mapkey)] = mapvalue
  7199  			iNdEx = postIndex
  7200  		default:
  7201  			iNdEx = preIndex
  7202  			skippy, err := skipTypes(dAtA[iNdEx:])
  7203  			if err != nil {
  7204  				return err
  7205  			}
  7206  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  7207  				return ErrInvalidLengthTypes
  7208  			}
  7209  			if (iNdEx + skippy) > l {
  7210  				return io.ErrUnexpectedEOF
  7211  			}
  7212  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  7213  			iNdEx += skippy
  7214  		}
  7215  	}
  7216  
  7217  	if iNdEx > l {
  7218  		return io.ErrUnexpectedEOF
  7219  	}
  7220  	return nil
  7221  }
  7222  func (m *DevicePin) Unmarshal(dAtA []byte) error {
  7223  	l := len(dAtA)
  7224  	iNdEx := 0
  7225  	for iNdEx < l {
  7226  		preIndex := iNdEx
  7227  		var wire uint64
  7228  		for shift := uint(0); ; shift += 7 {
  7229  			if shift >= 64 {
  7230  				return ErrIntOverflowTypes
  7231  			}
  7232  			if iNdEx >= l {
  7233  				return io.ErrUnexpectedEOF
  7234  			}
  7235  			b := dAtA[iNdEx]
  7236  			iNdEx++
  7237  			wire |= uint64(b&0x7F) << shift
  7238  			if b < 0x80 {
  7239  				break
  7240  			}
  7241  		}
  7242  		fieldNum := int32(wire >> 3)
  7243  		wireType := int(wire & 0x7)
  7244  		if wireType == 4 {
  7245  			return fmt.Errorf("proto: DevicePin: wiretype end group for non-group")
  7246  		}
  7247  		if fieldNum <= 0 {
  7248  			return fmt.Errorf("proto: DevicePin: illegal tag %d (wire type %d)", fieldNum, wire)
  7249  		}
  7250  		switch fieldNum {
  7251  		case 1:
  7252  			if wireType != 2 {
  7253  				return fmt.Errorf("proto: wrong wireType = %d for field DeviceId", wireType)
  7254  			}
  7255  			var stringLen uint64
  7256  			for shift := uint(0); ; shift += 7 {
  7257  				if shift >= 64 {
  7258  					return ErrIntOverflowTypes
  7259  				}
  7260  				if iNdEx >= l {
  7261  					return io.ErrUnexpectedEOF
  7262  				}
  7263  				b := dAtA[iNdEx]
  7264  				iNdEx++
  7265  				stringLen |= uint64(b&0x7F) << shift
  7266  				if b < 0x80 {
  7267  					break
  7268  				}
  7269  			}
  7270  			intStringLen := int(stringLen)
  7271  			if intStringLen < 0 {
  7272  				return ErrInvalidLengthTypes
  7273  			}
  7274  			postIndex := iNdEx + intStringLen
  7275  			if postIndex < 0 {
  7276  				return ErrInvalidLengthTypes
  7277  			}
  7278  			if postIndex > l {
  7279  				return io.ErrUnexpectedEOF
  7280  			}
  7281  			m.DeviceId = DeviceID(dAtA[iNdEx:postIndex])
  7282  			iNdEx = postIndex
  7283  		case 2:
  7284  			if wireType != 0 {
  7285  				return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
  7286  			}
  7287  			m.Index = 0
  7288  			for shift := uint(0); ; shift += 7 {
  7289  				if shift >= 64 {
  7290  					return ErrIntOverflowTypes
  7291  				}
  7292  				if iNdEx >= l {
  7293  					return io.ErrUnexpectedEOF
  7294  				}
  7295  				b := dAtA[iNdEx]
  7296  				iNdEx++
  7297  				m.Index |= DeviceIndex(b&0x7F) << shift
  7298  				if b < 0x80 {
  7299  					break
  7300  				}
  7301  			}
  7302  		default:
  7303  			iNdEx = preIndex
  7304  			skippy, err := skipTypes(dAtA[iNdEx:])
  7305  			if err != nil {
  7306  				return err
  7307  			}
  7308  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  7309  				return ErrInvalidLengthTypes
  7310  			}
  7311  			if (iNdEx + skippy) > l {
  7312  				return io.ErrUnexpectedEOF
  7313  			}
  7314  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  7315  			iNdEx += skippy
  7316  		}
  7317  	}
  7318  
  7319  	if iNdEx > l {
  7320  		return io.ErrUnexpectedEOF
  7321  	}
  7322  	return nil
  7323  }
  7324  func (m *LocalWorkerConfig) Unmarshal(dAtA []byte) error {
  7325  	l := len(dAtA)
  7326  	iNdEx := 0
  7327  	for iNdEx < l {
  7328  		preIndex := iNdEx
  7329  		var wire uint64
  7330  		for shift := uint(0); ; shift += 7 {
  7331  			if shift >= 64 {
  7332  				return ErrIntOverflowTypes
  7333  			}
  7334  			if iNdEx >= l {
  7335  				return io.ErrUnexpectedEOF
  7336  			}
  7337  			b := dAtA[iNdEx]
  7338  			iNdEx++
  7339  			wire |= uint64(b&0x7F) << shift
  7340  			if b < 0x80 {
  7341  				break
  7342  			}
  7343  		}
  7344  		fieldNum := int32(wire >> 3)
  7345  		wireType := int(wire & 0x7)
  7346  		if wireType == 4 {
  7347  			return fmt.Errorf("proto: LocalWorkerConfig: wiretype end group for non-group")
  7348  		}
  7349  		if fieldNum <= 0 {
  7350  			return fmt.Errorf("proto: LocalWorkerConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  7351  		}
  7352  		switch fieldNum {
  7353  		case 1:
  7354  			if wireType != 2 {
  7355  				return fmt.Errorf("proto: wrong wireType = %d for field Alias", wireType)
  7356  			}
  7357  			var stringLen uint64
  7358  			for shift := uint(0); ; shift += 7 {
  7359  				if shift >= 64 {
  7360  					return ErrIntOverflowTypes
  7361  				}
  7362  				if iNdEx >= l {
  7363  					return io.ErrUnexpectedEOF
  7364  				}
  7365  				b := dAtA[iNdEx]
  7366  				iNdEx++
  7367  				stringLen |= uint64(b&0x7F) << shift
  7368  				if b < 0x80 {
  7369  					break
  7370  				}
  7371  			}
  7372  			intStringLen := int(stringLen)
  7373  			if intStringLen < 0 {
  7374  				return ErrInvalidLengthTypes
  7375  			}
  7376  			postIndex := iNdEx + intStringLen
  7377  			if postIndex < 0 {
  7378  				return ErrInvalidLengthTypes
  7379  			}
  7380  			if postIndex > l {
  7381  				return io.ErrUnexpectedEOF
  7382  			}
  7383  			m.Alias = string(dAtA[iNdEx:postIndex])
  7384  			iNdEx = postIndex
  7385  		case 2:
  7386  			if wireType != 2 {
  7387  				return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  7388  			}
  7389  			var msglen int
  7390  			for shift := uint(0); ; shift += 7 {
  7391  				if shift >= 64 {
  7392  					return ErrIntOverflowTypes
  7393  				}
  7394  				if iNdEx >= l {
  7395  					return io.ErrUnexpectedEOF
  7396  				}
  7397  				b := dAtA[iNdEx]
  7398  				iNdEx++
  7399  				msglen |= int(b&0x7F) << shift
  7400  				if b < 0x80 {
  7401  					break
  7402  				}
  7403  			}
  7404  			if msglen < 0 {
  7405  				return ErrInvalidLengthTypes
  7406  			}
  7407  			postIndex := iNdEx + msglen
  7408  			if postIndex < 0 {
  7409  				return ErrInvalidLengthTypes
  7410  			}
  7411  			if postIndex > l {
  7412  				return io.ErrUnexpectedEOF
  7413  			}
  7414  			m.Devices = append(m.Devices, &Device{})
  7415  			if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7416  				return err
  7417  			}
  7418  			iNdEx = postIndex
  7419  		case 3:
  7420  			if wireType != 2 {
  7421  				return fmt.Errorf("proto: wrong wireType = %d for field Objects", wireType)
  7422  			}
  7423  			var msglen int
  7424  			for shift := uint(0); ; shift += 7 {
  7425  				if shift >= 64 {
  7426  					return ErrIntOverflowTypes
  7427  				}
  7428  				if iNdEx >= l {
  7429  					return io.ErrUnexpectedEOF
  7430  				}
  7431  				b := dAtA[iNdEx]
  7432  				iNdEx++
  7433  				msglen |= int(b&0x7F) << shift
  7434  				if b < 0x80 {
  7435  					break
  7436  				}
  7437  			}
  7438  			if msglen < 0 {
  7439  				return ErrInvalidLengthTypes
  7440  			}
  7441  			postIndex := iNdEx + msglen
  7442  			if postIndex < 0 {
  7443  				return ErrInvalidLengthTypes
  7444  			}
  7445  			if postIndex > l {
  7446  				return io.ErrUnexpectedEOF
  7447  			}
  7448  			m.Objects = append(m.Objects, &Object{})
  7449  			if err := m.Objects[len(m.Objects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7450  				return err
  7451  			}
  7452  			iNdEx = postIndex
  7453  		case 4:
  7454  			if wireType != 0 {
  7455  				return fmt.Errorf("proto: wrong wireType = %d for field Unixtime", wireType)
  7456  			}
  7457  			m.Unixtime = 0
  7458  			for shift := uint(0); ; shift += 7 {
  7459  				if shift >= 64 {
  7460  					return ErrIntOverflowTypes
  7461  				}
  7462  				if iNdEx >= l {
  7463  					return io.ErrUnexpectedEOF
  7464  				}
  7465  				b := dAtA[iNdEx]
  7466  				iNdEx++
  7467  				m.Unixtime |= int64(b&0x7F) << shift
  7468  				if b < 0x80 {
  7469  					break
  7470  				}
  7471  			}
  7472  		case 5:
  7473  			if wireType != 2 {
  7474  				return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  7475  			}
  7476  			var stringLen uint64
  7477  			for shift := uint(0); ; shift += 7 {
  7478  				if shift >= 64 {
  7479  					return ErrIntOverflowTypes
  7480  				}
  7481  				if iNdEx >= l {
  7482  					return io.ErrUnexpectedEOF
  7483  				}
  7484  				b := dAtA[iNdEx]
  7485  				iNdEx++
  7486  				stringLen |= uint64(b&0x7F) << shift
  7487  				if b < 0x80 {
  7488  					break
  7489  				}
  7490  			}
  7491  			intStringLen := int(stringLen)
  7492  			if intStringLen < 0 {
  7493  				return ErrInvalidLengthTypes
  7494  			}
  7495  			postIndex := iNdEx + intStringLen
  7496  			if postIndex < 0 {
  7497  				return ErrInvalidLengthTypes
  7498  			}
  7499  			if postIndex > l {
  7500  				return io.ErrUnexpectedEOF
  7501  			}
  7502  			m.Hash = string(dAtA[iNdEx:postIndex])
  7503  			iNdEx = postIndex
  7504  		default:
  7505  			iNdEx = preIndex
  7506  			skippy, err := skipTypes(dAtA[iNdEx:])
  7507  			if err != nil {
  7508  				return err
  7509  			}
  7510  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  7511  				return ErrInvalidLengthTypes
  7512  			}
  7513  			if (iNdEx + skippy) > l {
  7514  				return io.ErrUnexpectedEOF
  7515  			}
  7516  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  7517  			iNdEx += skippy
  7518  		}
  7519  	}
  7520  
  7521  	if iNdEx > l {
  7522  		return io.ErrUnexpectedEOF
  7523  	}
  7524  	return nil
  7525  }
  7526  func (m *LocalWorker) Unmarshal(dAtA []byte) error {
  7527  	l := len(dAtA)
  7528  	iNdEx := 0
  7529  	for iNdEx < l {
  7530  		preIndex := iNdEx
  7531  		var wire uint64
  7532  		for shift := uint(0); ; shift += 7 {
  7533  			if shift >= 64 {
  7534  				return ErrIntOverflowTypes
  7535  			}
  7536  			if iNdEx >= l {
  7537  				return io.ErrUnexpectedEOF
  7538  			}
  7539  			b := dAtA[iNdEx]
  7540  			iNdEx++
  7541  			wire |= uint64(b&0x7F) << shift
  7542  			if b < 0x80 {
  7543  				break
  7544  			}
  7545  		}
  7546  		fieldNum := int32(wire >> 3)
  7547  		wireType := int(wire & 0x7)
  7548  		if wireType == 4 {
  7549  			return fmt.Errorf("proto: LocalWorker: wiretype end group for non-group")
  7550  		}
  7551  		if fieldNum <= 0 {
  7552  			return fmt.Errorf("proto: LocalWorker: illegal tag %d (wire type %d)", fieldNum, wire)
  7553  		}
  7554  		switch fieldNum {
  7555  		case 1:
  7556  			if wireType != 2 {
  7557  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  7558  			}
  7559  			var stringLen uint64
  7560  			for shift := uint(0); ; shift += 7 {
  7561  				if shift >= 64 {
  7562  					return ErrIntOverflowTypes
  7563  				}
  7564  				if iNdEx >= l {
  7565  					return io.ErrUnexpectedEOF
  7566  				}
  7567  				b := dAtA[iNdEx]
  7568  				iNdEx++
  7569  				stringLen |= uint64(b&0x7F) << shift
  7570  				if b < 0x80 {
  7571  					break
  7572  				}
  7573  			}
  7574  			intStringLen := int(stringLen)
  7575  			if intStringLen < 0 {
  7576  				return ErrInvalidLengthTypes
  7577  			}
  7578  			postIndex := iNdEx + intStringLen
  7579  			if postIndex < 0 {
  7580  				return ErrInvalidLengthTypes
  7581  			}
  7582  			if postIndex > l {
  7583  				return io.ErrUnexpectedEOF
  7584  			}
  7585  			m.Id = string(dAtA[iNdEx:postIndex])
  7586  			iNdEx = postIndex
  7587  		case 2:
  7588  			if wireType != 2 {
  7589  				return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
  7590  			}
  7591  			var msglen int
  7592  			for shift := uint(0); ; shift += 7 {
  7593  				if shift >= 64 {
  7594  					return ErrIntOverflowTypes
  7595  				}
  7596  				if iNdEx >= l {
  7597  					return io.ErrUnexpectedEOF
  7598  				}
  7599  				b := dAtA[iNdEx]
  7600  				iNdEx++
  7601  				msglen |= int(b&0x7F) << shift
  7602  				if b < 0x80 {
  7603  					break
  7604  				}
  7605  			}
  7606  			if msglen < 0 {
  7607  				return ErrInvalidLengthTypes
  7608  			}
  7609  			postIndex := iNdEx + msglen
  7610  			if postIndex < 0 {
  7611  				return ErrInvalidLengthTypes
  7612  			}
  7613  			if postIndex > l {
  7614  				return io.ErrUnexpectedEOF
  7615  			}
  7616  			if m.Request == nil {
  7617  				m.Request = &LocalWorkerConfig{}
  7618  			}
  7619  			if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7620  				return err
  7621  			}
  7622  			iNdEx = postIndex
  7623  		case 3:
  7624  			if wireType != 2 {
  7625  				return fmt.Errorf("proto: wrong wireType = %d for field Actual", wireType)
  7626  			}
  7627  			var msglen int
  7628  			for shift := uint(0); ; shift += 7 {
  7629  				if shift >= 64 {
  7630  					return ErrIntOverflowTypes
  7631  				}
  7632  				if iNdEx >= l {
  7633  					return io.ErrUnexpectedEOF
  7634  				}
  7635  				b := dAtA[iNdEx]
  7636  				iNdEx++
  7637  				msglen |= int(b&0x7F) << shift
  7638  				if b < 0x80 {
  7639  					break
  7640  				}
  7641  			}
  7642  			if msglen < 0 {
  7643  				return ErrInvalidLengthTypes
  7644  			}
  7645  			postIndex := iNdEx + msglen
  7646  			if postIndex < 0 {
  7647  				return ErrInvalidLengthTypes
  7648  			}
  7649  			if postIndex > l {
  7650  				return io.ErrUnexpectedEOF
  7651  			}
  7652  			if m.Actual == nil {
  7653  				m.Actual = &LocalWorkerInfo{}
  7654  			}
  7655  			if err := m.Actual.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7656  				return err
  7657  			}
  7658  			iNdEx = postIndex
  7659  		default:
  7660  			iNdEx = preIndex
  7661  			skippy, err := skipTypes(dAtA[iNdEx:])
  7662  			if err != nil {
  7663  				return err
  7664  			}
  7665  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  7666  				return ErrInvalidLengthTypes
  7667  			}
  7668  			if (iNdEx + skippy) > l {
  7669  				return io.ErrUnexpectedEOF
  7670  			}
  7671  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  7672  			iNdEx += skippy
  7673  		}
  7674  	}
  7675  
  7676  	if iNdEx > l {
  7677  		return io.ErrUnexpectedEOF
  7678  	}
  7679  	return nil
  7680  }
  7681  func (m *DeviceDiscovery) Unmarshal(dAtA []byte) error {
  7682  	l := len(dAtA)
  7683  	iNdEx := 0
  7684  	for iNdEx < l {
  7685  		preIndex := iNdEx
  7686  		var wire uint64
  7687  		for shift := uint(0); ; shift += 7 {
  7688  			if shift >= 64 {
  7689  				return ErrIntOverflowTypes
  7690  			}
  7691  			if iNdEx >= l {
  7692  				return io.ErrUnexpectedEOF
  7693  			}
  7694  			b := dAtA[iNdEx]
  7695  			iNdEx++
  7696  			wire |= uint64(b&0x7F) << shift
  7697  			if b < 0x80 {
  7698  				break
  7699  			}
  7700  		}
  7701  		fieldNum := int32(wire >> 3)
  7702  		wireType := int(wire & 0x7)
  7703  		if wireType == 4 {
  7704  			return fmt.Errorf("proto: DeviceDiscovery: wiretype end group for non-group")
  7705  		}
  7706  		if fieldNum <= 0 {
  7707  			return fmt.Errorf("proto: DeviceDiscovery: illegal tag %d (wire type %d)", fieldNum, wire)
  7708  		}
  7709  		switch fieldNum {
  7710  		case 1:
  7711  			if wireType != 2 {
  7712  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  7713  			}
  7714  			var stringLen uint64
  7715  			for shift := uint(0); ; shift += 7 {
  7716  				if shift >= 64 {
  7717  					return ErrIntOverflowTypes
  7718  				}
  7719  				if iNdEx >= l {
  7720  					return io.ErrUnexpectedEOF
  7721  				}
  7722  				b := dAtA[iNdEx]
  7723  				iNdEx++
  7724  				stringLen |= uint64(b&0x7F) << shift
  7725  				if b < 0x80 {
  7726  					break
  7727  				}
  7728  			}
  7729  			intStringLen := int(stringLen)
  7730  			if intStringLen < 0 {
  7731  				return ErrInvalidLengthTypes
  7732  			}
  7733  			postIndex := iNdEx + intStringLen
  7734  			if postIndex < 0 {
  7735  				return ErrInvalidLengthTypes
  7736  			}
  7737  			if postIndex > l {
  7738  				return io.ErrUnexpectedEOF
  7739  			}
  7740  			m.Id = string(dAtA[iNdEx:postIndex])
  7741  			iNdEx = postIndex
  7742  		case 2:
  7743  			if wireType != 2 {
  7744  				return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType)
  7745  			}
  7746  			var msglen int
  7747  			for shift := uint(0); ; shift += 7 {
  7748  				if shift >= 64 {
  7749  					return ErrIntOverflowTypes
  7750  				}
  7751  				if iNdEx >= l {
  7752  					return io.ErrUnexpectedEOF
  7753  				}
  7754  				b := dAtA[iNdEx]
  7755  				iNdEx++
  7756  				msglen |= int(b&0x7F) << shift
  7757  				if b < 0x80 {
  7758  					break
  7759  				}
  7760  			}
  7761  			if msglen < 0 {
  7762  				return ErrInvalidLengthTypes
  7763  			}
  7764  			postIndex := iNdEx + msglen
  7765  			if postIndex < 0 {
  7766  				return ErrInvalidLengthTypes
  7767  			}
  7768  			if postIndex > l {
  7769  				return io.ErrUnexpectedEOF
  7770  			}
  7771  			if m.Request == nil {
  7772  				m.Request = &DiscoverRequest{}
  7773  			}
  7774  			if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7775  				return err
  7776  			}
  7777  			iNdEx = postIndex
  7778  		case 3:
  7779  			if wireType != 2 {
  7780  				return fmt.Errorf("proto: wrong wireType = %d for field Actual", wireType)
  7781  			}
  7782  			var msglen int
  7783  			for shift := uint(0); ; shift += 7 {
  7784  				if shift >= 64 {
  7785  					return ErrIntOverflowTypes
  7786  				}
  7787  				if iNdEx >= l {
  7788  					return io.ErrUnexpectedEOF
  7789  				}
  7790  				b := dAtA[iNdEx]
  7791  				iNdEx++
  7792  				msglen |= int(b&0x7F) << shift
  7793  				if b < 0x80 {
  7794  					break
  7795  				}
  7796  			}
  7797  			if msglen < 0 {
  7798  				return ErrInvalidLengthTypes
  7799  			}
  7800  			postIndex := iNdEx + msglen
  7801  			if postIndex < 0 {
  7802  				return ErrInvalidLengthTypes
  7803  			}
  7804  			if postIndex > l {
  7805  				return io.ErrUnexpectedEOF
  7806  			}
  7807  			if m.Actual == nil {
  7808  				m.Actual = &DiscoverResult{}
  7809  			}
  7810  			if err := m.Actual.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7811  				return err
  7812  			}
  7813  			iNdEx = postIndex
  7814  		default:
  7815  			iNdEx = preIndex
  7816  			skippy, err := skipTypes(dAtA[iNdEx:])
  7817  			if err != nil {
  7818  				return err
  7819  			}
  7820  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  7821  				return ErrInvalidLengthTypes
  7822  			}
  7823  			if (iNdEx + skippy) > l {
  7824  				return io.ErrUnexpectedEOF
  7825  			}
  7826  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  7827  			iNdEx += skippy
  7828  		}
  7829  	}
  7830  
  7831  	if iNdEx > l {
  7832  		return io.ErrUnexpectedEOF
  7833  	}
  7834  	return nil
  7835  }
  7836  func (m *DiscoverRequest) Unmarshal(dAtA []byte) error {
  7837  	l := len(dAtA)
  7838  	iNdEx := 0
  7839  	for iNdEx < l {
  7840  		preIndex := iNdEx
  7841  		var wire uint64
  7842  		for shift := uint(0); ; shift += 7 {
  7843  			if shift >= 64 {
  7844  				return ErrIntOverflowTypes
  7845  			}
  7846  			if iNdEx >= l {
  7847  				return io.ErrUnexpectedEOF
  7848  			}
  7849  			b := dAtA[iNdEx]
  7850  			iNdEx++
  7851  			wire |= uint64(b&0x7F) << shift
  7852  			if b < 0x80 {
  7853  				break
  7854  			}
  7855  		}
  7856  		fieldNum := int32(wire >> 3)
  7857  		wireType := int(wire & 0x7)
  7858  		if wireType == 4 {
  7859  			return fmt.Errorf("proto: DiscoverRequest: wiretype end group for non-group")
  7860  		}
  7861  		if fieldNum <= 0 {
  7862  			return fmt.Errorf("proto: DiscoverRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  7863  		}
  7864  		switch fieldNum {
  7865  		case 1:
  7866  			if wireType != 0 {
  7867  				return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType)
  7868  			}
  7869  			m.RequestId = 0
  7870  			for shift := uint(0); ; shift += 7 {
  7871  				if shift >= 64 {
  7872  					return ErrIntOverflowTypes
  7873  				}
  7874  				if iNdEx >= l {
  7875  					return io.ErrUnexpectedEOF
  7876  				}
  7877  				b := dAtA[iNdEx]
  7878  				iNdEx++
  7879  				m.RequestId |= int32(b&0x7F) << shift
  7880  				if b < 0x80 {
  7881  					break
  7882  				}
  7883  			}
  7884  		default:
  7885  			iNdEx = preIndex
  7886  			skippy, err := skipTypes(dAtA[iNdEx:])
  7887  			if err != nil {
  7888  				return err
  7889  			}
  7890  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  7891  				return ErrInvalidLengthTypes
  7892  			}
  7893  			if (iNdEx + skippy) > l {
  7894  				return io.ErrUnexpectedEOF
  7895  			}
  7896  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  7897  			iNdEx += skippy
  7898  		}
  7899  	}
  7900  
  7901  	if iNdEx > l {
  7902  		return io.ErrUnexpectedEOF
  7903  	}
  7904  	return nil
  7905  }
  7906  func (m *DiscoverResult) Unmarshal(dAtA []byte) error {
  7907  	l := len(dAtA)
  7908  	iNdEx := 0
  7909  	for iNdEx < l {
  7910  		preIndex := iNdEx
  7911  		var wire uint64
  7912  		for shift := uint(0); ; shift += 7 {
  7913  			if shift >= 64 {
  7914  				return ErrIntOverflowTypes
  7915  			}
  7916  			if iNdEx >= l {
  7917  				return io.ErrUnexpectedEOF
  7918  			}
  7919  			b := dAtA[iNdEx]
  7920  			iNdEx++
  7921  			wire |= uint64(b&0x7F) << shift
  7922  			if b < 0x80 {
  7923  				break
  7924  			}
  7925  		}
  7926  		fieldNum := int32(wire >> 3)
  7927  		wireType := int(wire & 0x7)
  7928  		if wireType == 4 {
  7929  			return fmt.Errorf("proto: DiscoverResult: wiretype end group for non-group")
  7930  		}
  7931  		if fieldNum <= 0 {
  7932  			return fmt.Errorf("proto: DiscoverResult: illegal tag %d (wire type %d)", fieldNum, wire)
  7933  		}
  7934  		switch fieldNum {
  7935  		case 1:
  7936  			if wireType != 2 {
  7937  				return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
  7938  			}
  7939  			var stringLen uint64
  7940  			for shift := uint(0); ; shift += 7 {
  7941  				if shift >= 64 {
  7942  					return ErrIntOverflowTypes
  7943  				}
  7944  				if iNdEx >= l {
  7945  					return io.ErrUnexpectedEOF
  7946  				}
  7947  				b := dAtA[iNdEx]
  7948  				iNdEx++
  7949  				stringLen |= uint64(b&0x7F) << shift
  7950  				if b < 0x80 {
  7951  					break
  7952  				}
  7953  			}
  7954  			intStringLen := int(stringLen)
  7955  			if intStringLen < 0 {
  7956  				return ErrInvalidLengthTypes
  7957  			}
  7958  			postIndex := iNdEx + intStringLen
  7959  			if postIndex < 0 {
  7960  				return ErrInvalidLengthTypes
  7961  			}
  7962  			if postIndex > l {
  7963  				return io.ErrUnexpectedEOF
  7964  			}
  7965  			m.Id = string(dAtA[iNdEx:postIndex])
  7966  			iNdEx = postIndex
  7967  		case 2:
  7968  			if wireType != 2 {
  7969  				return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  7970  			}
  7971  			var stringLen uint64
  7972  			for shift := uint(0); ; shift += 7 {
  7973  				if shift >= 64 {
  7974  					return ErrIntOverflowTypes
  7975  				}
  7976  				if iNdEx >= l {
  7977  					return io.ErrUnexpectedEOF
  7978  				}
  7979  				b := dAtA[iNdEx]
  7980  				iNdEx++
  7981  				stringLen |= uint64(b&0x7F) << shift
  7982  				if b < 0x80 {
  7983  					break
  7984  				}
  7985  			}
  7986  			intStringLen := int(stringLen)
  7987  			if intStringLen < 0 {
  7988  				return ErrInvalidLengthTypes
  7989  			}
  7990  			postIndex := iNdEx + intStringLen
  7991  			if postIndex < 0 {
  7992  				return ErrInvalidLengthTypes
  7993  			}
  7994  			if postIndex > l {
  7995  				return io.ErrUnexpectedEOF
  7996  			}
  7997  			m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
  7998  			iNdEx = postIndex
  7999  		default:
  8000  			iNdEx = preIndex
  8001  			skippy, err := skipTypes(dAtA[iNdEx:])
  8002  			if err != nil {
  8003  				return err
  8004  			}
  8005  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  8006  				return ErrInvalidLengthTypes
  8007  			}
  8008  			if (iNdEx + skippy) > l {
  8009  				return io.ErrUnexpectedEOF
  8010  			}
  8011  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  8012  			iNdEx += skippy
  8013  		}
  8014  	}
  8015  
  8016  	if iNdEx > l {
  8017  		return io.ErrUnexpectedEOF
  8018  	}
  8019  	return nil
  8020  }
  8021  func skipTypes(dAtA []byte) (n int, err error) {
  8022  	l := len(dAtA)
  8023  	iNdEx := 0
  8024  	depth := 0
  8025  	for iNdEx < l {
  8026  		var wire uint64
  8027  		for shift := uint(0); ; shift += 7 {
  8028  			if shift >= 64 {
  8029  				return 0, ErrIntOverflowTypes
  8030  			}
  8031  			if iNdEx >= l {
  8032  				return 0, io.ErrUnexpectedEOF
  8033  			}
  8034  			b := dAtA[iNdEx]
  8035  			iNdEx++
  8036  			wire |= (uint64(b) & 0x7F) << shift
  8037  			if b < 0x80 {
  8038  				break
  8039  			}
  8040  		}
  8041  		wireType := int(wire & 0x7)
  8042  		switch wireType {
  8043  		case 0:
  8044  			for shift := uint(0); ; shift += 7 {
  8045  				if shift >= 64 {
  8046  					return 0, ErrIntOverflowTypes
  8047  				}
  8048  				if iNdEx >= l {
  8049  					return 0, io.ErrUnexpectedEOF
  8050  				}
  8051  				iNdEx++
  8052  				if dAtA[iNdEx-1] < 0x80 {
  8053  					break
  8054  				}
  8055  			}
  8056  		case 1:
  8057  			iNdEx += 8
  8058  		case 2:
  8059  			var length int
  8060  			for shift := uint(0); ; shift += 7 {
  8061  				if shift >= 64 {
  8062  					return 0, ErrIntOverflowTypes
  8063  				}
  8064  				if iNdEx >= l {
  8065  					return 0, io.ErrUnexpectedEOF
  8066  				}
  8067  				b := dAtA[iNdEx]
  8068  				iNdEx++
  8069  				length |= (int(b) & 0x7F) << shift
  8070  				if b < 0x80 {
  8071  					break
  8072  				}
  8073  			}
  8074  			if length < 0 {
  8075  				return 0, ErrInvalidLengthTypes
  8076  			}
  8077  			iNdEx += length
  8078  		case 3:
  8079  			depth++
  8080  		case 4:
  8081  			if depth == 0 {
  8082  				return 0, ErrUnexpectedEndOfGroupTypes
  8083  			}
  8084  			depth--
  8085  		case 5:
  8086  			iNdEx += 4
  8087  		default:
  8088  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  8089  		}
  8090  		if iNdEx < 0 {
  8091  			return 0, ErrInvalidLengthTypes
  8092  		}
  8093  		if depth == 0 {
  8094  			return iNdEx, nil
  8095  		}
  8096  	}
  8097  	return 0, io.ErrUnexpectedEOF
  8098  }
  8099  
  8100  var (
  8101  	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
  8102  	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
  8103  	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
  8104  )