config.pb.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944
  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 {
  703. return ErrInvalidLengthConfig
  704. }
  705. if (iNdEx + skippy) < 0 {
  706. return ErrInvalidLengthConfig
  707. }
  708. if (iNdEx + skippy) > l {
  709. return io.ErrUnexpectedEOF
  710. }
  711. iNdEx += skippy
  712. }
  713. }
  714. if iNdEx > l {
  715. return io.ErrUnexpectedEOF
  716. }
  717. return nil
  718. }
  719. func (m *Defaults) Unmarshal(dAtA []byte) error {
  720. l := len(dAtA)
  721. iNdEx := 0
  722. for iNdEx < l {
  723. preIndex := iNdEx
  724. var wire uint64
  725. for shift := uint(0); ; shift += 7 {
  726. if shift >= 64 {
  727. return ErrIntOverflowConfig
  728. }
  729. if iNdEx >= l {
  730. return io.ErrUnexpectedEOF
  731. }
  732. b := dAtA[iNdEx]
  733. iNdEx++
  734. wire |= uint64(b&0x7F) << shift
  735. if b < 0x80 {
  736. break
  737. }
  738. }
  739. fieldNum := int32(wire >> 3)
  740. wireType := int(wire & 0x7)
  741. if wireType == 4 {
  742. return fmt.Errorf("proto: Defaults: wiretype end group for non-group")
  743. }
  744. if fieldNum <= 0 {
  745. return fmt.Errorf("proto: Defaults: illegal tag %d (wire type %d)", fieldNum, wire)
  746. }
  747. switch fieldNum {
  748. case 1:
  749. if wireType != 2 {
  750. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  751. }
  752. var msglen int
  753. for shift := uint(0); ; shift += 7 {
  754. if shift >= 64 {
  755. return ErrIntOverflowConfig
  756. }
  757. if iNdEx >= l {
  758. return io.ErrUnexpectedEOF
  759. }
  760. b := dAtA[iNdEx]
  761. iNdEx++
  762. msglen |= int(b&0x7F) << shift
  763. if b < 0x80 {
  764. break
  765. }
  766. }
  767. if msglen < 0 {
  768. return ErrInvalidLengthConfig
  769. }
  770. postIndex := iNdEx + msglen
  771. if postIndex < 0 {
  772. return ErrInvalidLengthConfig
  773. }
  774. if postIndex > l {
  775. return io.ErrUnexpectedEOF
  776. }
  777. if err := m.Folder.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  778. return err
  779. }
  780. iNdEx = postIndex
  781. case 2:
  782. if wireType != 2 {
  783. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  784. }
  785. var msglen int
  786. for shift := uint(0); ; shift += 7 {
  787. if shift >= 64 {
  788. return ErrIntOverflowConfig
  789. }
  790. if iNdEx >= l {
  791. return io.ErrUnexpectedEOF
  792. }
  793. b := dAtA[iNdEx]
  794. iNdEx++
  795. msglen |= int(b&0x7F) << shift
  796. if b < 0x80 {
  797. break
  798. }
  799. }
  800. if msglen < 0 {
  801. return ErrInvalidLengthConfig
  802. }
  803. postIndex := iNdEx + msglen
  804. if postIndex < 0 {
  805. return ErrInvalidLengthConfig
  806. }
  807. if postIndex > l {
  808. return io.ErrUnexpectedEOF
  809. }
  810. if err := m.Device.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  811. return err
  812. }
  813. iNdEx = postIndex
  814. default:
  815. iNdEx = preIndex
  816. skippy, err := skipConfig(dAtA[iNdEx:])
  817. if err != nil {
  818. return err
  819. }
  820. if skippy < 0 {
  821. return ErrInvalidLengthConfig
  822. }
  823. if (iNdEx + skippy) < 0 {
  824. return ErrInvalidLengthConfig
  825. }
  826. if (iNdEx + skippy) > l {
  827. return io.ErrUnexpectedEOF
  828. }
  829. iNdEx += skippy
  830. }
  831. }
  832. if iNdEx > l {
  833. return io.ErrUnexpectedEOF
  834. }
  835. return nil
  836. }
  837. func skipConfig(dAtA []byte) (n int, err error) {
  838. l := len(dAtA)
  839. iNdEx := 0
  840. depth := 0
  841. for iNdEx < l {
  842. var wire uint64
  843. for shift := uint(0); ; shift += 7 {
  844. if shift >= 64 {
  845. return 0, ErrIntOverflowConfig
  846. }
  847. if iNdEx >= l {
  848. return 0, io.ErrUnexpectedEOF
  849. }
  850. b := dAtA[iNdEx]
  851. iNdEx++
  852. wire |= (uint64(b) & 0x7F) << shift
  853. if b < 0x80 {
  854. break
  855. }
  856. }
  857. wireType := int(wire & 0x7)
  858. switch wireType {
  859. case 0:
  860. for shift := uint(0); ; shift += 7 {
  861. if shift >= 64 {
  862. return 0, ErrIntOverflowConfig
  863. }
  864. if iNdEx >= l {
  865. return 0, io.ErrUnexpectedEOF
  866. }
  867. iNdEx++
  868. if dAtA[iNdEx-1] < 0x80 {
  869. break
  870. }
  871. }
  872. case 1:
  873. iNdEx += 8
  874. case 2:
  875. var length int
  876. for shift := uint(0); ; shift += 7 {
  877. if shift >= 64 {
  878. return 0, ErrIntOverflowConfig
  879. }
  880. if iNdEx >= l {
  881. return 0, io.ErrUnexpectedEOF
  882. }
  883. b := dAtA[iNdEx]
  884. iNdEx++
  885. length |= (int(b) & 0x7F) << shift
  886. if b < 0x80 {
  887. break
  888. }
  889. }
  890. if length < 0 {
  891. return 0, ErrInvalidLengthConfig
  892. }
  893. iNdEx += length
  894. case 3:
  895. depth++
  896. case 4:
  897. if depth == 0 {
  898. return 0, ErrUnexpectedEndOfGroupConfig
  899. }
  900. depth--
  901. case 5:
  902. iNdEx += 4
  903. default:
  904. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  905. }
  906. if iNdEx < 0 {
  907. return 0, ErrInvalidLengthConfig
  908. }
  909. if depth == 0 {
  910. return iNdEx, nil
  911. }
  912. }
  913. return 0, io.ErrUnexpectedEOF
  914. }
  915. var (
  916. ErrInvalidLengthConfig = fmt.Errorf("proto: negative length found during unmarshaling")
  917. ErrIntOverflowConfig = fmt.Errorf("proto: integer overflow")
  918. ErrUnexpectedEndOfGroupConfig = fmt.Errorf("proto: unexpected end of group")
  919. )