deviceconfiguration.pb.go 32 KB

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