structs.pb.go 87 KB

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