structs.pb.go 72 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: lib/db/structs.proto
  3. package db
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. github_com_syncthing_syncthing_lib_protocol "github.com/syncthing/syncthing/lib/protocol"
  9. protocol "github.com/syncthing/syncthing/lib/protocol"
  10. _ "github.com/syncthing/syncthing/proto/ext"
  11. io "io"
  12. math "math"
  13. math_bits "math/bits"
  14. )
  15. // Reference imports to suppress errors if they are not otherwise used.
  16. var _ = proto.Marshal
  17. var _ = fmt.Errorf
  18. var _ = math.Inf
  19. // This is a compile-time assertion to ensure that this generated file
  20. // is compatible with the proto package it is being compiled against.
  21. // A compilation error at this line likely means your copy of the
  22. // proto package needs to be updated.
  23. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  24. type FileVersion struct {
  25. Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version" xml:"version"`
  26. Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
  27. Devices [][]byte `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices" xml:"device"`
  28. InvalidDevices [][]byte `protobuf:"bytes,4,rep,name=invalid_devices,json=invalidDevices,proto3" json:"invalidDevices" xml:"invalidDevice"`
  29. }
  30. func (m *FileVersion) Reset() { *m = FileVersion{} }
  31. func (m *FileVersion) String() string { return proto.CompactTextString(m) }
  32. func (*FileVersion) ProtoMessage() {}
  33. func (*FileVersion) Descriptor() ([]byte, []int) {
  34. return fileDescriptor_5465d80e8cba02e3, []int{0}
  35. }
  36. func (m *FileVersion) XXX_Unmarshal(b []byte) error {
  37. return m.Unmarshal(b)
  38. }
  39. func (m *FileVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  40. if deterministic {
  41. return xxx_messageInfo_FileVersion.Marshal(b, m, deterministic)
  42. } else {
  43. b = b[:cap(b)]
  44. n, err := m.MarshalToSizedBuffer(b)
  45. if err != nil {
  46. return nil, err
  47. }
  48. return b[:n], nil
  49. }
  50. }
  51. func (m *FileVersion) XXX_Merge(src proto.Message) {
  52. xxx_messageInfo_FileVersion.Merge(m, src)
  53. }
  54. func (m *FileVersion) XXX_Size() int {
  55. return m.ProtoSize()
  56. }
  57. func (m *FileVersion) XXX_DiscardUnknown() {
  58. xxx_messageInfo_FileVersion.DiscardUnknown(m)
  59. }
  60. var xxx_messageInfo_FileVersion proto.InternalMessageInfo
  61. type VersionList struct {
  62. RawVersions []FileVersion `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions" xml:"version"`
  63. }
  64. func (m *VersionList) Reset() { *m = VersionList{} }
  65. func (*VersionList) ProtoMessage() {}
  66. func (*VersionList) Descriptor() ([]byte, []int) {
  67. return fileDescriptor_5465d80e8cba02e3, []int{1}
  68. }
  69. func (m *VersionList) XXX_Unmarshal(b []byte) error {
  70. return m.Unmarshal(b)
  71. }
  72. func (m *VersionList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  73. if deterministic {
  74. return xxx_messageInfo_VersionList.Marshal(b, m, deterministic)
  75. } else {
  76. b = b[:cap(b)]
  77. n, err := m.MarshalToSizedBuffer(b)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return b[:n], nil
  82. }
  83. }
  84. func (m *VersionList) XXX_Merge(src proto.Message) {
  85. xxx_messageInfo_VersionList.Merge(m, src)
  86. }
  87. func (m *VersionList) XXX_Size() int {
  88. return m.ProtoSize()
  89. }
  90. func (m *VersionList) XXX_DiscardUnknown() {
  91. xxx_messageInfo_VersionList.DiscardUnknown(m)
  92. }
  93. var xxx_messageInfo_VersionList proto.InternalMessageInfo
  94. // Must be the same as FileInfo but without the blocks field
  95. type FileInfoTruncated struct {
  96. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" xml:"name"`
  97. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size" xml:"size"`
  98. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modifiedS" xml:"modifiedS"`
  99. ModifiedBy github_com_syncthing_syncthing_lib_protocol.ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=github.com/syncthing/syncthing/lib/protocol.ShortID" json:"modifiedBy" xml:"modifiedBy"`
  100. Version protocol.Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version" xml:"version"`
  101. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
  102. // repeated BlockInfo Blocks = 16
  103. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlinkTarget" xml:"symlinkTarget"`
  104. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
  105. Encrypted []byte `protobuf:"bytes,19,opt,name=encrypted,proto3" json:"encrypted" xml:"encrypted"`
  106. Type protocol.FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type" xml:"type"`
  107. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions" xml:"permissions"`
  108. ModifiedNs int `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3,casttype=int" json:"modifiedNs" xml:"modifiedNs"`
  109. RawBlockSize int `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3,casttype=int" json:"blockSize" xml:"blockSize"`
  110. // see bep.proto
  111. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
  112. VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
  113. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
  114. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
  115. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"noPermissions" xml:"noPermissions"`
  116. }
  117. func (m *FileInfoTruncated) Reset() { *m = FileInfoTruncated{} }
  118. func (*FileInfoTruncated) ProtoMessage() {}
  119. func (*FileInfoTruncated) Descriptor() ([]byte, []int) {
  120. return fileDescriptor_5465d80e8cba02e3, []int{2}
  121. }
  122. func (m *FileInfoTruncated) XXX_Unmarshal(b []byte) error {
  123. return m.Unmarshal(b)
  124. }
  125. func (m *FileInfoTruncated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  126. if deterministic {
  127. return xxx_messageInfo_FileInfoTruncated.Marshal(b, m, deterministic)
  128. } else {
  129. b = b[:cap(b)]
  130. n, err := m.MarshalToSizedBuffer(b)
  131. if err != nil {
  132. return nil, err
  133. }
  134. return b[:n], nil
  135. }
  136. }
  137. func (m *FileInfoTruncated) XXX_Merge(src proto.Message) {
  138. xxx_messageInfo_FileInfoTruncated.Merge(m, src)
  139. }
  140. func (m *FileInfoTruncated) XXX_Size() int {
  141. return m.ProtoSize()
  142. }
  143. func (m *FileInfoTruncated) XXX_DiscardUnknown() {
  144. xxx_messageInfo_FileInfoTruncated.DiscardUnknown(m)
  145. }
  146. var xxx_messageInfo_FileInfoTruncated proto.InternalMessageInfo
  147. // BlockList is the structure used to store block lists
  148. type BlockList struct {
  149. Blocks []protocol.BlockInfo `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks" xml:"block"`
  150. }
  151. func (m *BlockList) Reset() { *m = BlockList{} }
  152. func (m *BlockList) String() string { return proto.CompactTextString(m) }
  153. func (*BlockList) ProtoMessage() {}
  154. func (*BlockList) Descriptor() ([]byte, []int) {
  155. return fileDescriptor_5465d80e8cba02e3, []int{3}
  156. }
  157. func (m *BlockList) XXX_Unmarshal(b []byte) error {
  158. return m.Unmarshal(b)
  159. }
  160. func (m *BlockList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  161. if deterministic {
  162. return xxx_messageInfo_BlockList.Marshal(b, m, deterministic)
  163. } else {
  164. b = b[:cap(b)]
  165. n, err := m.MarshalToSizedBuffer(b)
  166. if err != nil {
  167. return nil, err
  168. }
  169. return b[:n], nil
  170. }
  171. }
  172. func (m *BlockList) XXX_Merge(src proto.Message) {
  173. xxx_messageInfo_BlockList.Merge(m, src)
  174. }
  175. func (m *BlockList) XXX_Size() int {
  176. return m.ProtoSize()
  177. }
  178. func (m *BlockList) XXX_DiscardUnknown() {
  179. xxx_messageInfo_BlockList.DiscardUnknown(m)
  180. }
  181. var xxx_messageInfo_BlockList proto.InternalMessageInfo
  182. // IndirectionHashesOnly is used to only unmarshal the indirection hashes
  183. // from a FileInfo
  184. type IndirectionHashesOnly struct {
  185. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocksHash" xml:"blocksHash"`
  186. VersionHash []byte `protobuf:"bytes,1001,opt,name=version_hash,json=versionHash,proto3" json:"versionHash" xml:"versionHash"`
  187. }
  188. func (m *IndirectionHashesOnly) Reset() { *m = IndirectionHashesOnly{} }
  189. func (m *IndirectionHashesOnly) String() string { return proto.CompactTextString(m) }
  190. func (*IndirectionHashesOnly) ProtoMessage() {}
  191. func (*IndirectionHashesOnly) Descriptor() ([]byte, []int) {
  192. return fileDescriptor_5465d80e8cba02e3, []int{4}
  193. }
  194. func (m *IndirectionHashesOnly) XXX_Unmarshal(b []byte) error {
  195. return m.Unmarshal(b)
  196. }
  197. func (m *IndirectionHashesOnly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  198. if deterministic {
  199. return xxx_messageInfo_IndirectionHashesOnly.Marshal(b, m, deterministic)
  200. } else {
  201. b = b[:cap(b)]
  202. n, err := m.MarshalToSizedBuffer(b)
  203. if err != nil {
  204. return nil, err
  205. }
  206. return b[:n], nil
  207. }
  208. }
  209. func (m *IndirectionHashesOnly) XXX_Merge(src proto.Message) {
  210. xxx_messageInfo_IndirectionHashesOnly.Merge(m, src)
  211. }
  212. func (m *IndirectionHashesOnly) XXX_Size() int {
  213. return m.ProtoSize()
  214. }
  215. func (m *IndirectionHashesOnly) XXX_DiscardUnknown() {
  216. xxx_messageInfo_IndirectionHashesOnly.DiscardUnknown(m)
  217. }
  218. var xxx_messageInfo_IndirectionHashesOnly proto.InternalMessageInfo
  219. // For each folder and device we keep one of these to track the current
  220. // counts and sequence. We also keep one for the global state of the folder.
  221. type Counts struct {
  222. Files int `protobuf:"varint,1,opt,name=files,proto3,casttype=int" json:"files" xml:"files"`
  223. Directories int `protobuf:"varint,2,opt,name=directories,proto3,casttype=int" json:"directories" xml:"directories"`
  224. Symlinks int `protobuf:"varint,3,opt,name=symlinks,proto3,casttype=int" json:"symlinks" xml:"symlinks"`
  225. Deleted int `protobuf:"varint,4,opt,name=deleted,proto3,casttype=int" json:"deleted" xml:"deleted"`
  226. Bytes int64 `protobuf:"varint,5,opt,name=bytes,proto3" json:"bytes" xml:"bytes"`
  227. Sequence int64 `protobuf:"varint,6,opt,name=sequence,proto3" json:"sequence" xml:"sequence"`
  228. DeviceID []byte `protobuf:"bytes,17,opt,name=device_id,json=deviceId,proto3" json:"deviceId" xml:"deviceId"`
  229. LocalFlags uint32 `protobuf:"varint,18,opt,name=local_flags,json=localFlags,proto3" json:"localFlags" xml:"localFlags"`
  230. }
  231. func (m *Counts) Reset() { *m = Counts{} }
  232. func (*Counts) ProtoMessage() {}
  233. func (*Counts) Descriptor() ([]byte, []int) {
  234. return fileDescriptor_5465d80e8cba02e3, []int{5}
  235. }
  236. func (m *Counts) XXX_Unmarshal(b []byte) error {
  237. return m.Unmarshal(b)
  238. }
  239. func (m *Counts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  240. if deterministic {
  241. return xxx_messageInfo_Counts.Marshal(b, m, deterministic)
  242. } else {
  243. b = b[:cap(b)]
  244. n, err := m.MarshalToSizedBuffer(b)
  245. if err != nil {
  246. return nil, err
  247. }
  248. return b[:n], nil
  249. }
  250. }
  251. func (m *Counts) XXX_Merge(src proto.Message) {
  252. xxx_messageInfo_Counts.Merge(m, src)
  253. }
  254. func (m *Counts) XXX_Size() int {
  255. return m.ProtoSize()
  256. }
  257. func (m *Counts) XXX_DiscardUnknown() {
  258. xxx_messageInfo_Counts.DiscardUnknown(m)
  259. }
  260. var xxx_messageInfo_Counts proto.InternalMessageInfo
  261. type CountsSet struct {
  262. Counts []Counts `protobuf:"bytes,1,rep,name=counts,proto3" json:"counts" xml:"count"`
  263. Created int64 `protobuf:"varint,2,opt,name=created,proto3" json:"created" xml:"created"`
  264. }
  265. func (m *CountsSet) Reset() { *m = CountsSet{} }
  266. func (m *CountsSet) String() string { return proto.CompactTextString(m) }
  267. func (*CountsSet) ProtoMessage() {}
  268. func (*CountsSet) Descriptor() ([]byte, []int) {
  269. return fileDescriptor_5465d80e8cba02e3, []int{6}
  270. }
  271. func (m *CountsSet) XXX_Unmarshal(b []byte) error {
  272. return m.Unmarshal(b)
  273. }
  274. func (m *CountsSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  275. if deterministic {
  276. return xxx_messageInfo_CountsSet.Marshal(b, m, deterministic)
  277. } else {
  278. b = b[:cap(b)]
  279. n, err := m.MarshalToSizedBuffer(b)
  280. if err != nil {
  281. return nil, err
  282. }
  283. return b[:n], nil
  284. }
  285. }
  286. func (m *CountsSet) XXX_Merge(src proto.Message) {
  287. xxx_messageInfo_CountsSet.Merge(m, src)
  288. }
  289. func (m *CountsSet) XXX_Size() int {
  290. return m.ProtoSize()
  291. }
  292. func (m *CountsSet) XXX_DiscardUnknown() {
  293. xxx_messageInfo_CountsSet.DiscardUnknown(m)
  294. }
  295. var xxx_messageInfo_CountsSet proto.InternalMessageInfo
  296. type FileVersionDeprecated struct {
  297. Version protocol.Vector `protobuf:"bytes,1,opt,name=version,proto3" json:"version" xml:"version"`
  298. Device []byte `protobuf:"bytes,2,opt,name=device,proto3" json:"device" xml:"device"`
  299. Invalid bool `protobuf:"varint,3,opt,name=invalid,proto3" json:"invalid" xml:"invalid"`
  300. Deleted bool `protobuf:"varint,4,opt,name=deleted,proto3" json:"deleted" xml:"deleted"`
  301. }
  302. func (m *FileVersionDeprecated) Reset() { *m = FileVersionDeprecated{} }
  303. func (m *FileVersionDeprecated) String() string { return proto.CompactTextString(m) }
  304. func (*FileVersionDeprecated) ProtoMessage() {}
  305. func (*FileVersionDeprecated) Descriptor() ([]byte, []int) {
  306. return fileDescriptor_5465d80e8cba02e3, []int{7}
  307. }
  308. func (m *FileVersionDeprecated) XXX_Unmarshal(b []byte) error {
  309. return m.Unmarshal(b)
  310. }
  311. func (m *FileVersionDeprecated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  312. if deterministic {
  313. return xxx_messageInfo_FileVersionDeprecated.Marshal(b, m, deterministic)
  314. } else {
  315. b = b[:cap(b)]
  316. n, err := m.MarshalToSizedBuffer(b)
  317. if err != nil {
  318. return nil, err
  319. }
  320. return b[:n], nil
  321. }
  322. }
  323. func (m *FileVersionDeprecated) XXX_Merge(src proto.Message) {
  324. xxx_messageInfo_FileVersionDeprecated.Merge(m, src)
  325. }
  326. func (m *FileVersionDeprecated) XXX_Size() int {
  327. return m.ProtoSize()
  328. }
  329. func (m *FileVersionDeprecated) XXX_DiscardUnknown() {
  330. xxx_messageInfo_FileVersionDeprecated.DiscardUnknown(m)
  331. }
  332. var xxx_messageInfo_FileVersionDeprecated proto.InternalMessageInfo
  333. type VersionListDeprecated struct {
  334. Versions []FileVersionDeprecated `protobuf:"bytes,1,rep,name=versions,proto3" json:"versions" xml:"version"`
  335. }
  336. func (m *VersionListDeprecated) Reset() { *m = VersionListDeprecated{} }
  337. func (*VersionListDeprecated) ProtoMessage() {}
  338. func (*VersionListDeprecated) Descriptor() ([]byte, []int) {
  339. return fileDescriptor_5465d80e8cba02e3, []int{8}
  340. }
  341. func (m *VersionListDeprecated) XXX_Unmarshal(b []byte) error {
  342. return m.Unmarshal(b)
  343. }
  344. func (m *VersionListDeprecated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  345. if deterministic {
  346. return xxx_messageInfo_VersionListDeprecated.Marshal(b, m, deterministic)
  347. } else {
  348. b = b[:cap(b)]
  349. n, err := m.MarshalToSizedBuffer(b)
  350. if err != nil {
  351. return nil, err
  352. }
  353. return b[:n], nil
  354. }
  355. }
  356. func (m *VersionListDeprecated) XXX_Merge(src proto.Message) {
  357. xxx_messageInfo_VersionListDeprecated.Merge(m, src)
  358. }
  359. func (m *VersionListDeprecated) XXX_Size() int {
  360. return m.ProtoSize()
  361. }
  362. func (m *VersionListDeprecated) XXX_DiscardUnknown() {
  363. xxx_messageInfo_VersionListDeprecated.DiscardUnknown(m)
  364. }
  365. var xxx_messageInfo_VersionListDeprecated proto.InternalMessageInfo
  366. func init() {
  367. proto.RegisterType((*FileVersion)(nil), "db.FileVersion")
  368. proto.RegisterType((*VersionList)(nil), "db.VersionList")
  369. proto.RegisterType((*FileInfoTruncated)(nil), "db.FileInfoTruncated")
  370. proto.RegisterType((*BlockList)(nil), "db.BlockList")
  371. proto.RegisterType((*IndirectionHashesOnly)(nil), "db.IndirectionHashesOnly")
  372. proto.RegisterType((*Counts)(nil), "db.Counts")
  373. proto.RegisterType((*CountsSet)(nil), "db.CountsSet")
  374. proto.RegisterType((*FileVersionDeprecated)(nil), "db.FileVersionDeprecated")
  375. proto.RegisterType((*VersionListDeprecated)(nil), "db.VersionListDeprecated")
  376. }
  377. func init() { proto.RegisterFile("lib/db/structs.proto", fileDescriptor_5465d80e8cba02e3) }
  378. var fileDescriptor_5465d80e8cba02e3 = []byte{
  379. // 1289 bytes of a gzipped FileDescriptorProto
  380. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0xdc, 0x44,
  381. 0x14, 0x5e, 0x67, 0x7f, 0x64, 0x77, 0x76, 0x93, 0x36, 0x2e, 0xad, 0x4c, 0x81, 0x9d, 0x65, 0x9a,
  382. 0x4a, 0x0b, 0x48, 0x1b, 0x29, 0x55, 0x2b, 0x54, 0x09, 0xaa, 0xba, 0x51, 0xdb, 0x54, 0xa5, 0x45,
  383. 0x93, 0xaa, 0x20, 0x2e, 0xab, 0xb5, 0x77, 0x92, 0x58, 0x75, 0xec, 0xc5, 0xe3, 0x34, 0xdd, 0xde,
  384. 0xb8, 0x20, 0x71, 0x43, 0x15, 0x07, 0x84, 0x10, 0xea, 0x89, 0x3f, 0x81, 0xbf, 0xa1, 0xc7, 0x1c,
  385. 0x11, 0x07, 0x4b, 0x4d, 0x2e, 0xb0, 0xc7, 0x3d, 0x21, 0x4e, 0x68, 0xde, 0x8c, 0xc7, 0xb3, 0x8d,
  386. 0x8a, 0xda, 0x92, 0x9b, 0xdf, 0xf7, 0xbe, 0xf7, 0x6c, 0xbf, 0xf9, 0xde, 0x9b, 0x87, 0xde, 0x0a,
  387. 0x03, 0x6f, 0x65, 0xe8, 0xad, 0xf0, 0x34, 0xd9, 0xf5, 0x53, 0xde, 0x1b, 0x25, 0x71, 0x1a, 0xdb,
  388. 0x73, 0x43, 0xef, 0xec, 0xb9, 0x84, 0x8d, 0x62, 0xbe, 0x02, 0x80, 0xb7, 0xbb, 0xb9, 0xb2, 0x15,
  389. 0x6f, 0xc5, 0x60, 0xc0, 0x93, 0x24, 0x9e, 0x3d, 0x23, 0xc2, 0xe1, 0xd1, 0x8f, 0xc3, 0x15, 0x8f,
  390. 0x8d, 0x14, 0xde, 0x60, 0x8f, 0x52, 0xf9, 0x48, 0x7e, 0x99, 0x43, 0xcd, 0xeb, 0x41, 0xc8, 0xee,
  391. 0xb3, 0x84, 0x07, 0x71, 0x64, 0xdf, 0x46, 0xf3, 0x0f, 0xe5, 0xa3, 0x63, 0x75, 0xac, 0x6e, 0x73,
  392. 0xf5, 0x64, 0x2f, 0x4f, 0xd0, 0xbb, 0xcf, 0xfc, 0x34, 0x4e, 0xdc, 0xce, 0xb3, 0x0c, 0x97, 0x26,
  393. 0x19, 0xce, 0x89, 0xd3, 0x0c, 0x2f, 0x3c, 0xda, 0x09, 0x2f, 0x13, 0x65, 0x13, 0x9a, 0x7b, 0xec,
  394. 0x4b, 0x68, 0x7e, 0xc8, 0x42, 0x96, 0xb2, 0xa1, 0x33, 0xd7, 0xb1, 0xba, 0x75, 0xf7, 0x5d, 0x11,
  395. 0xa7, 0x20, 0x1d, 0xa7, 0x6c, 0x42, 0x73, 0x8f, 0x7d, 0x51, 0xc4, 0x3d, 0x0c, 0x7c, 0xc6, 0x9d,
  396. 0x72, 0xa7, 0xdc, 0x6d, 0xb9, 0xef, 0xc8, 0x38, 0x80, 0xa6, 0x19, 0x6e, 0xa9, 0x38, 0x61, 0x43,
  397. 0x18, 0x38, 0x6c, 0x8a, 0x4e, 0x04, 0xd1, 0xc3, 0x41, 0x18, 0x0c, 0xfb, 0x79, 0x78, 0x05, 0xc2,
  398. 0x3f, 0x98, 0x64, 0x78, 0x51, 0xb9, 0xd6, 0x74, 0x96, 0x53, 0x90, 0x65, 0x06, 0x26, 0xf4, 0x05,
  399. 0x1a, 0xf9, 0xc6, 0x42, 0x4d, 0x55, 0x9c, 0xdb, 0x01, 0x4f, 0xed, 0x10, 0xd5, 0xd5, 0xdf, 0x71,
  400. 0xc7, 0xea, 0x94, 0xbb, 0xcd, 0xd5, 0x13, 0xbd, 0xa1, 0xd7, 0x33, 0x6a, 0xe8, 0x5e, 0x11, 0x05,
  401. 0x3a, 0xc8, 0x70, 0x93, 0x0e, 0xf6, 0x14, 0xc6, 0x27, 0x19, 0xd6, 0x71, 0x47, 0x0a, 0xf6, 0x64,
  402. 0x7f, 0xd9, 0xe4, 0x52, 0xcd, 0xbc, 0x5c, 0xf9, 0xf1, 0x29, 0x2e, 0x91, 0xbf, 0x11, 0x5a, 0x12,
  403. 0x2f, 0x58, 0x8f, 0x36, 0xe3, 0x7b, 0xc9, 0x6e, 0xe4, 0x0f, 0x44, 0x91, 0x3e, 0x44, 0x95, 0x68,
  404. 0xb0, 0xc3, 0xe0, 0x9c, 0x1a, 0xee, 0x99, 0x49, 0x86, 0xc1, 0x9e, 0x66, 0x18, 0x41, 0x76, 0x61,
  405. 0x10, 0x0a, 0x98, 0xe0, 0xf2, 0xe0, 0x31, 0x73, 0xca, 0x1d, 0xab, 0x5b, 0x96, 0x5c, 0x61, 0x6b,
  406. 0xae, 0x30, 0x08, 0x05, 0xcc, 0xbe, 0x82, 0xd0, 0x4e, 0x3c, 0x0c, 0x36, 0x03, 0x36, 0xec, 0x73,
  407. 0xa7, 0x0a, 0x11, 0x9d, 0x49, 0x86, 0x1b, 0x39, 0xba, 0x31, 0xcd, 0xf0, 0x09, 0x08, 0xd3, 0x08,
  408. 0xa1, 0x85, 0xd7, 0xfe, 0xcd, 0x42, 0x4d, 0x9d, 0xc1, 0x1b, 0x3b, 0xad, 0x8e, 0xd5, 0xad, 0xb8,
  409. 0x3f, 0x58, 0xa2, 0x2c, 0x7f, 0x64, 0xf8, 0xc2, 0x56, 0x90, 0x6e, 0xef, 0x7a, 0x3d, 0x3f, 0xde,
  410. 0x59, 0xe1, 0xe3, 0xc8, 0x4f, 0xb7, 0x83, 0x68, 0xcb, 0x78, 0x32, 0x45, 0xdb, 0xdb, 0xd8, 0x8e,
  411. 0x93, 0x74, 0x7d, 0x6d, 0x92, 0x61, 0xfd, 0x51, 0xee, 0x78, 0x9a, 0xe1, 0x93, 0x33, 0xef, 0x77,
  412. 0xc7, 0xe4, 0xa7, 0xfd, 0xe5, 0x37, 0x49, 0x4c, 0x8d, 0xb4, 0xa6, 0xf8, 0x1b, 0xff, 0x5f, 0xfc,
  413. 0x97, 0x51, 0x9d, 0xb3, 0xaf, 0x77, 0x59, 0xe4, 0x33, 0x07, 0x41, 0x15, 0xdb, 0x42, 0x05, 0x39,
  414. 0x36, 0xcd, 0xf0, 0xa2, 0xac, 0xbd, 0x02, 0x08, 0xd5, 0x3e, 0xfb, 0x2e, 0x5a, 0xe4, 0xe3, 0x9d,
  415. 0x30, 0x88, 0x1e, 0xf4, 0xd3, 0x41, 0xb2, 0xc5, 0x52, 0x67, 0x09, 0x4e, 0xb9, 0x3b, 0xc9, 0xf0,
  416. 0x82, 0xf2, 0xdc, 0x03, 0x87, 0xd6, 0xf1, 0x0c, 0x4a, 0xe8, 0x2c, 0xcb, 0xbe, 0x86, 0x9a, 0x5e,
  417. 0x18, 0xfb, 0x0f, 0x78, 0x7f, 0x7b, 0xc0, 0xb7, 0x1d, 0xbb, 0x63, 0x75, 0x5b, 0x2e, 0x11, 0x65,
  418. 0x95, 0xf0, 0xcd, 0x01, 0xdf, 0xd6, 0x65, 0x2d, 0x20, 0x42, 0x0d, 0xbf, 0xfd, 0x29, 0x6a, 0xb0,
  419. 0xc8, 0x4f, 0xc6, 0x23, 0xd1, 0xd0, 0xa7, 0x20, 0x05, 0x08, 0x43, 0x83, 0x5a, 0x18, 0x1a, 0x21,
  420. 0xb4, 0xf0, 0xda, 0x2e, 0xaa, 0xa4, 0xe3, 0x11, 0x83, 0x59, 0xb0, 0xb8, 0x7a, 0xa6, 0x28, 0xae,
  421. 0x16, 0xf7, 0x78, 0xc4, 0xa4, 0x3a, 0x05, 0x4f, 0xab, 0x53, 0x18, 0x84, 0x02, 0x66, 0x5f, 0x47,
  422. 0xcd, 0x11, 0x4b, 0x76, 0x02, 0x2e, 0x5b, 0xb0, 0xd2, 0xb1, 0xba, 0x0b, 0xee, 0xf2, 0x24, 0xc3,
  423. 0x26, 0x3c, 0xcd, 0xf0, 0x12, 0x44, 0x1a, 0x18, 0xa1, 0x26, 0xc3, 0xbe, 0x65, 0x68, 0x34, 0xe2,
  424. 0x4e, 0xb3, 0x63, 0x75, 0xab, 0x30, 0x27, 0xb4, 0x20, 0xee, 0xf0, 0x23, 0x3a, 0xbb, 0xc3, 0xc9,
  425. 0x3f, 0x19, 0x2e, 0x07, 0x51, 0x4a, 0x0d, 0x9a, 0xbd, 0x89, 0x64, 0x95, 0xfa, 0xd0, 0x63, 0x0b,
  426. 0x90, 0xea, 0xc6, 0x41, 0x86, 0x5b, 0x74, 0xb0, 0xe7, 0x0a, 0xc7, 0x46, 0xf0, 0x98, 0x89, 0x42,
  427. 0x79, 0xb9, 0xa1, 0x0b, 0xa5, 0x91, 0x3c, 0xf1, 0x93, 0xfd, 0xe5, 0x99, 0x30, 0x5a, 0x04, 0xd9,
  428. 0x6b, 0xa8, 0x19, 0xc6, 0xfe, 0x20, 0xec, 0x6f, 0x86, 0x83, 0x2d, 0xee, 0xfc, 0x39, 0x0f, 0x3f,
  429. 0x0f, 0xa7, 0x08, 0xf8, 0x75, 0x01, 0xeb, 0x8f, 0x2e, 0x20, 0x42, 0x0d, 0xbf, 0x7d, 0x13, 0xb5,
  430. 0x94, 0x44, 0xa5, 0x16, 0xfe, 0x9a, 0x87, 0x93, 0x84, 0x1a, 0x2a, 0x87, 0x52, 0xc3, 0x92, 0xa9,
  431. 0x6c, 0x29, 0x07, 0x93, 0x61, 0x8e, 0xf7, 0xda, 0xeb, 0x8c, 0x77, 0x8a, 0xe6, 0xd5, 0x94, 0x75,
  432. 0xe6, 0x21, 0xee, 0xe3, 0x83, 0x0c, 0x23, 0x3a, 0xd8, 0x5b, 0x97, 0xa8, 0xc8, 0xa2, 0x08, 0x3a,
  433. 0x8b, 0xb2, 0xc5, 0xac, 0x34, 0x98, 0x34, 0xe7, 0x89, 0x8e, 0x89, 0xe2, 0xbe, 0x29, 0x8d, 0x3a,
  434. 0xa4, 0x86, 0x8e, 0x89, 0xe2, 0xcf, 0x67, 0xc4, 0x21, 0x3b, 0x66, 0x06, 0x25, 0x74, 0x96, 0xa5,
  435. 0x46, 0xef, 0x17, 0xa8, 0x01, 0x47, 0x01, 0xb3, 0xff, 0x16, 0xaa, 0xc9, 0x6e, 0x50, 0x93, 0xff,
  436. 0x54, 0xa1, 0x60, 0x20, 0x09, 0x09, 0xbb, 0xef, 0xa9, 0x09, 0xa1, 0xa8, 0xd3, 0x0c, 0x37, 0x8b,
  437. 0x93, 0x26, 0x54, 0xc1, 0xe4, 0x57, 0x0b, 0x9d, 0x5e, 0x8f, 0x86, 0x41, 0xc2, 0xfc, 0x54, 0xd5,
  438. 0x93, 0xf1, 0xbb, 0x51, 0x38, 0x3e, 0x9e, 0x56, 0x3d, 0xb6, 0x43, 0x26, 0x3f, 0x57, 0x50, 0xed,
  439. 0x5a, 0xbc, 0x1b, 0xa5, 0xdc, 0xbe, 0x88, 0xaa, 0x9b, 0x41, 0xc8, 0x38, 0x5c, 0x39, 0x55, 0x17,
  440. 0x4f, 0x32, 0x2c, 0x01, 0xfd, 0x93, 0x60, 0xe9, 0x1e, 0x91, 0x4e, 0xfb, 0x33, 0xd4, 0x94, 0xff,
  441. 0x19, 0x27, 0x01, 0xe3, 0xd0, 0xfd, 0x55, 0xf7, 0x23, 0xf1, 0x25, 0x06, 0xac, 0xbf, 0xc4, 0xc0,
  442. 0x74, 0x22, 0x93, 0x68, 0x5f, 0x45, 0x75, 0x35, 0xdb, 0x38, 0xdc, 0x67, 0x55, 0xf7, 0x3c, 0xcc,
  443. 0x55, 0x85, 0x15, 0x73, 0x55, 0x01, 0x3a, 0x8b, 0xa6, 0xd8, 0x9f, 0x14, 0xc2, 0xad, 0x40, 0x86,
  444. 0x73, 0xff, 0x25, 0xdc, 0x3c, 0x5e, 0xeb, 0xb7, 0x87, 0xaa, 0xde, 0x38, 0x65, 0xf9, 0xe5, 0xe8,
  445. 0x88, 0x3a, 0x00, 0x50, 0x1c, 0xb6, 0xb0, 0x08, 0x95, 0xe8, 0xcc, 0x4d, 0x50, 0x7b, 0xcd, 0x9b,
  446. 0x60, 0x03, 0x35, 0xe4, 0x2e, 0xd3, 0x0f, 0x86, 0x70, 0x09, 0xb4, 0xdc, 0x4b, 0x07, 0x19, 0xae,
  447. 0xcb, 0xfd, 0x04, 0x6e, 0xc6, 0xba, 0x24, 0xac, 0x0f, 0x75, 0xa2, 0x1c, 0x10, 0xdd, 0xa2, 0x99,
  448. 0x54, 0xf3, 0x84, 0xc4, 0xcc, 0x41, 0x62, 0xbf, 0xc9, 0x1c, 0x51, 0x0d, 0xf2, 0xad, 0x85, 0x1a,
  449. 0x52, 0x1e, 0x1b, 0x2c, 0xb5, 0xaf, 0xa2, 0x9a, 0x0f, 0x86, 0xea, 0x10, 0x24, 0x76, 0x23, 0xe9,
  450. 0x2e, 0x1a, 0x43, 0x32, 0x74, 0xad, 0xc0, 0x24, 0x54, 0xc1, 0x62, 0xa8, 0xf8, 0x09, 0x1b, 0xe4,
  451. 0x3b, 0x63, 0x59, 0x0e, 0x15, 0x05, 0xe9, 0xb3, 0x51, 0x36, 0xa1, 0xb9, 0x87, 0x7c, 0x37, 0x87,
  452. 0x4e, 0x1b, 0x5b, 0xd8, 0x1a, 0x1b, 0x25, 0x4c, 0x2e, 0x4a, 0xc7, 0xbb, 0xd3, 0xae, 0xa2, 0x9a,
  453. 0xac, 0x23, 0x7c, 0x5e, 0xcb, 0x3d, 0x2b, 0x7e, 0x49, 0x22, 0x47, 0x36, 0x53, 0x85, 0x8b, 0x7f,
  454. 0xca, 0x07, 0x5e, 0xb9, 0x18, 0x94, 0x2f, 0x1b, 0x71, 0xc5, 0x50, 0xbb, 0x34, 0xab, 0xd3, 0x57,
  455. 0x1d, 0xb0, 0x64, 0x0f, 0x9d, 0x36, 0x76, 0x56, 0xa3, 0x14, 0x5f, 0x1e, 0xd9, 0x5e, 0xdf, 0x7e,
  456. 0x61, 0x7b, 0x2d, 0xc8, 0xee, 0xfb, 0xaa, 0x28, 0x2f, 0x5f, 0x5c, 0x5f, 0xdc, 0x54, 0xdd, 0x1b,
  457. 0xcf, 0x9e, 0xb7, 0x4b, 0xfb, 0xcf, 0xdb, 0xa5, 0x67, 0x07, 0x6d, 0x6b, 0xff, 0xa0, 0x6d, 0x7d,
  458. 0x7f, 0xd8, 0x2e, 0x3d, 0x3d, 0x6c, 0x5b, 0xfb, 0x87, 0xed, 0xd2, 0xef, 0x87, 0xed, 0xd2, 0x57,
  459. 0xe7, 0x5f, 0x61, 0x49, 0x1b, 0x7a, 0x5e, 0x0d, 0x4e, 0xe8, 0xc2, 0xbf, 0x01, 0x00, 0x00, 0xff,
  460. 0xff, 0xfc, 0x01, 0x79, 0xc2, 0x02, 0x0d, 0x00, 0x00,
  461. }
  462. func (m *FileVersion) Marshal() (dAtA []byte, err error) {
  463. size := m.ProtoSize()
  464. dAtA = make([]byte, size)
  465. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  466. if err != nil {
  467. return nil, err
  468. }
  469. return dAtA[:n], nil
  470. }
  471. func (m *FileVersion) MarshalTo(dAtA []byte) (int, error) {
  472. size := m.ProtoSize()
  473. return m.MarshalToSizedBuffer(dAtA[:size])
  474. }
  475. func (m *FileVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  476. i := len(dAtA)
  477. _ = i
  478. var l int
  479. _ = l
  480. if len(m.InvalidDevices) > 0 {
  481. for iNdEx := len(m.InvalidDevices) - 1; iNdEx >= 0; iNdEx-- {
  482. i -= len(m.InvalidDevices[iNdEx])
  483. copy(dAtA[i:], m.InvalidDevices[iNdEx])
  484. i = encodeVarintStructs(dAtA, i, uint64(len(m.InvalidDevices[iNdEx])))
  485. i--
  486. dAtA[i] = 0x22
  487. }
  488. }
  489. if len(m.Devices) > 0 {
  490. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  491. i -= len(m.Devices[iNdEx])
  492. copy(dAtA[i:], m.Devices[iNdEx])
  493. i = encodeVarintStructs(dAtA, i, uint64(len(m.Devices[iNdEx])))
  494. i--
  495. dAtA[i] = 0x1a
  496. }
  497. }
  498. if m.Deleted {
  499. i--
  500. if m.Deleted {
  501. dAtA[i] = 1
  502. } else {
  503. dAtA[i] = 0
  504. }
  505. i--
  506. dAtA[i] = 0x10
  507. }
  508. {
  509. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  510. if err != nil {
  511. return 0, err
  512. }
  513. i -= size
  514. i = encodeVarintStructs(dAtA, i, uint64(size))
  515. }
  516. i--
  517. dAtA[i] = 0xa
  518. return len(dAtA) - i, nil
  519. }
  520. func (m *VersionList) Marshal() (dAtA []byte, err error) {
  521. size := m.ProtoSize()
  522. dAtA = make([]byte, size)
  523. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  524. if err != nil {
  525. return nil, err
  526. }
  527. return dAtA[:n], nil
  528. }
  529. func (m *VersionList) MarshalTo(dAtA []byte) (int, error) {
  530. size := m.ProtoSize()
  531. return m.MarshalToSizedBuffer(dAtA[:size])
  532. }
  533. func (m *VersionList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  534. i := len(dAtA)
  535. _ = i
  536. var l int
  537. _ = l
  538. if len(m.RawVersions) > 0 {
  539. for iNdEx := len(m.RawVersions) - 1; iNdEx >= 0; iNdEx-- {
  540. {
  541. size, err := m.RawVersions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  542. if err != nil {
  543. return 0, err
  544. }
  545. i -= size
  546. i = encodeVarintStructs(dAtA, i, uint64(size))
  547. }
  548. i--
  549. dAtA[i] = 0xa
  550. }
  551. }
  552. return len(dAtA) - i, nil
  553. }
  554. func (m *FileInfoTruncated) Marshal() (dAtA []byte, err error) {
  555. size := m.ProtoSize()
  556. dAtA = make([]byte, size)
  557. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  558. if err != nil {
  559. return nil, err
  560. }
  561. return dAtA[:n], nil
  562. }
  563. func (m *FileInfoTruncated) MarshalTo(dAtA []byte) (int, error) {
  564. size := m.ProtoSize()
  565. return m.MarshalToSizedBuffer(dAtA[:size])
  566. }
  567. func (m *FileInfoTruncated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  568. i := len(dAtA)
  569. _ = i
  570. var l int
  571. _ = l
  572. if len(m.VersionHash) > 0 {
  573. i -= len(m.VersionHash)
  574. copy(dAtA[i:], m.VersionHash)
  575. i = encodeVarintStructs(dAtA, i, uint64(len(m.VersionHash)))
  576. i--
  577. dAtA[i] = 0x3e
  578. i--
  579. dAtA[i] = 0xca
  580. }
  581. if m.LocalFlags != 0 {
  582. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  583. i--
  584. dAtA[i] = 0x3e
  585. i--
  586. dAtA[i] = 0xc0
  587. }
  588. if len(m.Encrypted) > 0 {
  589. i -= len(m.Encrypted)
  590. copy(dAtA[i:], m.Encrypted)
  591. i = encodeVarintStructs(dAtA, i, uint64(len(m.Encrypted)))
  592. i--
  593. dAtA[i] = 0x1
  594. i--
  595. dAtA[i] = 0x9a
  596. }
  597. if len(m.BlocksHash) > 0 {
  598. i -= len(m.BlocksHash)
  599. copy(dAtA[i:], m.BlocksHash)
  600. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  601. i--
  602. dAtA[i] = 0x1
  603. i--
  604. dAtA[i] = 0x92
  605. }
  606. if len(m.SymlinkTarget) > 0 {
  607. i -= len(m.SymlinkTarget)
  608. copy(dAtA[i:], m.SymlinkTarget)
  609. i = encodeVarintStructs(dAtA, i, uint64(len(m.SymlinkTarget)))
  610. i--
  611. dAtA[i] = 0x1
  612. i--
  613. dAtA[i] = 0x8a
  614. }
  615. if m.RawBlockSize != 0 {
  616. i = encodeVarintStructs(dAtA, i, uint64(m.RawBlockSize))
  617. i--
  618. dAtA[i] = 0x68
  619. }
  620. if m.ModifiedBy != 0 {
  621. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedBy))
  622. i--
  623. dAtA[i] = 0x60
  624. }
  625. if m.ModifiedNs != 0 {
  626. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedNs))
  627. i--
  628. dAtA[i] = 0x58
  629. }
  630. if m.Sequence != 0 {
  631. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  632. i--
  633. dAtA[i] = 0x50
  634. }
  635. {
  636. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  637. if err != nil {
  638. return 0, err
  639. }
  640. i -= size
  641. i = encodeVarintStructs(dAtA, i, uint64(size))
  642. }
  643. i--
  644. dAtA[i] = 0x4a
  645. if m.NoPermissions {
  646. i--
  647. if m.NoPermissions {
  648. dAtA[i] = 1
  649. } else {
  650. dAtA[i] = 0
  651. }
  652. i--
  653. dAtA[i] = 0x40
  654. }
  655. if m.RawInvalid {
  656. i--
  657. if m.RawInvalid {
  658. dAtA[i] = 1
  659. } else {
  660. dAtA[i] = 0
  661. }
  662. i--
  663. dAtA[i] = 0x38
  664. }
  665. if m.Deleted {
  666. i--
  667. if m.Deleted {
  668. dAtA[i] = 1
  669. } else {
  670. dAtA[i] = 0
  671. }
  672. i--
  673. dAtA[i] = 0x30
  674. }
  675. if m.ModifiedS != 0 {
  676. i = encodeVarintStructs(dAtA, i, uint64(m.ModifiedS))
  677. i--
  678. dAtA[i] = 0x28
  679. }
  680. if m.Permissions != 0 {
  681. i = encodeVarintStructs(dAtA, i, uint64(m.Permissions))
  682. i--
  683. dAtA[i] = 0x20
  684. }
  685. if m.Size != 0 {
  686. i = encodeVarintStructs(dAtA, i, uint64(m.Size))
  687. i--
  688. dAtA[i] = 0x18
  689. }
  690. if m.Type != 0 {
  691. i = encodeVarintStructs(dAtA, i, uint64(m.Type))
  692. i--
  693. dAtA[i] = 0x10
  694. }
  695. if len(m.Name) > 0 {
  696. i -= len(m.Name)
  697. copy(dAtA[i:], m.Name)
  698. i = encodeVarintStructs(dAtA, i, uint64(len(m.Name)))
  699. i--
  700. dAtA[i] = 0xa
  701. }
  702. return len(dAtA) - i, nil
  703. }
  704. func (m *BlockList) Marshal() (dAtA []byte, err error) {
  705. size := m.ProtoSize()
  706. dAtA = make([]byte, size)
  707. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  708. if err != nil {
  709. return nil, err
  710. }
  711. return dAtA[:n], nil
  712. }
  713. func (m *BlockList) MarshalTo(dAtA []byte) (int, error) {
  714. size := m.ProtoSize()
  715. return m.MarshalToSizedBuffer(dAtA[:size])
  716. }
  717. func (m *BlockList) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  718. i := len(dAtA)
  719. _ = i
  720. var l int
  721. _ = l
  722. if len(m.Blocks) > 0 {
  723. for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
  724. {
  725. size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  726. if err != nil {
  727. return 0, err
  728. }
  729. i -= size
  730. i = encodeVarintStructs(dAtA, i, uint64(size))
  731. }
  732. i--
  733. dAtA[i] = 0xa
  734. }
  735. }
  736. return len(dAtA) - i, nil
  737. }
  738. func (m *IndirectionHashesOnly) Marshal() (dAtA []byte, err error) {
  739. size := m.ProtoSize()
  740. dAtA = make([]byte, size)
  741. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  742. if err != nil {
  743. return nil, err
  744. }
  745. return dAtA[:n], nil
  746. }
  747. func (m *IndirectionHashesOnly) MarshalTo(dAtA []byte) (int, error) {
  748. size := m.ProtoSize()
  749. return m.MarshalToSizedBuffer(dAtA[:size])
  750. }
  751. func (m *IndirectionHashesOnly) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  752. i := len(dAtA)
  753. _ = i
  754. var l int
  755. _ = l
  756. if len(m.VersionHash) > 0 {
  757. i -= len(m.VersionHash)
  758. copy(dAtA[i:], m.VersionHash)
  759. i = encodeVarintStructs(dAtA, i, uint64(len(m.VersionHash)))
  760. i--
  761. dAtA[i] = 0x3e
  762. i--
  763. dAtA[i] = 0xca
  764. }
  765. if len(m.BlocksHash) > 0 {
  766. i -= len(m.BlocksHash)
  767. copy(dAtA[i:], m.BlocksHash)
  768. i = encodeVarintStructs(dAtA, i, uint64(len(m.BlocksHash)))
  769. i--
  770. dAtA[i] = 0x1
  771. i--
  772. dAtA[i] = 0x92
  773. }
  774. return len(dAtA) - i, nil
  775. }
  776. func (m *Counts) Marshal() (dAtA []byte, err error) {
  777. size := m.ProtoSize()
  778. dAtA = make([]byte, size)
  779. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  780. if err != nil {
  781. return nil, err
  782. }
  783. return dAtA[:n], nil
  784. }
  785. func (m *Counts) MarshalTo(dAtA []byte) (int, error) {
  786. size := m.ProtoSize()
  787. return m.MarshalToSizedBuffer(dAtA[:size])
  788. }
  789. func (m *Counts) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  790. i := len(dAtA)
  791. _ = i
  792. var l int
  793. _ = l
  794. if m.LocalFlags != 0 {
  795. i = encodeVarintStructs(dAtA, i, uint64(m.LocalFlags))
  796. i--
  797. dAtA[i] = 0x1
  798. i--
  799. dAtA[i] = 0x90
  800. }
  801. if len(m.DeviceID) > 0 {
  802. i -= len(m.DeviceID)
  803. copy(dAtA[i:], m.DeviceID)
  804. i = encodeVarintStructs(dAtA, i, uint64(len(m.DeviceID)))
  805. i--
  806. dAtA[i] = 0x1
  807. i--
  808. dAtA[i] = 0x8a
  809. }
  810. if m.Sequence != 0 {
  811. i = encodeVarintStructs(dAtA, i, uint64(m.Sequence))
  812. i--
  813. dAtA[i] = 0x30
  814. }
  815. if m.Bytes != 0 {
  816. i = encodeVarintStructs(dAtA, i, uint64(m.Bytes))
  817. i--
  818. dAtA[i] = 0x28
  819. }
  820. if m.Deleted != 0 {
  821. i = encodeVarintStructs(dAtA, i, uint64(m.Deleted))
  822. i--
  823. dAtA[i] = 0x20
  824. }
  825. if m.Symlinks != 0 {
  826. i = encodeVarintStructs(dAtA, i, uint64(m.Symlinks))
  827. i--
  828. dAtA[i] = 0x18
  829. }
  830. if m.Directories != 0 {
  831. i = encodeVarintStructs(dAtA, i, uint64(m.Directories))
  832. i--
  833. dAtA[i] = 0x10
  834. }
  835. if m.Files != 0 {
  836. i = encodeVarintStructs(dAtA, i, uint64(m.Files))
  837. i--
  838. dAtA[i] = 0x8
  839. }
  840. return len(dAtA) - i, nil
  841. }
  842. func (m *CountsSet) Marshal() (dAtA []byte, err error) {
  843. size := m.ProtoSize()
  844. dAtA = make([]byte, size)
  845. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  846. if err != nil {
  847. return nil, err
  848. }
  849. return dAtA[:n], nil
  850. }
  851. func (m *CountsSet) MarshalTo(dAtA []byte) (int, error) {
  852. size := m.ProtoSize()
  853. return m.MarshalToSizedBuffer(dAtA[:size])
  854. }
  855. func (m *CountsSet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  856. i := len(dAtA)
  857. _ = i
  858. var l int
  859. _ = l
  860. if m.Created != 0 {
  861. i = encodeVarintStructs(dAtA, i, uint64(m.Created))
  862. i--
  863. dAtA[i] = 0x10
  864. }
  865. if len(m.Counts) > 0 {
  866. for iNdEx := len(m.Counts) - 1; iNdEx >= 0; iNdEx-- {
  867. {
  868. size, err := m.Counts[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  869. if err != nil {
  870. return 0, err
  871. }
  872. i -= size
  873. i = encodeVarintStructs(dAtA, i, uint64(size))
  874. }
  875. i--
  876. dAtA[i] = 0xa
  877. }
  878. }
  879. return len(dAtA) - i, nil
  880. }
  881. func (m *FileVersionDeprecated) Marshal() (dAtA []byte, err error) {
  882. size := m.ProtoSize()
  883. dAtA = make([]byte, size)
  884. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  885. if err != nil {
  886. return nil, err
  887. }
  888. return dAtA[:n], nil
  889. }
  890. func (m *FileVersionDeprecated) MarshalTo(dAtA []byte) (int, error) {
  891. size := m.ProtoSize()
  892. return m.MarshalToSizedBuffer(dAtA[:size])
  893. }
  894. func (m *FileVersionDeprecated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  895. i := len(dAtA)
  896. _ = i
  897. var l int
  898. _ = l
  899. if m.Deleted {
  900. i--
  901. if m.Deleted {
  902. dAtA[i] = 1
  903. } else {
  904. dAtA[i] = 0
  905. }
  906. i--
  907. dAtA[i] = 0x20
  908. }
  909. if m.Invalid {
  910. i--
  911. if m.Invalid {
  912. dAtA[i] = 1
  913. } else {
  914. dAtA[i] = 0
  915. }
  916. i--
  917. dAtA[i] = 0x18
  918. }
  919. if len(m.Device) > 0 {
  920. i -= len(m.Device)
  921. copy(dAtA[i:], m.Device)
  922. i = encodeVarintStructs(dAtA, i, uint64(len(m.Device)))
  923. i--
  924. dAtA[i] = 0x12
  925. }
  926. {
  927. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  928. if err != nil {
  929. return 0, err
  930. }
  931. i -= size
  932. i = encodeVarintStructs(dAtA, i, uint64(size))
  933. }
  934. i--
  935. dAtA[i] = 0xa
  936. return len(dAtA) - i, nil
  937. }
  938. func (m *VersionListDeprecated) Marshal() (dAtA []byte, err error) {
  939. size := m.ProtoSize()
  940. dAtA = make([]byte, size)
  941. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  942. if err != nil {
  943. return nil, err
  944. }
  945. return dAtA[:n], nil
  946. }
  947. func (m *VersionListDeprecated) MarshalTo(dAtA []byte) (int, error) {
  948. size := m.ProtoSize()
  949. return m.MarshalToSizedBuffer(dAtA[:size])
  950. }
  951. func (m *VersionListDeprecated) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  952. i := len(dAtA)
  953. _ = i
  954. var l int
  955. _ = l
  956. if len(m.Versions) > 0 {
  957. for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- {
  958. {
  959. size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  960. if err != nil {
  961. return 0, err
  962. }
  963. i -= size
  964. i = encodeVarintStructs(dAtA, i, uint64(size))
  965. }
  966. i--
  967. dAtA[i] = 0xa
  968. }
  969. }
  970. return len(dAtA) - i, nil
  971. }
  972. func encodeVarintStructs(dAtA []byte, offset int, v uint64) int {
  973. offset -= sovStructs(v)
  974. base := offset
  975. for v >= 1<<7 {
  976. dAtA[offset] = uint8(v&0x7f | 0x80)
  977. v >>= 7
  978. offset++
  979. }
  980. dAtA[offset] = uint8(v)
  981. return base
  982. }
  983. func (m *FileVersion) ProtoSize() (n int) {
  984. if m == nil {
  985. return 0
  986. }
  987. var l int
  988. _ = l
  989. l = m.Version.ProtoSize()
  990. n += 1 + l + sovStructs(uint64(l))
  991. if m.Deleted {
  992. n += 2
  993. }
  994. if len(m.Devices) > 0 {
  995. for _, b := range m.Devices {
  996. l = len(b)
  997. n += 1 + l + sovStructs(uint64(l))
  998. }
  999. }
  1000. if len(m.InvalidDevices) > 0 {
  1001. for _, b := range m.InvalidDevices {
  1002. l = len(b)
  1003. n += 1 + l + sovStructs(uint64(l))
  1004. }
  1005. }
  1006. return n
  1007. }
  1008. func (m *VersionList) ProtoSize() (n int) {
  1009. if m == nil {
  1010. return 0
  1011. }
  1012. var l int
  1013. _ = l
  1014. if len(m.RawVersions) > 0 {
  1015. for _, e := range m.RawVersions {
  1016. l = e.ProtoSize()
  1017. n += 1 + l + sovStructs(uint64(l))
  1018. }
  1019. }
  1020. return n
  1021. }
  1022. func (m *FileInfoTruncated) ProtoSize() (n int) {
  1023. if m == nil {
  1024. return 0
  1025. }
  1026. var l int
  1027. _ = l
  1028. l = len(m.Name)
  1029. if l > 0 {
  1030. n += 1 + l + sovStructs(uint64(l))
  1031. }
  1032. if m.Type != 0 {
  1033. n += 1 + sovStructs(uint64(m.Type))
  1034. }
  1035. if m.Size != 0 {
  1036. n += 1 + sovStructs(uint64(m.Size))
  1037. }
  1038. if m.Permissions != 0 {
  1039. n += 1 + sovStructs(uint64(m.Permissions))
  1040. }
  1041. if m.ModifiedS != 0 {
  1042. n += 1 + sovStructs(uint64(m.ModifiedS))
  1043. }
  1044. if m.Deleted {
  1045. n += 2
  1046. }
  1047. if m.RawInvalid {
  1048. n += 2
  1049. }
  1050. if m.NoPermissions {
  1051. n += 2
  1052. }
  1053. l = m.Version.ProtoSize()
  1054. n += 1 + l + sovStructs(uint64(l))
  1055. if m.Sequence != 0 {
  1056. n += 1 + sovStructs(uint64(m.Sequence))
  1057. }
  1058. if m.ModifiedNs != 0 {
  1059. n += 1 + sovStructs(uint64(m.ModifiedNs))
  1060. }
  1061. if m.ModifiedBy != 0 {
  1062. n += 1 + sovStructs(uint64(m.ModifiedBy))
  1063. }
  1064. if m.RawBlockSize != 0 {
  1065. n += 1 + sovStructs(uint64(m.RawBlockSize))
  1066. }
  1067. l = len(m.SymlinkTarget)
  1068. if l > 0 {
  1069. n += 2 + l + sovStructs(uint64(l))
  1070. }
  1071. l = len(m.BlocksHash)
  1072. if l > 0 {
  1073. n += 2 + l + sovStructs(uint64(l))
  1074. }
  1075. l = len(m.Encrypted)
  1076. if l > 0 {
  1077. n += 2 + l + sovStructs(uint64(l))
  1078. }
  1079. if m.LocalFlags != 0 {
  1080. n += 2 + sovStructs(uint64(m.LocalFlags))
  1081. }
  1082. l = len(m.VersionHash)
  1083. if l > 0 {
  1084. n += 2 + l + sovStructs(uint64(l))
  1085. }
  1086. return n
  1087. }
  1088. func (m *BlockList) ProtoSize() (n int) {
  1089. if m == nil {
  1090. return 0
  1091. }
  1092. var l int
  1093. _ = l
  1094. if len(m.Blocks) > 0 {
  1095. for _, e := range m.Blocks {
  1096. l = e.ProtoSize()
  1097. n += 1 + l + sovStructs(uint64(l))
  1098. }
  1099. }
  1100. return n
  1101. }
  1102. func (m *IndirectionHashesOnly) ProtoSize() (n int) {
  1103. if m == nil {
  1104. return 0
  1105. }
  1106. var l int
  1107. _ = l
  1108. l = len(m.BlocksHash)
  1109. if l > 0 {
  1110. n += 2 + l + sovStructs(uint64(l))
  1111. }
  1112. l = len(m.VersionHash)
  1113. if l > 0 {
  1114. n += 2 + l + sovStructs(uint64(l))
  1115. }
  1116. return n
  1117. }
  1118. func (m *Counts) ProtoSize() (n int) {
  1119. if m == nil {
  1120. return 0
  1121. }
  1122. var l int
  1123. _ = l
  1124. if m.Files != 0 {
  1125. n += 1 + sovStructs(uint64(m.Files))
  1126. }
  1127. if m.Directories != 0 {
  1128. n += 1 + sovStructs(uint64(m.Directories))
  1129. }
  1130. if m.Symlinks != 0 {
  1131. n += 1 + sovStructs(uint64(m.Symlinks))
  1132. }
  1133. if m.Deleted != 0 {
  1134. n += 1 + sovStructs(uint64(m.Deleted))
  1135. }
  1136. if m.Bytes != 0 {
  1137. n += 1 + sovStructs(uint64(m.Bytes))
  1138. }
  1139. if m.Sequence != 0 {
  1140. n += 1 + sovStructs(uint64(m.Sequence))
  1141. }
  1142. l = len(m.DeviceID)
  1143. if l > 0 {
  1144. n += 2 + l + sovStructs(uint64(l))
  1145. }
  1146. if m.LocalFlags != 0 {
  1147. n += 2 + sovStructs(uint64(m.LocalFlags))
  1148. }
  1149. return n
  1150. }
  1151. func (m *CountsSet) ProtoSize() (n int) {
  1152. if m == nil {
  1153. return 0
  1154. }
  1155. var l int
  1156. _ = l
  1157. if len(m.Counts) > 0 {
  1158. for _, e := range m.Counts {
  1159. l = e.ProtoSize()
  1160. n += 1 + l + sovStructs(uint64(l))
  1161. }
  1162. }
  1163. if m.Created != 0 {
  1164. n += 1 + sovStructs(uint64(m.Created))
  1165. }
  1166. return n
  1167. }
  1168. func (m *FileVersionDeprecated) ProtoSize() (n int) {
  1169. if m == nil {
  1170. return 0
  1171. }
  1172. var l int
  1173. _ = l
  1174. l = m.Version.ProtoSize()
  1175. n += 1 + l + sovStructs(uint64(l))
  1176. l = len(m.Device)
  1177. if l > 0 {
  1178. n += 1 + l + sovStructs(uint64(l))
  1179. }
  1180. if m.Invalid {
  1181. n += 2
  1182. }
  1183. if m.Deleted {
  1184. n += 2
  1185. }
  1186. return n
  1187. }
  1188. func (m *VersionListDeprecated) ProtoSize() (n int) {
  1189. if m == nil {
  1190. return 0
  1191. }
  1192. var l int
  1193. _ = l
  1194. if len(m.Versions) > 0 {
  1195. for _, e := range m.Versions {
  1196. l = e.ProtoSize()
  1197. n += 1 + l + sovStructs(uint64(l))
  1198. }
  1199. }
  1200. return n
  1201. }
  1202. func sovStructs(x uint64) (n int) {
  1203. return (math_bits.Len64(x|1) + 6) / 7
  1204. }
  1205. func sozStructs(x uint64) (n int) {
  1206. return sovStructs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1207. }
  1208. func (m *FileVersion) Unmarshal(dAtA []byte) error {
  1209. l := len(dAtA)
  1210. iNdEx := 0
  1211. for iNdEx < l {
  1212. preIndex := iNdEx
  1213. var wire uint64
  1214. for shift := uint(0); ; shift += 7 {
  1215. if shift >= 64 {
  1216. return ErrIntOverflowStructs
  1217. }
  1218. if iNdEx >= l {
  1219. return io.ErrUnexpectedEOF
  1220. }
  1221. b := dAtA[iNdEx]
  1222. iNdEx++
  1223. wire |= uint64(b&0x7F) << shift
  1224. if b < 0x80 {
  1225. break
  1226. }
  1227. }
  1228. fieldNum := int32(wire >> 3)
  1229. wireType := int(wire & 0x7)
  1230. if wireType == 4 {
  1231. return fmt.Errorf("proto: FileVersion: wiretype end group for non-group")
  1232. }
  1233. if fieldNum <= 0 {
  1234. return fmt.Errorf("proto: FileVersion: illegal tag %d (wire type %d)", fieldNum, wire)
  1235. }
  1236. switch fieldNum {
  1237. case 1:
  1238. if wireType != 2 {
  1239. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1240. }
  1241. var msglen int
  1242. for shift := uint(0); ; shift += 7 {
  1243. if shift >= 64 {
  1244. return ErrIntOverflowStructs
  1245. }
  1246. if iNdEx >= l {
  1247. return io.ErrUnexpectedEOF
  1248. }
  1249. b := dAtA[iNdEx]
  1250. iNdEx++
  1251. msglen |= int(b&0x7F) << shift
  1252. if b < 0x80 {
  1253. break
  1254. }
  1255. }
  1256. if msglen < 0 {
  1257. return ErrInvalidLengthStructs
  1258. }
  1259. postIndex := iNdEx + msglen
  1260. if postIndex < 0 {
  1261. return ErrInvalidLengthStructs
  1262. }
  1263. if postIndex > l {
  1264. return io.ErrUnexpectedEOF
  1265. }
  1266. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1267. return err
  1268. }
  1269. iNdEx = postIndex
  1270. case 2:
  1271. if wireType != 0 {
  1272. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1273. }
  1274. var v int
  1275. for shift := uint(0); ; shift += 7 {
  1276. if shift >= 64 {
  1277. return ErrIntOverflowStructs
  1278. }
  1279. if iNdEx >= l {
  1280. return io.ErrUnexpectedEOF
  1281. }
  1282. b := dAtA[iNdEx]
  1283. iNdEx++
  1284. v |= int(b&0x7F) << shift
  1285. if b < 0x80 {
  1286. break
  1287. }
  1288. }
  1289. m.Deleted = bool(v != 0)
  1290. case 3:
  1291. if wireType != 2 {
  1292. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  1293. }
  1294. var byteLen int
  1295. for shift := uint(0); ; shift += 7 {
  1296. if shift >= 64 {
  1297. return ErrIntOverflowStructs
  1298. }
  1299. if iNdEx >= l {
  1300. return io.ErrUnexpectedEOF
  1301. }
  1302. b := dAtA[iNdEx]
  1303. iNdEx++
  1304. byteLen |= int(b&0x7F) << shift
  1305. if b < 0x80 {
  1306. break
  1307. }
  1308. }
  1309. if byteLen < 0 {
  1310. return ErrInvalidLengthStructs
  1311. }
  1312. postIndex := iNdEx + byteLen
  1313. if postIndex < 0 {
  1314. return ErrInvalidLengthStructs
  1315. }
  1316. if postIndex > l {
  1317. return io.ErrUnexpectedEOF
  1318. }
  1319. m.Devices = append(m.Devices, make([]byte, postIndex-iNdEx))
  1320. copy(m.Devices[len(m.Devices)-1], dAtA[iNdEx:postIndex])
  1321. iNdEx = postIndex
  1322. case 4:
  1323. if wireType != 2 {
  1324. return fmt.Errorf("proto: wrong wireType = %d for field InvalidDevices", wireType)
  1325. }
  1326. var byteLen int
  1327. for shift := uint(0); ; shift += 7 {
  1328. if shift >= 64 {
  1329. return ErrIntOverflowStructs
  1330. }
  1331. if iNdEx >= l {
  1332. return io.ErrUnexpectedEOF
  1333. }
  1334. b := dAtA[iNdEx]
  1335. iNdEx++
  1336. byteLen |= int(b&0x7F) << shift
  1337. if b < 0x80 {
  1338. break
  1339. }
  1340. }
  1341. if byteLen < 0 {
  1342. return ErrInvalidLengthStructs
  1343. }
  1344. postIndex := iNdEx + byteLen
  1345. if postIndex < 0 {
  1346. return ErrInvalidLengthStructs
  1347. }
  1348. if postIndex > l {
  1349. return io.ErrUnexpectedEOF
  1350. }
  1351. m.InvalidDevices = append(m.InvalidDevices, make([]byte, postIndex-iNdEx))
  1352. copy(m.InvalidDevices[len(m.InvalidDevices)-1], dAtA[iNdEx:postIndex])
  1353. iNdEx = postIndex
  1354. default:
  1355. iNdEx = preIndex
  1356. skippy, err := skipStructs(dAtA[iNdEx:])
  1357. if err != nil {
  1358. return err
  1359. }
  1360. if skippy < 0 {
  1361. return ErrInvalidLengthStructs
  1362. }
  1363. if (iNdEx + skippy) < 0 {
  1364. return ErrInvalidLengthStructs
  1365. }
  1366. if (iNdEx + skippy) > l {
  1367. return io.ErrUnexpectedEOF
  1368. }
  1369. iNdEx += skippy
  1370. }
  1371. }
  1372. if iNdEx > l {
  1373. return io.ErrUnexpectedEOF
  1374. }
  1375. return nil
  1376. }
  1377. func (m *VersionList) Unmarshal(dAtA []byte) error {
  1378. l := len(dAtA)
  1379. iNdEx := 0
  1380. for iNdEx < l {
  1381. preIndex := iNdEx
  1382. var wire uint64
  1383. for shift := uint(0); ; shift += 7 {
  1384. if shift >= 64 {
  1385. return ErrIntOverflowStructs
  1386. }
  1387. if iNdEx >= l {
  1388. return io.ErrUnexpectedEOF
  1389. }
  1390. b := dAtA[iNdEx]
  1391. iNdEx++
  1392. wire |= uint64(b&0x7F) << shift
  1393. if b < 0x80 {
  1394. break
  1395. }
  1396. }
  1397. fieldNum := int32(wire >> 3)
  1398. wireType := int(wire & 0x7)
  1399. if wireType == 4 {
  1400. return fmt.Errorf("proto: VersionList: wiretype end group for non-group")
  1401. }
  1402. if fieldNum <= 0 {
  1403. return fmt.Errorf("proto: VersionList: illegal tag %d (wire type %d)", fieldNum, wire)
  1404. }
  1405. switch fieldNum {
  1406. case 1:
  1407. if wireType != 2 {
  1408. return fmt.Errorf("proto: wrong wireType = %d for field RawVersions", wireType)
  1409. }
  1410. var msglen int
  1411. for shift := uint(0); ; shift += 7 {
  1412. if shift >= 64 {
  1413. return ErrIntOverflowStructs
  1414. }
  1415. if iNdEx >= l {
  1416. return io.ErrUnexpectedEOF
  1417. }
  1418. b := dAtA[iNdEx]
  1419. iNdEx++
  1420. msglen |= int(b&0x7F) << shift
  1421. if b < 0x80 {
  1422. break
  1423. }
  1424. }
  1425. if msglen < 0 {
  1426. return ErrInvalidLengthStructs
  1427. }
  1428. postIndex := iNdEx + msglen
  1429. if postIndex < 0 {
  1430. return ErrInvalidLengthStructs
  1431. }
  1432. if postIndex > l {
  1433. return io.ErrUnexpectedEOF
  1434. }
  1435. m.RawVersions = append(m.RawVersions, FileVersion{})
  1436. if err := m.RawVersions[len(m.RawVersions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1437. return err
  1438. }
  1439. iNdEx = postIndex
  1440. default:
  1441. iNdEx = preIndex
  1442. skippy, err := skipStructs(dAtA[iNdEx:])
  1443. if err != nil {
  1444. return err
  1445. }
  1446. if skippy < 0 {
  1447. return ErrInvalidLengthStructs
  1448. }
  1449. if (iNdEx + skippy) < 0 {
  1450. return ErrInvalidLengthStructs
  1451. }
  1452. if (iNdEx + skippy) > l {
  1453. return io.ErrUnexpectedEOF
  1454. }
  1455. iNdEx += skippy
  1456. }
  1457. }
  1458. if iNdEx > l {
  1459. return io.ErrUnexpectedEOF
  1460. }
  1461. return nil
  1462. }
  1463. func (m *FileInfoTruncated) Unmarshal(dAtA []byte) error {
  1464. l := len(dAtA)
  1465. iNdEx := 0
  1466. for iNdEx < l {
  1467. preIndex := iNdEx
  1468. var wire uint64
  1469. for shift := uint(0); ; shift += 7 {
  1470. if shift >= 64 {
  1471. return ErrIntOverflowStructs
  1472. }
  1473. if iNdEx >= l {
  1474. return io.ErrUnexpectedEOF
  1475. }
  1476. b := dAtA[iNdEx]
  1477. iNdEx++
  1478. wire |= uint64(b&0x7F) << shift
  1479. if b < 0x80 {
  1480. break
  1481. }
  1482. }
  1483. fieldNum := int32(wire >> 3)
  1484. wireType := int(wire & 0x7)
  1485. if wireType == 4 {
  1486. return fmt.Errorf("proto: FileInfoTruncated: wiretype end group for non-group")
  1487. }
  1488. if fieldNum <= 0 {
  1489. return fmt.Errorf("proto: FileInfoTruncated: illegal tag %d (wire type %d)", fieldNum, wire)
  1490. }
  1491. switch fieldNum {
  1492. case 1:
  1493. if wireType != 2 {
  1494. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  1495. }
  1496. var stringLen uint64
  1497. for shift := uint(0); ; shift += 7 {
  1498. if shift >= 64 {
  1499. return ErrIntOverflowStructs
  1500. }
  1501. if iNdEx >= l {
  1502. return io.ErrUnexpectedEOF
  1503. }
  1504. b := dAtA[iNdEx]
  1505. iNdEx++
  1506. stringLen |= uint64(b&0x7F) << shift
  1507. if b < 0x80 {
  1508. break
  1509. }
  1510. }
  1511. intStringLen := int(stringLen)
  1512. if intStringLen < 0 {
  1513. return ErrInvalidLengthStructs
  1514. }
  1515. postIndex := iNdEx + intStringLen
  1516. if postIndex < 0 {
  1517. return ErrInvalidLengthStructs
  1518. }
  1519. if postIndex > l {
  1520. return io.ErrUnexpectedEOF
  1521. }
  1522. m.Name = string(dAtA[iNdEx:postIndex])
  1523. iNdEx = postIndex
  1524. case 2:
  1525. if wireType != 0 {
  1526. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  1527. }
  1528. m.Type = 0
  1529. for shift := uint(0); ; shift += 7 {
  1530. if shift >= 64 {
  1531. return ErrIntOverflowStructs
  1532. }
  1533. if iNdEx >= l {
  1534. return io.ErrUnexpectedEOF
  1535. }
  1536. b := dAtA[iNdEx]
  1537. iNdEx++
  1538. m.Type |= protocol.FileInfoType(b&0x7F) << shift
  1539. if b < 0x80 {
  1540. break
  1541. }
  1542. }
  1543. case 3:
  1544. if wireType != 0 {
  1545. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  1546. }
  1547. m.Size = 0
  1548. for shift := uint(0); ; shift += 7 {
  1549. if shift >= 64 {
  1550. return ErrIntOverflowStructs
  1551. }
  1552. if iNdEx >= l {
  1553. return io.ErrUnexpectedEOF
  1554. }
  1555. b := dAtA[iNdEx]
  1556. iNdEx++
  1557. m.Size |= int64(b&0x7F) << shift
  1558. if b < 0x80 {
  1559. break
  1560. }
  1561. }
  1562. case 4:
  1563. if wireType != 0 {
  1564. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  1565. }
  1566. m.Permissions = 0
  1567. for shift := uint(0); ; shift += 7 {
  1568. if shift >= 64 {
  1569. return ErrIntOverflowStructs
  1570. }
  1571. if iNdEx >= l {
  1572. return io.ErrUnexpectedEOF
  1573. }
  1574. b := dAtA[iNdEx]
  1575. iNdEx++
  1576. m.Permissions |= uint32(b&0x7F) << shift
  1577. if b < 0x80 {
  1578. break
  1579. }
  1580. }
  1581. case 5:
  1582. if wireType != 0 {
  1583. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  1584. }
  1585. m.ModifiedS = 0
  1586. for shift := uint(0); ; shift += 7 {
  1587. if shift >= 64 {
  1588. return ErrIntOverflowStructs
  1589. }
  1590. if iNdEx >= l {
  1591. return io.ErrUnexpectedEOF
  1592. }
  1593. b := dAtA[iNdEx]
  1594. iNdEx++
  1595. m.ModifiedS |= int64(b&0x7F) << shift
  1596. if b < 0x80 {
  1597. break
  1598. }
  1599. }
  1600. case 6:
  1601. if wireType != 0 {
  1602. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  1603. }
  1604. var v int
  1605. for shift := uint(0); ; shift += 7 {
  1606. if shift >= 64 {
  1607. return ErrIntOverflowStructs
  1608. }
  1609. if iNdEx >= l {
  1610. return io.ErrUnexpectedEOF
  1611. }
  1612. b := dAtA[iNdEx]
  1613. iNdEx++
  1614. v |= int(b&0x7F) << shift
  1615. if b < 0x80 {
  1616. break
  1617. }
  1618. }
  1619. m.Deleted = bool(v != 0)
  1620. case 7:
  1621. if wireType != 0 {
  1622. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  1623. }
  1624. var v int
  1625. for shift := uint(0); ; shift += 7 {
  1626. if shift >= 64 {
  1627. return ErrIntOverflowStructs
  1628. }
  1629. if iNdEx >= l {
  1630. return io.ErrUnexpectedEOF
  1631. }
  1632. b := dAtA[iNdEx]
  1633. iNdEx++
  1634. v |= int(b&0x7F) << shift
  1635. if b < 0x80 {
  1636. break
  1637. }
  1638. }
  1639. m.RawInvalid = bool(v != 0)
  1640. case 8:
  1641. if wireType != 0 {
  1642. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  1643. }
  1644. var v int
  1645. for shift := uint(0); ; shift += 7 {
  1646. if shift >= 64 {
  1647. return ErrIntOverflowStructs
  1648. }
  1649. if iNdEx >= l {
  1650. return io.ErrUnexpectedEOF
  1651. }
  1652. b := dAtA[iNdEx]
  1653. iNdEx++
  1654. v |= int(b&0x7F) << shift
  1655. if b < 0x80 {
  1656. break
  1657. }
  1658. }
  1659. m.NoPermissions = bool(v != 0)
  1660. case 9:
  1661. if wireType != 2 {
  1662. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1663. }
  1664. var msglen int
  1665. for shift := uint(0); ; shift += 7 {
  1666. if shift >= 64 {
  1667. return ErrIntOverflowStructs
  1668. }
  1669. if iNdEx >= l {
  1670. return io.ErrUnexpectedEOF
  1671. }
  1672. b := dAtA[iNdEx]
  1673. iNdEx++
  1674. msglen |= int(b&0x7F) << shift
  1675. if b < 0x80 {
  1676. break
  1677. }
  1678. }
  1679. if msglen < 0 {
  1680. return ErrInvalidLengthStructs
  1681. }
  1682. postIndex := iNdEx + msglen
  1683. if postIndex < 0 {
  1684. return ErrInvalidLengthStructs
  1685. }
  1686. if postIndex > l {
  1687. return io.ErrUnexpectedEOF
  1688. }
  1689. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1690. return err
  1691. }
  1692. iNdEx = postIndex
  1693. case 10:
  1694. if wireType != 0 {
  1695. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  1696. }
  1697. m.Sequence = 0
  1698. for shift := uint(0); ; shift += 7 {
  1699. if shift >= 64 {
  1700. return ErrIntOverflowStructs
  1701. }
  1702. if iNdEx >= l {
  1703. return io.ErrUnexpectedEOF
  1704. }
  1705. b := dAtA[iNdEx]
  1706. iNdEx++
  1707. m.Sequence |= int64(b&0x7F) << shift
  1708. if b < 0x80 {
  1709. break
  1710. }
  1711. }
  1712. case 11:
  1713. if wireType != 0 {
  1714. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  1715. }
  1716. m.ModifiedNs = 0
  1717. for shift := uint(0); ; shift += 7 {
  1718. if shift >= 64 {
  1719. return ErrIntOverflowStructs
  1720. }
  1721. if iNdEx >= l {
  1722. return io.ErrUnexpectedEOF
  1723. }
  1724. b := dAtA[iNdEx]
  1725. iNdEx++
  1726. m.ModifiedNs |= int(b&0x7F) << shift
  1727. if b < 0x80 {
  1728. break
  1729. }
  1730. }
  1731. case 12:
  1732. if wireType != 0 {
  1733. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  1734. }
  1735. m.ModifiedBy = 0
  1736. for shift := uint(0); ; shift += 7 {
  1737. if shift >= 64 {
  1738. return ErrIntOverflowStructs
  1739. }
  1740. if iNdEx >= l {
  1741. return io.ErrUnexpectedEOF
  1742. }
  1743. b := dAtA[iNdEx]
  1744. iNdEx++
  1745. m.ModifiedBy |= github_com_syncthing_syncthing_lib_protocol.ShortID(b&0x7F) << shift
  1746. if b < 0x80 {
  1747. break
  1748. }
  1749. }
  1750. case 13:
  1751. if wireType != 0 {
  1752. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  1753. }
  1754. m.RawBlockSize = 0
  1755. for shift := uint(0); ; shift += 7 {
  1756. if shift >= 64 {
  1757. return ErrIntOverflowStructs
  1758. }
  1759. if iNdEx >= l {
  1760. return io.ErrUnexpectedEOF
  1761. }
  1762. b := dAtA[iNdEx]
  1763. iNdEx++
  1764. m.RawBlockSize |= int(b&0x7F) << shift
  1765. if b < 0x80 {
  1766. break
  1767. }
  1768. }
  1769. case 17:
  1770. if wireType != 2 {
  1771. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  1772. }
  1773. var stringLen uint64
  1774. for shift := uint(0); ; shift += 7 {
  1775. if shift >= 64 {
  1776. return ErrIntOverflowStructs
  1777. }
  1778. if iNdEx >= l {
  1779. return io.ErrUnexpectedEOF
  1780. }
  1781. b := dAtA[iNdEx]
  1782. iNdEx++
  1783. stringLen |= uint64(b&0x7F) << shift
  1784. if b < 0x80 {
  1785. break
  1786. }
  1787. }
  1788. intStringLen := int(stringLen)
  1789. if intStringLen < 0 {
  1790. return ErrInvalidLengthStructs
  1791. }
  1792. postIndex := iNdEx + intStringLen
  1793. if postIndex < 0 {
  1794. return ErrInvalidLengthStructs
  1795. }
  1796. if postIndex > l {
  1797. return io.ErrUnexpectedEOF
  1798. }
  1799. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  1800. iNdEx = postIndex
  1801. case 18:
  1802. if wireType != 2 {
  1803. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  1804. }
  1805. var byteLen int
  1806. for shift := uint(0); ; shift += 7 {
  1807. if shift >= 64 {
  1808. return ErrIntOverflowStructs
  1809. }
  1810. if iNdEx >= l {
  1811. return io.ErrUnexpectedEOF
  1812. }
  1813. b := dAtA[iNdEx]
  1814. iNdEx++
  1815. byteLen |= int(b&0x7F) << shift
  1816. if b < 0x80 {
  1817. break
  1818. }
  1819. }
  1820. if byteLen < 0 {
  1821. return ErrInvalidLengthStructs
  1822. }
  1823. postIndex := iNdEx + byteLen
  1824. if postIndex < 0 {
  1825. return ErrInvalidLengthStructs
  1826. }
  1827. if postIndex > l {
  1828. return io.ErrUnexpectedEOF
  1829. }
  1830. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  1831. if m.BlocksHash == nil {
  1832. m.BlocksHash = []byte{}
  1833. }
  1834. iNdEx = postIndex
  1835. case 19:
  1836. if wireType != 2 {
  1837. return fmt.Errorf("proto: wrong wireType = %d for field Encrypted", wireType)
  1838. }
  1839. var byteLen int
  1840. for shift := uint(0); ; shift += 7 {
  1841. if shift >= 64 {
  1842. return ErrIntOverflowStructs
  1843. }
  1844. if iNdEx >= l {
  1845. return io.ErrUnexpectedEOF
  1846. }
  1847. b := dAtA[iNdEx]
  1848. iNdEx++
  1849. byteLen |= int(b&0x7F) << shift
  1850. if b < 0x80 {
  1851. break
  1852. }
  1853. }
  1854. if byteLen < 0 {
  1855. return ErrInvalidLengthStructs
  1856. }
  1857. postIndex := iNdEx + byteLen
  1858. if postIndex < 0 {
  1859. return ErrInvalidLengthStructs
  1860. }
  1861. if postIndex > l {
  1862. return io.ErrUnexpectedEOF
  1863. }
  1864. m.Encrypted = append(m.Encrypted[:0], dAtA[iNdEx:postIndex]...)
  1865. if m.Encrypted == nil {
  1866. m.Encrypted = []byte{}
  1867. }
  1868. iNdEx = postIndex
  1869. case 1000:
  1870. if wireType != 0 {
  1871. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  1872. }
  1873. m.LocalFlags = 0
  1874. for shift := uint(0); ; shift += 7 {
  1875. if shift >= 64 {
  1876. return ErrIntOverflowStructs
  1877. }
  1878. if iNdEx >= l {
  1879. return io.ErrUnexpectedEOF
  1880. }
  1881. b := dAtA[iNdEx]
  1882. iNdEx++
  1883. m.LocalFlags |= uint32(b&0x7F) << shift
  1884. if b < 0x80 {
  1885. break
  1886. }
  1887. }
  1888. case 1001:
  1889. if wireType != 2 {
  1890. return fmt.Errorf("proto: wrong wireType = %d for field VersionHash", wireType)
  1891. }
  1892. var byteLen int
  1893. for shift := uint(0); ; shift += 7 {
  1894. if shift >= 64 {
  1895. return ErrIntOverflowStructs
  1896. }
  1897. if iNdEx >= l {
  1898. return io.ErrUnexpectedEOF
  1899. }
  1900. b := dAtA[iNdEx]
  1901. iNdEx++
  1902. byteLen |= int(b&0x7F) << shift
  1903. if b < 0x80 {
  1904. break
  1905. }
  1906. }
  1907. if byteLen < 0 {
  1908. return ErrInvalidLengthStructs
  1909. }
  1910. postIndex := iNdEx + byteLen
  1911. if postIndex < 0 {
  1912. return ErrInvalidLengthStructs
  1913. }
  1914. if postIndex > l {
  1915. return io.ErrUnexpectedEOF
  1916. }
  1917. m.VersionHash = append(m.VersionHash[:0], dAtA[iNdEx:postIndex]...)
  1918. if m.VersionHash == nil {
  1919. m.VersionHash = []byte{}
  1920. }
  1921. iNdEx = postIndex
  1922. default:
  1923. iNdEx = preIndex
  1924. skippy, err := skipStructs(dAtA[iNdEx:])
  1925. if err != nil {
  1926. return err
  1927. }
  1928. if skippy < 0 {
  1929. return ErrInvalidLengthStructs
  1930. }
  1931. if (iNdEx + skippy) < 0 {
  1932. return ErrInvalidLengthStructs
  1933. }
  1934. if (iNdEx + skippy) > l {
  1935. return io.ErrUnexpectedEOF
  1936. }
  1937. iNdEx += skippy
  1938. }
  1939. }
  1940. if iNdEx > l {
  1941. return io.ErrUnexpectedEOF
  1942. }
  1943. return nil
  1944. }
  1945. func (m *BlockList) Unmarshal(dAtA []byte) error {
  1946. l := len(dAtA)
  1947. iNdEx := 0
  1948. for iNdEx < l {
  1949. preIndex := iNdEx
  1950. var wire uint64
  1951. for shift := uint(0); ; shift += 7 {
  1952. if shift >= 64 {
  1953. return ErrIntOverflowStructs
  1954. }
  1955. if iNdEx >= l {
  1956. return io.ErrUnexpectedEOF
  1957. }
  1958. b := dAtA[iNdEx]
  1959. iNdEx++
  1960. wire |= uint64(b&0x7F) << shift
  1961. if b < 0x80 {
  1962. break
  1963. }
  1964. }
  1965. fieldNum := int32(wire >> 3)
  1966. wireType := int(wire & 0x7)
  1967. if wireType == 4 {
  1968. return fmt.Errorf("proto: BlockList: wiretype end group for non-group")
  1969. }
  1970. if fieldNum <= 0 {
  1971. return fmt.Errorf("proto: BlockList: illegal tag %d (wire type %d)", fieldNum, wire)
  1972. }
  1973. switch fieldNum {
  1974. case 1:
  1975. if wireType != 2 {
  1976. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  1977. }
  1978. var msglen int
  1979. for shift := uint(0); ; shift += 7 {
  1980. if shift >= 64 {
  1981. return ErrIntOverflowStructs
  1982. }
  1983. if iNdEx >= l {
  1984. return io.ErrUnexpectedEOF
  1985. }
  1986. b := dAtA[iNdEx]
  1987. iNdEx++
  1988. msglen |= int(b&0x7F) << shift
  1989. if b < 0x80 {
  1990. break
  1991. }
  1992. }
  1993. if msglen < 0 {
  1994. return ErrInvalidLengthStructs
  1995. }
  1996. postIndex := iNdEx + msglen
  1997. if postIndex < 0 {
  1998. return ErrInvalidLengthStructs
  1999. }
  2000. if postIndex > l {
  2001. return io.ErrUnexpectedEOF
  2002. }
  2003. m.Blocks = append(m.Blocks, protocol.BlockInfo{})
  2004. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2005. return err
  2006. }
  2007. iNdEx = postIndex
  2008. default:
  2009. iNdEx = preIndex
  2010. skippy, err := skipStructs(dAtA[iNdEx:])
  2011. if err != nil {
  2012. return err
  2013. }
  2014. if skippy < 0 {
  2015. return ErrInvalidLengthStructs
  2016. }
  2017. if (iNdEx + skippy) < 0 {
  2018. return ErrInvalidLengthStructs
  2019. }
  2020. if (iNdEx + skippy) > l {
  2021. return io.ErrUnexpectedEOF
  2022. }
  2023. iNdEx += skippy
  2024. }
  2025. }
  2026. if iNdEx > l {
  2027. return io.ErrUnexpectedEOF
  2028. }
  2029. return nil
  2030. }
  2031. func (m *IndirectionHashesOnly) Unmarshal(dAtA []byte) error {
  2032. l := len(dAtA)
  2033. iNdEx := 0
  2034. for iNdEx < l {
  2035. preIndex := iNdEx
  2036. var wire uint64
  2037. for shift := uint(0); ; shift += 7 {
  2038. if shift >= 64 {
  2039. return ErrIntOverflowStructs
  2040. }
  2041. if iNdEx >= l {
  2042. return io.ErrUnexpectedEOF
  2043. }
  2044. b := dAtA[iNdEx]
  2045. iNdEx++
  2046. wire |= uint64(b&0x7F) << shift
  2047. if b < 0x80 {
  2048. break
  2049. }
  2050. }
  2051. fieldNum := int32(wire >> 3)
  2052. wireType := int(wire & 0x7)
  2053. if wireType == 4 {
  2054. return fmt.Errorf("proto: IndirectionHashesOnly: wiretype end group for non-group")
  2055. }
  2056. if fieldNum <= 0 {
  2057. return fmt.Errorf("proto: IndirectionHashesOnly: illegal tag %d (wire type %d)", fieldNum, wire)
  2058. }
  2059. switch fieldNum {
  2060. case 18:
  2061. if wireType != 2 {
  2062. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  2063. }
  2064. var byteLen int
  2065. for shift := uint(0); ; shift += 7 {
  2066. if shift >= 64 {
  2067. return ErrIntOverflowStructs
  2068. }
  2069. if iNdEx >= l {
  2070. return io.ErrUnexpectedEOF
  2071. }
  2072. b := dAtA[iNdEx]
  2073. iNdEx++
  2074. byteLen |= int(b&0x7F) << shift
  2075. if b < 0x80 {
  2076. break
  2077. }
  2078. }
  2079. if byteLen < 0 {
  2080. return ErrInvalidLengthStructs
  2081. }
  2082. postIndex := iNdEx + byteLen
  2083. if postIndex < 0 {
  2084. return ErrInvalidLengthStructs
  2085. }
  2086. if postIndex > l {
  2087. return io.ErrUnexpectedEOF
  2088. }
  2089. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  2090. if m.BlocksHash == nil {
  2091. m.BlocksHash = []byte{}
  2092. }
  2093. iNdEx = postIndex
  2094. case 1001:
  2095. if wireType != 2 {
  2096. return fmt.Errorf("proto: wrong wireType = %d for field VersionHash", wireType)
  2097. }
  2098. var byteLen int
  2099. for shift := uint(0); ; shift += 7 {
  2100. if shift >= 64 {
  2101. return ErrIntOverflowStructs
  2102. }
  2103. if iNdEx >= l {
  2104. return io.ErrUnexpectedEOF
  2105. }
  2106. b := dAtA[iNdEx]
  2107. iNdEx++
  2108. byteLen |= int(b&0x7F) << shift
  2109. if b < 0x80 {
  2110. break
  2111. }
  2112. }
  2113. if byteLen < 0 {
  2114. return ErrInvalidLengthStructs
  2115. }
  2116. postIndex := iNdEx + byteLen
  2117. if postIndex < 0 {
  2118. return ErrInvalidLengthStructs
  2119. }
  2120. if postIndex > l {
  2121. return io.ErrUnexpectedEOF
  2122. }
  2123. m.VersionHash = append(m.VersionHash[:0], dAtA[iNdEx:postIndex]...)
  2124. if m.VersionHash == nil {
  2125. m.VersionHash = []byte{}
  2126. }
  2127. iNdEx = postIndex
  2128. default:
  2129. iNdEx = preIndex
  2130. skippy, err := skipStructs(dAtA[iNdEx:])
  2131. if err != nil {
  2132. return err
  2133. }
  2134. if skippy < 0 {
  2135. return ErrInvalidLengthStructs
  2136. }
  2137. if (iNdEx + skippy) < 0 {
  2138. return ErrInvalidLengthStructs
  2139. }
  2140. if (iNdEx + skippy) > l {
  2141. return io.ErrUnexpectedEOF
  2142. }
  2143. iNdEx += skippy
  2144. }
  2145. }
  2146. if iNdEx > l {
  2147. return io.ErrUnexpectedEOF
  2148. }
  2149. return nil
  2150. }
  2151. func (m *Counts) Unmarshal(dAtA []byte) error {
  2152. l := len(dAtA)
  2153. iNdEx := 0
  2154. for iNdEx < l {
  2155. preIndex := iNdEx
  2156. var wire uint64
  2157. for shift := uint(0); ; shift += 7 {
  2158. if shift >= 64 {
  2159. return ErrIntOverflowStructs
  2160. }
  2161. if iNdEx >= l {
  2162. return io.ErrUnexpectedEOF
  2163. }
  2164. b := dAtA[iNdEx]
  2165. iNdEx++
  2166. wire |= uint64(b&0x7F) << shift
  2167. if b < 0x80 {
  2168. break
  2169. }
  2170. }
  2171. fieldNum := int32(wire >> 3)
  2172. wireType := int(wire & 0x7)
  2173. if wireType == 4 {
  2174. return fmt.Errorf("proto: Counts: wiretype end group for non-group")
  2175. }
  2176. if fieldNum <= 0 {
  2177. return fmt.Errorf("proto: Counts: illegal tag %d (wire type %d)", fieldNum, wire)
  2178. }
  2179. switch fieldNum {
  2180. case 1:
  2181. if wireType != 0 {
  2182. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  2183. }
  2184. m.Files = 0
  2185. for shift := uint(0); ; shift += 7 {
  2186. if shift >= 64 {
  2187. return ErrIntOverflowStructs
  2188. }
  2189. if iNdEx >= l {
  2190. return io.ErrUnexpectedEOF
  2191. }
  2192. b := dAtA[iNdEx]
  2193. iNdEx++
  2194. m.Files |= int(b&0x7F) << shift
  2195. if b < 0x80 {
  2196. break
  2197. }
  2198. }
  2199. case 2:
  2200. if wireType != 0 {
  2201. return fmt.Errorf("proto: wrong wireType = %d for field Directories", wireType)
  2202. }
  2203. m.Directories = 0
  2204. for shift := uint(0); ; shift += 7 {
  2205. if shift >= 64 {
  2206. return ErrIntOverflowStructs
  2207. }
  2208. if iNdEx >= l {
  2209. return io.ErrUnexpectedEOF
  2210. }
  2211. b := dAtA[iNdEx]
  2212. iNdEx++
  2213. m.Directories |= int(b&0x7F) << shift
  2214. if b < 0x80 {
  2215. break
  2216. }
  2217. }
  2218. case 3:
  2219. if wireType != 0 {
  2220. return fmt.Errorf("proto: wrong wireType = %d for field Symlinks", wireType)
  2221. }
  2222. m.Symlinks = 0
  2223. for shift := uint(0); ; shift += 7 {
  2224. if shift >= 64 {
  2225. return ErrIntOverflowStructs
  2226. }
  2227. if iNdEx >= l {
  2228. return io.ErrUnexpectedEOF
  2229. }
  2230. b := dAtA[iNdEx]
  2231. iNdEx++
  2232. m.Symlinks |= int(b&0x7F) << shift
  2233. if b < 0x80 {
  2234. break
  2235. }
  2236. }
  2237. case 4:
  2238. if wireType != 0 {
  2239. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2240. }
  2241. m.Deleted = 0
  2242. for shift := uint(0); ; shift += 7 {
  2243. if shift >= 64 {
  2244. return ErrIntOverflowStructs
  2245. }
  2246. if iNdEx >= l {
  2247. return io.ErrUnexpectedEOF
  2248. }
  2249. b := dAtA[iNdEx]
  2250. iNdEx++
  2251. m.Deleted |= int(b&0x7F) << shift
  2252. if b < 0x80 {
  2253. break
  2254. }
  2255. }
  2256. case 5:
  2257. if wireType != 0 {
  2258. return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
  2259. }
  2260. m.Bytes = 0
  2261. for shift := uint(0); ; shift += 7 {
  2262. if shift >= 64 {
  2263. return ErrIntOverflowStructs
  2264. }
  2265. if iNdEx >= l {
  2266. return io.ErrUnexpectedEOF
  2267. }
  2268. b := dAtA[iNdEx]
  2269. iNdEx++
  2270. m.Bytes |= int64(b&0x7F) << shift
  2271. if b < 0x80 {
  2272. break
  2273. }
  2274. }
  2275. case 6:
  2276. if wireType != 0 {
  2277. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  2278. }
  2279. m.Sequence = 0
  2280. for shift := uint(0); ; shift += 7 {
  2281. if shift >= 64 {
  2282. return ErrIntOverflowStructs
  2283. }
  2284. if iNdEx >= l {
  2285. return io.ErrUnexpectedEOF
  2286. }
  2287. b := dAtA[iNdEx]
  2288. iNdEx++
  2289. m.Sequence |= int64(b&0x7F) << shift
  2290. if b < 0x80 {
  2291. break
  2292. }
  2293. }
  2294. case 17:
  2295. if wireType != 2 {
  2296. return fmt.Errorf("proto: wrong wireType = %d for field DeviceID", wireType)
  2297. }
  2298. var byteLen int
  2299. for shift := uint(0); ; shift += 7 {
  2300. if shift >= 64 {
  2301. return ErrIntOverflowStructs
  2302. }
  2303. if iNdEx >= l {
  2304. return io.ErrUnexpectedEOF
  2305. }
  2306. b := dAtA[iNdEx]
  2307. iNdEx++
  2308. byteLen |= int(b&0x7F) << shift
  2309. if b < 0x80 {
  2310. break
  2311. }
  2312. }
  2313. if byteLen < 0 {
  2314. return ErrInvalidLengthStructs
  2315. }
  2316. postIndex := iNdEx + byteLen
  2317. if postIndex < 0 {
  2318. return ErrInvalidLengthStructs
  2319. }
  2320. if postIndex > l {
  2321. return io.ErrUnexpectedEOF
  2322. }
  2323. m.DeviceID = append(m.DeviceID[:0], dAtA[iNdEx:postIndex]...)
  2324. if m.DeviceID == nil {
  2325. m.DeviceID = []byte{}
  2326. }
  2327. iNdEx = postIndex
  2328. case 18:
  2329. if wireType != 0 {
  2330. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  2331. }
  2332. m.LocalFlags = 0
  2333. for shift := uint(0); ; shift += 7 {
  2334. if shift >= 64 {
  2335. return ErrIntOverflowStructs
  2336. }
  2337. if iNdEx >= l {
  2338. return io.ErrUnexpectedEOF
  2339. }
  2340. b := dAtA[iNdEx]
  2341. iNdEx++
  2342. m.LocalFlags |= uint32(b&0x7F) << shift
  2343. if b < 0x80 {
  2344. break
  2345. }
  2346. }
  2347. default:
  2348. iNdEx = preIndex
  2349. skippy, err := skipStructs(dAtA[iNdEx:])
  2350. if err != nil {
  2351. return err
  2352. }
  2353. if skippy < 0 {
  2354. return ErrInvalidLengthStructs
  2355. }
  2356. if (iNdEx + skippy) < 0 {
  2357. return ErrInvalidLengthStructs
  2358. }
  2359. if (iNdEx + skippy) > l {
  2360. return io.ErrUnexpectedEOF
  2361. }
  2362. iNdEx += skippy
  2363. }
  2364. }
  2365. if iNdEx > l {
  2366. return io.ErrUnexpectedEOF
  2367. }
  2368. return nil
  2369. }
  2370. func (m *CountsSet) Unmarshal(dAtA []byte) error {
  2371. l := len(dAtA)
  2372. iNdEx := 0
  2373. for iNdEx < l {
  2374. preIndex := iNdEx
  2375. var wire uint64
  2376. for shift := uint(0); ; shift += 7 {
  2377. if shift >= 64 {
  2378. return ErrIntOverflowStructs
  2379. }
  2380. if iNdEx >= l {
  2381. return io.ErrUnexpectedEOF
  2382. }
  2383. b := dAtA[iNdEx]
  2384. iNdEx++
  2385. wire |= uint64(b&0x7F) << shift
  2386. if b < 0x80 {
  2387. break
  2388. }
  2389. }
  2390. fieldNum := int32(wire >> 3)
  2391. wireType := int(wire & 0x7)
  2392. if wireType == 4 {
  2393. return fmt.Errorf("proto: CountsSet: wiretype end group for non-group")
  2394. }
  2395. if fieldNum <= 0 {
  2396. return fmt.Errorf("proto: CountsSet: illegal tag %d (wire type %d)", fieldNum, wire)
  2397. }
  2398. switch fieldNum {
  2399. case 1:
  2400. if wireType != 2 {
  2401. return fmt.Errorf("proto: wrong wireType = %d for field Counts", wireType)
  2402. }
  2403. var msglen int
  2404. for shift := uint(0); ; shift += 7 {
  2405. if shift >= 64 {
  2406. return ErrIntOverflowStructs
  2407. }
  2408. if iNdEx >= l {
  2409. return io.ErrUnexpectedEOF
  2410. }
  2411. b := dAtA[iNdEx]
  2412. iNdEx++
  2413. msglen |= int(b&0x7F) << shift
  2414. if b < 0x80 {
  2415. break
  2416. }
  2417. }
  2418. if msglen < 0 {
  2419. return ErrInvalidLengthStructs
  2420. }
  2421. postIndex := iNdEx + msglen
  2422. if postIndex < 0 {
  2423. return ErrInvalidLengthStructs
  2424. }
  2425. if postIndex > l {
  2426. return io.ErrUnexpectedEOF
  2427. }
  2428. m.Counts = append(m.Counts, Counts{})
  2429. if err := m.Counts[len(m.Counts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2430. return err
  2431. }
  2432. iNdEx = postIndex
  2433. case 2:
  2434. if wireType != 0 {
  2435. return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType)
  2436. }
  2437. m.Created = 0
  2438. for shift := uint(0); ; shift += 7 {
  2439. if shift >= 64 {
  2440. return ErrIntOverflowStructs
  2441. }
  2442. if iNdEx >= l {
  2443. return io.ErrUnexpectedEOF
  2444. }
  2445. b := dAtA[iNdEx]
  2446. iNdEx++
  2447. m.Created |= int64(b&0x7F) << shift
  2448. if b < 0x80 {
  2449. break
  2450. }
  2451. }
  2452. default:
  2453. iNdEx = preIndex
  2454. skippy, err := skipStructs(dAtA[iNdEx:])
  2455. if err != nil {
  2456. return err
  2457. }
  2458. if skippy < 0 {
  2459. return ErrInvalidLengthStructs
  2460. }
  2461. if (iNdEx + skippy) < 0 {
  2462. return ErrInvalidLengthStructs
  2463. }
  2464. if (iNdEx + skippy) > l {
  2465. return io.ErrUnexpectedEOF
  2466. }
  2467. iNdEx += skippy
  2468. }
  2469. }
  2470. if iNdEx > l {
  2471. return io.ErrUnexpectedEOF
  2472. }
  2473. return nil
  2474. }
  2475. func (m *FileVersionDeprecated) Unmarshal(dAtA []byte) error {
  2476. l := len(dAtA)
  2477. iNdEx := 0
  2478. for iNdEx < l {
  2479. preIndex := iNdEx
  2480. var wire uint64
  2481. for shift := uint(0); ; shift += 7 {
  2482. if shift >= 64 {
  2483. return ErrIntOverflowStructs
  2484. }
  2485. if iNdEx >= l {
  2486. return io.ErrUnexpectedEOF
  2487. }
  2488. b := dAtA[iNdEx]
  2489. iNdEx++
  2490. wire |= uint64(b&0x7F) << shift
  2491. if b < 0x80 {
  2492. break
  2493. }
  2494. }
  2495. fieldNum := int32(wire >> 3)
  2496. wireType := int(wire & 0x7)
  2497. if wireType == 4 {
  2498. return fmt.Errorf("proto: FileVersionDeprecated: wiretype end group for non-group")
  2499. }
  2500. if fieldNum <= 0 {
  2501. return fmt.Errorf("proto: FileVersionDeprecated: illegal tag %d (wire type %d)", fieldNum, wire)
  2502. }
  2503. switch fieldNum {
  2504. case 1:
  2505. if wireType != 2 {
  2506. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  2507. }
  2508. var msglen int
  2509. for shift := uint(0); ; shift += 7 {
  2510. if shift >= 64 {
  2511. return ErrIntOverflowStructs
  2512. }
  2513. if iNdEx >= l {
  2514. return io.ErrUnexpectedEOF
  2515. }
  2516. b := dAtA[iNdEx]
  2517. iNdEx++
  2518. msglen |= int(b&0x7F) << shift
  2519. if b < 0x80 {
  2520. break
  2521. }
  2522. }
  2523. if msglen < 0 {
  2524. return ErrInvalidLengthStructs
  2525. }
  2526. postIndex := iNdEx + msglen
  2527. if postIndex < 0 {
  2528. return ErrInvalidLengthStructs
  2529. }
  2530. if postIndex > l {
  2531. return io.ErrUnexpectedEOF
  2532. }
  2533. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2534. return err
  2535. }
  2536. iNdEx = postIndex
  2537. case 2:
  2538. if wireType != 2 {
  2539. return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType)
  2540. }
  2541. var byteLen int
  2542. for shift := uint(0); ; shift += 7 {
  2543. if shift >= 64 {
  2544. return ErrIntOverflowStructs
  2545. }
  2546. if iNdEx >= l {
  2547. return io.ErrUnexpectedEOF
  2548. }
  2549. b := dAtA[iNdEx]
  2550. iNdEx++
  2551. byteLen |= int(b&0x7F) << shift
  2552. if b < 0x80 {
  2553. break
  2554. }
  2555. }
  2556. if byteLen < 0 {
  2557. return ErrInvalidLengthStructs
  2558. }
  2559. postIndex := iNdEx + byteLen
  2560. if postIndex < 0 {
  2561. return ErrInvalidLengthStructs
  2562. }
  2563. if postIndex > l {
  2564. return io.ErrUnexpectedEOF
  2565. }
  2566. m.Device = append(m.Device[:0], dAtA[iNdEx:postIndex]...)
  2567. if m.Device == nil {
  2568. m.Device = []byte{}
  2569. }
  2570. iNdEx = postIndex
  2571. case 3:
  2572. if wireType != 0 {
  2573. return fmt.Errorf("proto: wrong wireType = %d for field Invalid", wireType)
  2574. }
  2575. var v int
  2576. for shift := uint(0); ; shift += 7 {
  2577. if shift >= 64 {
  2578. return ErrIntOverflowStructs
  2579. }
  2580. if iNdEx >= l {
  2581. return io.ErrUnexpectedEOF
  2582. }
  2583. b := dAtA[iNdEx]
  2584. iNdEx++
  2585. v |= int(b&0x7F) << shift
  2586. if b < 0x80 {
  2587. break
  2588. }
  2589. }
  2590. m.Invalid = bool(v != 0)
  2591. case 4:
  2592. if wireType != 0 {
  2593. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  2594. }
  2595. var v int
  2596. for shift := uint(0); ; shift += 7 {
  2597. if shift >= 64 {
  2598. return ErrIntOverflowStructs
  2599. }
  2600. if iNdEx >= l {
  2601. return io.ErrUnexpectedEOF
  2602. }
  2603. b := dAtA[iNdEx]
  2604. iNdEx++
  2605. v |= int(b&0x7F) << shift
  2606. if b < 0x80 {
  2607. break
  2608. }
  2609. }
  2610. m.Deleted = bool(v != 0)
  2611. default:
  2612. iNdEx = preIndex
  2613. skippy, err := skipStructs(dAtA[iNdEx:])
  2614. if err != nil {
  2615. return err
  2616. }
  2617. if skippy < 0 {
  2618. return ErrInvalidLengthStructs
  2619. }
  2620. if (iNdEx + skippy) < 0 {
  2621. return ErrInvalidLengthStructs
  2622. }
  2623. if (iNdEx + skippy) > l {
  2624. return io.ErrUnexpectedEOF
  2625. }
  2626. iNdEx += skippy
  2627. }
  2628. }
  2629. if iNdEx > l {
  2630. return io.ErrUnexpectedEOF
  2631. }
  2632. return nil
  2633. }
  2634. func (m *VersionListDeprecated) Unmarshal(dAtA []byte) error {
  2635. l := len(dAtA)
  2636. iNdEx := 0
  2637. for iNdEx < l {
  2638. preIndex := iNdEx
  2639. var wire uint64
  2640. for shift := uint(0); ; shift += 7 {
  2641. if shift >= 64 {
  2642. return ErrIntOverflowStructs
  2643. }
  2644. if iNdEx >= l {
  2645. return io.ErrUnexpectedEOF
  2646. }
  2647. b := dAtA[iNdEx]
  2648. iNdEx++
  2649. wire |= uint64(b&0x7F) << shift
  2650. if b < 0x80 {
  2651. break
  2652. }
  2653. }
  2654. fieldNum := int32(wire >> 3)
  2655. wireType := int(wire & 0x7)
  2656. if wireType == 4 {
  2657. return fmt.Errorf("proto: VersionListDeprecated: wiretype end group for non-group")
  2658. }
  2659. if fieldNum <= 0 {
  2660. return fmt.Errorf("proto: VersionListDeprecated: illegal tag %d (wire type %d)", fieldNum, wire)
  2661. }
  2662. switch fieldNum {
  2663. case 1:
  2664. if wireType != 2 {
  2665. return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType)
  2666. }
  2667. var msglen int
  2668. for shift := uint(0); ; shift += 7 {
  2669. if shift >= 64 {
  2670. return ErrIntOverflowStructs
  2671. }
  2672. if iNdEx >= l {
  2673. return io.ErrUnexpectedEOF
  2674. }
  2675. b := dAtA[iNdEx]
  2676. iNdEx++
  2677. msglen |= int(b&0x7F) << shift
  2678. if b < 0x80 {
  2679. break
  2680. }
  2681. }
  2682. if msglen < 0 {
  2683. return ErrInvalidLengthStructs
  2684. }
  2685. postIndex := iNdEx + msglen
  2686. if postIndex < 0 {
  2687. return ErrInvalidLengthStructs
  2688. }
  2689. if postIndex > l {
  2690. return io.ErrUnexpectedEOF
  2691. }
  2692. m.Versions = append(m.Versions, FileVersionDeprecated{})
  2693. if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2694. return err
  2695. }
  2696. iNdEx = postIndex
  2697. default:
  2698. iNdEx = preIndex
  2699. skippy, err := skipStructs(dAtA[iNdEx:])
  2700. if err != nil {
  2701. return err
  2702. }
  2703. if skippy < 0 {
  2704. return ErrInvalidLengthStructs
  2705. }
  2706. if (iNdEx + skippy) < 0 {
  2707. return ErrInvalidLengthStructs
  2708. }
  2709. if (iNdEx + skippy) > l {
  2710. return io.ErrUnexpectedEOF
  2711. }
  2712. iNdEx += skippy
  2713. }
  2714. }
  2715. if iNdEx > l {
  2716. return io.ErrUnexpectedEOF
  2717. }
  2718. return nil
  2719. }
  2720. func skipStructs(dAtA []byte) (n int, err error) {
  2721. l := len(dAtA)
  2722. iNdEx := 0
  2723. depth := 0
  2724. for iNdEx < l {
  2725. var wire uint64
  2726. for shift := uint(0); ; shift += 7 {
  2727. if shift >= 64 {
  2728. return 0, ErrIntOverflowStructs
  2729. }
  2730. if iNdEx >= l {
  2731. return 0, io.ErrUnexpectedEOF
  2732. }
  2733. b := dAtA[iNdEx]
  2734. iNdEx++
  2735. wire |= (uint64(b) & 0x7F) << shift
  2736. if b < 0x80 {
  2737. break
  2738. }
  2739. }
  2740. wireType := int(wire & 0x7)
  2741. switch wireType {
  2742. case 0:
  2743. for shift := uint(0); ; shift += 7 {
  2744. if shift >= 64 {
  2745. return 0, ErrIntOverflowStructs
  2746. }
  2747. if iNdEx >= l {
  2748. return 0, io.ErrUnexpectedEOF
  2749. }
  2750. iNdEx++
  2751. if dAtA[iNdEx-1] < 0x80 {
  2752. break
  2753. }
  2754. }
  2755. case 1:
  2756. iNdEx += 8
  2757. case 2:
  2758. var length int
  2759. for shift := uint(0); ; shift += 7 {
  2760. if shift >= 64 {
  2761. return 0, ErrIntOverflowStructs
  2762. }
  2763. if iNdEx >= l {
  2764. return 0, io.ErrUnexpectedEOF
  2765. }
  2766. b := dAtA[iNdEx]
  2767. iNdEx++
  2768. length |= (int(b) & 0x7F) << shift
  2769. if b < 0x80 {
  2770. break
  2771. }
  2772. }
  2773. if length < 0 {
  2774. return 0, ErrInvalidLengthStructs
  2775. }
  2776. iNdEx += length
  2777. case 3:
  2778. depth++
  2779. case 4:
  2780. if depth == 0 {
  2781. return 0, ErrUnexpectedEndOfGroupStructs
  2782. }
  2783. depth--
  2784. case 5:
  2785. iNdEx += 4
  2786. default:
  2787. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2788. }
  2789. if iNdEx < 0 {
  2790. return 0, ErrInvalidLengthStructs
  2791. }
  2792. if depth == 0 {
  2793. return iNdEx, nil
  2794. }
  2795. }
  2796. return 0, io.ErrUnexpectedEOF
  2797. }
  2798. var (
  2799. ErrInvalidLengthStructs = fmt.Errorf("proto: negative length found during unmarshaling")
  2800. ErrIntOverflowStructs = fmt.Errorf("proto: integer overflow")
  2801. ErrUnexpectedEndOfGroupStructs = fmt.Errorf("proto: unexpected end of group")
  2802. )