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" nodefault:"true"`
  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" nodefault:"true"`
  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. DeprecatedPendingFolders []ObservedFolder `protobuf:"bytes,15,rep,name=pending_folders,json=pendingFolders,proto3" json:"-" xml:"pendingFolder,omitempty"` // Deprecated: Do not use.
  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. // 1026 bytes of a gzipped FileDescriptorProto
  82. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xbf, 0x6f, 0xdb, 0x46,
  83. 0x18, 0x15, 0xeb, 0xc4, 0xb6, 0xce, 0x3f, 0x64, 0xd3, 0x88, 0xc3, 0x18, 0x88, 0x4e, 0x50, 0x35,
  84. 0x28, 0x68, 0x22, 0x17, 0x6e, 0x27, 0xa3, 0x2d, 0x50, 0xc6, 0x68, 0x63, 0x18, 0x4d, 0x5c, 0x16,
  85. 0x5d, 0xbc, 0xb0, 0x24, 0xef, 0xac, 0x1c, 0x2c, 0xf2, 0x58, 0xf2, 0xa8, 0x58, 0x40, 0xff, 0x80,
  86. 0x76, 0x2b, 0x02, 0x74, 0xea, 0x92, 0xf6, 0xdf, 0xe8, 0xd0, 0xd5, 0x9b, 0x35, 0x16, 0x1d, 0x0e,
  87. 0x88, 0xbd, 0x71, 0x29, 0xc0, 0x31, 0x53, 0x71, 0x77, 0x14, 0x45, 0xca, 0x51, 0x50, 0xa0, 0x1b,
  88. 0xef, 0xbd, 0x77, 0xef, 0xdd, 0xf7, 0xe9, 0xbb, 0x13, 0xe8, 0x0c, 0x88, 0xbb, 0xeb, 0xd1, 0xe0,
  89. 0x94, 0xf4, 0x77, 0x11, 0x1e, 0x12, 0x0f, 0xab, 0x45, 0x12, 0x39, 0x8c, 0xd0, 0xa0, 0x17, 0x46,
  90. 0x94, 0x51, 0x7d, 0x51, 0x81, 0x3b, 0xdb, 0x42, 0x2d, 0x21, 0x8f, 0x0e, 0x76, 0x5d, 0x1c, 0x2a,
  91. 0x7e, 0xe7, 0x5e, 0xc9, 0x85, 0xba, 0x31, 0x8e, 0x86, 0x18, 0xe5, 0x54, 0x1d, 0x9f, 0x33, 0xf5,
  92. 0xd9, 0xfe, 0x67, 0x03, 0x6c, 0x1d, 0xc8, 0x8c, 0xc7, 0xe5, 0x0c, 0xfd, 0x4f, 0x0d, 0xd4, 0x55,
  93. 0xb6, 0x4d, 0x90, 0xa1, 0xb5, 0xb4, 0xee, 0xaa, 0xf9, 0x9b, 0x76, 0xc1, 0x61, 0xed, 0x6f, 0x0e,
  94. 0x3f, 0xee, 0x13, 0xf6, 0x3c, 0x71, 0x7b, 0x1e, 0xf5, 0x77, 0xe3, 0x51, 0xe0, 0xb1, 0xe7, 0x24,
  95. 0xe8, 0x97, 0xbe, 0xca, 0x27, 0xea, 0x29, 0xf7, 0xc3, 0x83, 0x2b, 0x0e, 0x97, 0x27, 0xdf, 0x29,
  96. 0x87, 0xcb, 0x28, 0xff, 0xce, 0x38, 0x6c, 0x9e, 0xfb, 0x83, 0xfd, 0x36, 0x41, 0x0f, 0x1d, 0xc6,
  97. 0xa2, 0x76, 0x2b, 0xa0, 0x08, 0x9f, 0x3a, 0xc9, 0x80, 0xed, 0xb7, 0x59, 0x94, 0xe0, 0x76, 0x7a,
  98. 0xd9, 0x59, 0xca, 0xc9, 0xec, 0xb2, 0x53, 0x6c, 0xfc, 0x71, 0xdc, 0xd1, 0x5e, 0x8e, 0x3b, 0x85,
  99. 0xe9, 0xab, 0x71, 0x47, 0xb3, 0x26, 0x2c, 0xd2, 0x8f, 0xc1, 0xad, 0xc0, 0xf1, 0xb1, 0xf1, 0x5e,
  100. 0x4b, 0xeb, 0xd6, 0xcd, 0x4f, 0x52, 0x0e, 0xe5, 0x3a, 0xe3, 0xf0, 0x9e, 0x8c, 0x13, 0x0b, 0xe9,
  101. 0xf9, 0x90, 0xfa, 0x84, 0x61, 0x3f, 0x64, 0x23, 0x91, 0xb4, 0xf5, 0x16, 0xdc, 0x92, 0x3b, 0xf5,
  102. 0x73, 0x50, 0x77, 0x10, 0x8a, 0x70, 0x1c, 0xe3, 0xd8, 0x58, 0x68, 0x2d, 0x74, 0xeb, 0xe6, 0x49,
  103. 0xca, 0xe1, 0x14, 0xcc, 0x38, 0x7c, 0x20, 0xbd, 0x73, 0xa4, 0xe4, 0xdc, 0x2a, 0x4a, 0x42, 0xa3,
  104. 0xc0, 0xf1, 0x89, 0x27, 0xb2, 0x36, 0x6f, 0xe8, 0xde, 0x5c, 0x76, 0x96, 0x72, 0x81, 0x35, 0xf5,
  105. 0xd5, 0x87, 0x60, 0xc5, 0xa3, 0x7e, 0x28, 0x56, 0x84, 0x06, 0xc6, 0xad, 0x96, 0xd6, 0x5d, 0xdf,
  106. 0xbb, 0xd3, 0x2b, 0x7a, 0xfc, 0x78, 0x4a, 0x9a, 0x9f, 0xa6, 0x1c, 0x96, 0xd5, 0x19, 0x87, 0xdb,
  107. 0xf2, 0x50, 0x25, 0x4c, 0x35, 0x3a, 0xbd, 0xec, 0x6c, 0xcc, 0x82, 0x56, 0x79, 0xab, 0x8e, 0x41,
  108. 0xdd, 0xc3, 0x11, 0xb3, 0x65, 0x23, 0x6f, 0xcb, 0x46, 0x3e, 0x11, 0xbf, 0x9d, 0x00, 0x9f, 0xaa,
  109. 0x66, 0xde, 0x57, 0xde, 0x39, 0xf0, 0x96, 0x86, 0xde, 0x9d, 0xc3, 0x59, 0x85, 0x8b, 0x7e, 0x02,
  110. 0x00, 0x09, 0x58, 0x44, 0x51, 0xe2, 0xe1, 0xc8, 0x58, 0x6c, 0x69, 0xdd, 0x65, 0x73, 0x3f, 0xe5,
  111. 0xb0, 0x84, 0x66, 0x1c, 0xde, 0x51, 0x53, 0x52, 0x40, 0x45, 0x11, 0x8d, 0x19, 0xcc, 0x2a, 0xed,
  112. 0xd3, 0x7f, 0xd7, 0xc0, 0x4e, 0x7c, 0x46, 0x42, 0x7b, 0x82, 0x89, 0xf1, 0xb6, 0x23, 0xec, 0xd3,
  113. 0xa1, 0x33, 0x88, 0x8d, 0x25, 0x19, 0x86, 0x52, 0x0e, 0x0d, 0xa1, 0x3a, 0x2c, 0x89, 0xac, 0x5c,
  114. 0x93, 0x71, 0xf8, 0xbe, 0x8c, 0x9e, 0x27, 0x28, 0x0e, 0x72, 0xff, 0x9d, 0x0a, 0x6b, 0x6e, 0x82,
  115. 0xfe, 0x87, 0x06, 0xd6, 0x8a, 0x33, 0x23, 0xdb, 0x1d, 0x19, 0xcb, 0xf2, 0xc6, 0xfd, 0xf2, 0xbf,
  116. 0x6e, 0x5c, 0xca, 0xe1, 0xea, 0xd4, 0xd5, 0x1c, 0x65, 0x1c, 0x76, 0xab, 0x3d, 0x44, 0xe6, 0x68,
  117. 0xfe, 0x9d, 0xdb, 0xbc, 0x21, 0x13, 0x37, 0x4e, 0xde, 0xb2, 0x8a, 0xad, 0xbe, 0x07, 0x16, 0x43,
  118. 0x27, 0x89, 0x31, 0x32, 0xea, 0xb2, 0x9b, 0x3b, 0x29, 0x87, 0x39, 0x92, 0x71, 0xb8, 0x2a, 0x23,
  119. 0xd5, 0xb2, 0x6d, 0xe5, 0xb8, 0xfe, 0x03, 0xd8, 0x70, 0x06, 0x03, 0xfa, 0x02, 0x23, 0x3b, 0xc0,
  120. 0xec, 0x05, 0x8d, 0xce, 0x62, 0x03, 0xc8, 0x2b, 0xf5, 0x75, 0xca, 0x61, 0x23, 0xe7, 0x9e, 0xe6,
  121. 0x54, 0xf1, 0x46, 0x54, 0xf1, 0xea, 0xa0, 0x19, 0xf3, 0x48, 0x6b, 0xd6, 0x4e, 0xff, 0x0e, 0x6c,
  122. 0x39, 0x09, 0xa3, 0xb6, 0xe3, 0x79, 0x38, 0x64, 0xf6, 0x29, 0x1d, 0x20, 0x1c, 0xc5, 0xc6, 0x8a,
  123. 0x3c, 0xfe, 0x87, 0x29, 0x87, 0x9b, 0x82, 0xfe, 0x5c, 0xb2, 0x5f, 0x28, 0x32, 0xe3, 0xf0, 0xae,
  124. 0x3a, 0xc2, 0x2c, 0xd3, 0xb6, 0x6e, 0xaa, 0xf5, 0x67, 0x60, 0xcd, 0x77, 0xce, 0xed, 0x18, 0x07,
  125. 0xc8, 0x3e, 0x73, 0xc3, 0xd8, 0x58, 0x6d, 0x69, 0xdd, 0xdb, 0xe6, 0x07, 0xe2, 0x72, 0xfa, 0xce,
  126. 0xf9, 0x37, 0x38, 0x40, 0x47, 0x6e, 0x28, 0x5c, 0x37, 0xa5, 0x6b, 0x09, 0x6b, 0xbf, 0xe1, 0x70,
  127. 0x81, 0x04, 0xcc, 0x2a, 0x0b, 0x27, 0x86, 0x11, 0xf6, 0x86, 0xca, 0x70, 0xad, 0x62, 0x68, 0x61,
  128. 0x6f, 0x38, 0x6b, 0x38, 0xc1, 0x2a, 0x86, 0x13, 0x50, 0x0f, 0x40, 0x83, 0xf4, 0x03, 0x1a, 0x61,
  129. 0x54, 0xd4, 0xbf, 0xde, 0x5a, 0xe8, 0xae, 0xec, 0x6d, 0xf7, 0xd4, 0xbf, 0x46, 0xef, 0x59, 0xfe,
  130. 0xaf, 0xa1, 0x6a, 0x32, 0x1f, 0x89, 0x59, 0x4c, 0x39, 0x5c, 0xcf, 0xb7, 0x4d, 0x1b, 0xb3, 0xa5,
  131. 0xa6, 0xaa, 0x0c, 0xb7, 0xad, 0x19, 0x99, 0xfe, 0x93, 0x06, 0x1a, 0x21, 0x0e, 0x10, 0x09, 0xfa,
  132. 0x45, 0x60, 0xe3, 0x9d, 0x81, 0x4f, 0x44, 0xe0, 0x15, 0x87, 0xc6, 0x01, 0x0e, 0x23, 0xec, 0x39,
  133. 0x0c, 0xa3, 0x63, 0x65, 0x90, 0x7b, 0xa6, 0x1c, 0x6a, 0x8f, 0x8a, 0x37, 0x28, 0x2c, 0x73, 0xa5,
  134. 0xd1, 0x30, 0x34, 0x6b, 0xbd, 0xc2, 0xc5, 0xfa, 0xaf, 0x1a, 0x68, 0xa8, 0x6e, 0x7e, 0x9f, 0xe0,
  135. 0x98, 0xd9, 0x67, 0xc4, 0x35, 0x36, 0x64, 0x3f, 0xe3, 0x2b, 0x0e, 0xd7, 0xbe, 0x12, 0x6d, 0x92,
  136. 0xcc, 0x11, 0x31, 0x53, 0x0e, 0xd7, 0xfc, 0x32, 0x50, 0x14, 0x5c, 0x41, 0x27, 0x4d, 0x4e, 0x2f,
  137. 0x3b, 0x33, 0xf2, 0x59, 0xe0, 0xe5, 0xb8, 0x53, 0x4d, 0xb0, 0x2a, 0xbc, 0xab, 0x7f, 0x06, 0xea,
  138. 0x49, 0xc0, 0xa2, 0x24, 0x66, 0x18, 0x19, 0x9b, 0x72, 0x26, 0x5b, 0xe2, 0x7f, 0xa6, 0x00, 0x33,
  139. 0x0e, 0x1b, 0xf2, 0x04, 0x05, 0xd2, 0xb6, 0xa6, 0xac, 0xac, 0x4e, 0x3c, 0x70, 0x0c, 0xdb, 0xfd,
  140. 0x84, 0xd8, 0x21, 0x8d, 0x98, 0xa1, 0x4f, 0xab, 0xb3, 0x24, 0xf5, 0xe5, 0xb7, 0x87, 0xc7, 0x34,
  141. 0x62, 0xa2, 0xba, 0xa8, 0x0c, 0x14, 0xd5, 0x55, 0xd0, 0x72, 0x75, 0x55, 0xf9, 0x2c, 0x20, 0xaa,
  142. 0xab, 0x24, 0x58, 0x13, 0x3e, 0x21, 0x62, 0x69, 0x1e, 0x5d, 0xbc, 0x6e, 0xd6, 0xc6, 0xaf, 0x9b,
  143. 0xb5, 0x8b, 0xab, 0xa6, 0x36, 0xbe, 0x6a, 0x6a, 0x3f, 0x5f, 0x37, 0x6b, 0xaf, 0xae, 0x9b, 0xda,
  144. 0xf8, 0xba, 0x59, 0xfb, 0xeb, 0xba, 0x59, 0x3b, 0x79, 0xf0, 0x1f, 0x1e, 0x3b, 0x35, 0x31, 0xee,
  145. 0xa2, 0x7c, 0xf4, 0x3e, 0xfa, 0x37, 0x00, 0x00, 0xff, 0xff, 0xbf, 0x4a, 0x4f, 0x60, 0x33, 0x09,
  146. 0x00, 0x00,
  147. }
  148. func (m *DeviceConfiguration) Marshal() (dAtA []byte, err error) {
  149. size := m.ProtoSize()
  150. dAtA = make([]byte, size)
  151. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  152. if err != nil {
  153. return nil, err
  154. }
  155. return dAtA[:n], nil
  156. }
  157. func (m *DeviceConfiguration) MarshalTo(dAtA []byte) (int, error) {
  158. size := m.ProtoSize()
  159. return m.MarshalToSizedBuffer(dAtA[:size])
  160. }
  161. func (m *DeviceConfiguration) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  162. i := len(dAtA)
  163. _ = i
  164. var l int
  165. _ = l
  166. if m.RemoteGUIPort != 0 {
  167. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.RemoteGUIPort))
  168. i--
  169. dAtA[i] = 0x1
  170. i--
  171. dAtA[i] = 0x90
  172. }
  173. if m.Untrusted {
  174. i--
  175. if m.Untrusted {
  176. dAtA[i] = 1
  177. } else {
  178. dAtA[i] = 0
  179. }
  180. i--
  181. dAtA[i] = 0x1
  182. i--
  183. dAtA[i] = 0x88
  184. }
  185. if m.MaxRequestKiB != 0 {
  186. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRequestKiB))
  187. i--
  188. dAtA[i] = 0x1
  189. i--
  190. dAtA[i] = 0x80
  191. }
  192. if len(m.DeprecatedPendingFolders) > 0 {
  193. for iNdEx := len(m.DeprecatedPendingFolders) - 1; iNdEx >= 0; iNdEx-- {
  194. {
  195. size, err := m.DeprecatedPendingFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  196. if err != nil {
  197. return 0, err
  198. }
  199. i -= size
  200. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  201. }
  202. i--
  203. dAtA[i] = 0x7a
  204. }
  205. }
  206. if len(m.IgnoredFolders) > 0 {
  207. for iNdEx := len(m.IgnoredFolders) - 1; iNdEx >= 0; iNdEx-- {
  208. {
  209. size, err := m.IgnoredFolders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  210. if err != nil {
  211. return 0, err
  212. }
  213. i -= size
  214. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  215. }
  216. i--
  217. dAtA[i] = 0x72
  218. }
  219. }
  220. if m.MaxRecvKbps != 0 {
  221. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxRecvKbps))
  222. i--
  223. dAtA[i] = 0x68
  224. }
  225. if m.MaxSendKbps != 0 {
  226. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.MaxSendKbps))
  227. i--
  228. dAtA[i] = 0x60
  229. }
  230. if m.AutoAcceptFolders {
  231. i--
  232. if m.AutoAcceptFolders {
  233. dAtA[i] = 1
  234. } else {
  235. dAtA[i] = 0
  236. }
  237. i--
  238. dAtA[i] = 0x58
  239. }
  240. if len(m.AllowedNetworks) > 0 {
  241. for iNdEx := len(m.AllowedNetworks) - 1; iNdEx >= 0; iNdEx-- {
  242. i -= len(m.AllowedNetworks[iNdEx])
  243. copy(dAtA[i:], m.AllowedNetworks[iNdEx])
  244. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.AllowedNetworks[iNdEx])))
  245. i--
  246. dAtA[i] = 0x52
  247. }
  248. }
  249. if m.Paused {
  250. i--
  251. if m.Paused {
  252. dAtA[i] = 1
  253. } else {
  254. dAtA[i] = 0
  255. }
  256. i--
  257. dAtA[i] = 0x48
  258. }
  259. {
  260. size := m.IntroducedBy.ProtoSize()
  261. i -= size
  262. if _, err := m.IntroducedBy.MarshalTo(dAtA[i:]); err != nil {
  263. return 0, err
  264. }
  265. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  266. }
  267. i--
  268. dAtA[i] = 0x42
  269. if m.SkipIntroductionRemovals {
  270. i--
  271. if m.SkipIntroductionRemovals {
  272. dAtA[i] = 1
  273. } else {
  274. dAtA[i] = 0
  275. }
  276. i--
  277. dAtA[i] = 0x38
  278. }
  279. if m.Introducer {
  280. i--
  281. if m.Introducer {
  282. dAtA[i] = 1
  283. } else {
  284. dAtA[i] = 0
  285. }
  286. i--
  287. dAtA[i] = 0x30
  288. }
  289. if len(m.CertName) > 0 {
  290. i -= len(m.CertName)
  291. copy(dAtA[i:], m.CertName)
  292. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.CertName)))
  293. i--
  294. dAtA[i] = 0x2a
  295. }
  296. if m.Compression != 0 {
  297. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(m.Compression))
  298. i--
  299. dAtA[i] = 0x20
  300. }
  301. if len(m.Addresses) > 0 {
  302. for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
  303. i -= len(m.Addresses[iNdEx])
  304. copy(dAtA[i:], m.Addresses[iNdEx])
  305. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Addresses[iNdEx])))
  306. i--
  307. dAtA[i] = 0x1a
  308. }
  309. }
  310. if len(m.Name) > 0 {
  311. i -= len(m.Name)
  312. copy(dAtA[i:], m.Name)
  313. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(len(m.Name)))
  314. i--
  315. dAtA[i] = 0x12
  316. }
  317. {
  318. size := m.DeviceID.ProtoSize()
  319. i -= size
  320. if _, err := m.DeviceID.MarshalTo(dAtA[i:]); err != nil {
  321. return 0, err
  322. }
  323. i = encodeVarintDeviceconfiguration(dAtA, i, uint64(size))
  324. }
  325. i--
  326. dAtA[i] = 0xa
  327. return len(dAtA) - i, nil
  328. }
  329. func encodeVarintDeviceconfiguration(dAtA []byte, offset int, v uint64) int {
  330. offset -= sovDeviceconfiguration(v)
  331. base := offset
  332. for v >= 1<<7 {
  333. dAtA[offset] = uint8(v&0x7f | 0x80)
  334. v >>= 7
  335. offset++
  336. }
  337. dAtA[offset] = uint8(v)
  338. return base
  339. }
  340. func (m *DeviceConfiguration) ProtoSize() (n int) {
  341. if m == nil {
  342. return 0
  343. }
  344. var l int
  345. _ = l
  346. l = m.DeviceID.ProtoSize()
  347. n += 1 + l + sovDeviceconfiguration(uint64(l))
  348. l = len(m.Name)
  349. if l > 0 {
  350. n += 1 + l + sovDeviceconfiguration(uint64(l))
  351. }
  352. if len(m.Addresses) > 0 {
  353. for _, s := range m.Addresses {
  354. l = len(s)
  355. n += 1 + l + sovDeviceconfiguration(uint64(l))
  356. }
  357. }
  358. if m.Compression != 0 {
  359. n += 1 + sovDeviceconfiguration(uint64(m.Compression))
  360. }
  361. l = len(m.CertName)
  362. if l > 0 {
  363. n += 1 + l + sovDeviceconfiguration(uint64(l))
  364. }
  365. if m.Introducer {
  366. n += 2
  367. }
  368. if m.SkipIntroductionRemovals {
  369. n += 2
  370. }
  371. l = m.IntroducedBy.ProtoSize()
  372. n += 1 + l + sovDeviceconfiguration(uint64(l))
  373. if m.Paused {
  374. n += 2
  375. }
  376. if len(m.AllowedNetworks) > 0 {
  377. for _, s := range m.AllowedNetworks {
  378. l = len(s)
  379. n += 1 + l + sovDeviceconfiguration(uint64(l))
  380. }
  381. }
  382. if m.AutoAcceptFolders {
  383. n += 2
  384. }
  385. if m.MaxSendKbps != 0 {
  386. n += 1 + sovDeviceconfiguration(uint64(m.MaxSendKbps))
  387. }
  388. if m.MaxRecvKbps != 0 {
  389. n += 1 + sovDeviceconfiguration(uint64(m.MaxRecvKbps))
  390. }
  391. if len(m.IgnoredFolders) > 0 {
  392. for _, e := range m.IgnoredFolders {
  393. l = e.ProtoSize()
  394. n += 1 + l + sovDeviceconfiguration(uint64(l))
  395. }
  396. }
  397. if len(m.DeprecatedPendingFolders) > 0 {
  398. for _, e := range m.DeprecatedPendingFolders {
  399. l = e.ProtoSize()
  400. n += 1 + l + sovDeviceconfiguration(uint64(l))
  401. }
  402. }
  403. if m.MaxRequestKiB != 0 {
  404. n += 2 + sovDeviceconfiguration(uint64(m.MaxRequestKiB))
  405. }
  406. if m.Untrusted {
  407. n += 3
  408. }
  409. if m.RemoteGUIPort != 0 {
  410. n += 2 + sovDeviceconfiguration(uint64(m.RemoteGUIPort))
  411. }
  412. return n
  413. }
  414. func sovDeviceconfiguration(x uint64) (n int) {
  415. return (math_bits.Len64(x|1) + 6) / 7
  416. }
  417. func sozDeviceconfiguration(x uint64) (n int) {
  418. return sovDeviceconfiguration(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  419. }
  420. func (m *DeviceConfiguration) Unmarshal(dAtA []byte) error {
  421. l := len(dAtA)
  422. iNdEx := 0
  423. for iNdEx < l {
  424. preIndex := iNdEx
  425. var wire uint64
  426. for shift := uint(0); ; shift += 7 {
  427. if shift >= 64 {
  428. return ErrIntOverflowDeviceconfiguration
  429. }
  430. if iNdEx >= l {
  431. return io.ErrUnexpectedEOF
  432. }
  433. b := dAtA[iNdEx]
  434. iNdEx++
  435. wire |= uint64(b&0x7F) << shift
  436. if b < 0x80 {
  437. break
  438. }
  439. }
  440. fieldNum := int32(wire >> 3)
  441. wireType := int(wire & 0x7)
  442. if wireType == 4 {
  443. return fmt.Errorf("proto: DeviceConfiguration: wiretype end group for non-group")
  444. }
  445. if fieldNum <= 0 {
  446. return fmt.Errorf("proto: DeviceConfiguration: illegal tag %d (wire type %d)", fieldNum, wire)
  447. }
  448. switch fieldNum {
  449. case 1:
  450. if wireType != 2 {
  451. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  452. }
  453. var byteLen int
  454. for shift := uint(0); ; shift += 7 {
  455. if shift >= 64 {
  456. return ErrIntOverflowDeviceconfiguration
  457. }
  458. if iNdEx >= l {
  459. return io.ErrUnexpectedEOF
  460. }
  461. b := dAtA[iNdEx]
  462. iNdEx++
  463. byteLen |= int(b&0x7F) << shift
  464. if b < 0x80 {
  465. break
  466. }
  467. }
  468. if byteLen < 0 {
  469. return ErrInvalidLengthDeviceconfiguration
  470. }
  471. postIndex := iNdEx + byteLen
  472. if postIndex < 0 {
  473. return ErrInvalidLengthDeviceconfiguration
  474. }
  475. if postIndex > l {
  476. return io.ErrUnexpectedEOF
  477. }
  478. if err := m.DeviceID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  479. return err
  480. }
  481. iNdEx = postIndex
  482. case 2:
  483. if wireType != 2 {
  484. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  485. }
  486. var stringLen uint64
  487. for shift := uint(0); ; shift += 7 {
  488. if shift >= 64 {
  489. return ErrIntOverflowDeviceconfiguration
  490. }
  491. if iNdEx >= l {
  492. return io.ErrUnexpectedEOF
  493. }
  494. b := dAtA[iNdEx]
  495. iNdEx++
  496. stringLen |= uint64(b&0x7F) << shift
  497. if b < 0x80 {
  498. break
  499. }
  500. }
  501. intStringLen := int(stringLen)
  502. if intStringLen < 0 {
  503. return ErrInvalidLengthDeviceconfiguration
  504. }
  505. postIndex := iNdEx + intStringLen
  506. if postIndex < 0 {
  507. return ErrInvalidLengthDeviceconfiguration
  508. }
  509. if postIndex > l {
  510. return io.ErrUnexpectedEOF
  511. }
  512. m.Name = string(dAtA[iNdEx:postIndex])
  513. iNdEx = postIndex
  514. case 3:
  515. if wireType != 2 {
  516. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  517. }
  518. var stringLen uint64
  519. for shift := uint(0); ; shift += 7 {
  520. if shift >= 64 {
  521. return ErrIntOverflowDeviceconfiguration
  522. }
  523. if iNdEx >= l {
  524. return io.ErrUnexpectedEOF
  525. }
  526. b := dAtA[iNdEx]
  527. iNdEx++
  528. stringLen |= uint64(b&0x7F) << shift
  529. if b < 0x80 {
  530. break
  531. }
  532. }
  533. intStringLen := int(stringLen)
  534. if intStringLen < 0 {
  535. return ErrInvalidLengthDeviceconfiguration
  536. }
  537. postIndex := iNdEx + intStringLen
  538. if postIndex < 0 {
  539. return ErrInvalidLengthDeviceconfiguration
  540. }
  541. if postIndex > l {
  542. return io.ErrUnexpectedEOF
  543. }
  544. m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
  545. iNdEx = postIndex
  546. case 4:
  547. if wireType != 0 {
  548. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  549. }
  550. m.Compression = 0
  551. for shift := uint(0); ; shift += 7 {
  552. if shift >= 64 {
  553. return ErrIntOverflowDeviceconfiguration
  554. }
  555. if iNdEx >= l {
  556. return io.ErrUnexpectedEOF
  557. }
  558. b := dAtA[iNdEx]
  559. iNdEx++
  560. m.Compression |= protocol.Compression(b&0x7F) << shift
  561. if b < 0x80 {
  562. break
  563. }
  564. }
  565. case 5:
  566. if wireType != 2 {
  567. return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
  568. }
  569. var stringLen uint64
  570. for shift := uint(0); ; shift += 7 {
  571. if shift >= 64 {
  572. return ErrIntOverflowDeviceconfiguration
  573. }
  574. if iNdEx >= l {
  575. return io.ErrUnexpectedEOF
  576. }
  577. b := dAtA[iNdEx]
  578. iNdEx++
  579. stringLen |= uint64(b&0x7F) << shift
  580. if b < 0x80 {
  581. break
  582. }
  583. }
  584. intStringLen := int(stringLen)
  585. if intStringLen < 0 {
  586. return ErrInvalidLengthDeviceconfiguration
  587. }
  588. postIndex := iNdEx + intStringLen
  589. if postIndex < 0 {
  590. return ErrInvalidLengthDeviceconfiguration
  591. }
  592. if postIndex > l {
  593. return io.ErrUnexpectedEOF
  594. }
  595. m.CertName = string(dAtA[iNdEx:postIndex])
  596. iNdEx = postIndex
  597. case 6:
  598. if wireType != 0 {
  599. return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
  600. }
  601. var v int
  602. for shift := uint(0); ; shift += 7 {
  603. if shift >= 64 {
  604. return ErrIntOverflowDeviceconfiguration
  605. }
  606. if iNdEx >= l {
  607. return io.ErrUnexpectedEOF
  608. }
  609. b := dAtA[iNdEx]
  610. iNdEx++
  611. v |= int(b&0x7F) << shift
  612. if b < 0x80 {
  613. break
  614. }
  615. }
  616. m.Introducer = bool(v != 0)
  617. case 7:
  618. if wireType != 0 {
  619. return fmt.Errorf("proto: wrong wireType = %d for field SkipIntroductionRemovals", wireType)
  620. }
  621. var v int
  622. for shift := uint(0); ; shift += 7 {
  623. if shift >= 64 {
  624. return ErrIntOverflowDeviceconfiguration
  625. }
  626. if iNdEx >= l {
  627. return io.ErrUnexpectedEOF
  628. }
  629. b := dAtA[iNdEx]
  630. iNdEx++
  631. v |= int(b&0x7F) << shift
  632. if b < 0x80 {
  633. break
  634. }
  635. }
  636. m.SkipIntroductionRemovals = bool(v != 0)
  637. case 8:
  638. if wireType != 2 {
  639. return fmt.Errorf("proto: wrong wireType = %d for field IntroducedBy", wireType)
  640. }
  641. var byteLen int
  642. for shift := uint(0); ; shift += 7 {
  643. if shift >= 64 {
  644. return ErrIntOverflowDeviceconfiguration
  645. }
  646. if iNdEx >= l {
  647. return io.ErrUnexpectedEOF
  648. }
  649. b := dAtA[iNdEx]
  650. iNdEx++
  651. byteLen |= int(b&0x7F) << shift
  652. if b < 0x80 {
  653. break
  654. }
  655. }
  656. if byteLen < 0 {
  657. return ErrInvalidLengthDeviceconfiguration
  658. }
  659. postIndex := iNdEx + byteLen
  660. if postIndex < 0 {
  661. return ErrInvalidLengthDeviceconfiguration
  662. }
  663. if postIndex > l {
  664. return io.ErrUnexpectedEOF
  665. }
  666. if err := m.IntroducedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  667. return err
  668. }
  669. iNdEx = postIndex
  670. case 9:
  671. if wireType != 0 {
  672. return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
  673. }
  674. var v int
  675. for shift := uint(0); ; shift += 7 {
  676. if shift >= 64 {
  677. return ErrIntOverflowDeviceconfiguration
  678. }
  679. if iNdEx >= l {
  680. return io.ErrUnexpectedEOF
  681. }
  682. b := dAtA[iNdEx]
  683. iNdEx++
  684. v |= int(b&0x7F) << shift
  685. if b < 0x80 {
  686. break
  687. }
  688. }
  689. m.Paused = bool(v != 0)
  690. case 10:
  691. if wireType != 2 {
  692. return fmt.Errorf("proto: wrong wireType = %d for field AllowedNetworks", wireType)
  693. }
  694. var stringLen uint64
  695. for shift := uint(0); ; shift += 7 {
  696. if shift >= 64 {
  697. return ErrIntOverflowDeviceconfiguration
  698. }
  699. if iNdEx >= l {
  700. return io.ErrUnexpectedEOF
  701. }
  702. b := dAtA[iNdEx]
  703. iNdEx++
  704. stringLen |= uint64(b&0x7F) << shift
  705. if b < 0x80 {
  706. break
  707. }
  708. }
  709. intStringLen := int(stringLen)
  710. if intStringLen < 0 {
  711. return ErrInvalidLengthDeviceconfiguration
  712. }
  713. postIndex := iNdEx + intStringLen
  714. if postIndex < 0 {
  715. return ErrInvalidLengthDeviceconfiguration
  716. }
  717. if postIndex > l {
  718. return io.ErrUnexpectedEOF
  719. }
  720. m.AllowedNetworks = append(m.AllowedNetworks, string(dAtA[iNdEx:postIndex]))
  721. iNdEx = postIndex
  722. case 11:
  723. if wireType != 0 {
  724. return fmt.Errorf("proto: wrong wireType = %d for field AutoAcceptFolders", wireType)
  725. }
  726. var v int
  727. for shift := uint(0); ; shift += 7 {
  728. if shift >= 64 {
  729. return ErrIntOverflowDeviceconfiguration
  730. }
  731. if iNdEx >= l {
  732. return io.ErrUnexpectedEOF
  733. }
  734. b := dAtA[iNdEx]
  735. iNdEx++
  736. v |= int(b&0x7F) << shift
  737. if b < 0x80 {
  738. break
  739. }
  740. }
  741. m.AutoAcceptFolders = bool(v != 0)
  742. case 12:
  743. if wireType != 0 {
  744. return fmt.Errorf("proto: wrong wireType = %d for field MaxSendKbps", wireType)
  745. }
  746. m.MaxSendKbps = 0
  747. for shift := uint(0); ; shift += 7 {
  748. if shift >= 64 {
  749. return ErrIntOverflowDeviceconfiguration
  750. }
  751. if iNdEx >= l {
  752. return io.ErrUnexpectedEOF
  753. }
  754. b := dAtA[iNdEx]
  755. iNdEx++
  756. m.MaxSendKbps |= int(b&0x7F) << shift
  757. if b < 0x80 {
  758. break
  759. }
  760. }
  761. case 13:
  762. if wireType != 0 {
  763. return fmt.Errorf("proto: wrong wireType = %d for field MaxRecvKbps", wireType)
  764. }
  765. m.MaxRecvKbps = 0
  766. for shift := uint(0); ; shift += 7 {
  767. if shift >= 64 {
  768. return ErrIntOverflowDeviceconfiguration
  769. }
  770. if iNdEx >= l {
  771. return io.ErrUnexpectedEOF
  772. }
  773. b := dAtA[iNdEx]
  774. iNdEx++
  775. m.MaxRecvKbps |= int(b&0x7F) << shift
  776. if b < 0x80 {
  777. break
  778. }
  779. }
  780. case 14:
  781. if wireType != 2 {
  782. return fmt.Errorf("proto: wrong wireType = %d for field IgnoredFolders", wireType)
  783. }
  784. var msglen int
  785. for shift := uint(0); ; shift += 7 {
  786. if shift >= 64 {
  787. return ErrIntOverflowDeviceconfiguration
  788. }
  789. if iNdEx >= l {
  790. return io.ErrUnexpectedEOF
  791. }
  792. b := dAtA[iNdEx]
  793. iNdEx++
  794. msglen |= int(b&0x7F) << shift
  795. if b < 0x80 {
  796. break
  797. }
  798. }
  799. if msglen < 0 {
  800. return ErrInvalidLengthDeviceconfiguration
  801. }
  802. postIndex := iNdEx + msglen
  803. if postIndex < 0 {
  804. return ErrInvalidLengthDeviceconfiguration
  805. }
  806. if postIndex > l {
  807. return io.ErrUnexpectedEOF
  808. }
  809. m.IgnoredFolders = append(m.IgnoredFolders, ObservedFolder{})
  810. if err := m.IgnoredFolders[len(m.IgnoredFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  811. return err
  812. }
  813. iNdEx = postIndex
  814. case 15:
  815. if wireType != 2 {
  816. return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedPendingFolders", wireType)
  817. }
  818. var msglen int
  819. for shift := uint(0); ; shift += 7 {
  820. if shift >= 64 {
  821. return ErrIntOverflowDeviceconfiguration
  822. }
  823. if iNdEx >= l {
  824. return io.ErrUnexpectedEOF
  825. }
  826. b := dAtA[iNdEx]
  827. iNdEx++
  828. msglen |= int(b&0x7F) << shift
  829. if b < 0x80 {
  830. break
  831. }
  832. }
  833. if msglen < 0 {
  834. return ErrInvalidLengthDeviceconfiguration
  835. }
  836. postIndex := iNdEx + msglen
  837. if postIndex < 0 {
  838. return ErrInvalidLengthDeviceconfiguration
  839. }
  840. if postIndex > l {
  841. return io.ErrUnexpectedEOF
  842. }
  843. m.DeprecatedPendingFolders = append(m.DeprecatedPendingFolders, ObservedFolder{})
  844. if err := m.DeprecatedPendingFolders[len(m.DeprecatedPendingFolders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  845. return err
  846. }
  847. iNdEx = postIndex
  848. case 16:
  849. if wireType != 0 {
  850. return fmt.Errorf("proto: wrong wireType = %d for field MaxRequestKiB", wireType)
  851. }
  852. m.MaxRequestKiB = 0
  853. for shift := uint(0); ; shift += 7 {
  854. if shift >= 64 {
  855. return ErrIntOverflowDeviceconfiguration
  856. }
  857. if iNdEx >= l {
  858. return io.ErrUnexpectedEOF
  859. }
  860. b := dAtA[iNdEx]
  861. iNdEx++
  862. m.MaxRequestKiB |= int(b&0x7F) << shift
  863. if b < 0x80 {
  864. break
  865. }
  866. }
  867. case 17:
  868. if wireType != 0 {
  869. return fmt.Errorf("proto: wrong wireType = %d for field Untrusted", wireType)
  870. }
  871. var v int
  872. for shift := uint(0); ; shift += 7 {
  873. if shift >= 64 {
  874. return ErrIntOverflowDeviceconfiguration
  875. }
  876. if iNdEx >= l {
  877. return io.ErrUnexpectedEOF
  878. }
  879. b := dAtA[iNdEx]
  880. iNdEx++
  881. v |= int(b&0x7F) << shift
  882. if b < 0x80 {
  883. break
  884. }
  885. }
  886. m.Untrusted = bool(v != 0)
  887. case 18:
  888. if wireType != 0 {
  889. return fmt.Errorf("proto: wrong wireType = %d for field RemoteGUIPort", wireType)
  890. }
  891. m.RemoteGUIPort = 0
  892. for shift := uint(0); ; shift += 7 {
  893. if shift >= 64 {
  894. return ErrIntOverflowDeviceconfiguration
  895. }
  896. if iNdEx >= l {
  897. return io.ErrUnexpectedEOF
  898. }
  899. b := dAtA[iNdEx]
  900. iNdEx++
  901. m.RemoteGUIPort |= int(b&0x7F) << shift
  902. if b < 0x80 {
  903. break
  904. }
  905. }
  906. default:
  907. iNdEx = preIndex
  908. skippy, err := skipDeviceconfiguration(dAtA[iNdEx:])
  909. if err != nil {
  910. return err
  911. }
  912. if (skippy < 0) || (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. )