deviceconfiguration.pb.go 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/config/deviceconfiguration.proto
  3. package config
  4. import (
  5. fmt "fmt"
  6. proto "github.com/gogo/protobuf/proto"
  7. github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
  8. protocol "github.com/syncthing/syncthing/lib/protocol"
  9. _ "github.com/syncthing/syncthing/proto/ext"
  10. io "io"
  11. math "math"
  12. math_bits "math/bits"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  23. type DeviceConfiguration struct {
  24. DeviceID github_com_syncthing_syncthing_lib_protocol.DeviceID `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.DeviceID" json:"deviceID" xml:"id,attr"`
  25. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" xml:"name,attr,omitempty"`
  26. Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses" xml:"address,omitempty" default:"dynamic"`
  27. Compression protocol.Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression" xml:"compression,attr"`
  28. CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"certName" xml:"certName,attr,omitempty"`
  29. Introducer bool `protobuf:"varint,6,opt,name=introducer,proto3" json:"introducer" xml:"introducer,attr"`
  30. SkipIntroductionRemovals bool `protobuf:"varint,7,opt,name=skip_introduction_removals,json=skipIntroductionRemovals,proto3" json:"skipIntroductionRemovals" xml:"skipIntroductionRemovals,attr"`
  31. IntroducedBy github_com_syncthing_syncthing_lib_protocol.DeviceID `protobuf:"bytes,8,opt,name=introduced_by,json=introducedBy,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.DeviceID" json:"introducedBy" xml:"introducedBy,attr"`
  32. Paused bool `protobuf:"varint,9,opt,name=paused,proto3" json:"paused" xml:"paused"`
  33. AllowedNetworks []string `protobuf:"bytes,10,rep,name=allowed_networks,json=allowedNetworks,proto3" json:"allowedNetworks" xml:"allowedNetwork,omitempty"`
  34. AutoAcceptFolders bool `protobuf:"varint,11,opt,name=auto_accept_folders,json=autoAcceptFolders,proto3" json:"autoAcceptFolders" xml:"autoAcceptFolders"`
  35. MaxSendKbps int `protobuf:"varint,12,opt,name=max_send_kbps,json=maxSendKbps,proto3,casttype=int" json:"maxSendKbps" xml:"maxSendKbps"`
  36. MaxRecvKbps int `protobuf:"varint,13,opt,name=max_recv_kbps,json=maxRecvKbps,proto3,casttype=int" json:"maxRecvKbps" xml:"maxRecvKbps"`
  37. IgnoredFolders []ObservedFolder `protobuf:"bytes,14,rep,name=ignored_folders,json=ignoredFolders,proto3" json:"ignoredFolders" xml:"ignoredFolder"`
  38. PendingFolders []ObservedFolder `protobuf:"bytes,15,rep,name=pending_folders,json=pendingFolders,proto3" json:"pendingFolders" xml:"pendingFolder"`
  39. MaxRequestKiB int `protobuf:"varint,16,opt,name=max_request_kib,json=maxRequestKib,proto3,casttype=int" json:"maxRequestKiB" xml:"maxRequestKiB"`
  40. Untrusted bool `protobuf:"varint,17,opt,name=untrusted,proto3" json:"untrusted" xml:"untrusted"`
  41. RemoteGUIPort int `protobuf:"varint,18,opt,name=remote_gui_port,json=remoteGuiPort,proto3,casttype=int" json:"remoteGUIPort" xml:"remoteGUIPort"`
  42. }
  43. func (m *DeviceConfiguration) Reset() { *m = DeviceConfiguration{} }
  44. func (m *DeviceConfiguration) String() string { return proto.CompactTextString(m) }
  45. func (*DeviceConfiguration) ProtoMessage() {}
  46. func (*DeviceConfiguration) Descriptor() ([]byte, []int) {
  47. return fileDescriptor_744b782bd13071dd, []int{0}
  48. }
  49. func (m *DeviceConfiguration) XXX_Unmarshal(b []byte) error {
  50. return m.Unmarshal(b)
  51. }
  52. func (m *DeviceConfiguration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  53. if deterministic {
  54. return xxx_messageInfo_DeviceConfiguration.Marshal(b, m, deterministic)
  55. } else {
  56. b = b[:cap(b)]
  57. n, err := m.MarshalToSizedBuffer(b)
  58. if err != nil {
  59. return nil, err
  60. }
  61. return b[:n], nil
  62. }
  63. }
  64. func (m *DeviceConfiguration) XXX_Merge(src proto.Message) {
  65. xxx_messageInfo_DeviceConfiguration.Merge(m, src)
  66. }
  67. func (m *DeviceConfiguration) XXX_Size() int {
  68. return m.ProtoSize()
  69. }
  70. func (m *DeviceConfiguration) XXX_DiscardUnknown() {
  71. xxx_messageInfo_DeviceConfiguration.DiscardUnknown(m)
  72. }
  73. var xxx_messageInfo_DeviceConfiguration proto.InternalMessageInfo
  74. func init() {
  75. proto.RegisterType((*DeviceConfiguration)(nil), "config.DeviceConfiguration")
  76. }
  77. func init() {
  78. proto.RegisterFile("lib/config/deviceconfiguration.proto", fileDescriptor_744b782bd13071dd)
  79. }
  80. var fileDescriptor_744b782bd13071dd = []byte{
  81. // 980 bytes of a gzipped FileDescriptorProto
  82. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0x31, 0x6f, 0xdb, 0x46,
  83. 0x18, 0x15, 0xeb, 0xc4, 0xb6, 0x68, 0xcb, 0xb2, 0x68, 0xc4, 0x61, 0x0c, 0x44, 0x27, 0xb0, 0x1a,
  84. 0x14, 0x34, 0x95, 0x0b, 0xb7, 0x93, 0xd1, 0x16, 0x28, 0x13, 0xb4, 0x35, 0x8c, 0x26, 0xe9, 0x15,
  85. 0x5d, 0xbc, 0xb0, 0x24, 0xef, 0xac, 0x1c, 0x2c, 0xf2, 0x58, 0xf2, 0xa8, 0x48, 0x40, 0x87, 0x8e,
  86. 0x1d, 0x3a, 0x14, 0x59, 0xbb, 0x14, 0x1d, 0x0a, 0xb4, 0xbf, 0xc4, 0x9b, 0x35, 0x16, 0x1d, 0x0e,
  87. 0x88, 0xbd, 0x71, 0xe4, 0x98, 0xa9, 0xb8, 0x23, 0x45, 0x91, 0x74, 0x5c, 0x04, 0xe8, 0x76, 0xf7,
  88. 0xde, 0xbb, 0xf7, 0xee, 0xfb, 0xf4, 0x9d, 0xa8, 0xf6, 0xc7, 0xc4, 0xd9, 0x77, 0xa9, 0x7f, 0x4a,
  89. 0x46, 0xfb, 0x08, 0x4f, 0x88, 0x8b, 0xb3, 0x4d, 0x1c, 0xda, 0x8c, 0x50, 0x7f, 0x18, 0x84, 0x94,
  90. 0x51, 0x6d, 0x35, 0x03, 0xf7, 0x76, 0x85, 0x5a, 0x42, 0x2e, 0x1d, 0xef, 0x3b, 0x38, 0xc8, 0xf8,
  91. 0xbd, 0x7b, 0x25, 0x17, 0xea, 0x44, 0x38, 0x9c, 0x60, 0x94, 0x53, 0x4d, 0x3c, 0x65, 0xd9, 0xd2,
  92. 0xf8, 0x73, 0x5b, 0xdd, 0x79, 0x2c, 0x33, 0x1e, 0x95, 0x33, 0xb4, 0xbf, 0x14, 0xb5, 0x99, 0x65,
  93. 0x5b, 0x04, 0xe9, 0x4a, 0x4f, 0x19, 0x6c, 0x9a, 0x3f, 0x2b, 0xe7, 0x1c, 0x34, 0xfe, 0xe1, 0xe0,
  94. 0xa3, 0x11, 0x61, 0xcf, 0x63, 0x67, 0xe8, 0x52, 0x6f, 0x3f, 0x9a, 0xf9, 0x2e, 0x7b, 0x4e, 0xfc,
  95. 0x51, 0x69, 0x55, 0xbe, 0xd1, 0x30, 0x73, 0x3f, 0x7a, 0x7c, 0xc9, 0xc1, 0xfa, 0x62, 0x9d, 0x70,
  96. 0xb0, 0x8e, 0xf2, 0x75, 0xca, 0x41, 0x6b, 0xea, 0x8d, 0x0f, 0x0d, 0x82, 0x1e, 0xda, 0x8c, 0x85,
  97. 0x46, 0x72, 0xd1, 0x5f, 0xcb, 0xd7, 0xe9, 0x45, 0xbf, 0xd0, 0xfd, 0x34, 0xef, 0x2b, 0x2f, 0xe7,
  98. 0xfd, 0xc2, 0x03, 0x2e, 0x18, 0xa4, 0x3d, 0x53, 0x6f, 0xf9, 0xb6, 0x87, 0xf5, 0x77, 0x7a, 0xca,
  99. 0xa0, 0x69, 0x7e, 0x9c, 0x70, 0x20, 0xf7, 0x29, 0x07, 0xf7, 0xa4, 0xb3, 0xd8, 0x48, 0xbf, 0x87,
  100. 0xd4, 0x23, 0x0c, 0x7b, 0x01, 0x9b, 0x89, 0x94, 0x9d, 0x37, 0xe0, 0x50, 0x9e, 0xd4, 0xa6, 0x6a,
  101. 0xd3, 0x46, 0x28, 0xc4, 0x51, 0x84, 0x23, 0x7d, 0xa5, 0xb7, 0x32, 0x68, 0x9a, 0x27, 0x09, 0x07,
  102. 0x4b, 0x30, 0xe5, 0xe0, 0x81, 0xf4, 0xce, 0x91, 0x92, 0x73, 0x0f, 0xe1, 0x53, 0x3b, 0x1e, 0xb3,
  103. 0x43, 0x03, 0xcd, 0x7c, 0xdb, 0x23, 0xae, 0xc8, 0xea, 0x5c, 0xd3, 0xbd, 0xbe, 0xe8, 0xaf, 0xe5,
  104. 0x02, 0xb8, 0xf4, 0xd5, 0x26, 0xea, 0x86, 0x4b, 0xbd, 0x40, 0xec, 0x08, 0xf5, 0xf5, 0x5b, 0x3d,
  105. 0x65, 0xb0, 0x75, 0x70, 0x67, 0x58, 0xb4, 0xf3, 0xd1, 0x92, 0x34, 0x3f, 0x49, 0x38, 0x28, 0xab,
  106. 0x53, 0x0e, 0x76, 0xe5, 0xa5, 0x4a, 0x58, 0xd1, 0xd3, 0xed, 0x3a, 0x08, 0xcb, 0x47, 0x35, 0xac,
  107. 0x36, 0x5d, 0x1c, 0x32, 0x4b, 0x36, 0xf2, 0xb6, 0x6c, 0xe4, 0x97, 0xe2, 0x67, 0x12, 0xe0, 0x93,
  108. 0xac, 0x99, 0xf7, 0x33, 0xef, 0x1c, 0x78, 0x43, 0x43, 0xef, 0xde, 0xc0, 0xc1, 0xc2, 0x45, 0x3b,
  109. 0x51, 0x55, 0xe2, 0xb3, 0x90, 0xa2, 0xd8, 0xc5, 0xa1, 0xbe, 0xda, 0x53, 0x06, 0xeb, 0xe6, 0x61,
  110. 0xc2, 0x41, 0x09, 0x4d, 0x39, 0xb8, 0x93, 0x0d, 0x44, 0x01, 0x15, 0x45, 0xb4, 0x6b, 0x18, 0x2c,
  111. 0x9d, 0xd3, 0x7e, 0x57, 0xd4, 0xbd, 0xe8, 0x8c, 0x04, 0xd6, 0x02, 0x13, 0x93, 0x6c, 0x85, 0xd8,
  112. 0xa3, 0x13, 0x7b, 0x1c, 0xe9, 0x6b, 0x32, 0x0c, 0x25, 0x1c, 0xe8, 0x42, 0x75, 0x54, 0x12, 0xc1,
  113. 0x5c, 0x93, 0x72, 0xf0, 0xae, 0x8c, 0xbe, 0x49, 0x50, 0x5c, 0xe4, 0xfe, 0x7f, 0x2a, 0xe0, 0x8d,
  114. 0x09, 0xda, 0x1f, 0x8a, 0xda, 0x2a, 0xee, 0x8c, 0x2c, 0x67, 0xa6, 0xaf, 0xcb, 0xc7, 0xf5, 0xe3,
  115. 0xff, 0x7a, 0x5c, 0x09, 0x07, 0x9b, 0x4b, 0x57, 0x73, 0x96, 0x72, 0x70, 0xb7, 0xda, 0x43, 0x64,
  116. 0xce, 0x8a, 0xcb, 0x77, 0xae, 0xa1, 0xe2, 0x71, 0xc1, 0x8a, 0x83, 0x76, 0xa0, 0xae, 0x06, 0x76,
  117. 0x1c, 0x61, 0xa4, 0x37, 0x65, 0xe3, 0xf6, 0x12, 0x0e, 0x72, 0x24, 0xe5, 0x60, 0x53, 0xba, 0x67,
  118. 0x5b, 0x03, 0xe6, 0xb8, 0xf6, 0x83, 0xba, 0x6d, 0x8f, 0xc7, 0xf4, 0x05, 0x46, 0x96, 0x8f, 0xd9,
  119. 0x0b, 0x1a, 0x9e, 0x45, 0xba, 0x2a, 0x5f, 0xcf, 0xd7, 0x09, 0x07, 0xed, 0x9c, 0x7b, 0x92, 0x53,
  120. 0x29, 0x07, 0xdd, 0xec, 0x0d, 0x55, 0xf0, 0xea, 0x4c, 0xe9, 0x37, 0x91, 0xb0, 0x6e, 0xa7, 0x7d,
  121. 0xa7, 0xee, 0xd8, 0x31, 0xa3, 0x96, 0xed, 0xba, 0x38, 0x60, 0xd6, 0x29, 0x1d, 0x23, 0x1c, 0x46,
  122. 0xfa, 0x86, 0xbc, 0xfe, 0x07, 0x09, 0x07, 0x1d, 0x41, 0x7f, 0x26, 0xd9, 0xcf, 0x33, 0xb2, 0xe8,
  123. 0xd3, 0x35, 0xc6, 0x80, 0xd7, 0xd5, 0xda, 0x53, 0xb5, 0xe5, 0xd9, 0x53, 0x2b, 0xc2, 0x3e, 0xb2,
  124. 0xce, 0x9c, 0x20, 0xd2, 0x37, 0x7b, 0xca, 0xe0, 0xb6, 0xf9, 0x9e, 0x78, 0x87, 0x9e, 0x3d, 0xfd,
  125. 0x06, 0xfb, 0xe8, 0xd8, 0x09, 0x84, 0x6b, 0x47, 0xba, 0x96, 0x30, 0xe3, 0x35, 0x07, 0x2b, 0xc4,
  126. 0x67, 0xb0, 0x2c, 0x5c, 0x18, 0x86, 0xd8, 0x9d, 0x64, 0x86, 0xad, 0x8a, 0x21, 0xc4, 0xee, 0xa4,
  127. 0x6e, 0xb8, 0xc0, 0x2a, 0x86, 0x0b, 0x50, 0xf3, 0xd5, 0x36, 0x19, 0xf9, 0x34, 0xc4, 0xa8, 0xa8,
  128. 0x7f, 0xab, 0xb7, 0x32, 0xd8, 0x38, 0xd8, 0x1d, 0x66, 0xdf, 0x82, 0xe1, 0xd3, 0xfc, 0x5b, 0x90,
  129. 0xd5, 0x64, 0xbe, 0x2f, 0xc6, 0x2e, 0xe1, 0x60, 0x2b, 0x3f, 0xb6, 0x6c, 0xcc, 0x4e, 0x36, 0x40,
  130. 0x65, 0xd8, 0x80, 0x35, 0x99, 0xc8, 0x0b, 0xb0, 0x8f, 0x88, 0x3f, 0x2a, 0xf2, 0xda, 0x6f, 0x97,
  131. 0x97, 0x1f, 0xab, 0xe7, 0x55, 0x60, 0x03, 0xd6, 0x64, 0xda, 0xaf, 0x8a, 0xda, 0xce, 0x3a, 0xf6,
  132. 0x7d, 0x8c, 0x23, 0x66, 0x9d, 0x11, 0x47, 0xdf, 0x96, 0x3d, 0x8b, 0x2e, 0x39, 0x68, 0x7d, 0x25,
  133. 0x5a, 0x21, 0x99, 0x63, 0x62, 0x26, 0x1c, 0xb4, 0xbc, 0x32, 0x50, 0x84, 0x54, 0xd0, 0x45, 0x23,
  134. 0x93, 0x8b, 0x7e, 0x4d, 0x5e, 0x07, 0x5e, 0xce, 0xfb, 0xd5, 0x04, 0x58, 0xe1, 0x1d, 0xed, 0x53,
  135. 0xb5, 0x19, 0xfb, 0x2c, 0x8c, 0x23, 0x86, 0x91, 0xde, 0x91, 0x73, 0xd7, 0x13, 0x9f, 0x8d, 0x02,
  136. 0x4c, 0x39, 0x68, 0xcb, 0x1b, 0x14, 0x88, 0x01, 0x97, 0xac, 0xac, 0x4e, 0xfc, 0x5f, 0x31, 0x6c,
  137. 0x8d, 0x62, 0x62, 0x05, 0x34, 0x64, 0xba, 0xb6, 0xac, 0x0e, 0x4a, 0xea, 0x8b, 0x6f, 0x8f, 0x9e,
  138. 0xd1, 0x90, 0x89, 0xea, 0xc2, 0x32, 0x50, 0x54, 0x57, 0x41, 0xcb, 0xd5, 0x55, 0xe5, 0x75, 0x40,
  139. 0x54, 0x57, 0x49, 0x80, 0x0b, 0x3e, 0x26, 0x62, 0x6b, 0x1e, 0x9f, 0xbf, 0xea, 0x36, 0xe6, 0xaf,
  140. 0xba, 0x8d, 0xf3, 0xcb, 0xae, 0x32, 0xbf, 0xec, 0x2a, 0xbf, 0x5c, 0x75, 0x1b, 0xbf, 0x5d, 0x75,
  141. 0x95, 0xf9, 0x55, 0xb7, 0xf1, 0xf7, 0x55, 0xb7, 0x71, 0xf2, 0xe0, 0x2d, 0xfe, 0xbb, 0xb2, 0xb1,
  142. 0x70, 0x56, 0xe5, 0x7f, 0xd8, 0x87, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x0e, 0x8a, 0x12,
  143. 0xed, 0x08, 0x00, 0x00,
  144. }
  145. func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) {
  146. size := m.ProtoSize()
  147. dAtA = make([]byte, size)
  148. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  149. if err != nil {
  150. return nil, err
  151. }
  152. return dAtA[:n], nil
  153. }
  154. func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
  155. size := m.ProtoSize()
  156. return m.MarshalToSizedBuffer(dAtA[:size])
  157. }
  158. func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  159. i := len(dAtA)
  160. _ = i
  161. var l int
  162. _ = l
  163. if m.RemoteGUIPort != 0 {
  164. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.RemoteGUIPort))
  165. i--
  166. dAtA[i] = 0x1
  167. i--
  168. dAtA[i] = 0x90
  169. }
  170. if m.Untrusted {
  171. i--
  172. if m.Untrusted {
  173. dAtA[i] = 1
  174. } else {
  175. dAtA[i] = 0
  176. }
  177. i--
  178. dAtA[i] = 0x1
  179. i--
  180. dAtA[i] = 0x88
  181. }
  182. if m.MaxRequestKiB != 0 {
  183. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRequestKiB))
  184. i--
  185. dAtA[i] = 0x1
  186. i--
  187. dAtA[i] = 0x80
  188. }
  189. if len(m.PendingFolders) > 0 {
  190. for iNdEx := len(m.PendingFolders) - 1; iNdEx >= 0; iNdEx-- {
  191. {
  192. size, err := m.PendingFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  193. if err != nil {
  194. return 0, err
  195. }
  196. i -= size
  197. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  198. }
  199. i--
  200. dAtA[i] = 0x7a
  201. }
  202. }
  203. if len(m.IgnoredFolders) > 0 {
  204. for iNdEx := len(m.IgnoredFolders) - 1; iNdEx >= 0; iNdEx-- {
  205. {
  206. size, err := m.IgnoredFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  207. if err != nil {
  208. return 0, err
  209. }
  210. i -= size
  211. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  212. }
  213. i--
  214. dAtA[i] = 0x72
  215. }
  216. }
  217. if m.MaxRecvKbps != 0 {
  218. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRecvKbps))
  219. i--
  220. dAtA[i] = 0x68
  221. }
  222. if m.MaxSendKbps != 0 {
  223. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxSendKbps))
  224. i--
  225. dAtA[i] = 0x60
  226. }
  227. if m.AutoAcceptFolders {
  228. i--
  229. if m.AutoAcceptFolders {
  230. dAtA[i] = 1
  231. } else {
  232. dAtA[i] = 0
  233. }
  234. i--
  235. dAtA[i] = 0x58
  236. }
  237. if len(m.AllowedNetworks) > 0 {
  238. for iNdEx := len(m.AllowedNetworks) - 1; iNdEx >= 0; iNdEx-- {
  239. i -= len(m.AllowedNetworks[iNdEx])
  240. copy(dAtA[i:], m.AllowedNetworks[iNdEx])
  241. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.AllowedNetworks[iNdEx])))
  242. i--
  243. dAtA[i] = 0x52
  244. }
  245. }
  246. if m.Paused {
  247. i--
  248. if m.Paused {
  249. dAtA[i] = 1
  250. } else {
  251. dAtA[i] = 0
  252. }
  253. i--
  254. dAtA[i] = 0x48
  255. }
  256. {
  257. size := m.IntroducedBy.ProtoSize()
  258. i -= size
  259. if _, err := m.IntroducedBy.MarshalTo(dAtA[i:]); err != nil {
  260. return 0, err
  261. }
  262. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  263. }
  264. i--
  265. dAtA[i] = 0x42
  266. if m.SkipIntroductionRemovals {
  267. i--
  268. if m.SkipIntroductionRemovals {
  269. dAtA[i] = 1
  270. } else {
  271. dAtA[i] = 0
  272. }
  273. i--
  274. dAtA[i] = 0x38
  275. }
  276. if m.Introducer {
  277. i--
  278. if m.Introducer {
  279. dAtA[i] = 1
  280. } else {
  281. dAtA[i] = 0
  282. }
  283. i--
  284. dAtA[i] = 0x30
  285. }
  286. if len(m.CertName) > 0 {
  287. i -= len(m.CertName)
  288. copy(dAtA[i:], m.CertName)
  289. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.CertName)))
  290. i--
  291. dAtA[i] = 0x2a
  292. }
  293. if m.Compression != 0 {
  294. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.Compression))
  295. i--
  296. dAtA[i] = 0x20
  297. }
  298. if len(m.Addresses) > 0 {
  299. for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
  300. i -= len(m.Addresses[iNdEx])
  301. copy(dAtA[i:], m.Addresses[iNdEx])
  302. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Addresses[iNdEx])))
  303. i--
  304. dAtA[i] = 0x1a
  305. }
  306. }
  307. if len(m.Name) > 0 {
  308. i -= len(m.Name)
  309. copy(dAtA[i:], m.Name)
  310. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Name)))
  311. i--
  312. dAtA[i] = 0x12
  313. }
  314. {
  315. size := m.DeviceID.ProtoSize()
  316. i -= size
  317. if _, err := m.DeviceID.MarshalTo(dAtA[i:]); err != nil {
  318. return 0, err
  319. }
  320. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  321. }
  322. i--
  323. dAtA[i] = 0xa
  324. return len(dAtA) - i, nil
  325. }
  326. func encodeVarintDeviceconfiguration(dAtA []byte, offset int, v uint64) int {
  327. offset -= sovDeviceconfiguration(v)
  328. base := offset
  329. for v >= 1<<7 {
  330. dAtA[offset] = uint8(v&0x7f | 0x80)
  331. v >>= 7
  332. offset++
  333. }
  334. dAtA[offset] = uint8(v)
  335. return base
  336. }
  337. func (m *DeviceConfiguration) ProtoSize() (n int) {
  338. if m == nil {
  339. return 0
  340. }
  341. var l int
  342. _ = l
  343. l = m.DeviceID.ProtoSize()
  344. n += 1 + l + sovDeviceconfiguration(uint64(l))
  345. l = len(m.Name)
  346. if l > 0 {
  347. n += 1 + l + sovDeviceconfiguration(uint64(l))
  348. }
  349. if len(m.Addresses) > 0 {
  350. for _, s := range m.Addresses {
  351. l = len(s)
  352. n += 1 + l + sovDeviceconfiguration(uint64(l))
  353. }
  354. }
  355. if m.Compression != 0 {
  356. n += 1 + sovDeviceconfiguration(uint64(m.Compression))
  357. }
  358. l = len(m.CertName)
  359. if l > 0 {
  360. n += 1 + l + sovDeviceconfiguration(uint64(l))
  361. }
  362. if m.Introducer {
  363. n += 2
  364. }
  365. if m.SkipIntroductionRemovals {
  366. n += 2
  367. }
  368. l = m.IntroducedBy.ProtoSize()
  369. n += 1 + l + sovDeviceconfiguration(uint64(l))
  370. if m.Paused {
  371. n += 2
  372. }
  373. if len(m.AllowedNetworks) > 0 {
  374. for _, s := range m.AllowedNetworks {
  375. l = len(s)
  376. n += 1 + l + sovDeviceconfiguration(uint64(l))
  377. }
  378. }
  379. if m.AutoAcceptFolders {
  380. n += 2
  381. }
  382. if m.MaxSendKbps != 0 {
  383. n += 1 + sovDeviceconfiguration(uint64(m.MaxSendKbps))
  384. }
  385. if m.MaxRecvKbps != 0 {
  386. n += 1 + sovDeviceconfiguration(uint64(m.MaxRecvKbps))
  387. }
  388. if len(m.IgnoredFolders) > 0 {
  389. for _, e := range m.IgnoredFolders {
  390. l = e.ProtoSize()
  391. n += 1 + l + sovDeviceconfiguration(uint64(l))
  392. }
  393. }
  394. if len(m.PendingFolders) > 0 {
  395. for _, e := range m.PendingFolders {
  396. l = e.ProtoSize()
  397. n += 1 + l + sovDeviceconfiguration(uint64(l))
  398. }
  399. }
  400. if m.MaxRequestKiB != 0 {
  401. n += 2 + sovDeviceconfiguration(uint64(m.MaxRequestKiB))
  402. }
  403. if m.Untrusted {
  404. n += 3
  405. }
  406. if m.RemoteGUIPort != 0 {
  407. n += 2 + sovDeviceconfiguration(uint64(m.RemoteGUIPort))
  408. }
  409. return n
  410. }
  411. func sovDeviceconfiguration(x uint64) (n int) {
  412. return (math_bits.Len64(x|1) + 6) / 7
  413. }
  414. func sozDeviceconfiguration(x uint64) (n int) {
  415. return sovDeviceconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  416. }
  417. func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error {
  418. l := len(dAtA)
  419. iNdEx := 0
  420. for iNdEx < l {
  421. preIndex := iNdEx
  422. var wire uint64
  423. for shift := uint(0); ; shift += 7 {
  424. if shift >= 64 {
  425. return ErrIntOverflowDeviceconfiguration
  426. }
  427. if iNdEx >= l {
  428. return io.ErrUnexpectedEOF
  429. }
  430. b := dAtA[iNdEx]
  431. iNdEx++
  432. wire |= uint64(b&0x7F) << shift
  433. if b < 0x80 {
  434. break
  435. }
  436. }
  437. fieldNum := int32(wire >> 3)
  438. wireType := int(wire & 0x7)
  439. if wireType == 4 {
  440. return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group")
  441. }
  442. if fieldNum <= 0 {
  443. return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
  444. }
  445. switch fieldNum {
  446. case 1:
  447. if wireType != 2 {
  448. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  449. }
  450. var byteLen int
  451. for shift := uint(0); ; shift += 7 {
  452. if shift >= 64 {
  453. return ErrIntOverflowDeviceconfiguration
  454. }
  455. if iNdEx >= l {
  456. return io.ErrUnexpectedEOF
  457. }
  458. b := dAtA[iNdEx]
  459. iNdEx++
  460. byteLen |= int(b&0x7F) << shift
  461. if b < 0x80 {
  462. break
  463. }
  464. }
  465. if byteLen < 0 {
  466. return ErrInvalidLengthDeviceconfiguration
  467. }
  468. postIndex := iNdEx + byteLen
  469. if postIndex < 0 {
  470. return ErrInvalidLengthDeviceconfiguration
  471. }
  472. if postIndex > l {
  473. return io.ErrUnexpectedEOF
  474. }
  475. if err := m.DeviceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  476. return err
  477. }
  478. iNdEx = postIndex
  479. case 2:
  480. if wireType != 2 {
  481. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  482. }
  483. var stringLen uint64
  484. for shift := uint(0); ; shift += 7 {
  485. if shift >= 64 {
  486. return ErrIntOverflowDeviceconfiguration
  487. }
  488. if iNdEx >= l {
  489. return io.ErrUnexpectedEOF
  490. }
  491. b := dAtA[iNdEx]
  492. iNdEx++
  493. stringLen |= uint64(b&0x7F) << shift
  494. if b < 0x80 {
  495. break
  496. }
  497. }
  498. intStringLen := int(stringLen)
  499. if intStringLen < 0 {
  500. return ErrInvalidLengthDeviceconfiguration
  501. }
  502. postIndex := iNdEx + intStringLen
  503. if postIndex < 0 {
  504. return ErrInvalidLengthDeviceconfiguration
  505. }
  506. if postIndex > l {
  507. return io.ErrUnexpectedEOF
  508. }
  509. m.Name = string(dAtA[iNdEx:postIndex])
  510. iNdEx = postIndex
  511. case 3:
  512. if wireType != 2 {
  513. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  514. }
  515. var stringLen uint64
  516. for shift := uint(0); ; shift += 7 {
  517. if shift >= 64 {
  518. return ErrIntOverflowDeviceconfiguration
  519. }
  520. if iNdEx >= l {
  521. return io.ErrUnexpectedEOF
  522. }
  523. b := dAtA[iNdEx]
  524. iNdEx++
  525. stringLen |= uint64(b&0x7F) << shift
  526. if b < 0x80 {
  527. break
  528. }
  529. }
  530. intStringLen := int(stringLen)
  531. if intStringLen < 0 {
  532. return ErrInvalidLengthDeviceconfiguration
  533. }
  534. postIndex := iNdEx + intStringLen
  535. if postIndex < 0 {
  536. return ErrInvalidLengthDeviceconfiguration
  537. }
  538. if postIndex > l {
  539. return io.ErrUnexpectedEOF
  540. }
  541. m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
  542. iNdEx = postIndex
  543. case 4:
  544. if wireType != 0 {
  545. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  546. }
  547. m.Compression = 0
  548. for shift := uint(0); ; shift += 7 {
  549. if shift >= 64 {
  550. return ErrIntOverflowDeviceconfiguration
  551. }
  552. if iNdEx >= l {
  553. return io.ErrUnexpectedEOF
  554. }
  555. b := dAtA[iNdEx]
  556. iNdEx++
  557. m.Compression |= protocol.Compression(b&0x7F) << shift
  558. if b < 0x80 {
  559. break
  560. }
  561. }
  562. case 5:
  563. if wireType != 2 {
  564. return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
  565. }
  566. var stringLen uint64
  567. for shift := uint(0); ; shift += 7 {
  568. if shift >= 64 {
  569. return ErrIntOverflowDeviceconfiguration
  570. }
  571. if iNdEx >= l {
  572. return io.ErrUnexpectedEOF
  573. }
  574. b := dAtA[iNdEx]
  575. iNdEx++
  576. stringLen |= uint64(b&0x7F) << shift
  577. if b < 0x80 {
  578. break
  579. }
  580. }
  581. intStringLen := int(stringLen)
  582. if intStringLen < 0 {
  583. return ErrInvalidLengthDeviceconfiguration
  584. }
  585. postIndex := iNdEx + intStringLen
  586. if postIndex < 0 {
  587. return ErrInvalidLengthDeviceconfiguration
  588. }
  589. if postIndex > l {
  590. return io.ErrUnexpectedEOF
  591. }
  592. m.CertName = string(dAtA[iNdEx:postIndex])
  593. iNdEx = postIndex
  594. case 6:
  595. if wireType != 0 {
  596. return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
  597. }
  598. var v int
  599. for shift := uint(0); ; shift += 7 {
  600. if shift >= 64 {
  601. return ErrIntOverflowDeviceconfiguration
  602. }
  603. if iNdEx >= l {
  604. return io.ErrUnexpectedEOF
  605. }
  606. b := dAtA[iNdEx]
  607. iNdEx++
  608. v |= int(b&0x7F) << shift
  609. if b < 0x80 {
  610. break
  611. }
  612. }
  613. m.Introducer = bool(v != 0)
  614. case 7:
  615. if wireType != 0 {
  616. return fmt.Errorf("proto: wrong wireType = %d for field SkipIntroductionRemovals", wireType)
  617. }
  618. var v int
  619. for shift := uint(0); ; shift += 7 {
  620. if shift >= 64 {
  621. return ErrIntOverflowDeviceconfiguration
  622. }
  623. if iNdEx >= l {
  624. return io.ErrUnexpectedEOF
  625. }
  626. b := dAtA[iNdEx]
  627. iNdEx++
  628. v |= int(b&0x7F) << shift
  629. if b < 0x80 {
  630. break
  631. }
  632. }
  633. m.SkipIntroductionRemovals = bool(v != 0)
  634. case 8:
  635. if wireType != 2 {
  636. return fmt.Errorf("proto: wrong wireType = %d for field IntroducedBy", wireType)
  637. }
  638. var byteLen int
  639. for shift := uint(0); ; shift += 7 {
  640. if shift >= 64 {
  641. return ErrIntOverflowDeviceconfiguration
  642. }
  643. if iNdEx >= l {
  644. return io.ErrUnexpectedEOF
  645. }
  646. b := dAtA[iNdEx]
  647. iNdEx++
  648. byteLen |= int(b&0x7F) << shift
  649. if b < 0x80 {
  650. break
  651. }
  652. }
  653. if byteLen < 0 {
  654. return ErrInvalidLengthDeviceconfiguration
  655. }
  656. postIndex := iNdEx + byteLen
  657. if postIndex < 0 {
  658. return ErrInvalidLengthDeviceconfiguration
  659. }
  660. if postIndex > l {
  661. return io.ErrUnexpectedEOF
  662. }
  663. if err := m.IntroducedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  664. return err
  665. }
  666. iNdEx = postIndex
  667. case 9:
  668. if wireType != 0 {
  669. return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
  670. }
  671. var v int
  672. for shift := uint(0); ; shift += 7 {
  673. if shift >= 64 {
  674. return ErrIntOverflowDeviceconfiguration
  675. }
  676. if iNdEx >= l {
  677. return io.ErrUnexpectedEOF
  678. }
  679. b := dAtA[iNdEx]
  680. iNdEx++
  681. v |= int(b&0x7F) << shift
  682. if b < 0x80 {
  683. break
  684. }
  685. }
  686. m.Paused = bool(v != 0)
  687. case 10:
  688. if wireType != 2 {
  689. return fmt.Errorf("proto: wrong wireType = %d for field AllowedNetworks", wireType)
  690. }
  691. var stringLen uint64
  692. for shift := uint(0); ; shift += 7 {
  693. if shift >= 64 {
  694. return ErrIntOverflowDeviceconfiguration
  695. }
  696. if iNdEx >= l {
  697. return io.ErrUnexpectedEOF
  698. }
  699. b := dAtA[iNdEx]
  700. iNdEx++
  701. stringLen |= uint64(b&0x7F) << shift
  702. if b < 0x80 {
  703. break
  704. }
  705. }
  706. intStringLen := int(stringLen)
  707. if intStringLen < 0 {
  708. return ErrInvalidLengthDeviceconfiguration
  709. }
  710. postIndex := iNdEx + intStringLen
  711. if postIndex < 0 {
  712. return ErrInvalidLengthDeviceconfiguration
  713. }
  714. if postIndex > l {
  715. return io.ErrUnexpectedEOF
  716. }
  717. m.AllowedNetworks = append(m.AllowedNetworks, string(dAtA[iNdEx:postIndex]))
  718. iNdEx = postIndex
  719. case 11:
  720. if wireType != 0 {
  721. return fmt.Errorf("proto: wrong wireType = %d for field AutoAcceptFolders", wireType)
  722. }
  723. var v int
  724. for shift := uint(0); ; shift += 7 {
  725. if shift >= 64 {
  726. return ErrIntOverflowDeviceconfiguration
  727. }
  728. if iNdEx >= l {
  729. return io.ErrUnexpectedEOF
  730. }
  731. b := dAtA[iNdEx]
  732. iNdEx++
  733. v |= int(b&0x7F) << shift
  734. if b < 0x80 {
  735. break
  736. }
  737. }
  738. m.AutoAcceptFolders = bool(v != 0)
  739. case 12:
  740. if wireType != 0 {
  741. return fmt.Errorf("proto: wrong wireType = %d for field MaxSendKbps", wireType)
  742. }
  743. m.MaxSendKbps = 0
  744. for shift := uint(0); ; shift += 7 {
  745. if shift >= 64 {
  746. return ErrIntOverflowDeviceconfiguration
  747. }
  748. if iNdEx >= l {
  749. return io.ErrUnexpectedEOF
  750. }
  751. b := dAtA[iNdEx]
  752. iNdEx++
  753. m.MaxSendKbps |= int(b&0x7F) << shift
  754. if b < 0x80 {
  755. break
  756. }
  757. }
  758. case 13:
  759. if wireType != 0 {
  760. return fmt.Errorf("proto: wrong wireType = %d for field MaxRecvKbps", wireType)
  761. }
  762. m.MaxRecvKbps = 0
  763. for shift := uint(0); ; shift += 7 {
  764. if shift >= 64 {
  765. return ErrIntOverflowDeviceconfiguration
  766. }
  767. if iNdEx >= l {
  768. return io.ErrUnexpectedEOF
  769. }
  770. b := dAtA[iNdEx]
  771. iNdEx++
  772. m.MaxRecvKbps |= int(b&0x7F) << shift
  773. if b < 0x80 {
  774. break
  775. }
  776. }
  777. case 14:
  778. if wireType != 2 {
  779. return fmt.Errorf("proto: wrong wireType = %d for field IgnoredFolders", wireType)
  780. }
  781. var msglen int
  782. for shift := uint(0); ; shift += 7 {
  783. if shift >= 64 {
  784. return ErrIntOverflowDeviceconfiguration
  785. }
  786. if iNdEx >= l {
  787. return io.ErrUnexpectedEOF
  788. }
  789. b := dAtA[iNdEx]
  790. iNdEx++
  791. msglen |= int(b&0x7F) << shift
  792. if b < 0x80 {
  793. break
  794. }
  795. }
  796. if msglen < 0 {
  797. return ErrInvalidLengthDeviceconfiguration
  798. }
  799. postIndex := iNdEx + msglen
  800. if postIndex < 0 {
  801. return ErrInvalidLengthDeviceconfiguration
  802. }
  803. if postIndex > l {
  804. return io.ErrUnexpectedEOF
  805. }
  806. m.IgnoredFolders = append(m.IgnoredFolders, ObservedFolder{})
  807. if err := m.IgnoredFolders[len(m.IgnoredFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  808. return err
  809. }
  810. iNdEx = postIndex
  811. case 15:
  812. if wireType != 2 {
  813. return fmt.Errorf("proto: wrong wireType = %d for field PendingFolders", wireType)
  814. }
  815. var msglen int
  816. for shift := uint(0); ; shift += 7 {
  817. if shift >= 64 {
  818. return ErrIntOverflowDeviceconfiguration
  819. }
  820. if iNdEx >= l {
  821. return io.ErrUnexpectedEOF
  822. }
  823. b := dAtA[iNdEx]
  824. iNdEx++
  825. msglen |= int(b&0x7F) << shift
  826. if b < 0x80 {
  827. break
  828. }
  829. }
  830. if msglen < 0 {
  831. return ErrInvalidLengthDeviceconfiguration
  832. }
  833. postIndex := iNdEx + msglen
  834. if postIndex < 0 {
  835. return ErrInvalidLengthDeviceconfiguration
  836. }
  837. if postIndex > l {
  838. return io.ErrUnexpectedEOF
  839. }
  840. m.PendingFolders = append(m.PendingFolders, ObservedFolder{})
  841. if err := m.PendingFolders[len(m.PendingFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  842. return err
  843. }
  844. iNdEx = postIndex
  845. case 16:
  846. if wireType != 0 {
  847. return fmt.Errorf("proto: wrong wireType = %d for field MaxRequestKiB", wireType)
  848. }
  849. m.MaxRequestKiB = 0
  850. for shift := uint(0); ; shift += 7 {
  851. if shift >= 64 {
  852. return ErrIntOverflowDeviceconfiguration
  853. }
  854. if iNdEx >= l {
  855. return io.ErrUnexpectedEOF
  856. }
  857. b := dAtA[iNdEx]
  858. iNdEx++
  859. m.MaxRequestKiB |= int(b&0x7F) << shift
  860. if b < 0x80 {
  861. break
  862. }
  863. }
  864. case 17:
  865. if wireType != 0 {
  866. return fmt.Errorf("proto: wrong wireType = %d for field Untrusted", wireType)
  867. }
  868. var v int
  869. for shift := uint(0); ; shift += 7 {
  870. if shift >= 64 {
  871. return ErrIntOverflowDeviceconfiguration
  872. }
  873. if iNdEx >= l {
  874. return io.ErrUnexpectedEOF
  875. }
  876. b := dAtA[iNdEx]
  877. iNdEx++
  878. v |= int(b&0x7F) << shift
  879. if b < 0x80 {
  880. break
  881. }
  882. }
  883. m.Untrusted = bool(v != 0)
  884. case 18:
  885. if wireType != 0 {
  886. return fmt.Errorf("proto: wrong wireType = %d for field RemoteGUIPort", wireType)
  887. }
  888. m.RemoteGUIPort = 0
  889. for shift := uint(0); ; shift += 7 {
  890. if shift >= 64 {
  891. return ErrIntOverflowDeviceconfiguration
  892. }
  893. if iNdEx >= l {
  894. return io.ErrUnexpectedEOF
  895. }
  896. b := dAtA[iNdEx]
  897. iNdEx++
  898. m.RemoteGUIPort |= int(b&0x7F) << shift
  899. if b < 0x80 {
  900. break
  901. }
  902. }
  903. default:
  904. iNdEx = preIndex
  905. skippy, err := skipDeviceconfiguration(dAtA[iNdEx:])
  906. if err != nil {
  907. return err
  908. }
  909. if skippy < 0 {
  910. return ErrInvalidLengthDeviceconfiguration
  911. }
  912. if (iNdEx + skippy) < 0 {
  913. return ErrInvalidLengthDeviceconfiguration
  914. }
  915. if (iNdEx + skippy) > l {
  916. return io.ErrUnexpectedEOF
  917. }
  918. iNdEx += skippy
  919. }
  920. }
  921. if iNdEx > l {
  922. return io.ErrUnexpectedEOF
  923. }
  924. return nil
  925. }
  926. func skipDeviceconfiguration(dAtA []byte) (n int, err error) {
  927. l := len(dAtA)
  928. iNdEx := 0
  929. depth := 0
  930. for iNdEx < l {
  931. var wire uint64
  932. for shift := uint(0); ; shift += 7 {
  933. if shift >= 64 {
  934. return 0, ErrIntOverflowDeviceconfiguration
  935. }
  936. if iNdEx >= l {
  937. return 0, io.ErrUnexpectedEOF
  938. }
  939. b := dAtA[iNdEx]
  940. iNdEx++
  941. wire |= (uint64(b) & 0x7F) << shift
  942. if b < 0x80 {
  943. break
  944. }
  945. }
  946. wireType := int(wire & 0x7)
  947. switch wireType {
  948. case 0:
  949. for shift := uint(0); ; shift += 7 {
  950. if shift >= 64 {
  951. return 0, ErrIntOverflowDeviceconfiguration
  952. }
  953. if iNdEx >= l {
  954. return 0, io.ErrUnexpectedEOF
  955. }
  956. iNdEx++
  957. if dAtA[iNdEx-1] < 0x80 {
  958. break
  959. }
  960. }
  961. case 1:
  962. iNdEx += 8
  963. case 2:
  964. var length int
  965. for shift := uint(0); ; shift += 7 {
  966. if shift >= 64 {
  967. return 0, ErrIntOverflowDeviceconfiguration
  968. }
  969. if iNdEx >= l {
  970. return 0, io.ErrUnexpectedEOF
  971. }
  972. b := dAtA[iNdEx]
  973. iNdEx++
  974. length |= (int(b) & 0x7F) << shift
  975. if b < 0x80 {
  976. break
  977. }
  978. }
  979. if length < 0 {
  980. return 0, ErrInvalidLengthDeviceconfiguration
  981. }
  982. iNdEx += length
  983. case 3:
  984. depth++
  985. case 4:
  986. if depth == 0 {
  987. return 0, ErrUnexpectedEndOfGroupDeviceconfiguration
  988. }
  989. depth--
  990. case 5:
  991. iNdEx += 4
  992. default:
  993. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  994. }
  995. if iNdEx < 0 {
  996. return 0, ErrInvalidLengthDeviceconfiguration
  997. }
  998. if depth == 0 {
  999. return iNdEx, nil
  1000. }
  1001. }
  1002. return 0, io.ErrUnexpectedEOF
  1003. }
  1004. var (
  1005. ErrInvalidLengthDeviceconfiguration = fmt.Errorf("proto: negative length found during unmarshaling")
  1006. ErrIntOverflowDeviceconfiguration = fmt.Errorf("proto: integer overflow")
  1007. ErrUnexpectedEndOfGroupDeviceconfiguration = fmt.Errorf("proto: unexpected end of group")
  1008. )