config.pb.go 25 KB

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