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

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: onos/topo/config.proto
     3  
     4  package topo
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	_ "github.com/gogo/protobuf/types"
    11  	github_com_gogo_protobuf_types "github.com/gogo/protobuf/types"
    12  	io "io"
    13  	math "math"
    14  	math_bits "math/bits"
    15  	time "time"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var _ = proto.Marshal
    20  var _ = fmt.Errorf
    21  var _ = math.Inf
    22  var _ = time.Kitchen
    23  
    24  // This is a compile-time assertion to ensure that this generated file
    25  // is compatible with the proto package it is being compiled against.
    26  // A compilation error at this line likely means your copy of the
    27  // proto package needs to be updated.
    28  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    29  
    30  // Protocol to interact with a device
    31  type Protocol int32
    32  
    33  const (
    34  	//UNKNOWN_PROTOCOL constant needed to go around proto3 nullifying the 0 values
    35  	Protocol_UNKNOWN_PROTOCOL Protocol = 0
    36  	// GNMI protocol reference
    37  	Protocol_GNMI Protocol = 1
    38  	// P4RUNTIME protocol reference
    39  	Protocol_P4RUNTIME Protocol = 2
    40  	// GNOI protocol reference
    41  	Protocol_GNOI Protocol = 3
    42  	// E2 Control Plane Protocol
    43  	Protocol_E2AP Protocol = 4
    44  )
    45  
    46  var Protocol_name = map[int32]string{
    47  	0: "UNKNOWN_PROTOCOL",
    48  	1: "GNMI",
    49  	2: "P4RUNTIME",
    50  	3: "GNOI",
    51  	4: "E2AP",
    52  }
    53  
    54  var Protocol_value = map[string]int32{
    55  	"UNKNOWN_PROTOCOL": 0,
    56  	"GNMI":             1,
    57  	"P4RUNTIME":        2,
    58  	"GNOI":             3,
    59  	"E2AP":             4,
    60  }
    61  
    62  func (x Protocol) String() string {
    63  	return proto.EnumName(Protocol_name, int32(x))
    64  }
    65  
    66  func (Protocol) EnumDescriptor() ([]byte, []int) {
    67  	return fileDescriptor_6fc2683aefb53254, []int{0}
    68  }
    69  
    70  // ConnectivityState represents the L3 reachability of a device from the service container (e.g. enos-config), independently of gRPC or the service itself (e.g. gNMI)
    71  type ConnectivityState int32
    72  
    73  const (
    74  	//UNKNOWN_CONNECTIVITY_STATE constant needed to go around proto3 nullifying the 0 values
    75  	ConnectivityState_UNKNOWN_CONNECTIVITY_STATE ConnectivityState = 0
    76  	// REACHABLE indicates the the service can reach the device at L3
    77  	ConnectivityState_REACHABLE ConnectivityState = 1
    78  	// UNREACHABLE indicates the the service can't reach the device at L3
    79  	ConnectivityState_UNREACHABLE ConnectivityState = 2
    80  )
    81  
    82  var ConnectivityState_name = map[int32]string{
    83  	0: "UNKNOWN_CONNECTIVITY_STATE",
    84  	1: "REACHABLE",
    85  	2: "UNREACHABLE",
    86  }
    87  
    88  var ConnectivityState_value = map[string]int32{
    89  	"UNKNOWN_CONNECTIVITY_STATE": 0,
    90  	"REACHABLE":                  1,
    91  	"UNREACHABLE":                2,
    92  }
    93  
    94  func (x ConnectivityState) String() string {
    95  	return proto.EnumName(ConnectivityState_name, int32(x))
    96  }
    97  
    98  func (ConnectivityState) EnumDescriptor() ([]byte, []int) {
    99  	return fileDescriptor_6fc2683aefb53254, []int{1}
   100  }
   101  
   102  // ConnectivityState represents the state of a gRPC channel to the device from the service container
   103  type ChannelState int32
   104  
   105  const (
   106  	//UNKNOWN_CHANNEL_STATE constant needed to go around proto3 nullifying the 0 values
   107  	ChannelState_UNKNOWN_CHANNEL_STATE ChannelState = 0
   108  	// CONNECTED indicates the corresponding grpc channel is connected on this device
   109  	ChannelState_CONNECTED ChannelState = 1
   110  	// DISCONNECTED indicates the corresponding grpc channel is not connected on this device
   111  	ChannelState_DISCONNECTED ChannelState = 2
   112  )
   113  
   114  var ChannelState_name = map[int32]string{
   115  	0: "UNKNOWN_CHANNEL_STATE",
   116  	1: "CONNECTED",
   117  	2: "DISCONNECTED",
   118  }
   119  
   120  var ChannelState_value = map[string]int32{
   121  	"UNKNOWN_CHANNEL_STATE": 0,
   122  	"CONNECTED":             1,
   123  	"DISCONNECTED":          2,
   124  }
   125  
   126  func (x ChannelState) String() string {
   127  	return proto.EnumName(ChannelState_name, int32(x))
   128  }
   129  
   130  func (ChannelState) EnumDescriptor() ([]byte, []int) {
   131  	return fileDescriptor_6fc2683aefb53254, []int{2}
   132  }
   133  
   134  // ServiceState represents the state of the gRPC service (e.g. gNMI) to the device from the service container
   135  type ServiceState int32
   136  
   137  const (
   138  	//UNKNOWN_SERVICE_STATE constant needed to go around proto3 nullifying the 0 values
   139  	ServiceState_UNKNOWN_SERVICE_STATE ServiceState = 0
   140  	// AVAILABLE indicates the corresponding grpc service is available
   141  	ServiceState_AVAILABLE ServiceState = 1
   142  	// UNAVAILABLE indicates the corresponding grpc service is not available
   143  	ServiceState_UNAVAILABLE ServiceState = 2
   144  	// CONNECTING indicates the corresponding protocol is in the connecting phase on this device
   145  	ServiceState_CONNECTING ServiceState = 3
   146  )
   147  
   148  var ServiceState_name = map[int32]string{
   149  	0: "UNKNOWN_SERVICE_STATE",
   150  	1: "AVAILABLE",
   151  	2: "UNAVAILABLE",
   152  	3: "CONNECTING",
   153  }
   154  
   155  var ServiceState_value = map[string]int32{
   156  	"UNKNOWN_SERVICE_STATE": 0,
   157  	"AVAILABLE":             1,
   158  	"UNAVAILABLE":           2,
   159  	"CONNECTING":            3,
   160  }
   161  
   162  func (x ServiceState) String() string {
   163  	return proto.EnumName(ServiceState_name, int32(x))
   164  }
   165  
   166  func (ServiceState) EnumDescriptor() ([]byte, []int) {
   167  	return fileDescriptor_6fc2683aefb53254, []int{3}
   168  }
   169  
   170  // Basic asset information
   171  type Asset struct {
   172  	Name         string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   173  	Manufacturer string `protobuf:"bytes,2,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"`
   174  	Model        string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"`
   175  	Serial       string `protobuf:"bytes,4,opt,name=serial,proto3" json:"serial,omitempty"`
   176  	Asset        string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"`
   177  	SwVersion    string `protobuf:"bytes,6,opt,name=sw_version,json=swVersion,proto3" json:"sw_version,omitempty"`
   178  	Role         string `protobuf:"bytes,8,opt,name=role,proto3" json:"role,omitempty"`
   179  }
   180  
   181  func (m *Asset) Reset()         { *m = Asset{} }
   182  func (m *Asset) String() string { return proto.CompactTextString(m) }
   183  func (*Asset) ProtoMessage()    {}
   184  func (*Asset) Descriptor() ([]byte, []int) {
   185  	return fileDescriptor_6fc2683aefb53254, []int{0}
   186  }
   187  func (m *Asset) XXX_Unmarshal(b []byte) error {
   188  	return m.Unmarshal(b)
   189  }
   190  func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   191  	if deterministic {
   192  		return xxx_messageInfo_Asset.Marshal(b, m, deterministic)
   193  	} else {
   194  		b = b[:cap(b)]
   195  		n, err := m.MarshalToSizedBuffer(b)
   196  		if err != nil {
   197  			return nil, err
   198  		}
   199  		return b[:n], nil
   200  	}
   201  }
   202  func (m *Asset) XXX_Merge(src proto.Message) {
   203  	xxx_messageInfo_Asset.Merge(m, src)
   204  }
   205  func (m *Asset) XXX_Size() int {
   206  	return m.Size()
   207  }
   208  func (m *Asset) XXX_DiscardUnknown() {
   209  	xxx_messageInfo_Asset.DiscardUnknown(m)
   210  }
   211  
   212  var xxx_messageInfo_Asset proto.InternalMessageInfo
   213  
   214  func (m *Asset) GetName() string {
   215  	if m != nil {
   216  		return m.Name
   217  	}
   218  	return ""
   219  }
   220  
   221  func (m *Asset) GetManufacturer() string {
   222  	if m != nil {
   223  		return m.Manufacturer
   224  	}
   225  	return ""
   226  }
   227  
   228  func (m *Asset) GetModel() string {
   229  	if m != nil {
   230  		return m.Model
   231  	}
   232  	return ""
   233  }
   234  
   235  func (m *Asset) GetSerial() string {
   236  	if m != nil {
   237  		return m.Serial
   238  	}
   239  	return ""
   240  }
   241  
   242  func (m *Asset) GetAsset() string {
   243  	if m != nil {
   244  		return m.Asset
   245  	}
   246  	return ""
   247  }
   248  
   249  func (m *Asset) GetSwVersion() string {
   250  	if m != nil {
   251  		return m.SwVersion
   252  	}
   253  	return ""
   254  }
   255  
   256  func (m *Asset) GetRole() string {
   257  	if m != nil {
   258  		return m.Role
   259  	}
   260  	return ""
   261  }
   262  
   263  // Configurable device aspect
   264  type Configurable struct {
   265  	Type                 string         `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
   266  	Address              string         `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
   267  	Target               string         `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
   268  	Version              string         `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
   269  	Timeout              *time.Duration `protobuf:"bytes,5,opt,name=timeout,proto3,stdduration" json:"timeout,omitempty"`
   270  	Persistent           bool           `protobuf:"varint,6,opt,name=persistent,proto3" json:"persistent,omitempty"`
   271  	ValidateCapabilities bool           `protobuf:"varint,7,opt,name=validate_capabilities,json=validateCapabilities,proto3" json:"validate_capabilities,omitempty"`
   272  }
   273  
   274  func (m *Configurable) Reset()         { *m = Configurable{} }
   275  func (m *Configurable) String() string { return proto.CompactTextString(m) }
   276  func (*Configurable) ProtoMessage()    {}
   277  func (*Configurable) Descriptor() ([]byte, []int) {
   278  	return fileDescriptor_6fc2683aefb53254, []int{1}
   279  }
   280  func (m *Configurable) XXX_Unmarshal(b []byte) error {
   281  	return m.Unmarshal(b)
   282  }
   283  func (m *Configurable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   284  	if deterministic {
   285  		return xxx_messageInfo_Configurable.Marshal(b, m, deterministic)
   286  	} else {
   287  		b = b[:cap(b)]
   288  		n, err := m.MarshalToSizedBuffer(b)
   289  		if err != nil {
   290  			return nil, err
   291  		}
   292  		return b[:n], nil
   293  	}
   294  }
   295  func (m *Configurable) XXX_Merge(src proto.Message) {
   296  	xxx_messageInfo_Configurable.Merge(m, src)
   297  }
   298  func (m *Configurable) XXX_Size() int {
   299  	return m.Size()
   300  }
   301  func (m *Configurable) XXX_DiscardUnknown() {
   302  	xxx_messageInfo_Configurable.DiscardUnknown(m)
   303  }
   304  
   305  var xxx_messageInfo_Configurable proto.InternalMessageInfo
   306  
   307  func (m *Configurable) GetType() string {
   308  	if m != nil {
   309  		return m.Type
   310  	}
   311  	return ""
   312  }
   313  
   314  func (m *Configurable) GetAddress() string {
   315  	if m != nil {
   316  		return m.Address
   317  	}
   318  	return ""
   319  }
   320  
   321  func (m *Configurable) GetTarget() string {
   322  	if m != nil {
   323  		return m.Target
   324  	}
   325  	return ""
   326  }
   327  
   328  func (m *Configurable) GetVersion() string {
   329  	if m != nil {
   330  		return m.Version
   331  	}
   332  	return ""
   333  }
   334  
   335  func (m *Configurable) GetTimeout() *time.Duration {
   336  	if m != nil {
   337  		return m.Timeout
   338  	}
   339  	return nil
   340  }
   341  
   342  func (m *Configurable) GetPersistent() bool {
   343  	if m != nil {
   344  		return m.Persistent
   345  	}
   346  	return false
   347  }
   348  
   349  func (m *Configurable) GetValidateCapabilities() bool {
   350  	if m != nil {
   351  		return m.ValidateCapabilities
   352  	}
   353  	return false
   354  }
   355  
   356  // Aspect for tracking device mastership
   357  type MastershipState struct {
   358  	Term   uint64 `protobuf:"varint,1,opt,name=term,proto3" json:"term,omitempty"`
   359  	NodeId string `protobuf:"bytes,2,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
   360  }
   361  
   362  func (m *MastershipState) Reset()         { *m = MastershipState{} }
   363  func (m *MastershipState) String() string { return proto.CompactTextString(m) }
   364  func (*MastershipState) ProtoMessage()    {}
   365  func (*MastershipState) Descriptor() ([]byte, []int) {
   366  	return fileDescriptor_6fc2683aefb53254, []int{2}
   367  }
   368  func (m *MastershipState) XXX_Unmarshal(b []byte) error {
   369  	return m.Unmarshal(b)
   370  }
   371  func (m *MastershipState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   372  	if deterministic {
   373  		return xxx_messageInfo_MastershipState.Marshal(b, m, deterministic)
   374  	} else {
   375  		b = b[:cap(b)]
   376  		n, err := m.MarshalToSizedBuffer(b)
   377  		if err != nil {
   378  			return nil, err
   379  		}
   380  		return b[:n], nil
   381  	}
   382  }
   383  func (m *MastershipState) XXX_Merge(src proto.Message) {
   384  	xxx_messageInfo_MastershipState.Merge(m, src)
   385  }
   386  func (m *MastershipState) XXX_Size() int {
   387  	return m.Size()
   388  }
   389  func (m *MastershipState) XXX_DiscardUnknown() {
   390  	xxx_messageInfo_MastershipState.DiscardUnknown(m)
   391  }
   392  
   393  var xxx_messageInfo_MastershipState proto.InternalMessageInfo
   394  
   395  func (m *MastershipState) GetTerm() uint64 {
   396  	if m != nil {
   397  		return m.Term
   398  	}
   399  	return 0
   400  }
   401  
   402  func (m *MastershipState) GetNodeId() string {
   403  	if m != nil {
   404  		return m.NodeId
   405  	}
   406  	return ""
   407  }
   408  
   409  // TLS connectivity aspect
   410  type TLSOptions struct {
   411  	Insecure bool   `protobuf:"varint,1,opt,name=insecure,proto3" json:"insecure,omitempty"`
   412  	Plain    bool   `protobuf:"varint,2,opt,name=plain,proto3" json:"plain,omitempty"`
   413  	Key      string `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
   414  	CaCert   string `protobuf:"bytes,4,opt,name=ca_cert,json=caCert,proto3" json:"ca_cert,omitempty"`
   415  	Cert     string `protobuf:"bytes,5,opt,name=cert,proto3" json:"cert,omitempty"`
   416  }
   417  
   418  func (m *TLSOptions) Reset()         { *m = TLSOptions{} }
   419  func (m *TLSOptions) String() string { return proto.CompactTextString(m) }
   420  func (*TLSOptions) ProtoMessage()    {}
   421  func (*TLSOptions) Descriptor() ([]byte, []int) {
   422  	return fileDescriptor_6fc2683aefb53254, []int{3}
   423  }
   424  func (m *TLSOptions) XXX_Unmarshal(b []byte) error {
   425  	return m.Unmarshal(b)
   426  }
   427  func (m *TLSOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   428  	if deterministic {
   429  		return xxx_messageInfo_TLSOptions.Marshal(b, m, deterministic)
   430  	} else {
   431  		b = b[:cap(b)]
   432  		n, err := m.MarshalToSizedBuffer(b)
   433  		if err != nil {
   434  			return nil, err
   435  		}
   436  		return b[:n], nil
   437  	}
   438  }
   439  func (m *TLSOptions) XXX_Merge(src proto.Message) {
   440  	xxx_messageInfo_TLSOptions.Merge(m, src)
   441  }
   442  func (m *TLSOptions) XXX_Size() int {
   443  	return m.Size()
   444  }
   445  func (m *TLSOptions) XXX_DiscardUnknown() {
   446  	xxx_messageInfo_TLSOptions.DiscardUnknown(m)
   447  }
   448  
   449  var xxx_messageInfo_TLSOptions proto.InternalMessageInfo
   450  
   451  func (m *TLSOptions) GetInsecure() bool {
   452  	if m != nil {
   453  		return m.Insecure
   454  	}
   455  	return false
   456  }
   457  
   458  func (m *TLSOptions) GetPlain() bool {
   459  	if m != nil {
   460  		return m.Plain
   461  	}
   462  	return false
   463  }
   464  
   465  func (m *TLSOptions) GetKey() string {
   466  	if m != nil {
   467  		return m.Key
   468  	}
   469  	return ""
   470  }
   471  
   472  func (m *TLSOptions) GetCaCert() string {
   473  	if m != nil {
   474  		return m.CaCert
   475  	}
   476  	return ""
   477  }
   478  
   479  func (m *TLSOptions) GetCert() string {
   480  	if m != nil {
   481  		return m.Cert
   482  	}
   483  	return ""
   484  }
   485  
   486  // Aspect for ad-hoc properties
   487  type AdHoc struct {
   488  	Properties map[string]string `protobuf:"bytes,1,rep,name=properties,proto3" json:"properties,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
   489  }
   490  
   491  func (m *AdHoc) Reset()         { *m = AdHoc{} }
   492  func (m *AdHoc) String() string { return proto.CompactTextString(m) }
   493  func (*AdHoc) ProtoMessage()    {}
   494  func (*AdHoc) Descriptor() ([]byte, []int) {
   495  	return fileDescriptor_6fc2683aefb53254, []int{4}
   496  }
   497  func (m *AdHoc) XXX_Unmarshal(b []byte) error {
   498  	return m.Unmarshal(b)
   499  }
   500  func (m *AdHoc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   501  	if deterministic {
   502  		return xxx_messageInfo_AdHoc.Marshal(b, m, deterministic)
   503  	} else {
   504  		b = b[:cap(b)]
   505  		n, err := m.MarshalToSizedBuffer(b)
   506  		if err != nil {
   507  			return nil, err
   508  		}
   509  		return b[:n], nil
   510  	}
   511  }
   512  func (m *AdHoc) XXX_Merge(src proto.Message) {
   513  	xxx_messageInfo_AdHoc.Merge(m, src)
   514  }
   515  func (m *AdHoc) XXX_Size() int {
   516  	return m.Size()
   517  }
   518  func (m *AdHoc) XXX_DiscardUnknown() {
   519  	xxx_messageInfo_AdHoc.DiscardUnknown(m)
   520  }
   521  
   522  var xxx_messageInfo_AdHoc proto.InternalMessageInfo
   523  
   524  func (m *AdHoc) GetProperties() map[string]string {
   525  	if m != nil {
   526  		return m.Properties
   527  	}
   528  	return nil
   529  }
   530  
   531  // ProtocolState contains information related to service and connectivity to a device
   532  type ProtocolState struct {
   533  	// The protocol to which state relates
   534  	Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=onos.topo.Protocol" json:"protocol,omitempty"`
   535  	// ConnectivityState contains the L3 connectivity information
   536  	ConnectivityState ConnectivityState `protobuf:"varint,2,opt,name=connectivityState,proto3,enum=onos.topo.ConnectivityState" json:"connectivityState,omitempty"`
   537  	// ChannelState relates to the availability of the gRPC channel
   538  	ChannelState ChannelState `protobuf:"varint,3,opt,name=channelState,proto3,enum=onos.topo.ChannelState" json:"channelState,omitempty"`
   539  	// ServiceState indicates the availability of the gRPC servic on top of the channel
   540  	ServiceState ServiceState `protobuf:"varint,4,opt,name=serviceState,proto3,enum=onos.topo.ServiceState" json:"serviceState,omitempty"`
   541  }
   542  
   543  func (m *ProtocolState) Reset()         { *m = ProtocolState{} }
   544  func (m *ProtocolState) String() string { return proto.CompactTextString(m) }
   545  func (*ProtocolState) ProtoMessage()    {}
   546  func (*ProtocolState) Descriptor() ([]byte, []int) {
   547  	return fileDescriptor_6fc2683aefb53254, []int{5}
   548  }
   549  func (m *ProtocolState) XXX_Unmarshal(b []byte) error {
   550  	return m.Unmarshal(b)
   551  }
   552  func (m *ProtocolState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   553  	if deterministic {
   554  		return xxx_messageInfo_ProtocolState.Marshal(b, m, deterministic)
   555  	} else {
   556  		b = b[:cap(b)]
   557  		n, err := m.MarshalToSizedBuffer(b)
   558  		if err != nil {
   559  			return nil, err
   560  		}
   561  		return b[:n], nil
   562  	}
   563  }
   564  func (m *ProtocolState) XXX_Merge(src proto.Message) {
   565  	xxx_messageInfo_ProtocolState.Merge(m, src)
   566  }
   567  func (m *ProtocolState) XXX_Size() int {
   568  	return m.Size()
   569  }
   570  func (m *ProtocolState) XXX_DiscardUnknown() {
   571  	xxx_messageInfo_ProtocolState.DiscardUnknown(m)
   572  }
   573  
   574  var xxx_messageInfo_ProtocolState proto.InternalMessageInfo
   575  
   576  func (m *ProtocolState) GetProtocol() Protocol {
   577  	if m != nil {
   578  		return m.Protocol
   579  	}
   580  	return Protocol_UNKNOWN_PROTOCOL
   581  }
   582  
   583  func (m *ProtocolState) GetConnectivityState() ConnectivityState {
   584  	if m != nil {
   585  		return m.ConnectivityState
   586  	}
   587  	return ConnectivityState_UNKNOWN_CONNECTIVITY_STATE
   588  }
   589  
   590  func (m *ProtocolState) GetChannelState() ChannelState {
   591  	if m != nil {
   592  		return m.ChannelState
   593  	}
   594  	return ChannelState_UNKNOWN_CHANNEL_STATE
   595  }
   596  
   597  func (m *ProtocolState) GetServiceState() ServiceState {
   598  	if m != nil {
   599  		return m.ServiceState
   600  	}
   601  	return ServiceState_UNKNOWN_SERVICE_STATE
   602  }
   603  
   604  // Protocols
   605  type Protocols struct {
   606  	State []*ProtocolState `protobuf:"bytes,1,rep,name=state,proto3" json:"state,omitempty"`
   607  }
   608  
   609  func (m *Protocols) Reset()         { *m = Protocols{} }
   610  func (m *Protocols) String() string { return proto.CompactTextString(m) }
   611  func (*Protocols) ProtoMessage()    {}
   612  func (*Protocols) Descriptor() ([]byte, []int) {
   613  	return fileDescriptor_6fc2683aefb53254, []int{6}
   614  }
   615  func (m *Protocols) XXX_Unmarshal(b []byte) error {
   616  	return m.Unmarshal(b)
   617  }
   618  func (m *Protocols) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   619  	if deterministic {
   620  		return xxx_messageInfo_Protocols.Marshal(b, m, deterministic)
   621  	} else {
   622  		b = b[:cap(b)]
   623  		n, err := m.MarshalToSizedBuffer(b)
   624  		if err != nil {
   625  			return nil, err
   626  		}
   627  		return b[:n], nil
   628  	}
   629  }
   630  func (m *Protocols) XXX_Merge(src proto.Message) {
   631  	xxx_messageInfo_Protocols.Merge(m, src)
   632  }
   633  func (m *Protocols) XXX_Size() int {
   634  	return m.Size()
   635  }
   636  func (m *Protocols) XXX_DiscardUnknown() {
   637  	xxx_messageInfo_Protocols.DiscardUnknown(m)
   638  }
   639  
   640  var xxx_messageInfo_Protocols proto.InternalMessageInfo
   641  
   642  func (m *Protocols) GetState() []*ProtocolState {
   643  	if m != nil {
   644  		return m.State
   645  	}
   646  	return nil
   647  }
   648  
   649  func init() {
   650  	proto.RegisterEnum("onos.topo.Protocol", Protocol_name, Protocol_value)
   651  	proto.RegisterEnum("onos.topo.ConnectivityState", ConnectivityState_name, ConnectivityState_value)
   652  	proto.RegisterEnum("onos.topo.ChannelState", ChannelState_name, ChannelState_value)
   653  	proto.RegisterEnum("onos.topo.ServiceState", ServiceState_name, ServiceState_value)
   654  	proto.RegisterType((*Asset)(nil), "onos.topo.Asset")
   655  	proto.RegisterType((*Configurable)(nil), "onos.topo.Configurable")
   656  	proto.RegisterType((*MastershipState)(nil), "onos.topo.MastershipState")
   657  	proto.RegisterType((*TLSOptions)(nil), "onos.topo.TLSOptions")
   658  	proto.RegisterType((*AdHoc)(nil), "onos.topo.AdHoc")
   659  	proto.RegisterMapType((map[string]string)(nil), "onos.topo.AdHoc.PropertiesEntry")
   660  	proto.RegisterType((*ProtocolState)(nil), "onos.topo.ProtocolState")
   661  	proto.RegisterType((*Protocols)(nil), "onos.topo.Protocols")
   662  }
   663  
   664  func init() { proto.RegisterFile("onos/topo/config.proto", fileDescriptor_6fc2683aefb53254) }
   665  
   666  var fileDescriptor_6fc2683aefb53254 = []byte{
   667  	// 836 bytes of a gzipped FileDescriptorProto
   668  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x52, 0xcf, 0x6f, 0xdb, 0x36,
   669  	0x14, 0xb6, 0xfc, 0x23, 0xb1, 0x5f, 0xdc, 0x44, 0xe5, 0xdc, 0x56, 0x35, 0x36, 0x2f, 0xf0, 0xa9,
   670  	0xc8, 0x41, 0x06, 0xdc, 0x1d, 0xb6, 0x15, 0x1b, 0xe6, 0x28, 0x42, 0xa3, 0xce, 0x91, 0x0d, 0xd9,
   671  	0xc9, 0xd0, 0x93, 0xc1, 0x48, 0x8c, 0x2b, 0x4c, 0x16, 0x05, 0x92, 0x76, 0x91, 0xc3, 0xae, 0xc3,
   672  	0x8e, 0x3b, 0xee, 0x2f, 0xd9, 0xdf, 0xb0, 0x63, 0x8f, 0xbb, 0x6d, 0x48, 0xfe, 0x8f, 0x61, 0x20,
   673  	0x29, 0x39, 0x4a, 0xd3, 0xdb, 0x7b, 0xdf, 0xfb, 0xde, 0xc7, 0x8f, 0x1f, 0x09, 0x4f, 0x69, 0x4a,
   674  	0xf9, 0x40, 0xd0, 0x8c, 0x0e, 0x42, 0x9a, 0x5e, 0xc5, 0x4b, 0x3b, 0x63, 0x54, 0x50, 0xd4, 0x92,
   675  	0xb8, 0x2d, 0xf1, 0x6e, 0x6f, 0x49, 0xe9, 0x32, 0x21, 0x03, 0x35, 0xb8, 0x5c, 0x5f, 0x0d, 0xa2,
   676  	0x35, 0xc3, 0x22, 0xa6, 0xa9, 0xa6, 0x76, 0x3b, 0x4b, 0xba, 0xa4, 0xaa, 0x1c, 0xc8, 0x4a, 0xa3,
   677  	0xfd, 0x3f, 0x0d, 0x68, 0x8c, 0x38, 0x27, 0x02, 0x21, 0xa8, 0xa7, 0x78, 0x45, 0x2c, 0xe3, 0xd0,
   678  	0x78, 0xd1, 0x0a, 0x54, 0x8d, 0xfa, 0xd0, 0x5e, 0xe1, 0x74, 0x7d, 0x85, 0x43, 0xb1, 0x66, 0x84,
   679  	0x59, 0x55, 0x35, 0xbb, 0x87, 0xa1, 0x0e, 0x34, 0x56, 0x34, 0x22, 0x89, 0x55, 0x53, 0x43, 0xdd,
   680  	0xa0, 0xa7, 0xb0, 0xc3, 0x09, 0x8b, 0x71, 0x62, 0xd5, 0x15, 0x9c, 0x77, 0x92, 0x8d, 0xe5, 0x71,
   681  	0x56, 0x43, 0xb3, 0x55, 0x83, 0xbe, 0x00, 0xe0, 0xef, 0x17, 0x1b, 0xc2, 0x78, 0x4c, 0x53, 0x6b,
   682  	0x47, 0x8d, 0x5a, 0xfc, 0xfd, 0x85, 0x06, 0xa4, 0x35, 0x46, 0x13, 0x62, 0x35, 0xb5, 0x35, 0x59,
   683  	0xf7, 0xff, 0x33, 0xa0, 0xed, 0xa8, 0x28, 0xd6, 0x0c, 0x5f, 0x26, 0x44, 0x92, 0xc4, 0x75, 0xb6,
   684  	0xf5, 0x2f, 0x6b, 0x64, 0xc1, 0x2e, 0x8e, 0x22, 0x46, 0x38, 0xcf, 0xad, 0x17, 0xad, 0xf4, 0x27,
   685  	0x30, 0x5b, 0x12, 0x91, 0xdb, 0xce, 0x3b, 0xb9, 0x51, 0xd8, 0xd0, 0xc6, 0x8b, 0x16, 0x7d, 0x03,
   686  	0xbb, 0x22, 0x5e, 0x11, 0xba, 0xd6, 0xde, 0xf7, 0x86, 0xcf, 0x6d, 0x9d, 0xb8, 0x5d, 0x24, 0x6e,
   687  	0x9f, 0xe4, 0x89, 0x1f, 0xd7, 0xff, 0xf8, 0xe7, 0x4b, 0x23, 0x28, 0xf8, 0xa8, 0x07, 0x90, 0x49,
   688  	0x15, 0x2e, 0x48, 0x2a, 0xd4, 0xf5, 0x9a, 0x41, 0x09, 0x41, 0x2f, 0xe1, 0xc9, 0x06, 0x27, 0x71,
   689  	0x84, 0x05, 0x59, 0x84, 0x38, 0xc3, 0x97, 0x71, 0x12, 0x8b, 0x98, 0x70, 0x6b, 0x57, 0x51, 0x3b,
   690  	0xc5, 0xd0, 0x29, 0xcd, 0xfa, 0xdf, 0xc3, 0xc1, 0x19, 0xe6, 0x82, 0x30, 0xfe, 0x2e, 0xce, 0x66,
   691  	0x02, 0x0b, 0x1d, 0x01, 0x61, 0x2b, 0x15, 0x41, 0x3d, 0x50, 0x35, 0x7a, 0x06, 0xbb, 0x29, 0x8d,
   692  	0xc8, 0x22, 0x8e, 0xf2, 0x08, 0x76, 0x64, 0xeb, 0x45, 0xfd, 0x5f, 0x00, 0xe6, 0xe3, 0xd9, 0x24,
   693  	0x93, 0x86, 0x39, 0xea, 0x42, 0x33, 0x4e, 0x39, 0x09, 0xd7, 0x4c, 0x27, 0xd8, 0x0c, 0xb6, 0xbd,
   694  	0x7c, 0xb3, 0x2c, 0xc1, 0x71, 0xaa, 0x04, 0x9a, 0x81, 0x6e, 0x90, 0x09, 0xb5, 0x9f, 0xc9, 0x75,
   695  	0x1e, 0x9f, 0x2c, 0xe5, 0x51, 0x21, 0x5e, 0x84, 0x84, 0x89, 0xe2, 0xd1, 0x43, 0xec, 0x10, 0xa6,
   696  	0xbe, 0x96, 0x42, 0xf5, 0x9b, 0xab, 0xba, 0xff, 0x9b, 0xfc, 0x78, 0xd1, 0x29, 0x0d, 0xd1, 0x0f,
   697  	0x00, 0x19, 0xa3, 0x19, 0x61, 0xea, 0xca, 0xc6, 0x61, 0xed, 0xc5, 0xde, 0xf0, 0xd0, 0xde, 0x7e,
   698  	0x6c, 0x5b, 0xb1, 0xec, 0xe9, 0x96, 0xe2, 0xa6, 0x82, 0x5d, 0x07, 0xa5, 0x9d, 0xee, 0x77, 0x70,
   699  	0xf0, 0xd1, 0xb8, 0x70, 0x67, 0xdc, 0xb9, 0xeb, 0x40, 0x63, 0x83, 0x93, 0x35, 0xc9, 0x63, 0xd0,
   700  	0xcd, 0xb7, 0xd5, 0xaf, 0x8d, 0xfe, 0xaf, 0x55, 0x78, 0x34, 0x95, 0x6f, 0x18, 0xd2, 0x44, 0x07,
   701  	0x39, 0x80, 0x66, 0x96, 0x03, 0x4a, 0x62, 0x7f, 0xf8, 0x59, 0xc9, 0x50, 0xc1, 0x0d, 0xb6, 0x24,
   702  	0xf4, 0x06, 0x1e, 0x87, 0x34, 0x4d, 0x49, 0x28, 0xe2, 0x4d, 0x2c, 0xae, 0x95, 0x8a, 0x3a, 0x68,
   703  	0x7f, 0xf8, 0x79, 0x69, 0xd3, 0xf9, 0x98, 0x13, 0x3c, 0x5c, 0x43, 0xaf, 0xa0, 0x1d, 0xbe, 0xc3,
   704  	0x69, 0x4a, 0xb4, 0x19, 0x95, 0xf0, 0xfe, 0xf0, 0x59, 0x59, 0xa6, 0x34, 0x0e, 0xee, 0x91, 0xe5,
   705  	0x32, 0x27, 0x6c, 0x13, 0x87, 0x44, 0x2f, 0xd7, 0x1f, 0x2c, 0xcf, 0x4a, 0xe3, 0xe0, 0x1e, 0xb9,
   706  	0xff, 0x0a, 0x5a, 0xc5, 0xdd, 0x38, 0xb2, 0xa1, 0xc1, 0x95, 0x84, 0x7e, 0x11, 0xeb, 0x13, 0x01,
   707  	0x68, 0x0d, 0x4d, 0x3b, 0x3a, 0x83, 0x66, 0x81, 0xa3, 0x0e, 0x98, 0xe7, 0xfe, 0x8f, 0xfe, 0xe4,
   708  	0x27, 0x7f, 0x31, 0x0d, 0x26, 0xf3, 0x89, 0x33, 0x19, 0x9b, 0x15, 0xd4, 0x84, 0xfa, 0x6b, 0xff,
   709  	0xcc, 0x33, 0x0d, 0xf4, 0x08, 0x5a, 0xd3, 0xaf, 0x82, 0x73, 0x7f, 0xee, 0x9d, 0xb9, 0x66, 0x55,
   710  	0x0f, 0x26, 0x9e, 0x59, 0x93, 0x95, 0x3b, 0x1c, 0x4d, 0xcd, 0xfa, 0xd1, 0x0c, 0x1e, 0x3f, 0x48,
   711  	0x0b, 0xf5, 0xa0, 0x5b, 0xe8, 0x3a, 0x13, 0xdf, 0x77, 0x9d, 0xb9, 0x77, 0xe1, 0xcd, 0xdf, 0x2e,
   712  	0x66, 0xf3, 0xd1, 0xdc, 0x35, 0x2b, 0x52, 0x37, 0x70, 0x47, 0xce, 0xe9, 0xe8, 0x78, 0xec, 0x9a,
   713  	0x06, 0x3a, 0x80, 0xbd, 0x73, 0xff, 0x0e, 0xa8, 0x1e, 0xbd, 0x81, 0x76, 0x39, 0x3b, 0xf4, 0x1c,
   714  	0x9e, 0x6c, 0xf5, 0x4e, 0x47, 0xbe, 0xef, 0x8e, 0xcb, 0x52, 0xf9, 0x11, 0xee, 0x89, 0x69, 0x20,
   715  	0x13, 0xda, 0x27, 0xde, 0xec, 0x0e, 0xa9, 0x1e, 0xbd, 0x85, 0x76, 0x39, 0xca, 0xb2, 0xd6, 0xcc,
   716  	0x0d, 0x2e, 0x3c, 0xc7, 0x2d, 0x6b, 0x8d, 0x2e, 0x46, 0xde, 0xb8, 0x6c, 0xeb, 0x0e, 0xa8, 0xa2,
   717  	0x7d, 0x80, 0xe2, 0x3a, 0xfe, 0x6b, 0xb3, 0x76, 0x6c, 0xfd, 0x75, 0xd3, 0x33, 0x3e, 0xdc, 0xf4,
   718  	0x8c, 0x7f, 0x6f, 0x7a, 0xc6, 0xef, 0xb7, 0xbd, 0xca, 0x87, 0xdb, 0x5e, 0xe5, 0xef, 0xdb, 0x5e,
   719  	0xe5, 0x72, 0x47, 0xfd, 0xb8, 0x97, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0xe2, 0xbb, 0x4b, 0x1d,
   720  	0x10, 0x06, 0x00, 0x00,
   721  }
   722  
   723  func (m *Asset) Marshal() (dAtA []byte, err error) {
   724  	size := m.Size()
   725  	dAtA = make([]byte, size)
   726  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   727  	if err != nil {
   728  		return nil, err
   729  	}
   730  	return dAtA[:n], nil
   731  }
   732  
   733  func (m *Asset) MarshalTo(dAtA []byte) (int, error) {
   734  	size := m.Size()
   735  	return m.MarshalToSizedBuffer(dAtA[:size])
   736  }
   737  
   738  func (m *Asset) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   739  	i := len(dAtA)
   740  	_ = i
   741  	var l int
   742  	_ = l
   743  	if len(m.Role) > 0 {
   744  		i -= len(m.Role)
   745  		copy(dAtA[i:], m.Role)
   746  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Role)))
   747  		i--
   748  		dAtA[i] = 0x42
   749  	}
   750  	if len(m.SwVersion) > 0 {
   751  		i -= len(m.SwVersion)
   752  		copy(dAtA[i:], m.SwVersion)
   753  		i = encodeVarintConfig(dAtA, i, uint64(len(m.SwVersion)))
   754  		i--
   755  		dAtA[i] = 0x32
   756  	}
   757  	if len(m.Asset) > 0 {
   758  		i -= len(m.Asset)
   759  		copy(dAtA[i:], m.Asset)
   760  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Asset)))
   761  		i--
   762  		dAtA[i] = 0x2a
   763  	}
   764  	if len(m.Serial) > 0 {
   765  		i -= len(m.Serial)
   766  		copy(dAtA[i:], m.Serial)
   767  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Serial)))
   768  		i--
   769  		dAtA[i] = 0x22
   770  	}
   771  	if len(m.Model) > 0 {
   772  		i -= len(m.Model)
   773  		copy(dAtA[i:], m.Model)
   774  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Model)))
   775  		i--
   776  		dAtA[i] = 0x1a
   777  	}
   778  	if len(m.Manufacturer) > 0 {
   779  		i -= len(m.Manufacturer)
   780  		copy(dAtA[i:], m.Manufacturer)
   781  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Manufacturer)))
   782  		i--
   783  		dAtA[i] = 0x12
   784  	}
   785  	if len(m.Name) > 0 {
   786  		i -= len(m.Name)
   787  		copy(dAtA[i:], m.Name)
   788  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Name)))
   789  		i--
   790  		dAtA[i] = 0xa
   791  	}
   792  	return len(dAtA) - i, nil
   793  }
   794  
   795  func (m *Configurable) Marshal() (dAtA []byte, err error) {
   796  	size := m.Size()
   797  	dAtA = make([]byte, size)
   798  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   799  	if err != nil {
   800  		return nil, err
   801  	}
   802  	return dAtA[:n], nil
   803  }
   804  
   805  func (m *Configurable) MarshalTo(dAtA []byte) (int, error) {
   806  	size := m.Size()
   807  	return m.MarshalToSizedBuffer(dAtA[:size])
   808  }
   809  
   810  func (m *Configurable) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   811  	i := len(dAtA)
   812  	_ = i
   813  	var l int
   814  	_ = l
   815  	if m.ValidateCapabilities {
   816  		i--
   817  		if m.ValidateCapabilities {
   818  			dAtA[i] = 1
   819  		} else {
   820  			dAtA[i] = 0
   821  		}
   822  		i--
   823  		dAtA[i] = 0x38
   824  	}
   825  	if m.Persistent {
   826  		i--
   827  		if m.Persistent {
   828  			dAtA[i] = 1
   829  		} else {
   830  			dAtA[i] = 0
   831  		}
   832  		i--
   833  		dAtA[i] = 0x30
   834  	}
   835  	if m.Timeout != nil {
   836  		n1, err1 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Timeout, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout):])
   837  		if err1 != nil {
   838  			return 0, err1
   839  		}
   840  		i -= n1
   841  		i = encodeVarintConfig(dAtA, i, uint64(n1))
   842  		i--
   843  		dAtA[i] = 0x2a
   844  	}
   845  	if len(m.Version) > 0 {
   846  		i -= len(m.Version)
   847  		copy(dAtA[i:], m.Version)
   848  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Version)))
   849  		i--
   850  		dAtA[i] = 0x22
   851  	}
   852  	if len(m.Target) > 0 {
   853  		i -= len(m.Target)
   854  		copy(dAtA[i:], m.Target)
   855  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Target)))
   856  		i--
   857  		dAtA[i] = 0x1a
   858  	}
   859  	if len(m.Address) > 0 {
   860  		i -= len(m.Address)
   861  		copy(dAtA[i:], m.Address)
   862  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Address)))
   863  		i--
   864  		dAtA[i] = 0x12
   865  	}
   866  	if len(m.Type) > 0 {
   867  		i -= len(m.Type)
   868  		copy(dAtA[i:], m.Type)
   869  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Type)))
   870  		i--
   871  		dAtA[i] = 0xa
   872  	}
   873  	return len(dAtA) - i, nil
   874  }
   875  
   876  func (m *MastershipState) Marshal() (dAtA []byte, err error) {
   877  	size := m.Size()
   878  	dAtA = make([]byte, size)
   879  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   880  	if err != nil {
   881  		return nil, err
   882  	}
   883  	return dAtA[:n], nil
   884  }
   885  
   886  func (m *MastershipState) MarshalTo(dAtA []byte) (int, error) {
   887  	size := m.Size()
   888  	return m.MarshalToSizedBuffer(dAtA[:size])
   889  }
   890  
   891  func (m *MastershipState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   892  	i := len(dAtA)
   893  	_ = i
   894  	var l int
   895  	_ = l
   896  	if len(m.NodeId) > 0 {
   897  		i -= len(m.NodeId)
   898  		copy(dAtA[i:], m.NodeId)
   899  		i = encodeVarintConfig(dAtA, i, uint64(len(m.NodeId)))
   900  		i--
   901  		dAtA[i] = 0x12
   902  	}
   903  	if m.Term != 0 {
   904  		i = encodeVarintConfig(dAtA, i, uint64(m.Term))
   905  		i--
   906  		dAtA[i] = 0x8
   907  	}
   908  	return len(dAtA) - i, nil
   909  }
   910  
   911  func (m *TLSOptions) Marshal() (dAtA []byte, err error) {
   912  	size := m.Size()
   913  	dAtA = make([]byte, size)
   914  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   915  	if err != nil {
   916  		return nil, err
   917  	}
   918  	return dAtA[:n], nil
   919  }
   920  
   921  func (m *TLSOptions) MarshalTo(dAtA []byte) (int, error) {
   922  	size := m.Size()
   923  	return m.MarshalToSizedBuffer(dAtA[:size])
   924  }
   925  
   926  func (m *TLSOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   927  	i := len(dAtA)
   928  	_ = i
   929  	var l int
   930  	_ = l
   931  	if len(m.Cert) > 0 {
   932  		i -= len(m.Cert)
   933  		copy(dAtA[i:], m.Cert)
   934  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Cert)))
   935  		i--
   936  		dAtA[i] = 0x2a
   937  	}
   938  	if len(m.CaCert) > 0 {
   939  		i -= len(m.CaCert)
   940  		copy(dAtA[i:], m.CaCert)
   941  		i = encodeVarintConfig(dAtA, i, uint64(len(m.CaCert)))
   942  		i--
   943  		dAtA[i] = 0x22
   944  	}
   945  	if len(m.Key) > 0 {
   946  		i -= len(m.Key)
   947  		copy(dAtA[i:], m.Key)
   948  		i = encodeVarintConfig(dAtA, i, uint64(len(m.Key)))
   949  		i--
   950  		dAtA[i] = 0x1a
   951  	}
   952  	if m.Plain {
   953  		i--
   954  		if m.Plain {
   955  			dAtA[i] = 1
   956  		} else {
   957  			dAtA[i] = 0
   958  		}
   959  		i--
   960  		dAtA[i] = 0x10
   961  	}
   962  	if m.Insecure {
   963  		i--
   964  		if m.Insecure {
   965  			dAtA[i] = 1
   966  		} else {
   967  			dAtA[i] = 0
   968  		}
   969  		i--
   970  		dAtA[i] = 0x8
   971  	}
   972  	return len(dAtA) - i, nil
   973  }
   974  
   975  func (m *AdHoc) Marshal() (dAtA []byte, err error) {
   976  	size := m.Size()
   977  	dAtA = make([]byte, size)
   978  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   979  	if err != nil {
   980  		return nil, err
   981  	}
   982  	return dAtA[:n], nil
   983  }
   984  
   985  func (m *AdHoc) MarshalTo(dAtA []byte) (int, error) {
   986  	size := m.Size()
   987  	return m.MarshalToSizedBuffer(dAtA[:size])
   988  }
   989  
   990  func (m *AdHoc) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   991  	i := len(dAtA)
   992  	_ = i
   993  	var l int
   994  	_ = l
   995  	if len(m.Properties) > 0 {
   996  		for k := range m.Properties {
   997  			v := m.Properties[k]
   998  			baseI := i
   999  			i -= len(v)
  1000  			copy(dAtA[i:], v)
  1001  			i = encodeVarintConfig(dAtA, i, uint64(len(v)))
  1002  			i--
  1003  			dAtA[i] = 0x12
  1004  			i -= len(k)
  1005  			copy(dAtA[i:], k)
  1006  			i = encodeVarintConfig(dAtA, i, uint64(len(k)))
  1007  			i--
  1008  			dAtA[i] = 0xa
  1009  			i = encodeVarintConfig(dAtA, i, uint64(baseI-i))
  1010  			i--
  1011  			dAtA[i] = 0xa
  1012  		}
  1013  	}
  1014  	return len(dAtA) - i, nil
  1015  }
  1016  
  1017  func (m *ProtocolState) Marshal() (dAtA []byte, err error) {
  1018  	size := m.Size()
  1019  	dAtA = make([]byte, size)
  1020  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1021  	if err != nil {
  1022  		return nil, err
  1023  	}
  1024  	return dAtA[:n], nil
  1025  }
  1026  
  1027  func (m *ProtocolState) MarshalTo(dAtA []byte) (int, error) {
  1028  	size := m.Size()
  1029  	return m.MarshalToSizedBuffer(dAtA[:size])
  1030  }
  1031  
  1032  func (m *ProtocolState) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1033  	i := len(dAtA)
  1034  	_ = i
  1035  	var l int
  1036  	_ = l
  1037  	if m.ServiceState != 0 {
  1038  		i = encodeVarintConfig(dAtA, i, uint64(m.ServiceState))
  1039  		i--
  1040  		dAtA[i] = 0x20
  1041  	}
  1042  	if m.ChannelState != 0 {
  1043  		i = encodeVarintConfig(dAtA, i, uint64(m.ChannelState))
  1044  		i--
  1045  		dAtA[i] = 0x18
  1046  	}
  1047  	if m.ConnectivityState != 0 {
  1048  		i = encodeVarintConfig(dAtA, i, uint64(m.ConnectivityState))
  1049  		i--
  1050  		dAtA[i] = 0x10
  1051  	}
  1052  	if m.Protocol != 0 {
  1053  		i = encodeVarintConfig(dAtA, i, uint64(m.Protocol))
  1054  		i--
  1055  		dAtA[i] = 0x8
  1056  	}
  1057  	return len(dAtA) - i, nil
  1058  }
  1059  
  1060  func (m *Protocols) Marshal() (dAtA []byte, err error) {
  1061  	size := m.Size()
  1062  	dAtA = make([]byte, size)
  1063  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1064  	if err != nil {
  1065  		return nil, err
  1066  	}
  1067  	return dAtA[:n], nil
  1068  }
  1069  
  1070  func (m *Protocols) MarshalTo(dAtA []byte) (int, error) {
  1071  	size := m.Size()
  1072  	return m.MarshalToSizedBuffer(dAtA[:size])
  1073  }
  1074  
  1075  func (m *Protocols) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1076  	i := len(dAtA)
  1077  	_ = i
  1078  	var l int
  1079  	_ = l
  1080  	if len(m.State) > 0 {
  1081  		for iNdEx := len(m.State) - 1; iNdEx >= 0; iNdEx-- {
  1082  			{
  1083  				size, err := m.State[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1084  				if err != nil {
  1085  					return 0, err
  1086  				}
  1087  				i -= size
  1088  				i = encodeVarintConfig(dAtA, i, uint64(size))
  1089  			}
  1090  			i--
  1091  			dAtA[i] = 0xa
  1092  		}
  1093  	}
  1094  	return len(dAtA) - i, nil
  1095  }
  1096  
  1097  func encodeVarintConfig(dAtA []byte, offset int, v uint64) int {
  1098  	offset -= sovConfig(v)
  1099  	base := offset
  1100  	for v >= 1<<7 {
  1101  		dAtA[offset] = uint8(v&0x7f | 0x80)
  1102  		v >>= 7
  1103  		offset++
  1104  	}
  1105  	dAtA[offset] = uint8(v)
  1106  	return base
  1107  }
  1108  func (m *Asset) Size() (n int) {
  1109  	if m == nil {
  1110  		return 0
  1111  	}
  1112  	var l int
  1113  	_ = l
  1114  	l = len(m.Name)
  1115  	if l > 0 {
  1116  		n += 1 + l + sovConfig(uint64(l))
  1117  	}
  1118  	l = len(m.Manufacturer)
  1119  	if l > 0 {
  1120  		n += 1 + l + sovConfig(uint64(l))
  1121  	}
  1122  	l = len(m.Model)
  1123  	if l > 0 {
  1124  		n += 1 + l + sovConfig(uint64(l))
  1125  	}
  1126  	l = len(m.Serial)
  1127  	if l > 0 {
  1128  		n += 1 + l + sovConfig(uint64(l))
  1129  	}
  1130  	l = len(m.Asset)
  1131  	if l > 0 {
  1132  		n += 1 + l + sovConfig(uint64(l))
  1133  	}
  1134  	l = len(m.SwVersion)
  1135  	if l > 0 {
  1136  		n += 1 + l + sovConfig(uint64(l))
  1137  	}
  1138  	l = len(m.Role)
  1139  	if l > 0 {
  1140  		n += 1 + l + sovConfig(uint64(l))
  1141  	}
  1142  	return n
  1143  }
  1144  
  1145  func (m *Configurable) Size() (n int) {
  1146  	if m == nil {
  1147  		return 0
  1148  	}
  1149  	var l int
  1150  	_ = l
  1151  	l = len(m.Type)
  1152  	if l > 0 {
  1153  		n += 1 + l + sovConfig(uint64(l))
  1154  	}
  1155  	l = len(m.Address)
  1156  	if l > 0 {
  1157  		n += 1 + l + sovConfig(uint64(l))
  1158  	}
  1159  	l = len(m.Target)
  1160  	if l > 0 {
  1161  		n += 1 + l + sovConfig(uint64(l))
  1162  	}
  1163  	l = len(m.Version)
  1164  	if l > 0 {
  1165  		n += 1 + l + sovConfig(uint64(l))
  1166  	}
  1167  	if m.Timeout != nil {
  1168  		l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Timeout)
  1169  		n += 1 + l + sovConfig(uint64(l))
  1170  	}
  1171  	if m.Persistent {
  1172  		n += 2
  1173  	}
  1174  	if m.ValidateCapabilities {
  1175  		n += 2
  1176  	}
  1177  	return n
  1178  }
  1179  
  1180  func (m *MastershipState) Size() (n int) {
  1181  	if m == nil {
  1182  		return 0
  1183  	}
  1184  	var l int
  1185  	_ = l
  1186  	if m.Term != 0 {
  1187  		n += 1 + sovConfig(uint64(m.Term))
  1188  	}
  1189  	l = len(m.NodeId)
  1190  	if l > 0 {
  1191  		n += 1 + l + sovConfig(uint64(l))
  1192  	}
  1193  	return n
  1194  }
  1195  
  1196  func (m *TLSOptions) Size() (n int) {
  1197  	if m == nil {
  1198  		return 0
  1199  	}
  1200  	var l int
  1201  	_ = l
  1202  	if m.Insecure {
  1203  		n += 2
  1204  	}
  1205  	if m.Plain {
  1206  		n += 2
  1207  	}
  1208  	l = len(m.Key)
  1209  	if l > 0 {
  1210  		n += 1 + l + sovConfig(uint64(l))
  1211  	}
  1212  	l = len(m.CaCert)
  1213  	if l > 0 {
  1214  		n += 1 + l + sovConfig(uint64(l))
  1215  	}
  1216  	l = len(m.Cert)
  1217  	if l > 0 {
  1218  		n += 1 + l + sovConfig(uint64(l))
  1219  	}
  1220  	return n
  1221  }
  1222  
  1223  func (m *AdHoc) Size() (n int) {
  1224  	if m == nil {
  1225  		return 0
  1226  	}
  1227  	var l int
  1228  	_ = l
  1229  	if len(m.Properties) > 0 {
  1230  		for k, v := range m.Properties {
  1231  			_ = k
  1232  			_ = v
  1233  			mapEntrySize := 1 + len(k) + sovConfig(uint64(len(k))) + 1 + len(v) + sovConfig(uint64(len(v)))
  1234  			n += mapEntrySize + 1 + sovConfig(uint64(mapEntrySize))
  1235  		}
  1236  	}
  1237  	return n
  1238  }
  1239  
  1240  func (m *ProtocolState) Size() (n int) {
  1241  	if m == nil {
  1242  		return 0
  1243  	}
  1244  	var l int
  1245  	_ = l
  1246  	if m.Protocol != 0 {
  1247  		n += 1 + sovConfig(uint64(m.Protocol))
  1248  	}
  1249  	if m.ConnectivityState != 0 {
  1250  		n += 1 + sovConfig(uint64(m.ConnectivityState))
  1251  	}
  1252  	if m.ChannelState != 0 {
  1253  		n += 1 + sovConfig(uint64(m.ChannelState))
  1254  	}
  1255  	if m.ServiceState != 0 {
  1256  		n += 1 + sovConfig(uint64(m.ServiceState))
  1257  	}
  1258  	return n
  1259  }
  1260  
  1261  func (m *Protocols) Size() (n int) {
  1262  	if m == nil {
  1263  		return 0
  1264  	}
  1265  	var l int
  1266  	_ = l
  1267  	if len(m.State) > 0 {
  1268  		for _, e := range m.State {
  1269  			l = e.Size()
  1270  			n += 1 + l + sovConfig(uint64(l))
  1271  		}
  1272  	}
  1273  	return n
  1274  }
  1275  
  1276  func sovConfig(x uint64) (n int) {
  1277  	return (math_bits.Len64(x|1) + 6) / 7
  1278  }
  1279  func sozConfig(x uint64) (n int) {
  1280  	return sovConfig(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1281  }
  1282  func (m *Asset) Unmarshal(dAtA []byte) error {
  1283  	l := len(dAtA)
  1284  	iNdEx := 0
  1285  	for iNdEx < l {
  1286  		preIndex := iNdEx
  1287  		var wire uint64
  1288  		for shift := uint(0); ; shift += 7 {
  1289  			if shift >= 64 {
  1290  				return ErrIntOverflowConfig
  1291  			}
  1292  			if iNdEx >= l {
  1293  				return io.ErrUnexpectedEOF
  1294  			}
  1295  			b := dAtA[iNdEx]
  1296  			iNdEx++
  1297  			wire |= uint64(b&0x7F) << shift
  1298  			if b < 0x80 {
  1299  				break
  1300  			}
  1301  		}
  1302  		fieldNum := int32(wire >> 3)
  1303  		wireType := int(wire & 0x7)
  1304  		if wireType == 4 {
  1305  			return fmt.Errorf("proto: Asset: wiretype end group for non-group")
  1306  		}
  1307  		if fieldNum <= 0 {
  1308  			return fmt.Errorf("proto: Asset: illegal tag %d (wire type %d)", fieldNum, wire)
  1309  		}
  1310  		switch fieldNum {
  1311  		case 1:
  1312  			if wireType != 2 {
  1313  				return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1314  			}
  1315  			var stringLen uint64
  1316  			for shift := uint(0); ; shift += 7 {
  1317  				if shift >= 64 {
  1318  					return ErrIntOverflowConfig
  1319  				}
  1320  				if iNdEx >= l {
  1321  					return io.ErrUnexpectedEOF
  1322  				}
  1323  				b := dAtA[iNdEx]
  1324  				iNdEx++
  1325  				stringLen |= uint64(b&0x7F) << shift
  1326  				if b < 0x80 {
  1327  					break
  1328  				}
  1329  			}
  1330  			intStringLen := int(stringLen)
  1331  			if intStringLen < 0 {
  1332  				return ErrInvalidLengthConfig
  1333  			}
  1334  			postIndex := iNdEx + intStringLen
  1335  			if postIndex < 0 {
  1336  				return ErrInvalidLengthConfig
  1337  			}
  1338  			if postIndex > l {
  1339  				return io.ErrUnexpectedEOF
  1340  			}
  1341  			m.Name = string(dAtA[iNdEx:postIndex])
  1342  			iNdEx = postIndex
  1343  		case 2:
  1344  			if wireType != 2 {
  1345  				return fmt.Errorf("proto: wrong wireType = %d for field Manufacturer", wireType)
  1346  			}
  1347  			var stringLen uint64
  1348  			for shift := uint(0); ; shift += 7 {
  1349  				if shift >= 64 {
  1350  					return ErrIntOverflowConfig
  1351  				}
  1352  				if iNdEx >= l {
  1353  					return io.ErrUnexpectedEOF
  1354  				}
  1355  				b := dAtA[iNdEx]
  1356  				iNdEx++
  1357  				stringLen |= uint64(b&0x7F) << shift
  1358  				if b < 0x80 {
  1359  					break
  1360  				}
  1361  			}
  1362  			intStringLen := int(stringLen)
  1363  			if intStringLen < 0 {
  1364  				return ErrInvalidLengthConfig
  1365  			}
  1366  			postIndex := iNdEx + intStringLen
  1367  			if postIndex < 0 {
  1368  				return ErrInvalidLengthConfig
  1369  			}
  1370  			if postIndex > l {
  1371  				return io.ErrUnexpectedEOF
  1372  			}
  1373  			m.Manufacturer = string(dAtA[iNdEx:postIndex])
  1374  			iNdEx = postIndex
  1375  		case 3:
  1376  			if wireType != 2 {
  1377  				return fmt.Errorf("proto: wrong wireType = %d for field Model", wireType)
  1378  			}
  1379  			var stringLen uint64
  1380  			for shift := uint(0); ; shift += 7 {
  1381  				if shift >= 64 {
  1382  					return ErrIntOverflowConfig
  1383  				}
  1384  				if iNdEx >= l {
  1385  					return io.ErrUnexpectedEOF
  1386  				}
  1387  				b := dAtA[iNdEx]
  1388  				iNdEx++
  1389  				stringLen |= uint64(b&0x7F) << shift
  1390  				if b < 0x80 {
  1391  					break
  1392  				}
  1393  			}
  1394  			intStringLen := int(stringLen)
  1395  			if intStringLen < 0 {
  1396  				return ErrInvalidLengthConfig
  1397  			}
  1398  			postIndex := iNdEx + intStringLen
  1399  			if postIndex < 0 {
  1400  				return ErrInvalidLengthConfig
  1401  			}
  1402  			if postIndex > l {
  1403  				return io.ErrUnexpectedEOF
  1404  			}
  1405  			m.Model = string(dAtA[iNdEx:postIndex])
  1406  			iNdEx = postIndex
  1407  		case 4:
  1408  			if wireType != 2 {
  1409  				return fmt.Errorf("proto: wrong wireType = %d for field Serial", wireType)
  1410  			}
  1411  			var stringLen uint64
  1412  			for shift := uint(0); ; shift += 7 {
  1413  				if shift >= 64 {
  1414  					return ErrIntOverflowConfig
  1415  				}
  1416  				if iNdEx >= l {
  1417  					return io.ErrUnexpectedEOF
  1418  				}
  1419  				b := dAtA[iNdEx]
  1420  				iNdEx++
  1421  				stringLen |= uint64(b&0x7F) << shift
  1422  				if b < 0x80 {
  1423  					break
  1424  				}
  1425  			}
  1426  			intStringLen := int(stringLen)
  1427  			if intStringLen < 0 {
  1428  				return ErrInvalidLengthConfig
  1429  			}
  1430  			postIndex := iNdEx + intStringLen
  1431  			if postIndex < 0 {
  1432  				return ErrInvalidLengthConfig
  1433  			}
  1434  			if postIndex > l {
  1435  				return io.ErrUnexpectedEOF
  1436  			}
  1437  			m.Serial = string(dAtA[iNdEx:postIndex])
  1438  			iNdEx = postIndex
  1439  		case 5:
  1440  			if wireType != 2 {
  1441  				return fmt.Errorf("proto: wrong wireType = %d for field Asset", wireType)
  1442  			}
  1443  			var stringLen uint64
  1444  			for shift := uint(0); ; shift += 7 {
  1445  				if shift >= 64 {
  1446  					return ErrIntOverflowConfig
  1447  				}
  1448  				if iNdEx >= l {
  1449  					return io.ErrUnexpectedEOF
  1450  				}
  1451  				b := dAtA[iNdEx]
  1452  				iNdEx++
  1453  				stringLen |= uint64(b&0x7F) << shift
  1454  				if b < 0x80 {
  1455  					break
  1456  				}
  1457  			}
  1458  			intStringLen := int(stringLen)
  1459  			if intStringLen < 0 {
  1460  				return ErrInvalidLengthConfig
  1461  			}
  1462  			postIndex := iNdEx + intStringLen
  1463  			if postIndex < 0 {
  1464  				return ErrInvalidLengthConfig
  1465  			}
  1466  			if postIndex > l {
  1467  				return io.ErrUnexpectedEOF
  1468  			}
  1469  			m.Asset = string(dAtA[iNdEx:postIndex])
  1470  			iNdEx = postIndex
  1471  		case 6:
  1472  			if wireType != 2 {
  1473  				return fmt.Errorf("proto: wrong wireType = %d for field SwVersion", wireType)
  1474  			}
  1475  			var stringLen uint64
  1476  			for shift := uint(0); ; shift += 7 {
  1477  				if shift >= 64 {
  1478  					return ErrIntOverflowConfig
  1479  				}
  1480  				if iNdEx >= l {
  1481  					return io.ErrUnexpectedEOF
  1482  				}
  1483  				b := dAtA[iNdEx]
  1484  				iNdEx++
  1485  				stringLen |= uint64(b&0x7F) << shift
  1486  				if b < 0x80 {
  1487  					break
  1488  				}
  1489  			}
  1490  			intStringLen := int(stringLen)
  1491  			if intStringLen < 0 {
  1492  				return ErrInvalidLengthConfig
  1493  			}
  1494  			postIndex := iNdEx + intStringLen
  1495  			if postIndex < 0 {
  1496  				return ErrInvalidLengthConfig
  1497  			}
  1498  			if postIndex > l {
  1499  				return io.ErrUnexpectedEOF
  1500  			}
  1501  			m.SwVersion = string(dAtA[iNdEx:postIndex])
  1502  			iNdEx = postIndex
  1503  		case 8:
  1504  			if wireType != 2 {
  1505  				return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
  1506  			}
  1507  			var stringLen uint64
  1508  			for shift := uint(0); ; shift += 7 {
  1509  				if shift >= 64 {
  1510  					return ErrIntOverflowConfig
  1511  				}
  1512  				if iNdEx >= l {
  1513  					return io.ErrUnexpectedEOF
  1514  				}
  1515  				b := dAtA[iNdEx]
  1516  				iNdEx++
  1517  				stringLen |= uint64(b&0x7F) << shift
  1518  				if b < 0x80 {
  1519  					break
  1520  				}
  1521  			}
  1522  			intStringLen := int(stringLen)
  1523  			if intStringLen < 0 {
  1524  				return ErrInvalidLengthConfig
  1525  			}
  1526  			postIndex := iNdEx + intStringLen
  1527  			if postIndex < 0 {
  1528  				return ErrInvalidLengthConfig
  1529  			}
  1530  			if postIndex > l {
  1531  				return io.ErrUnexpectedEOF
  1532  			}
  1533  			m.Role = string(dAtA[iNdEx:postIndex])
  1534  			iNdEx = postIndex
  1535  		default:
  1536  			iNdEx = preIndex
  1537  			skippy, err := skipConfig(dAtA[iNdEx:])
  1538  			if err != nil {
  1539  				return err
  1540  			}
  1541  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1542  				return ErrInvalidLengthConfig
  1543  			}
  1544  			if (iNdEx + skippy) > l {
  1545  				return io.ErrUnexpectedEOF
  1546  			}
  1547  			iNdEx += skippy
  1548  		}
  1549  	}
  1550  
  1551  	if iNdEx > l {
  1552  		return io.ErrUnexpectedEOF
  1553  	}
  1554  	return nil
  1555  }
  1556  func (m *Configurable) Unmarshal(dAtA []byte) error {
  1557  	l := len(dAtA)
  1558  	iNdEx := 0
  1559  	for iNdEx < l {
  1560  		preIndex := iNdEx
  1561  		var wire uint64
  1562  		for shift := uint(0); ; shift += 7 {
  1563  			if shift >= 64 {
  1564  				return ErrIntOverflowConfig
  1565  			}
  1566  			if iNdEx >= l {
  1567  				return io.ErrUnexpectedEOF
  1568  			}
  1569  			b := dAtA[iNdEx]
  1570  			iNdEx++
  1571  			wire |= uint64(b&0x7F) << shift
  1572  			if b < 0x80 {
  1573  				break
  1574  			}
  1575  		}
  1576  		fieldNum := int32(wire >> 3)
  1577  		wireType := int(wire & 0x7)
  1578  		if wireType == 4 {
  1579  			return fmt.Errorf("proto: Configurable: wiretype end group for non-group")
  1580  		}
  1581  		if fieldNum <= 0 {
  1582  			return fmt.Errorf("proto: Configurable: illegal tag %d (wire type %d)", fieldNum, wire)
  1583  		}
  1584  		switch fieldNum {
  1585  		case 1:
  1586  			if wireType != 2 {
  1587  				return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1588  			}
  1589  			var stringLen uint64
  1590  			for shift := uint(0); ; shift += 7 {
  1591  				if shift >= 64 {
  1592  					return ErrIntOverflowConfig
  1593  				}
  1594  				if iNdEx >= l {
  1595  					return io.ErrUnexpectedEOF
  1596  				}
  1597  				b := dAtA[iNdEx]
  1598  				iNdEx++
  1599  				stringLen |= uint64(b&0x7F) << shift
  1600  				if b < 0x80 {
  1601  					break
  1602  				}
  1603  			}
  1604  			intStringLen := int(stringLen)
  1605  			if intStringLen < 0 {
  1606  				return ErrInvalidLengthConfig
  1607  			}
  1608  			postIndex := iNdEx + intStringLen
  1609  			if postIndex < 0 {
  1610  				return ErrInvalidLengthConfig
  1611  			}
  1612  			if postIndex > l {
  1613  				return io.ErrUnexpectedEOF
  1614  			}
  1615  			m.Type = string(dAtA[iNdEx:postIndex])
  1616  			iNdEx = postIndex
  1617  		case 2:
  1618  			if wireType != 2 {
  1619  				return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
  1620  			}
  1621  			var stringLen uint64
  1622  			for shift := uint(0); ; shift += 7 {
  1623  				if shift >= 64 {
  1624  					return ErrIntOverflowConfig
  1625  				}
  1626  				if iNdEx >= l {
  1627  					return io.ErrUnexpectedEOF
  1628  				}
  1629  				b := dAtA[iNdEx]
  1630  				iNdEx++
  1631  				stringLen |= uint64(b&0x7F) << shift
  1632  				if b < 0x80 {
  1633  					break
  1634  				}
  1635  			}
  1636  			intStringLen := int(stringLen)
  1637  			if intStringLen < 0 {
  1638  				return ErrInvalidLengthConfig
  1639  			}
  1640  			postIndex := iNdEx + intStringLen
  1641  			if postIndex < 0 {
  1642  				return ErrInvalidLengthConfig
  1643  			}
  1644  			if postIndex > l {
  1645  				return io.ErrUnexpectedEOF
  1646  			}
  1647  			m.Address = string(dAtA[iNdEx:postIndex])
  1648  			iNdEx = postIndex
  1649  		case 3:
  1650  			if wireType != 2 {
  1651  				return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
  1652  			}
  1653  			var stringLen uint64
  1654  			for shift := uint(0); ; shift += 7 {
  1655  				if shift >= 64 {
  1656  					return ErrIntOverflowConfig
  1657  				}
  1658  				if iNdEx >= l {
  1659  					return io.ErrUnexpectedEOF
  1660  				}
  1661  				b := dAtA[iNdEx]
  1662  				iNdEx++
  1663  				stringLen |= uint64(b&0x7F) << shift
  1664  				if b < 0x80 {
  1665  					break
  1666  				}
  1667  			}
  1668  			intStringLen := int(stringLen)
  1669  			if intStringLen < 0 {
  1670  				return ErrInvalidLengthConfig
  1671  			}
  1672  			postIndex := iNdEx + intStringLen
  1673  			if postIndex < 0 {
  1674  				return ErrInvalidLengthConfig
  1675  			}
  1676  			if postIndex > l {
  1677  				return io.ErrUnexpectedEOF
  1678  			}
  1679  			m.Target = string(dAtA[iNdEx:postIndex])
  1680  			iNdEx = postIndex
  1681  		case 4:
  1682  			if wireType != 2 {
  1683  				return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1684  			}
  1685  			var stringLen uint64
  1686  			for shift := uint(0); ; shift += 7 {
  1687  				if shift >= 64 {
  1688  					return ErrIntOverflowConfig
  1689  				}
  1690  				if iNdEx >= l {
  1691  					return io.ErrUnexpectedEOF
  1692  				}
  1693  				b := dAtA[iNdEx]
  1694  				iNdEx++
  1695  				stringLen |= uint64(b&0x7F) << shift
  1696  				if b < 0x80 {
  1697  					break
  1698  				}
  1699  			}
  1700  			intStringLen := int(stringLen)
  1701  			if intStringLen < 0 {
  1702  				return ErrInvalidLengthConfig
  1703  			}
  1704  			postIndex := iNdEx + intStringLen
  1705  			if postIndex < 0 {
  1706  				return ErrInvalidLengthConfig
  1707  			}
  1708  			if postIndex > l {
  1709  				return io.ErrUnexpectedEOF
  1710  			}
  1711  			m.Version = string(dAtA[iNdEx:postIndex])
  1712  			iNdEx = postIndex
  1713  		case 5:
  1714  			if wireType != 2 {
  1715  				return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType)
  1716  			}
  1717  			var msglen int
  1718  			for shift := uint(0); ; shift += 7 {
  1719  				if shift >= 64 {
  1720  					return ErrIntOverflowConfig
  1721  				}
  1722  				if iNdEx >= l {
  1723  					return io.ErrUnexpectedEOF
  1724  				}
  1725  				b := dAtA[iNdEx]
  1726  				iNdEx++
  1727  				msglen |= int(b&0x7F) << shift
  1728  				if b < 0x80 {
  1729  					break
  1730  				}
  1731  			}
  1732  			if msglen < 0 {
  1733  				return ErrInvalidLengthConfig
  1734  			}
  1735  			postIndex := iNdEx + msglen
  1736  			if postIndex < 0 {
  1737  				return ErrInvalidLengthConfig
  1738  			}
  1739  			if postIndex > l {
  1740  				return io.ErrUnexpectedEOF
  1741  			}
  1742  			if m.Timeout == nil {
  1743  				m.Timeout = new(time.Duration)
  1744  			}
  1745  			if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Timeout, dAtA[iNdEx:postIndex]); err != nil {
  1746  				return err
  1747  			}
  1748  			iNdEx = postIndex
  1749  		case 6:
  1750  			if wireType != 0 {
  1751  				return fmt.Errorf("proto: wrong wireType = %d for field Persistent", wireType)
  1752  			}
  1753  			var v int
  1754  			for shift := uint(0); ; shift += 7 {
  1755  				if shift >= 64 {
  1756  					return ErrIntOverflowConfig
  1757  				}
  1758  				if iNdEx >= l {
  1759  					return io.ErrUnexpectedEOF
  1760  				}
  1761  				b := dAtA[iNdEx]
  1762  				iNdEx++
  1763  				v |= int(b&0x7F) << shift
  1764  				if b < 0x80 {
  1765  					break
  1766  				}
  1767  			}
  1768  			m.Persistent = bool(v != 0)
  1769  		case 7:
  1770  			if wireType != 0 {
  1771  				return fmt.Errorf("proto: wrong wireType = %d for field ValidateCapabilities", wireType)
  1772  			}
  1773  			var v int
  1774  			for shift := uint(0); ; shift += 7 {
  1775  				if shift >= 64 {
  1776  					return ErrIntOverflowConfig
  1777  				}
  1778  				if iNdEx >= l {
  1779  					return io.ErrUnexpectedEOF
  1780  				}
  1781  				b := dAtA[iNdEx]
  1782  				iNdEx++
  1783  				v |= int(b&0x7F) << shift
  1784  				if b < 0x80 {
  1785  					break
  1786  				}
  1787  			}
  1788  			m.ValidateCapabilities = bool(v != 0)
  1789  		default:
  1790  			iNdEx = preIndex
  1791  			skippy, err := skipConfig(dAtA[iNdEx:])
  1792  			if err != nil {
  1793  				return err
  1794  			}
  1795  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1796  				return ErrInvalidLengthConfig
  1797  			}
  1798  			if (iNdEx + skippy) > l {
  1799  				return io.ErrUnexpectedEOF
  1800  			}
  1801  			iNdEx += skippy
  1802  		}
  1803  	}
  1804  
  1805  	if iNdEx > l {
  1806  		return io.ErrUnexpectedEOF
  1807  	}
  1808  	return nil
  1809  }
  1810  func (m *MastershipState) Unmarshal(dAtA []byte) error {
  1811  	l := len(dAtA)
  1812  	iNdEx := 0
  1813  	for iNdEx < l {
  1814  		preIndex := iNdEx
  1815  		var wire uint64
  1816  		for shift := uint(0); ; shift += 7 {
  1817  			if shift >= 64 {
  1818  				return ErrIntOverflowConfig
  1819  			}
  1820  			if iNdEx >= l {
  1821  				return io.ErrUnexpectedEOF
  1822  			}
  1823  			b := dAtA[iNdEx]
  1824  			iNdEx++
  1825  			wire |= uint64(b&0x7F) << shift
  1826  			if b < 0x80 {
  1827  				break
  1828  			}
  1829  		}
  1830  		fieldNum := int32(wire >> 3)
  1831  		wireType := int(wire & 0x7)
  1832  		if wireType == 4 {
  1833  			return fmt.Errorf("proto: MastershipState: wiretype end group for non-group")
  1834  		}
  1835  		if fieldNum <= 0 {
  1836  			return fmt.Errorf("proto: MastershipState: illegal tag %d (wire type %d)", fieldNum, wire)
  1837  		}
  1838  		switch fieldNum {
  1839  		case 1:
  1840  			if wireType != 0 {
  1841  				return fmt.Errorf("proto: wrong wireType = %d for field Term", wireType)
  1842  			}
  1843  			m.Term = 0
  1844  			for shift := uint(0); ; shift += 7 {
  1845  				if shift >= 64 {
  1846  					return ErrIntOverflowConfig
  1847  				}
  1848  				if iNdEx >= l {
  1849  					return io.ErrUnexpectedEOF
  1850  				}
  1851  				b := dAtA[iNdEx]
  1852  				iNdEx++
  1853  				m.Term |= uint64(b&0x7F) << shift
  1854  				if b < 0x80 {
  1855  					break
  1856  				}
  1857  			}
  1858  		case 2:
  1859  			if wireType != 2 {
  1860  				return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType)
  1861  			}
  1862  			var stringLen uint64
  1863  			for shift := uint(0); ; shift += 7 {
  1864  				if shift >= 64 {
  1865  					return ErrIntOverflowConfig
  1866  				}
  1867  				if iNdEx >= l {
  1868  					return io.ErrUnexpectedEOF
  1869  				}
  1870  				b := dAtA[iNdEx]
  1871  				iNdEx++
  1872  				stringLen |= uint64(b&0x7F) << shift
  1873  				if b < 0x80 {
  1874  					break
  1875  				}
  1876  			}
  1877  			intStringLen := int(stringLen)
  1878  			if intStringLen < 0 {
  1879  				return ErrInvalidLengthConfig
  1880  			}
  1881  			postIndex := iNdEx + intStringLen
  1882  			if postIndex < 0 {
  1883  				return ErrInvalidLengthConfig
  1884  			}
  1885  			if postIndex > l {
  1886  				return io.ErrUnexpectedEOF
  1887  			}
  1888  			m.NodeId = string(dAtA[iNdEx:postIndex])
  1889  			iNdEx = postIndex
  1890  		default:
  1891  			iNdEx = preIndex
  1892  			skippy, err := skipConfig(dAtA[iNdEx:])
  1893  			if err != nil {
  1894  				return err
  1895  			}
  1896  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1897  				return ErrInvalidLengthConfig
  1898  			}
  1899  			if (iNdEx + skippy) > l {
  1900  				return io.ErrUnexpectedEOF
  1901  			}
  1902  			iNdEx += skippy
  1903  		}
  1904  	}
  1905  
  1906  	if iNdEx > l {
  1907  		return io.ErrUnexpectedEOF
  1908  	}
  1909  	return nil
  1910  }
  1911  func (m *TLSOptions) Unmarshal(dAtA []byte) error {
  1912  	l := len(dAtA)
  1913  	iNdEx := 0
  1914  	for iNdEx < l {
  1915  		preIndex := iNdEx
  1916  		var wire uint64
  1917  		for shift := uint(0); ; shift += 7 {
  1918  			if shift >= 64 {
  1919  				return ErrIntOverflowConfig
  1920  			}
  1921  			if iNdEx >= l {
  1922  				return io.ErrUnexpectedEOF
  1923  			}
  1924  			b := dAtA[iNdEx]
  1925  			iNdEx++
  1926  			wire |= uint64(b&0x7F) << shift
  1927  			if b < 0x80 {
  1928  				break
  1929  			}
  1930  		}
  1931  		fieldNum := int32(wire >> 3)
  1932  		wireType := int(wire & 0x7)
  1933  		if wireType == 4 {
  1934  			return fmt.Errorf("proto: TLSOptions: wiretype end group for non-group")
  1935  		}
  1936  		if fieldNum <= 0 {
  1937  			return fmt.Errorf("proto: TLSOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  1938  		}
  1939  		switch fieldNum {
  1940  		case 1:
  1941  			if wireType != 0 {
  1942  				return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType)
  1943  			}
  1944  			var v int
  1945  			for shift := uint(0); ; shift += 7 {
  1946  				if shift >= 64 {
  1947  					return ErrIntOverflowConfig
  1948  				}
  1949  				if iNdEx >= l {
  1950  					return io.ErrUnexpectedEOF
  1951  				}
  1952  				b := dAtA[iNdEx]
  1953  				iNdEx++
  1954  				v |= int(b&0x7F) << shift
  1955  				if b < 0x80 {
  1956  					break
  1957  				}
  1958  			}
  1959  			m.Insecure = bool(v != 0)
  1960  		case 2:
  1961  			if wireType != 0 {
  1962  				return fmt.Errorf("proto: wrong wireType = %d for field Plain", wireType)
  1963  			}
  1964  			var v int
  1965  			for shift := uint(0); ; shift += 7 {
  1966  				if shift >= 64 {
  1967  					return ErrIntOverflowConfig
  1968  				}
  1969  				if iNdEx >= l {
  1970  					return io.ErrUnexpectedEOF
  1971  				}
  1972  				b := dAtA[iNdEx]
  1973  				iNdEx++
  1974  				v |= int(b&0x7F) << shift
  1975  				if b < 0x80 {
  1976  					break
  1977  				}
  1978  			}
  1979  			m.Plain = bool(v != 0)
  1980  		case 3:
  1981  			if wireType != 2 {
  1982  				return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  1983  			}
  1984  			var stringLen uint64
  1985  			for shift := uint(0); ; shift += 7 {
  1986  				if shift >= 64 {
  1987  					return ErrIntOverflowConfig
  1988  				}
  1989  				if iNdEx >= l {
  1990  					return io.ErrUnexpectedEOF
  1991  				}
  1992  				b := dAtA[iNdEx]
  1993  				iNdEx++
  1994  				stringLen |= uint64(b&0x7F) << shift
  1995  				if b < 0x80 {
  1996  					break
  1997  				}
  1998  			}
  1999  			intStringLen := int(stringLen)
  2000  			if intStringLen < 0 {
  2001  				return ErrInvalidLengthConfig
  2002  			}
  2003  			postIndex := iNdEx + intStringLen
  2004  			if postIndex < 0 {
  2005  				return ErrInvalidLengthConfig
  2006  			}
  2007  			if postIndex > l {
  2008  				return io.ErrUnexpectedEOF
  2009  			}
  2010  			m.Key = string(dAtA[iNdEx:postIndex])
  2011  			iNdEx = postIndex
  2012  		case 4:
  2013  			if wireType != 2 {
  2014  				return fmt.Errorf("proto: wrong wireType = %d for field CaCert", wireType)
  2015  			}
  2016  			var stringLen uint64
  2017  			for shift := uint(0); ; shift += 7 {
  2018  				if shift >= 64 {
  2019  					return ErrIntOverflowConfig
  2020  				}
  2021  				if iNdEx >= l {
  2022  					return io.ErrUnexpectedEOF
  2023  				}
  2024  				b := dAtA[iNdEx]
  2025  				iNdEx++
  2026  				stringLen |= uint64(b&0x7F) << shift
  2027  				if b < 0x80 {
  2028  					break
  2029  				}
  2030  			}
  2031  			intStringLen := int(stringLen)
  2032  			if intStringLen < 0 {
  2033  				return ErrInvalidLengthConfig
  2034  			}
  2035  			postIndex := iNdEx + intStringLen
  2036  			if postIndex < 0 {
  2037  				return ErrInvalidLengthConfig
  2038  			}
  2039  			if postIndex > l {
  2040  				return io.ErrUnexpectedEOF
  2041  			}
  2042  			m.CaCert = string(dAtA[iNdEx:postIndex])
  2043  			iNdEx = postIndex
  2044  		case 5:
  2045  			if wireType != 2 {
  2046  				return fmt.Errorf("proto: wrong wireType = %d for field Cert", wireType)
  2047  			}
  2048  			var stringLen uint64
  2049  			for shift := uint(0); ; shift += 7 {
  2050  				if shift >= 64 {
  2051  					return ErrIntOverflowConfig
  2052  				}
  2053  				if iNdEx >= l {
  2054  					return io.ErrUnexpectedEOF
  2055  				}
  2056  				b := dAtA[iNdEx]
  2057  				iNdEx++
  2058  				stringLen |= uint64(b&0x7F) << shift
  2059  				if b < 0x80 {
  2060  					break
  2061  				}
  2062  			}
  2063  			intStringLen := int(stringLen)
  2064  			if intStringLen < 0 {
  2065  				return ErrInvalidLengthConfig
  2066  			}
  2067  			postIndex := iNdEx + intStringLen
  2068  			if postIndex < 0 {
  2069  				return ErrInvalidLengthConfig
  2070  			}
  2071  			if postIndex > l {
  2072  				return io.ErrUnexpectedEOF
  2073  			}
  2074  			m.Cert = string(dAtA[iNdEx:postIndex])
  2075  			iNdEx = postIndex
  2076  		default:
  2077  			iNdEx = preIndex
  2078  			skippy, err := skipConfig(dAtA[iNdEx:])
  2079  			if err != nil {
  2080  				return err
  2081  			}
  2082  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2083  				return ErrInvalidLengthConfig
  2084  			}
  2085  			if (iNdEx + skippy) > l {
  2086  				return io.ErrUnexpectedEOF
  2087  			}
  2088  			iNdEx += skippy
  2089  		}
  2090  	}
  2091  
  2092  	if iNdEx > l {
  2093  		return io.ErrUnexpectedEOF
  2094  	}
  2095  	return nil
  2096  }
  2097  func (m *AdHoc) Unmarshal(dAtA []byte) error {
  2098  	l := len(dAtA)
  2099  	iNdEx := 0
  2100  	for iNdEx < l {
  2101  		preIndex := iNdEx
  2102  		var wire uint64
  2103  		for shift := uint(0); ; shift += 7 {
  2104  			if shift >= 64 {
  2105  				return ErrIntOverflowConfig
  2106  			}
  2107  			if iNdEx >= l {
  2108  				return io.ErrUnexpectedEOF
  2109  			}
  2110  			b := dAtA[iNdEx]
  2111  			iNdEx++
  2112  			wire |= uint64(b&0x7F) << shift
  2113  			if b < 0x80 {
  2114  				break
  2115  			}
  2116  		}
  2117  		fieldNum := int32(wire >> 3)
  2118  		wireType := int(wire & 0x7)
  2119  		if wireType == 4 {
  2120  			return fmt.Errorf("proto: AdHoc: wiretype end group for non-group")
  2121  		}
  2122  		if fieldNum <= 0 {
  2123  			return fmt.Errorf("proto: AdHoc: illegal tag %d (wire type %d)", fieldNum, wire)
  2124  		}
  2125  		switch fieldNum {
  2126  		case 1:
  2127  			if wireType != 2 {
  2128  				return fmt.Errorf("proto: wrong wireType = %d for field Properties", wireType)
  2129  			}
  2130  			var msglen int
  2131  			for shift := uint(0); ; shift += 7 {
  2132  				if shift >= 64 {
  2133  					return ErrIntOverflowConfig
  2134  				}
  2135  				if iNdEx >= l {
  2136  					return io.ErrUnexpectedEOF
  2137  				}
  2138  				b := dAtA[iNdEx]
  2139  				iNdEx++
  2140  				msglen |= int(b&0x7F) << shift
  2141  				if b < 0x80 {
  2142  					break
  2143  				}
  2144  			}
  2145  			if msglen < 0 {
  2146  				return ErrInvalidLengthConfig
  2147  			}
  2148  			postIndex := iNdEx + msglen
  2149  			if postIndex < 0 {
  2150  				return ErrInvalidLengthConfig
  2151  			}
  2152  			if postIndex > l {
  2153  				return io.ErrUnexpectedEOF
  2154  			}
  2155  			if m.Properties == nil {
  2156  				m.Properties = make(map[string]string)
  2157  			}
  2158  			var mapkey string
  2159  			var mapvalue string
  2160  			for iNdEx < postIndex {
  2161  				entryPreIndex := iNdEx
  2162  				var wire uint64
  2163  				for shift := uint(0); ; shift += 7 {
  2164  					if shift >= 64 {
  2165  						return ErrIntOverflowConfig
  2166  					}
  2167  					if iNdEx >= l {
  2168  						return io.ErrUnexpectedEOF
  2169  					}
  2170  					b := dAtA[iNdEx]
  2171  					iNdEx++
  2172  					wire |= uint64(b&0x7F) << shift
  2173  					if b < 0x80 {
  2174  						break
  2175  					}
  2176  				}
  2177  				fieldNum := int32(wire >> 3)
  2178  				if fieldNum == 1 {
  2179  					var stringLenmapkey uint64
  2180  					for shift := uint(0); ; shift += 7 {
  2181  						if shift >= 64 {
  2182  							return ErrIntOverflowConfig
  2183  						}
  2184  						if iNdEx >= l {
  2185  							return io.ErrUnexpectedEOF
  2186  						}
  2187  						b := dAtA[iNdEx]
  2188  						iNdEx++
  2189  						stringLenmapkey |= uint64(b&0x7F) << shift
  2190  						if b < 0x80 {
  2191  							break
  2192  						}
  2193  					}
  2194  					intStringLenmapkey := int(stringLenmapkey)
  2195  					if intStringLenmapkey < 0 {
  2196  						return ErrInvalidLengthConfig
  2197  					}
  2198  					postStringIndexmapkey := iNdEx + intStringLenmapkey
  2199  					if postStringIndexmapkey < 0 {
  2200  						return ErrInvalidLengthConfig
  2201  					}
  2202  					if postStringIndexmapkey > l {
  2203  						return io.ErrUnexpectedEOF
  2204  					}
  2205  					mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  2206  					iNdEx = postStringIndexmapkey
  2207  				} else if fieldNum == 2 {
  2208  					var stringLenmapvalue uint64
  2209  					for shift := uint(0); ; shift += 7 {
  2210  						if shift >= 64 {
  2211  							return ErrIntOverflowConfig
  2212  						}
  2213  						if iNdEx >= l {
  2214  							return io.ErrUnexpectedEOF
  2215  						}
  2216  						b := dAtA[iNdEx]
  2217  						iNdEx++
  2218  						stringLenmapvalue |= uint64(b&0x7F) << shift
  2219  						if b < 0x80 {
  2220  							break
  2221  						}
  2222  					}
  2223  					intStringLenmapvalue := int(stringLenmapvalue)
  2224  					if intStringLenmapvalue < 0 {
  2225  						return ErrInvalidLengthConfig
  2226  					}
  2227  					postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  2228  					if postStringIndexmapvalue < 0 {
  2229  						return ErrInvalidLengthConfig
  2230  					}
  2231  					if postStringIndexmapvalue > l {
  2232  						return io.ErrUnexpectedEOF
  2233  					}
  2234  					mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  2235  					iNdEx = postStringIndexmapvalue
  2236  				} else {
  2237  					iNdEx = entryPreIndex
  2238  					skippy, err := skipConfig(dAtA[iNdEx:])
  2239  					if err != nil {
  2240  						return err
  2241  					}
  2242  					if (skippy < 0) || (iNdEx+skippy) < 0 {
  2243  						return ErrInvalidLengthConfig
  2244  					}
  2245  					if (iNdEx + skippy) > postIndex {
  2246  						return io.ErrUnexpectedEOF
  2247  					}
  2248  					iNdEx += skippy
  2249  				}
  2250  			}
  2251  			m.Properties[mapkey] = mapvalue
  2252  			iNdEx = postIndex
  2253  		default:
  2254  			iNdEx = preIndex
  2255  			skippy, err := skipConfig(dAtA[iNdEx:])
  2256  			if err != nil {
  2257  				return err
  2258  			}
  2259  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2260  				return ErrInvalidLengthConfig
  2261  			}
  2262  			if (iNdEx + skippy) > l {
  2263  				return io.ErrUnexpectedEOF
  2264  			}
  2265  			iNdEx += skippy
  2266  		}
  2267  	}
  2268  
  2269  	if iNdEx > l {
  2270  		return io.ErrUnexpectedEOF
  2271  	}
  2272  	return nil
  2273  }
  2274  func (m *ProtocolState) Unmarshal(dAtA []byte) error {
  2275  	l := len(dAtA)
  2276  	iNdEx := 0
  2277  	for iNdEx < l {
  2278  		preIndex := iNdEx
  2279  		var wire uint64
  2280  		for shift := uint(0); ; shift += 7 {
  2281  			if shift >= 64 {
  2282  				return ErrIntOverflowConfig
  2283  			}
  2284  			if iNdEx >= l {
  2285  				return io.ErrUnexpectedEOF
  2286  			}
  2287  			b := dAtA[iNdEx]
  2288  			iNdEx++
  2289  			wire |= uint64(b&0x7F) << shift
  2290  			if b < 0x80 {
  2291  				break
  2292  			}
  2293  		}
  2294  		fieldNum := int32(wire >> 3)
  2295  		wireType := int(wire & 0x7)
  2296  		if wireType == 4 {
  2297  			return fmt.Errorf("proto: ProtocolState: wiretype end group for non-group")
  2298  		}
  2299  		if fieldNum <= 0 {
  2300  			return fmt.Errorf("proto: ProtocolState: illegal tag %d (wire type %d)", fieldNum, wire)
  2301  		}
  2302  		switch fieldNum {
  2303  		case 1:
  2304  			if wireType != 0 {
  2305  				return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType)
  2306  			}
  2307  			m.Protocol = 0
  2308  			for shift := uint(0); ; shift += 7 {
  2309  				if shift >= 64 {
  2310  					return ErrIntOverflowConfig
  2311  				}
  2312  				if iNdEx >= l {
  2313  					return io.ErrUnexpectedEOF
  2314  				}
  2315  				b := dAtA[iNdEx]
  2316  				iNdEx++
  2317  				m.Protocol |= Protocol(b&0x7F) << shift
  2318  				if b < 0x80 {
  2319  					break
  2320  				}
  2321  			}
  2322  		case 2:
  2323  			if wireType != 0 {
  2324  				return fmt.Errorf("proto: wrong wireType = %d for field ConnectivityState", wireType)
  2325  			}
  2326  			m.ConnectivityState = 0
  2327  			for shift := uint(0); ; shift += 7 {
  2328  				if shift >= 64 {
  2329  					return ErrIntOverflowConfig
  2330  				}
  2331  				if iNdEx >= l {
  2332  					return io.ErrUnexpectedEOF
  2333  				}
  2334  				b := dAtA[iNdEx]
  2335  				iNdEx++
  2336  				m.ConnectivityState |= ConnectivityState(b&0x7F) << shift
  2337  				if b < 0x80 {
  2338  					break
  2339  				}
  2340  			}
  2341  		case 3:
  2342  			if wireType != 0 {
  2343  				return fmt.Errorf("proto: wrong wireType = %d for field ChannelState", wireType)
  2344  			}
  2345  			m.ChannelState = 0
  2346  			for shift := uint(0); ; shift += 7 {
  2347  				if shift >= 64 {
  2348  					return ErrIntOverflowConfig
  2349  				}
  2350  				if iNdEx >= l {
  2351  					return io.ErrUnexpectedEOF
  2352  				}
  2353  				b := dAtA[iNdEx]
  2354  				iNdEx++
  2355  				m.ChannelState |= ChannelState(b&0x7F) << shift
  2356  				if b < 0x80 {
  2357  					break
  2358  				}
  2359  			}
  2360  		case 4:
  2361  			if wireType != 0 {
  2362  				return fmt.Errorf("proto: wrong wireType = %d for field ServiceState", wireType)
  2363  			}
  2364  			m.ServiceState = 0
  2365  			for shift := uint(0); ; shift += 7 {
  2366  				if shift >= 64 {
  2367  					return ErrIntOverflowConfig
  2368  				}
  2369  				if iNdEx >= l {
  2370  					return io.ErrUnexpectedEOF
  2371  				}
  2372  				b := dAtA[iNdEx]
  2373  				iNdEx++
  2374  				m.ServiceState |= ServiceState(b&0x7F) << shift
  2375  				if b < 0x80 {
  2376  					break
  2377  				}
  2378  			}
  2379  		default:
  2380  			iNdEx = preIndex
  2381  			skippy, err := skipConfig(dAtA[iNdEx:])
  2382  			if err != nil {
  2383  				return err
  2384  			}
  2385  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2386  				return ErrInvalidLengthConfig
  2387  			}
  2388  			if (iNdEx + skippy) > l {
  2389  				return io.ErrUnexpectedEOF
  2390  			}
  2391  			iNdEx += skippy
  2392  		}
  2393  	}
  2394  
  2395  	if iNdEx > l {
  2396  		return io.ErrUnexpectedEOF
  2397  	}
  2398  	return nil
  2399  }
  2400  func (m *Protocols) Unmarshal(dAtA []byte) error {
  2401  	l := len(dAtA)
  2402  	iNdEx := 0
  2403  	for iNdEx < l {
  2404  		preIndex := iNdEx
  2405  		var wire uint64
  2406  		for shift := uint(0); ; shift += 7 {
  2407  			if shift >= 64 {
  2408  				return ErrIntOverflowConfig
  2409  			}
  2410  			if iNdEx >= l {
  2411  				return io.ErrUnexpectedEOF
  2412  			}
  2413  			b := dAtA[iNdEx]
  2414  			iNdEx++
  2415  			wire |= uint64(b&0x7F) << shift
  2416  			if b < 0x80 {
  2417  				break
  2418  			}
  2419  		}
  2420  		fieldNum := int32(wire >> 3)
  2421  		wireType := int(wire & 0x7)
  2422  		if wireType == 4 {
  2423  			return fmt.Errorf("proto: Protocols: wiretype end group for non-group")
  2424  		}
  2425  		if fieldNum <= 0 {
  2426  			return fmt.Errorf("proto: Protocols: illegal tag %d (wire type %d)", fieldNum, wire)
  2427  		}
  2428  		switch fieldNum {
  2429  		case 1:
  2430  			if wireType != 2 {
  2431  				return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
  2432  			}
  2433  			var msglen int
  2434  			for shift := uint(0); ; shift += 7 {
  2435  				if shift >= 64 {
  2436  					return ErrIntOverflowConfig
  2437  				}
  2438  				if iNdEx >= l {
  2439  					return io.ErrUnexpectedEOF
  2440  				}
  2441  				b := dAtA[iNdEx]
  2442  				iNdEx++
  2443  				msglen |= int(b&0x7F) << shift
  2444  				if b < 0x80 {
  2445  					break
  2446  				}
  2447  			}
  2448  			if msglen < 0 {
  2449  				return ErrInvalidLengthConfig
  2450  			}
  2451  			postIndex := iNdEx + msglen
  2452  			if postIndex < 0 {
  2453  				return ErrInvalidLengthConfig
  2454  			}
  2455  			if postIndex > l {
  2456  				return io.ErrUnexpectedEOF
  2457  			}
  2458  			m.State = append(m.State, &ProtocolState{})
  2459  			if err := m.State[len(m.State)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2460  				return err
  2461  			}
  2462  			iNdEx = postIndex
  2463  		default:
  2464  			iNdEx = preIndex
  2465  			skippy, err := skipConfig(dAtA[iNdEx:])
  2466  			if err != nil {
  2467  				return err
  2468  			}
  2469  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  2470  				return ErrInvalidLengthConfig
  2471  			}
  2472  			if (iNdEx + skippy) > l {
  2473  				return io.ErrUnexpectedEOF
  2474  			}
  2475  			iNdEx += skippy
  2476  		}
  2477  	}
  2478  
  2479  	if iNdEx > l {
  2480  		return io.ErrUnexpectedEOF
  2481  	}
  2482  	return nil
  2483  }
  2484  func skipConfig(dAtA []byte) (n int, err error) {
  2485  	l := len(dAtA)
  2486  	iNdEx := 0
  2487  	depth := 0
  2488  	for iNdEx < l {
  2489  		var wire uint64
  2490  		for shift := uint(0); ; shift += 7 {
  2491  			if shift >= 64 {
  2492  				return 0, ErrIntOverflowConfig
  2493  			}
  2494  			if iNdEx >= l {
  2495  				return 0, io.ErrUnexpectedEOF
  2496  			}
  2497  			b := dAtA[iNdEx]
  2498  			iNdEx++
  2499  			wire |= (uint64(b) & 0x7F) << shift
  2500  			if b < 0x80 {
  2501  				break
  2502  			}
  2503  		}
  2504  		wireType := int(wire & 0x7)
  2505  		switch wireType {
  2506  		case 0:
  2507  			for shift := uint(0); ; shift += 7 {
  2508  				if shift >= 64 {
  2509  					return 0, ErrIntOverflowConfig
  2510  				}
  2511  				if iNdEx >= l {
  2512  					return 0, io.ErrUnexpectedEOF
  2513  				}
  2514  				iNdEx++
  2515  				if dAtA[iNdEx-1] < 0x80 {
  2516  					break
  2517  				}
  2518  			}
  2519  		case 1:
  2520  			iNdEx += 8
  2521  		case 2:
  2522  			var length int
  2523  			for shift := uint(0); ; shift += 7 {
  2524  				if shift >= 64 {
  2525  					return 0, ErrIntOverflowConfig
  2526  				}
  2527  				if iNdEx >= l {
  2528  					return 0, io.ErrUnexpectedEOF
  2529  				}
  2530  				b := dAtA[iNdEx]
  2531  				iNdEx++
  2532  				length |= (int(b) & 0x7F) << shift
  2533  				if b < 0x80 {
  2534  					break
  2535  				}
  2536  			}
  2537  			if length < 0 {
  2538  				return 0, ErrInvalidLengthConfig
  2539  			}
  2540  			iNdEx += length
  2541  		case 3:
  2542  			depth++
  2543  		case 4:
  2544  			if depth == 0 {
  2545  				return 0, ErrUnexpectedEndOfGroupConfig
  2546  			}
  2547  			depth--
  2548  		case 5:
  2549  			iNdEx += 4
  2550  		default:
  2551  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2552  		}
  2553  		if iNdEx < 0 {
  2554  			return 0, ErrInvalidLengthConfig
  2555  		}
  2556  		if depth == 0 {
  2557  			return iNdEx, nil
  2558  		}
  2559  	}
  2560  	return 0, io.ErrUnexpectedEOF
  2561  }
  2562  
  2563  var (
  2564  	ErrInvalidLengthConfig        = fmt.Errorf("proto: negative length found during unmarshaling")
  2565  	ErrIntOverflowConfig          = fmt.Errorf("proto: integer overflow")
  2566  	ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
  2567  )