bep.pb.go 124 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: bep.proto
  3. package protocol
  4. import (
  5. fmt "fmt"
  6. _ "github.com/gogo/protobuf/gogoproto"
  7. proto "github.com/gogo/protobuf/proto"
  8. io "io"
  9. math "math"
  10. math_bits "math/bits"
  11. )
  12. // Reference imports to suppress errors if they are not otherwise used.
  13. var _ = proto.Marshal
  14. var _ = fmt.Errorf
  15. var _ = math.Inf
  16. // This is a compile-time assertion to ensure that this generated file
  17. // is compatible with the proto package it is being compiled against.
  18. // A compilation error at this line likely means your copy of the
  19. // proto package needs to be updated.
  20. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
  21. type MessageType int32
  22. const (
  23. messageTypeClusterConfig MessageType = 0
  24. messageTypeIndex MessageType = 1
  25. messageTypeIndexUpdate MessageType = 2
  26. messageTypeRequest MessageType = 3
  27. messageTypeResponse MessageType = 4
  28. messageTypeDownloadProgress MessageType = 5
  29. messageTypePing MessageType = 6
  30. messageTypeClose MessageType = 7
  31. )
  32. var MessageType_name = map[int32]string{
  33. 0: "CLUSTER_CONFIG",
  34. 1: "INDEX",
  35. 2: "INDEX_UPDATE",
  36. 3: "REQUEST",
  37. 4: "RESPONSE",
  38. 5: "DOWNLOAD_PROGRESS",
  39. 6: "PING",
  40. 7: "CLOSE",
  41. }
  42. var MessageType_value = map[string]int32{
  43. "CLUSTER_CONFIG": 0,
  44. "INDEX": 1,
  45. "INDEX_UPDATE": 2,
  46. "REQUEST": 3,
  47. "RESPONSE": 4,
  48. "DOWNLOAD_PROGRESS": 5,
  49. "PING": 6,
  50. "CLOSE": 7,
  51. }
  52. func (x MessageType) String() string {
  53. return proto.EnumName(MessageType_name, int32(x))
  54. }
  55. func (MessageType) EnumDescriptor() ([]byte, []int) {
  56. return fileDescriptor_e3f59eb60afbbc6e, []int{0}
  57. }
  58. type MessageCompression int32
  59. const (
  60. MessageCompressionNone MessageCompression = 0
  61. MessageCompressionLZ4 MessageCompression = 1
  62. )
  63. var MessageCompression_name = map[int32]string{
  64. 0: "NONE",
  65. 1: "LZ4",
  66. }
  67. var MessageCompression_value = map[string]int32{
  68. "NONE": 0,
  69. "LZ4": 1,
  70. }
  71. func (x MessageCompression) String() string {
  72. return proto.EnumName(MessageCompression_name, int32(x))
  73. }
  74. func (MessageCompression) EnumDescriptor() ([]byte, []int) {
  75. return fileDescriptor_e3f59eb60afbbc6e, []int{1}
  76. }
  77. type Compression int32
  78. const (
  79. CompressMetadata Compression = 0
  80. CompressNever Compression = 1
  81. CompressAlways Compression = 2
  82. )
  83. var Compression_name = map[int32]string{
  84. 0: "METADATA",
  85. 1: "NEVER",
  86. 2: "ALWAYS",
  87. }
  88. var Compression_value = map[string]int32{
  89. "METADATA": 0,
  90. "NEVER": 1,
  91. "ALWAYS": 2,
  92. }
  93. func (x Compression) String() string {
  94. return proto.EnumName(Compression_name, int32(x))
  95. }
  96. func (Compression) EnumDescriptor() ([]byte, []int) {
  97. return fileDescriptor_e3f59eb60afbbc6e, []int{2}
  98. }
  99. type FileInfoType int32
  100. const (
  101. FileInfoTypeFile FileInfoType = 0
  102. FileInfoTypeDirectory FileInfoType = 1
  103. FileInfoTypeDeprecatedSymlinkFile FileInfoType = 2 // Deprecated: Do not use.
  104. FileInfoTypeDeprecatedSymlinkDirectory FileInfoType = 3 // Deprecated: Do not use.
  105. FileInfoTypeSymlink FileInfoType = 4
  106. )
  107. var FileInfoType_name = map[int32]string{
  108. 0: "FILE",
  109. 1: "DIRECTORY",
  110. 2: "SYMLINK_FILE",
  111. 3: "SYMLINK_DIRECTORY",
  112. 4: "SYMLINK",
  113. }
  114. var FileInfoType_value = map[string]int32{
  115. "FILE": 0,
  116. "DIRECTORY": 1,
  117. "SYMLINK_FILE": 2,
  118. "SYMLINK_DIRECTORY": 3,
  119. "SYMLINK": 4,
  120. }
  121. func (x FileInfoType) String() string {
  122. return proto.EnumName(FileInfoType_name, int32(x))
  123. }
  124. func (FileInfoType) EnumDescriptor() ([]byte, []int) {
  125. return fileDescriptor_e3f59eb60afbbc6e, []int{3}
  126. }
  127. type ErrorCode int32
  128. const (
  129. ErrorCodeNoError ErrorCode = 0
  130. ErrorCodeGeneric ErrorCode = 1
  131. ErrorCodeNoSuchFile ErrorCode = 2
  132. ErrorCodeInvalidFile ErrorCode = 3
  133. )
  134. var ErrorCode_name = map[int32]string{
  135. 0: "NO_ERROR",
  136. 1: "GENERIC",
  137. 2: "NO_SUCH_FILE",
  138. 3: "INVALID_FILE",
  139. }
  140. var ErrorCode_value = map[string]int32{
  141. "NO_ERROR": 0,
  142. "GENERIC": 1,
  143. "NO_SUCH_FILE": 2,
  144. "INVALID_FILE": 3,
  145. }
  146. func (x ErrorCode) String() string {
  147. return proto.EnumName(ErrorCode_name, int32(x))
  148. }
  149. func (ErrorCode) EnumDescriptor() ([]byte, []int) {
  150. return fileDescriptor_e3f59eb60afbbc6e, []int{4}
  151. }
  152. type FileDownloadProgressUpdateType int32
  153. const (
  154. UpdateTypeAppend FileDownloadProgressUpdateType = 0
  155. UpdateTypeForget FileDownloadProgressUpdateType = 1
  156. )
  157. var FileDownloadProgressUpdateType_name = map[int32]string{
  158. 0: "APPEND",
  159. 1: "FORGET",
  160. }
  161. var FileDownloadProgressUpdateType_value = map[string]int32{
  162. "APPEND": 0,
  163. "FORGET": 1,
  164. }
  165. func (x FileDownloadProgressUpdateType) String() string {
  166. return proto.EnumName(FileDownloadProgressUpdateType_name, int32(x))
  167. }
  168. func (FileDownloadProgressUpdateType) EnumDescriptor() ([]byte, []int) {
  169. return fileDescriptor_e3f59eb60afbbc6e, []int{5}
  170. }
  171. type Hello struct {
  172. DeviceName string `protobuf:"bytes,1,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"`
  173. ClientName string `protobuf:"bytes,2,opt,name=client_name,json=clientName,proto3" json:"client_name,omitempty"`
  174. ClientVersion string `protobuf:"bytes,3,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"`
  175. }
  176. func (m *Hello) Reset() { *m = Hello{} }
  177. func (m *Hello) String() string { return proto.CompactTextString(m) }
  178. func (*Hello) ProtoMessage() {}
  179. func (*Hello) Descriptor() ([]byte, []int) {
  180. return fileDescriptor_e3f59eb60afbbc6e, []int{0}
  181. }
  182. func (m *Hello) XXX_Unmarshal(b []byte) error {
  183. return m.Unmarshal(b)
  184. }
  185. func (m *Hello) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  186. if deterministic {
  187. return xxx_messageInfo_Hello.Marshal(b, m, deterministic)
  188. } else {
  189. b = b[:cap(b)]
  190. n, err := m.MarshalToSizedBuffer(b)
  191. if err != nil {
  192. return nil, err
  193. }
  194. return b[:n], nil
  195. }
  196. }
  197. func (m *Hello) XXX_Merge(src proto.Message) {
  198. xxx_messageInfo_Hello.Merge(m, src)
  199. }
  200. func (m *Hello) XXX_Size() int {
  201. return m.ProtoSize()
  202. }
  203. func (m *Hello) XXX_DiscardUnknown() {
  204. xxx_messageInfo_Hello.DiscardUnknown(m)
  205. }
  206. var xxx_messageInfo_Hello proto.InternalMessageInfo
  207. type Header struct {
  208. Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=protocol.MessageType" json:"type,omitempty"`
  209. Compression MessageCompression `protobuf:"varint,2,opt,name=compression,proto3,enum=protocol.MessageCompression" json:"compression,omitempty"`
  210. }
  211. func (m *Header) Reset() { *m = Header{} }
  212. func (m *Header) String() string { return proto.CompactTextString(m) }
  213. func (*Header) ProtoMessage() {}
  214. func (*Header) Descriptor() ([]byte, []int) {
  215. return fileDescriptor_e3f59eb60afbbc6e, []int{1}
  216. }
  217. func (m *Header) XXX_Unmarshal(b []byte) error {
  218. return m.Unmarshal(b)
  219. }
  220. func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  221. if deterministic {
  222. return xxx_messageInfo_Header.Marshal(b, m, deterministic)
  223. } else {
  224. b = b[:cap(b)]
  225. n, err := m.MarshalToSizedBuffer(b)
  226. if err != nil {
  227. return nil, err
  228. }
  229. return b[:n], nil
  230. }
  231. }
  232. func (m *Header) XXX_Merge(src proto.Message) {
  233. xxx_messageInfo_Header.Merge(m, src)
  234. }
  235. func (m *Header) XXX_Size() int {
  236. return m.ProtoSize()
  237. }
  238. func (m *Header) XXX_DiscardUnknown() {
  239. xxx_messageInfo_Header.DiscardUnknown(m)
  240. }
  241. var xxx_messageInfo_Header proto.InternalMessageInfo
  242. type ClusterConfig struct {
  243. Folders []Folder `protobuf:"bytes,1,rep,name=folders,proto3" json:"folders"`
  244. }
  245. func (m *ClusterConfig) Reset() { *m = ClusterConfig{} }
  246. func (m *ClusterConfig) String() string { return proto.CompactTextString(m) }
  247. func (*ClusterConfig) ProtoMessage() {}
  248. func (*ClusterConfig) Descriptor() ([]byte, []int) {
  249. return fileDescriptor_e3f59eb60afbbc6e, []int{2}
  250. }
  251. func (m *ClusterConfig) XXX_Unmarshal(b []byte) error {
  252. return m.Unmarshal(b)
  253. }
  254. func (m *ClusterConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  255. if deterministic {
  256. return xxx_messageInfo_ClusterConfig.Marshal(b, m, deterministic)
  257. } else {
  258. b = b[:cap(b)]
  259. n, err := m.MarshalToSizedBuffer(b)
  260. if err != nil {
  261. return nil, err
  262. }
  263. return b[:n], nil
  264. }
  265. }
  266. func (m *ClusterConfig) XXX_Merge(src proto.Message) {
  267. xxx_messageInfo_ClusterConfig.Merge(m, src)
  268. }
  269. func (m *ClusterConfig) XXX_Size() int {
  270. return m.ProtoSize()
  271. }
  272. func (m *ClusterConfig) XXX_DiscardUnknown() {
  273. xxx_messageInfo_ClusterConfig.DiscardUnknown(m)
  274. }
  275. var xxx_messageInfo_ClusterConfig proto.InternalMessageInfo
  276. type Folder struct {
  277. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  278. Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"`
  279. ReadOnly bool `protobuf:"varint,3,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
  280. IgnorePermissions bool `protobuf:"varint,4,opt,name=ignore_permissions,json=ignorePermissions,proto3" json:"ignore_permissions,omitempty"`
  281. IgnoreDelete bool `protobuf:"varint,5,opt,name=ignore_delete,json=ignoreDelete,proto3" json:"ignore_delete,omitempty"`
  282. DisableTempIndexes bool `protobuf:"varint,6,opt,name=disable_temp_indexes,json=disableTempIndexes,proto3" json:"disable_temp_indexes,omitempty"`
  283. Paused bool `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"`
  284. Devices []Device `protobuf:"bytes,16,rep,name=devices,proto3" json:"devices"`
  285. }
  286. func (m *Folder) Reset() { *m = Folder{} }
  287. func (m *Folder) String() string { return proto.CompactTextString(m) }
  288. func (*Folder) ProtoMessage() {}
  289. func (*Folder) Descriptor() ([]byte, []int) {
  290. return fileDescriptor_e3f59eb60afbbc6e, []int{3}
  291. }
  292. func (m *Folder) XXX_Unmarshal(b []byte) error {
  293. return m.Unmarshal(b)
  294. }
  295. func (m *Folder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  296. if deterministic {
  297. return xxx_messageInfo_Folder.Marshal(b, m, deterministic)
  298. } else {
  299. b = b[:cap(b)]
  300. n, err := m.MarshalToSizedBuffer(b)
  301. if err != nil {
  302. return nil, err
  303. }
  304. return b[:n], nil
  305. }
  306. }
  307. func (m *Folder) XXX_Merge(src proto.Message) {
  308. xxx_messageInfo_Folder.Merge(m, src)
  309. }
  310. func (m *Folder) XXX_Size() int {
  311. return m.ProtoSize()
  312. }
  313. func (m *Folder) XXX_DiscardUnknown() {
  314. xxx_messageInfo_Folder.DiscardUnknown(m)
  315. }
  316. var xxx_messageInfo_Folder proto.InternalMessageInfo
  317. type Device struct {
  318. ID DeviceID `protobuf:"bytes,1,opt,name=id,proto3,customtype=DeviceID" json:"id"`
  319. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  320. Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty"`
  321. Compression Compression `protobuf:"varint,4,opt,name=compression,proto3,enum=protocol.Compression" json:"compression,omitempty"`
  322. CertName string `protobuf:"bytes,5,opt,name=cert_name,json=certName,proto3" json:"cert_name,omitempty"`
  323. MaxSequence int64 `protobuf:"varint,6,opt,name=max_sequence,json=maxSequence,proto3" json:"max_sequence,omitempty"`
  324. Introducer bool `protobuf:"varint,7,opt,name=introducer,proto3" json:"introducer,omitempty"`
  325. IndexID IndexID `protobuf:"varint,8,opt,name=index_id,json=indexId,proto3,customtype=IndexID" json:"index_id"`
  326. SkipIntroductionRemovals bool `protobuf:"varint,9,opt,name=skip_introduction_removals,json=skipIntroductionRemovals,proto3" json:"skip_introduction_removals,omitempty"`
  327. }
  328. func (m *Device) Reset() { *m = Device{} }
  329. func (m *Device) String() string { return proto.CompactTextString(m) }
  330. func (*Device) ProtoMessage() {}
  331. func (*Device) Descriptor() ([]byte, []int) {
  332. return fileDescriptor_e3f59eb60afbbc6e, []int{4}
  333. }
  334. func (m *Device) XXX_Unmarshal(b []byte) error {
  335. return m.Unmarshal(b)
  336. }
  337. func (m *Device) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  338. if deterministic {
  339. return xxx_messageInfo_Device.Marshal(b, m, deterministic)
  340. } else {
  341. b = b[:cap(b)]
  342. n, err := m.MarshalToSizedBuffer(b)
  343. if err != nil {
  344. return nil, err
  345. }
  346. return b[:n], nil
  347. }
  348. }
  349. func (m *Device) XXX_Merge(src proto.Message) {
  350. xxx_messageInfo_Device.Merge(m, src)
  351. }
  352. func (m *Device) XXX_Size() int {
  353. return m.ProtoSize()
  354. }
  355. func (m *Device) XXX_DiscardUnknown() {
  356. xxx_messageInfo_Device.DiscardUnknown(m)
  357. }
  358. var xxx_messageInfo_Device proto.InternalMessageInfo
  359. type Index struct {
  360. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  361. Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files"`
  362. }
  363. func (m *Index) Reset() { *m = Index{} }
  364. func (m *Index) String() string { return proto.CompactTextString(m) }
  365. func (*Index) ProtoMessage() {}
  366. func (*Index) Descriptor() ([]byte, []int) {
  367. return fileDescriptor_e3f59eb60afbbc6e, []int{5}
  368. }
  369. func (m *Index) XXX_Unmarshal(b []byte) error {
  370. return m.Unmarshal(b)
  371. }
  372. func (m *Index) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  373. if deterministic {
  374. return xxx_messageInfo_Index.Marshal(b, m, deterministic)
  375. } else {
  376. b = b[:cap(b)]
  377. n, err := m.MarshalToSizedBuffer(b)
  378. if err != nil {
  379. return nil, err
  380. }
  381. return b[:n], nil
  382. }
  383. }
  384. func (m *Index) XXX_Merge(src proto.Message) {
  385. xxx_messageInfo_Index.Merge(m, src)
  386. }
  387. func (m *Index) XXX_Size() int {
  388. return m.ProtoSize()
  389. }
  390. func (m *Index) XXX_DiscardUnknown() {
  391. xxx_messageInfo_Index.DiscardUnknown(m)
  392. }
  393. var xxx_messageInfo_Index proto.InternalMessageInfo
  394. type IndexUpdate struct {
  395. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  396. Files []FileInfo `protobuf:"bytes,2,rep,name=files,proto3" json:"files"`
  397. }
  398. func (m *IndexUpdate) Reset() { *m = IndexUpdate{} }
  399. func (m *IndexUpdate) String() string { return proto.CompactTextString(m) }
  400. func (*IndexUpdate) ProtoMessage() {}
  401. func (*IndexUpdate) Descriptor() ([]byte, []int) {
  402. return fileDescriptor_e3f59eb60afbbc6e, []int{6}
  403. }
  404. func (m *IndexUpdate) XXX_Unmarshal(b []byte) error {
  405. return m.Unmarshal(b)
  406. }
  407. func (m *IndexUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  408. if deterministic {
  409. return xxx_messageInfo_IndexUpdate.Marshal(b, m, deterministic)
  410. } else {
  411. b = b[:cap(b)]
  412. n, err := m.MarshalToSizedBuffer(b)
  413. if err != nil {
  414. return nil, err
  415. }
  416. return b[:n], nil
  417. }
  418. }
  419. func (m *IndexUpdate) XXX_Merge(src proto.Message) {
  420. xxx_messageInfo_IndexUpdate.Merge(m, src)
  421. }
  422. func (m *IndexUpdate) XXX_Size() int {
  423. return m.ProtoSize()
  424. }
  425. func (m *IndexUpdate) XXX_DiscardUnknown() {
  426. xxx_messageInfo_IndexUpdate.DiscardUnknown(m)
  427. }
  428. var xxx_messageInfo_IndexUpdate proto.InternalMessageInfo
  429. type FileInfo struct {
  430. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  431. Size int64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
  432. ModifiedS int64 `protobuf:"varint,5,opt,name=modified_s,json=modifiedS,proto3" json:"modified_s,omitempty"`
  433. ModifiedBy ShortID `protobuf:"varint,12,opt,name=modified_by,json=modifiedBy,proto3,customtype=ShortID" json:"modified_by"`
  434. Version Vector `protobuf:"bytes,9,opt,name=version,proto3" json:"version"`
  435. Sequence int64 `protobuf:"varint,10,opt,name=sequence,proto3" json:"sequence,omitempty"`
  436. Blocks []BlockInfo `protobuf:"bytes,16,rep,name=blocks,proto3" json:"blocks"`
  437. SymlinkTarget string `protobuf:"bytes,17,opt,name=symlink_target,json=symlinkTarget,proto3" json:"symlink_target,omitempty"`
  438. BlocksHash []byte `protobuf:"bytes,18,opt,name=blocks_hash,json=blocksHash,proto3" json:"blocks_hash,omitempty"`
  439. Type FileInfoType `protobuf:"varint,2,opt,name=type,proto3,enum=protocol.FileInfoType" json:"type,omitempty"`
  440. Permissions uint32 `protobuf:"varint,4,opt,name=permissions,proto3" json:"permissions,omitempty"`
  441. ModifiedNs int32 `protobuf:"varint,11,opt,name=modified_ns,json=modifiedNs,proto3" json:"modified_ns,omitempty"`
  442. RawBlockSize int32 `protobuf:"varint,13,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
  443. // The local_flags fields stores flags that are relevant to the local
  444. // host only. It is not part of the protocol, doesn't get sent or
  445. // received (we make sure to zero it), nonetheless we need it on our
  446. // struct and to be able to serialize it to/from the database.
  447. LocalFlags uint32 `protobuf:"varint,1000,opt,name=local_flags,json=localFlags,proto3" json:"local_flags,omitempty"`
  448. Deleted bool `protobuf:"varint,6,opt,name=deleted,proto3" json:"deleted,omitempty"`
  449. RawInvalid bool `protobuf:"varint,7,opt,name=invalid,proto3" json:"invalid,omitempty"`
  450. NoPermissions bool `protobuf:"varint,8,opt,name=no_permissions,json=noPermissions,proto3" json:"no_permissions,omitempty"`
  451. }
  452. func (m *FileInfo) Reset() { *m = FileInfo{} }
  453. func (*FileInfo) ProtoMessage() {}
  454. func (*FileInfo) Descriptor() ([]byte, []int) {
  455. return fileDescriptor_e3f59eb60afbbc6e, []int{7}
  456. }
  457. func (m *FileInfo) XXX_Unmarshal(b []byte) error {
  458. return m.Unmarshal(b)
  459. }
  460. func (m *FileInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  461. if deterministic {
  462. return xxx_messageInfo_FileInfo.Marshal(b, m, deterministic)
  463. } else {
  464. b = b[:cap(b)]
  465. n, err := m.MarshalToSizedBuffer(b)
  466. if err != nil {
  467. return nil, err
  468. }
  469. return b[:n], nil
  470. }
  471. }
  472. func (m *FileInfo) XXX_Merge(src proto.Message) {
  473. xxx_messageInfo_FileInfo.Merge(m, src)
  474. }
  475. func (m *FileInfo) XXX_Size() int {
  476. return m.ProtoSize()
  477. }
  478. func (m *FileInfo) XXX_DiscardUnknown() {
  479. xxx_messageInfo_FileInfo.DiscardUnknown(m)
  480. }
  481. var xxx_messageInfo_FileInfo proto.InternalMessageInfo
  482. type BlockInfo struct {
  483. Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
  484. Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
  485. Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
  486. WeakHash uint32 `protobuf:"varint,4,opt,name=weak_hash,json=weakHash,proto3" json:"weak_hash,omitempty"`
  487. }
  488. func (m *BlockInfo) Reset() { *m = BlockInfo{} }
  489. func (*BlockInfo) ProtoMessage() {}
  490. func (*BlockInfo) Descriptor() ([]byte, []int) {
  491. return fileDescriptor_e3f59eb60afbbc6e, []int{8}
  492. }
  493. func (m *BlockInfo) XXX_Unmarshal(b []byte) error {
  494. return m.Unmarshal(b)
  495. }
  496. func (m *BlockInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  497. if deterministic {
  498. return xxx_messageInfo_BlockInfo.Marshal(b, m, deterministic)
  499. } else {
  500. b = b[:cap(b)]
  501. n, err := m.MarshalToSizedBuffer(b)
  502. if err != nil {
  503. return nil, err
  504. }
  505. return b[:n], nil
  506. }
  507. }
  508. func (m *BlockInfo) XXX_Merge(src proto.Message) {
  509. xxx_messageInfo_BlockInfo.Merge(m, src)
  510. }
  511. func (m *BlockInfo) XXX_Size() int {
  512. return m.ProtoSize()
  513. }
  514. func (m *BlockInfo) XXX_DiscardUnknown() {
  515. xxx_messageInfo_BlockInfo.DiscardUnknown(m)
  516. }
  517. var xxx_messageInfo_BlockInfo proto.InternalMessageInfo
  518. type Vector struct {
  519. Counters []Counter `protobuf:"bytes,1,rep,name=counters,proto3" json:"counters"`
  520. }
  521. func (m *Vector) Reset() { *m = Vector{} }
  522. func (m *Vector) String() string { return proto.CompactTextString(m) }
  523. func (*Vector) ProtoMessage() {}
  524. func (*Vector) Descriptor() ([]byte, []int) {
  525. return fileDescriptor_e3f59eb60afbbc6e, []int{9}
  526. }
  527. func (m *Vector) XXX_Unmarshal(b []byte) error {
  528. return m.Unmarshal(b)
  529. }
  530. func (m *Vector) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  531. if deterministic {
  532. return xxx_messageInfo_Vector.Marshal(b, m, deterministic)
  533. } else {
  534. b = b[:cap(b)]
  535. n, err := m.MarshalToSizedBuffer(b)
  536. if err != nil {
  537. return nil, err
  538. }
  539. return b[:n], nil
  540. }
  541. }
  542. func (m *Vector) XXX_Merge(src proto.Message) {
  543. xxx_messageInfo_Vector.Merge(m, src)
  544. }
  545. func (m *Vector) XXX_Size() int {
  546. return m.ProtoSize()
  547. }
  548. func (m *Vector) XXX_DiscardUnknown() {
  549. xxx_messageInfo_Vector.DiscardUnknown(m)
  550. }
  551. var xxx_messageInfo_Vector proto.InternalMessageInfo
  552. type Counter struct {
  553. ID ShortID `protobuf:"varint,1,opt,name=id,proto3,customtype=ShortID" json:"id"`
  554. Value uint64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"`
  555. }
  556. func (m *Counter) Reset() { *m = Counter{} }
  557. func (m *Counter) String() string { return proto.CompactTextString(m) }
  558. func (*Counter) ProtoMessage() {}
  559. func (*Counter) Descriptor() ([]byte, []int) {
  560. return fileDescriptor_e3f59eb60afbbc6e, []int{10}
  561. }
  562. func (m *Counter) XXX_Unmarshal(b []byte) error {
  563. return m.Unmarshal(b)
  564. }
  565. func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  566. if deterministic {
  567. return xxx_messageInfo_Counter.Marshal(b, m, deterministic)
  568. } else {
  569. b = b[:cap(b)]
  570. n, err := m.MarshalToSizedBuffer(b)
  571. if err != nil {
  572. return nil, err
  573. }
  574. return b[:n], nil
  575. }
  576. }
  577. func (m *Counter) XXX_Merge(src proto.Message) {
  578. xxx_messageInfo_Counter.Merge(m, src)
  579. }
  580. func (m *Counter) XXX_Size() int {
  581. return m.ProtoSize()
  582. }
  583. func (m *Counter) XXX_DiscardUnknown() {
  584. xxx_messageInfo_Counter.DiscardUnknown(m)
  585. }
  586. var xxx_messageInfo_Counter proto.InternalMessageInfo
  587. type Request struct {
  588. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  589. Folder string `protobuf:"bytes,2,opt,name=folder,proto3" json:"folder,omitempty"`
  590. Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
  591. Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"`
  592. Size int32 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"`
  593. Hash []byte `protobuf:"bytes,6,opt,name=hash,proto3" json:"hash,omitempty"`
  594. FromTemporary bool `protobuf:"varint,7,opt,name=from_temporary,json=fromTemporary,proto3" json:"from_temporary,omitempty"`
  595. WeakHash uint32 `protobuf:"varint,8,opt,name=weak_hash,json=weakHash,proto3" json:"weak_hash,omitempty"`
  596. }
  597. func (m *Request) Reset() { *m = Request{} }
  598. func (m *Request) String() string { return proto.CompactTextString(m) }
  599. func (*Request) ProtoMessage() {}
  600. func (*Request) Descriptor() ([]byte, []int) {
  601. return fileDescriptor_e3f59eb60afbbc6e, []int{11}
  602. }
  603. func (m *Request) XXX_Unmarshal(b []byte) error {
  604. return m.Unmarshal(b)
  605. }
  606. func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  607. if deterministic {
  608. return xxx_messageInfo_Request.Marshal(b, m, deterministic)
  609. } else {
  610. b = b[:cap(b)]
  611. n, err := m.MarshalToSizedBuffer(b)
  612. if err != nil {
  613. return nil, err
  614. }
  615. return b[:n], nil
  616. }
  617. }
  618. func (m *Request) XXX_Merge(src proto.Message) {
  619. xxx_messageInfo_Request.Merge(m, src)
  620. }
  621. func (m *Request) XXX_Size() int {
  622. return m.ProtoSize()
  623. }
  624. func (m *Request) XXX_DiscardUnknown() {
  625. xxx_messageInfo_Request.DiscardUnknown(m)
  626. }
  627. var xxx_messageInfo_Request proto.InternalMessageInfo
  628. type Response struct {
  629. ID int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
  630. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  631. Code ErrorCode `protobuf:"varint,3,opt,name=code,proto3,enum=protocol.ErrorCode" json:"code,omitempty"`
  632. }
  633. func (m *Response) Reset() { *m = Response{} }
  634. func (m *Response) String() string { return proto.CompactTextString(m) }
  635. func (*Response) ProtoMessage() {}
  636. func (*Response) Descriptor() ([]byte, []int) {
  637. return fileDescriptor_e3f59eb60afbbc6e, []int{12}
  638. }
  639. func (m *Response) XXX_Unmarshal(b []byte) error {
  640. return m.Unmarshal(b)
  641. }
  642. func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  643. if deterministic {
  644. return xxx_messageInfo_Response.Marshal(b, m, deterministic)
  645. } else {
  646. b = b[:cap(b)]
  647. n, err := m.MarshalToSizedBuffer(b)
  648. if err != nil {
  649. return nil, err
  650. }
  651. return b[:n], nil
  652. }
  653. }
  654. func (m *Response) XXX_Merge(src proto.Message) {
  655. xxx_messageInfo_Response.Merge(m, src)
  656. }
  657. func (m *Response) XXX_Size() int {
  658. return m.ProtoSize()
  659. }
  660. func (m *Response) XXX_DiscardUnknown() {
  661. xxx_messageInfo_Response.DiscardUnknown(m)
  662. }
  663. var xxx_messageInfo_Response proto.InternalMessageInfo
  664. type DownloadProgress struct {
  665. Folder string `protobuf:"bytes,1,opt,name=folder,proto3" json:"folder,omitempty"`
  666. Updates []FileDownloadProgressUpdate `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates"`
  667. }
  668. func (m *DownloadProgress) Reset() { *m = DownloadProgress{} }
  669. func (m *DownloadProgress) String() string { return proto.CompactTextString(m) }
  670. func (*DownloadProgress) ProtoMessage() {}
  671. func (*DownloadProgress) Descriptor() ([]byte, []int) {
  672. return fileDescriptor_e3f59eb60afbbc6e, []int{13}
  673. }
  674. func (m *DownloadProgress) XXX_Unmarshal(b []byte) error {
  675. return m.Unmarshal(b)
  676. }
  677. func (m *DownloadProgress) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  678. if deterministic {
  679. return xxx_messageInfo_DownloadProgress.Marshal(b, m, deterministic)
  680. } else {
  681. b = b[:cap(b)]
  682. n, err := m.MarshalToSizedBuffer(b)
  683. if err != nil {
  684. return nil, err
  685. }
  686. return b[:n], nil
  687. }
  688. }
  689. func (m *DownloadProgress) XXX_Merge(src proto.Message) {
  690. xxx_messageInfo_DownloadProgress.Merge(m, src)
  691. }
  692. func (m *DownloadProgress) XXX_Size() int {
  693. return m.ProtoSize()
  694. }
  695. func (m *DownloadProgress) XXX_DiscardUnknown() {
  696. xxx_messageInfo_DownloadProgress.DiscardUnknown(m)
  697. }
  698. var xxx_messageInfo_DownloadProgress proto.InternalMessageInfo
  699. type FileDownloadProgressUpdate struct {
  700. UpdateType FileDownloadProgressUpdateType `protobuf:"varint,1,opt,name=update_type,json=updateType,proto3,enum=protocol.FileDownloadProgressUpdateType" json:"update_type,omitempty"`
  701. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
  702. Version Vector `protobuf:"bytes,3,opt,name=version,proto3" json:"version"`
  703. BlockIndexes []int32 `protobuf:"varint,4,rep,name=block_indexes,json=blockIndexes,proto3" json:"block_indexes,omitempty"`
  704. BlockSize int32 `protobuf:"varint,5,opt,name=block_size,json=blockSize,proto3" json:"block_size,omitempty"`
  705. }
  706. func (m *FileDownloadProgressUpdate) Reset() { *m = FileDownloadProgressUpdate{} }
  707. func (m *FileDownloadProgressUpdate) String() string { return proto.CompactTextString(m) }
  708. func (*FileDownloadProgressUpdate) ProtoMessage() {}
  709. func (*FileDownloadProgressUpdate) Descriptor() ([]byte, []int) {
  710. return fileDescriptor_e3f59eb60afbbc6e, []int{14}
  711. }
  712. func (m *FileDownloadProgressUpdate) XXX_Unmarshal(b []byte) error {
  713. return m.Unmarshal(b)
  714. }
  715. func (m *FileDownloadProgressUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  716. if deterministic {
  717. return xxx_messageInfo_FileDownloadProgressUpdate.Marshal(b, m, deterministic)
  718. } else {
  719. b = b[:cap(b)]
  720. n, err := m.MarshalToSizedBuffer(b)
  721. if err != nil {
  722. return nil, err
  723. }
  724. return b[:n], nil
  725. }
  726. }
  727. func (m *FileDownloadProgressUpdate) XXX_Merge(src proto.Message) {
  728. xxx_messageInfo_FileDownloadProgressUpdate.Merge(m, src)
  729. }
  730. func (m *FileDownloadProgressUpdate) XXX_Size() int {
  731. return m.ProtoSize()
  732. }
  733. func (m *FileDownloadProgressUpdate) XXX_DiscardUnknown() {
  734. xxx_messageInfo_FileDownloadProgressUpdate.DiscardUnknown(m)
  735. }
  736. var xxx_messageInfo_FileDownloadProgressUpdate proto.InternalMessageInfo
  737. type Ping struct {
  738. }
  739. func (m *Ping) Reset() { *m = Ping{} }
  740. func (m *Ping) String() string { return proto.CompactTextString(m) }
  741. func (*Ping) ProtoMessage() {}
  742. func (*Ping) Descriptor() ([]byte, []int) {
  743. return fileDescriptor_e3f59eb60afbbc6e, []int{15}
  744. }
  745. func (m *Ping) XXX_Unmarshal(b []byte) error {
  746. return m.Unmarshal(b)
  747. }
  748. func (m *Ping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  749. if deterministic {
  750. return xxx_messageInfo_Ping.Marshal(b, m, deterministic)
  751. } else {
  752. b = b[:cap(b)]
  753. n, err := m.MarshalToSizedBuffer(b)
  754. if err != nil {
  755. return nil, err
  756. }
  757. return b[:n], nil
  758. }
  759. }
  760. func (m *Ping) XXX_Merge(src proto.Message) {
  761. xxx_messageInfo_Ping.Merge(m, src)
  762. }
  763. func (m *Ping) XXX_Size() int {
  764. return m.ProtoSize()
  765. }
  766. func (m *Ping) XXX_DiscardUnknown() {
  767. xxx_messageInfo_Ping.DiscardUnknown(m)
  768. }
  769. var xxx_messageInfo_Ping proto.InternalMessageInfo
  770. type Close struct {
  771. Reason string `protobuf:"bytes,1,opt,name=reason,proto3" json:"reason,omitempty"`
  772. }
  773. func (m *Close) Reset() { *m = Close{} }
  774. func (m *Close) String() string { return proto.CompactTextString(m) }
  775. func (*Close) ProtoMessage() {}
  776. func (*Close) Descriptor() ([]byte, []int) {
  777. return fileDescriptor_e3f59eb60afbbc6e, []int{16}
  778. }
  779. func (m *Close) XXX_Unmarshal(b []byte) error {
  780. return m.Unmarshal(b)
  781. }
  782. func (m *Close) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  783. if deterministic {
  784. return xxx_messageInfo_Close.Marshal(b, m, deterministic)
  785. } else {
  786. b = b[:cap(b)]
  787. n, err := m.MarshalToSizedBuffer(b)
  788. if err != nil {
  789. return nil, err
  790. }
  791. return b[:n], nil
  792. }
  793. }
  794. func (m *Close) XXX_Merge(src proto.Message) {
  795. xxx_messageInfo_Close.Merge(m, src)
  796. }
  797. func (m *Close) XXX_Size() int {
  798. return m.ProtoSize()
  799. }
  800. func (m *Close) XXX_DiscardUnknown() {
  801. xxx_messageInfo_Close.DiscardUnknown(m)
  802. }
  803. var xxx_messageInfo_Close proto.InternalMessageInfo
  804. func init() {
  805. proto.RegisterEnum("protocol.MessageType", MessageType_name, MessageType_value)
  806. proto.RegisterEnum("protocol.MessageCompression", MessageCompression_name, MessageCompression_value)
  807. proto.RegisterEnum("protocol.Compression", Compression_name, Compression_value)
  808. proto.RegisterEnum("protocol.FileInfoType", FileInfoType_name, FileInfoType_value)
  809. proto.RegisterEnum("protocol.ErrorCode", ErrorCode_name, ErrorCode_value)
  810. proto.RegisterEnum("protocol.FileDownloadProgressUpdateType", FileDownloadProgressUpdateType_name, FileDownloadProgressUpdateType_value)
  811. proto.RegisterType((*Hello)(nil), "protocol.Hello")
  812. proto.RegisterType((*Header)(nil), "protocol.Header")
  813. proto.RegisterType((*ClusterConfig)(nil), "protocol.ClusterConfig")
  814. proto.RegisterType((*Folder)(nil), "protocol.Folder")
  815. proto.RegisterType((*Device)(nil), "protocol.Device")
  816. proto.RegisterType((*Index)(nil), "protocol.Index")
  817. proto.RegisterType((*IndexUpdate)(nil), "protocol.IndexUpdate")
  818. proto.RegisterType((*FileInfo)(nil), "protocol.FileInfo")
  819. proto.RegisterType((*BlockInfo)(nil), "protocol.BlockInfo")
  820. proto.RegisterType((*Vector)(nil), "protocol.Vector")
  821. proto.RegisterType((*Counter)(nil), "protocol.Counter")
  822. proto.RegisterType((*Request)(nil), "protocol.Request")
  823. proto.RegisterType((*Response)(nil), "protocol.Response")
  824. proto.RegisterType((*DownloadProgress)(nil), "protocol.DownloadProgress")
  825. proto.RegisterType((*FileDownloadProgressUpdate)(nil), "protocol.FileDownloadProgressUpdate")
  826. proto.RegisterType((*Ping)(nil), "protocol.Ping")
  827. proto.RegisterType((*Close)(nil), "protocol.Close")
  828. }
  829. func init() { proto.RegisterFile("bep.proto", fileDescriptor_e3f59eb60afbbc6e) }
  830. var fileDescriptor_e3f59eb60afbbc6e = []byte{
  831. // 1825 bytes of a gzipped FileDescriptorProto
  832. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x73, 0xdb, 0xc6,
  833. 0x15, 0x26, 0x48, 0xf0, 0xd7, 0x23, 0xa5, 0x40, 0x6b, 0x5b, 0x45, 0x61, 0x9b, 0x84, 0x69, 0x3b,
  834. 0x66, 0x34, 0xa9, 0xed, 0x26, 0x69, 0x3b, 0xed, 0xb4, 0x9d, 0xe1, 0x0f, 0x48, 0xe6, 0x54, 0x26,
  835. 0xd5, 0x25, 0xe5, 0xd4, 0x39, 0x14, 0x03, 0x11, 0x4b, 0x0a, 0x63, 0x10, 0xcb, 0x02, 0xa0, 0x64,
  836. 0xe6, 0x4f, 0xe0, 0xa9, 0xc7, 0x5e, 0x38, 0x93, 0x99, 0x9e, 0xfa, 0x9f, 0xf8, 0xe8, 0xf6, 0xd4,
  837. 0xe9, 0x41, 0xd3, 0xc8, 0x97, 0x1c, 0x7b, 0xe9, 0xb5, 0xed, 0xec, 0x2e, 0x40, 0x82, 0x52, 0x9c,
  838. 0xc9, 0xa1, 0x27, 0xec, 0xbe, 0xf7, 0xed, 0x5b, 0xec, 0xf7, 0xde, 0xfb, 0x76, 0xa1, 0x78, 0x42,
  839. 0xa6, 0x8f, 0xa7, 0x3e, 0x0d, 0x29, 0x2a, 0xf0, 0xcf, 0x90, 0xba, 0xda, 0x7d, 0x9f, 0x4c, 0x69,
  840. 0xf0, 0x84, 0xcf, 0x4f, 0x66, 0xa3, 0x27, 0x63, 0x3a, 0xa6, 0x7c, 0xc2, 0x47, 0x02, 0x5e, 0x9b,
  841. 0x42, 0xf6, 0x19, 0x71, 0x5d, 0x8a, 0xaa, 0x50, 0xb2, 0xc9, 0x99, 0x33, 0x24, 0xa6, 0x67, 0x4d,
  842. 0x88, 0x2a, 0xe9, 0x52, 0xbd, 0x88, 0x41, 0x98, 0xba, 0xd6, 0x84, 0x30, 0xc0, 0xd0, 0x75, 0x88,
  843. 0x17, 0x0a, 0x40, 0x5a, 0x00, 0x84, 0x89, 0x03, 0x1e, 0xc2, 0x76, 0x04, 0x38, 0x23, 0x7e, 0xe0,
  844. 0x50, 0x4f, 0xcd, 0x70, 0xcc, 0x96, 0xb0, 0xbe, 0x10, 0xc6, 0x5a, 0x00, 0xb9, 0x67, 0xc4, 0xb2,
  845. 0x89, 0x8f, 0x3e, 0x02, 0x39, 0x9c, 0x4f, 0xc5, 0x5e, 0xdb, 0x9f, 0xdc, 0x7a, 0x1c, 0xff, 0xf9,
  846. 0xe3, 0xe7, 0x24, 0x08, 0xac, 0x31, 0x19, 0xcc, 0xa7, 0x04, 0x73, 0x08, 0xfa, 0x35, 0x94, 0x86,
  847. 0x74, 0x32, 0xf5, 0x49, 0xc0, 0x03, 0xa7, 0xf9, 0x8a, 0x3b, 0xd7, 0x56, 0xb4, 0xd6, 0x18, 0x9c,
  848. 0x5c, 0x50, 0x6b, 0xc0, 0x56, 0xcb, 0x9d, 0x05, 0x21, 0xf1, 0x5b, 0xd4, 0x1b, 0x39, 0x63, 0xf4,
  849. 0x14, 0xf2, 0x23, 0xea, 0xda, 0xc4, 0x0f, 0x54, 0x49, 0xcf, 0xd4, 0x4b, 0x9f, 0x28, 0xeb, 0x60,
  850. 0xfb, 0xdc, 0xd1, 0x94, 0xdf, 0x5c, 0x54, 0x53, 0x38, 0x86, 0xd5, 0xfe, 0x9c, 0x86, 0x9c, 0xf0,
  851. 0xa0, 0x5d, 0x48, 0x3b, 0xb6, 0xa0, 0xa8, 0x99, 0xbb, 0xbc, 0xa8, 0xa6, 0x3b, 0x6d, 0x9c, 0x76,
  852. 0x6c, 0x74, 0x13, 0xb2, 0xae, 0x75, 0x42, 0xdc, 0x88, 0x1c, 0x31, 0x41, 0xb7, 0xa1, 0xe8, 0x13,
  853. 0xcb, 0x36, 0xa9, 0xe7, 0xce, 0x39, 0x25, 0x05, 0x5c, 0x60, 0x86, 0x9e, 0xe7, 0xce, 0xd1, 0x8f,
  854. 0x00, 0x39, 0x63, 0x8f, 0xfa, 0xc4, 0x9c, 0x12, 0x7f, 0xe2, 0xf0, 0xbf, 0x0d, 0x54, 0x99, 0xa3,
  855. 0x76, 0x84, 0xe7, 0x68, 0xed, 0x40, 0xf7, 0x61, 0x2b, 0x82, 0xdb, 0xc4, 0x25, 0x21, 0x51, 0xb3,
  856. 0x1c, 0x59, 0x16, 0xc6, 0x36, 0xb7, 0xa1, 0xa7, 0x70, 0xd3, 0x76, 0x02, 0xeb, 0xc4, 0x25, 0x66,
  857. 0x48, 0x26, 0x53, 0xd3, 0xf1, 0x6c, 0xf2, 0x9a, 0x04, 0x6a, 0x8e, 0x63, 0x51, 0xe4, 0x1b, 0x90,
  858. 0xc9, 0xb4, 0x23, 0x3c, 0x68, 0x17, 0x72, 0x53, 0x6b, 0x16, 0x10, 0x5b, 0xcd, 0x73, 0x4c, 0x34,
  859. 0x63, 0x2c, 0x89, 0x0a, 0x08, 0x54, 0xe5, 0x2a, 0x4b, 0x6d, 0xee, 0x88, 0x59, 0x8a, 0x60, 0xb5,
  860. 0x7f, 0xa5, 0x21, 0x27, 0x3c, 0xe8, 0xc3, 0x15, 0x4b, 0xe5, 0xe6, 0x2e, 0x43, 0xfd, 0xe3, 0xa2,
  861. 0x5a, 0x10, 0xbe, 0x4e, 0x3b, 0xc1, 0x1a, 0x02, 0x39, 0x51, 0x51, 0x7c, 0x8c, 0xee, 0x40, 0xd1,
  862. 0xb2, 0x6d, 0x96, 0x3d, 0x12, 0xa8, 0x19, 0x3d, 0x53, 0x2f, 0xe2, 0xb5, 0x01, 0xfd, 0x6c, 0xb3,
  863. 0x1a, 0xe4, 0xab, 0xf5, 0xf3, 0xbe, 0x32, 0x60, 0xa9, 0x18, 0x12, 0x3f, 0xaa, 0xe0, 0x2c, 0xdf,
  864. 0xaf, 0xc0, 0x0c, 0xbc, 0x7e, 0xef, 0x41, 0x79, 0x62, 0xbd, 0x36, 0x03, 0xf2, 0x87, 0x19, 0xf1,
  865. 0x86, 0x84, 0xd3, 0x95, 0xc1, 0xa5, 0x89, 0xf5, 0xba, 0x1f, 0x99, 0x50, 0x05, 0xc0, 0xf1, 0x42,
  866. 0x9f, 0xda, 0xb3, 0x21, 0xf1, 0x23, 0xae, 0x12, 0x16, 0xf4, 0x13, 0x28, 0x70, 0xb2, 0x4d, 0xc7,
  867. 0x56, 0x0b, 0xba, 0x54, 0x97, 0x9b, 0x5a, 0x74, 0xf0, 0x3c, 0xa7, 0x9a, 0x9f, 0x3b, 0x1e, 0xe2,
  868. 0x3c, 0xc7, 0x76, 0x6c, 0xf4, 0x4b, 0xd0, 0x82, 0x57, 0x0e, 0x4b, 0x94, 0x88, 0x14, 0x3a, 0xd4,
  869. 0x33, 0x7d, 0x32, 0xa1, 0x67, 0x96, 0x1b, 0xa8, 0x45, 0xbe, 0x8d, 0xca, 0x10, 0x9d, 0x04, 0x00,
  870. 0x47, 0xfe, 0x5a, 0x0f, 0xb2, 0x3c, 0x22, 0xcb, 0xa2, 0x28, 0xd6, 0xa8, 0x7b, 0xa3, 0x19, 0x7a,
  871. 0x0c, 0xd9, 0x91, 0xe3, 0x92, 0x40, 0x4d, 0xf3, 0x1c, 0xa2, 0x44, 0xa5, 0x3b, 0x2e, 0xe9, 0x78,
  872. 0x23, 0x1a, 0x65, 0x51, 0xc0, 0x6a, 0xc7, 0x50, 0xe2, 0x01, 0x8f, 0xa7, 0xb6, 0x15, 0x92, 0xff,
  873. 0x5b, 0xd8, 0xff, 0xca, 0x50, 0x88, 0x3d, 0xab, 0xa4, 0x4b, 0x89, 0xa4, 0x23, 0x90, 0x03, 0xe7,
  874. 0x4b, 0xc2, 0x7b, 0x24, 0x83, 0xf9, 0x18, 0xdd, 0x05, 0x98, 0x50, 0xdb, 0x19, 0x39, 0xc4, 0x36,
  875. 0x03, 0x9e, 0xb2, 0x0c, 0x2e, 0xc6, 0x96, 0x3e, 0x7a, 0x0a, 0xa5, 0x95, 0xfb, 0x64, 0xae, 0x96,
  876. 0x39, 0xe7, 0x1f, 0xc4, 0x9c, 0xf7, 0x4f, 0xa9, 0x1f, 0x76, 0xda, 0x78, 0x15, 0xa2, 0x39, 0x67,
  877. 0x25, 0x1d, 0xcb, 0x13, 0x23, 0x76, 0xa3, 0xa4, 0x5f, 0x90, 0x61, 0x48, 0x57, 0x8d, 0x1f, 0xc1,
  878. 0x90, 0x06, 0x85, 0x55, 0x4d, 0x00, 0xff, 0x81, 0xd5, 0x1c, 0xfd, 0x18, 0x72, 0x27, 0x2e, 0x1d,
  879. 0xbe, 0x8a, 0xfb, 0xe3, 0xc6, 0x3a, 0x58, 0x93, 0xd9, 0x13, 0x2c, 0x44, 0x40, 0x26, 0x93, 0xc1,
  880. 0x7c, 0xe2, 0x3a, 0xde, 0x2b, 0x33, 0xb4, 0xfc, 0x31, 0x09, 0xd5, 0x1d, 0x21, 0x93, 0x91, 0x75,
  881. 0xc0, 0x8d, 0x4c, 0x6e, 0xc5, 0x02, 0xf3, 0xd4, 0x0a, 0x4e, 0x55, 0xc4, 0xda, 0x08, 0x83, 0x30,
  882. 0x3d, 0xb3, 0x82, 0x53, 0xb4, 0x17, 0xa9, 0xa7, 0xd0, 0xc2, 0xdd, 0xeb, 0xec, 0x27, 0xe4, 0x53,
  883. 0x87, 0xd2, 0x55, 0x79, 0xd9, 0xc2, 0x49, 0x13, 0xdb, 0x6e, 0x45, 0xa4, 0x17, 0xa8, 0x25, 0x5d,
  884. 0xaa, 0x67, 0xd7, 0xbc, 0x75, 0x03, 0xf4, 0x04, 0xc4, 0xe6, 0x26, 0x4f, 0xd1, 0x16, 0xf3, 0x37,
  885. 0x95, 0xcb, 0x8b, 0x6a, 0x19, 0x5b, 0xe7, 0xfc, 0xa8, 0x7d, 0xe7, 0x4b, 0x82, 0x8b, 0x27, 0xf1,
  886. 0x90, 0xed, 0xe9, 0xd2, 0xa1, 0xe5, 0x9a, 0x23, 0xd7, 0x1a, 0x07, 0xea, 0x37, 0x79, 0xbe, 0x29,
  887. 0x70, 0xdb, 0x3e, 0x33, 0x21, 0x95, 0xa9, 0x0b, 0x53, 0x2c, 0x3b, 0x92, 0xa6, 0x78, 0x8a, 0xea,
  888. 0x90, 0x77, 0xbc, 0x33, 0xcb, 0x75, 0x22, 0x41, 0x6a, 0x6e, 0x5f, 0x5e, 0x54, 0x01, 0x5b, 0xe7,
  889. 0x1d, 0x61, 0xc5, 0xb1, 0x9b, 0xb1, 0xe9, 0xd1, 0x0d, 0xed, 0x2c, 0xf0, 0x50, 0x5b, 0x1e, 0x4d,
  890. 0xe8, 0xe6, 0x2f, 0xe4, 0x3f, 0x7d, 0x55, 0x4d, 0xd5, 0x3c, 0x28, 0xae, 0xb2, 0xc2, 0xaa, 0x8d,
  891. 0x33, 0x9b, 0xe1, 0xcc, 0xf2, 0x31, 0x2b, 0x75, 0x3a, 0x1a, 0x05, 0x24, 0xe4, 0x75, 0x99, 0xc1,
  892. 0xd1, 0x6c, 0x55, 0x99, 0x69, 0x4e, 0x8b, 0xa8, 0xcc, 0xdb, 0x50, 0x3c, 0x27, 0xd6, 0x2b, 0x91,
  893. 0x1e, 0xc1, 0x68, 0x81, 0x19, 0x58, 0x72, 0xa2, 0xfd, 0x7e, 0x05, 0x39, 0x51, 0x52, 0xe8, 0x53,
  894. 0x28, 0x0c, 0xe9, 0xcc, 0x0b, 0xd7, 0xf7, 0xcd, 0x4e, 0x52, 0xae, 0xb8, 0x27, 0xaa, 0x93, 0x15,
  895. 0xb0, 0xb6, 0x0f, 0xf9, 0xc8, 0x85, 0x1e, 0xae, 0xb4, 0x54, 0x6e, 0xde, 0xba, 0x52, 0xde, 0x9b,
  896. 0x17, 0xd0, 0x99, 0xe5, 0xce, 0xc4, 0x8f, 0xca, 0x58, 0x4c, 0x6a, 0x7f, 0x95, 0x20, 0x8f, 0x59,
  897. 0xc5, 0x06, 0x61, 0xe2, 0xea, 0xca, 0x6e, 0x5c, 0x5d, 0xeb, 0x26, 0x4f, 0x6f, 0x34, 0x79, 0xdc,
  898. 0xa7, 0x99, 0x44, 0x9f, 0xae, 0x59, 0x92, 0xbf, 0x95, 0xa5, 0x6c, 0x82, 0xa5, 0x98, 0xe5, 0x5c,
  899. 0x82, 0xe5, 0x87, 0xb0, 0x3d, 0xf2, 0xe9, 0x84, 0x5f, 0x4e, 0xd4, 0xb7, 0xfc, 0x79, 0xa4, 0xa4,
  900. 0x5b, 0xcc, 0x3a, 0x88, 0x8d, 0x9b, 0x04, 0x17, 0x36, 0x09, 0xae, 0x99, 0x50, 0xc0, 0x24, 0x98,
  901. 0x52, 0x2f, 0x20, 0xef, 0x3d, 0x13, 0x02, 0xd9, 0xb6, 0x42, 0x8b, 0x9f, 0xa8, 0x8c, 0xf9, 0x18,
  902. 0x3d, 0x02, 0x79, 0x48, 0x6d, 0x71, 0x9e, 0xed, 0x64, 0xbb, 0x1a, 0xbe, 0x4f, 0xfd, 0x16, 0xb5,
  903. 0x09, 0xe6, 0x80, 0xda, 0x14, 0x94, 0x36, 0x3d, 0xf7, 0x5c, 0x6a, 0xd9, 0x47, 0x3e, 0x1d, 0xb3,
  904. 0x1b, 0xe4, 0xbd, 0x4a, 0xd8, 0x86, 0xfc, 0x8c, 0x6b, 0x65, 0xac, 0x85, 0x0f, 0x36, 0xbb, 0xf1,
  905. 0x6a, 0x20, 0x21, 0xac, 0xb1, 0xce, 0x44, 0x4b, 0x6b, 0xff, 0x96, 0x40, 0x7b, 0x3f, 0x1a, 0x75,
  906. 0xa0, 0x24, 0x90, 0x66, 0xe2, 0xd1, 0x54, 0xff, 0x3e, 0x1b, 0x71, 0x21, 0x80, 0xd9, 0x6a, 0xfc,
  907. 0xad, 0x37, 0x6e, 0x42, 0x17, 0x33, 0xdf, 0x4f, 0x17, 0x1f, 0xc1, 0x96, 0x50, 0x84, 0xf8, 0x7d,
  908. 0x21, 0xeb, 0x99, 0x7a, 0xb6, 0x99, 0x56, 0x52, 0xb8, 0x7c, 0x22, 0xda, 0x4c, 0xbc, 0x2e, 0xee,
  909. 0x6e, 0x48, 0x87, 0xa8, 0x8e, 0xb5, 0x50, 0xd4, 0x72, 0x20, 0x1f, 0x39, 0xde, 0xb8, 0x56, 0x85,
  910. 0x6c, 0xcb, 0xa5, 0x3c, 0x9f, 0x39, 0x9f, 0x58, 0x01, 0xf5, 0x62, 0x9a, 0xc5, 0x6c, 0xef, 0x6f,
  911. 0x69, 0x28, 0x25, 0x9e, 0x86, 0xe8, 0x29, 0x6c, 0xb7, 0x0e, 0x8f, 0xfb, 0x03, 0x03, 0x9b, 0xad,
  912. 0x5e, 0x77, 0xbf, 0x73, 0xa0, 0xa4, 0xb4, 0x3b, 0x8b, 0xa5, 0xae, 0x4e, 0xd6, 0xa0, 0xcd, 0x57,
  913. 0x5f, 0x15, 0xb2, 0x9d, 0x6e, 0xdb, 0xf8, 0x9d, 0x22, 0x69, 0x37, 0x17, 0x4b, 0x5d, 0x49, 0x00,
  914. 0xc5, 0x15, 0xfa, 0x31, 0x94, 0x39, 0xc0, 0x3c, 0x3e, 0x6a, 0x37, 0x06, 0x86, 0x92, 0xd6, 0xb4,
  915. 0xc5, 0x52, 0xdf, 0xbd, 0x8a, 0x8b, 0x52, 0x72, 0x1f, 0xf2, 0xd8, 0xf8, 0xed, 0xb1, 0xd1, 0x1f,
  916. 0x28, 0x19, 0x6d, 0x77, 0xb1, 0xd4, 0x51, 0x02, 0x18, 0x77, 0xdc, 0x43, 0x28, 0x60, 0xa3, 0x7f,
  917. 0xd4, 0xeb, 0xf6, 0x0d, 0x45, 0xd6, 0x7e, 0xb0, 0x58, 0xea, 0x37, 0x36, 0x50, 0x51, 0x11, 0xff,
  918. 0x14, 0x76, 0xda, 0xbd, 0xcf, 0xbb, 0x87, 0xbd, 0x46, 0xdb, 0x3c, 0xc2, 0xbd, 0x03, 0x6c, 0xf4,
  919. 0xfb, 0x4a, 0x56, 0xab, 0x2e, 0x96, 0xfa, 0xed, 0x04, 0xfe, 0x5a, 0x4d, 0xde, 0x05, 0xf9, 0xa8,
  920. 0xd3, 0x3d, 0x50, 0x72, 0xda, 0x8d, 0xc5, 0x52, 0xff, 0x20, 0x01, 0x65, 0xa4, 0xb2, 0x13, 0xb7,
  921. 0x0e, 0x7b, 0x7d, 0x43, 0xc9, 0x5f, 0x3b, 0x31, 0x27, 0x7b, 0xef, 0xf7, 0x80, 0xae, 0x3f, 0x9e,
  922. 0xd1, 0x03, 0x90, 0xbb, 0xbd, 0xae, 0xa1, 0xa4, 0xc4, 0xf9, 0xaf, 0x23, 0xba, 0xd4, 0x23, 0xa8,
  923. 0x06, 0x99, 0xc3, 0x2f, 0x3e, 0x53, 0x24, 0xed, 0x87, 0x8b, 0xa5, 0x7e, 0xeb, 0x3a, 0xe8, 0xf0,
  924. 0x8b, 0xcf, 0xf6, 0x28, 0x94, 0x92, 0x81, 0x6b, 0x50, 0x78, 0x6e, 0x0c, 0x1a, 0xed, 0xc6, 0xa0,
  925. 0xa1, 0xa4, 0xc4, 0x2f, 0xc5, 0xee, 0xe7, 0x24, 0xb4, 0x78, 0x8f, 0xde, 0x81, 0x6c, 0xd7, 0x78,
  926. 0x61, 0x60, 0x45, 0xd2, 0x76, 0x16, 0x4b, 0x7d, 0x2b, 0x06, 0x74, 0xc9, 0x19, 0xf1, 0x51, 0x05,
  927. 0x72, 0x8d, 0xc3, 0xcf, 0x1b, 0x2f, 0xfb, 0x4a, 0x5a, 0x43, 0x8b, 0xa5, 0xbe, 0x1d, 0xbb, 0x1b,
  928. 0xee, 0xb9, 0x35, 0x0f, 0xf6, 0xfe, 0x23, 0x41, 0x39, 0x79, 0x05, 0xa2, 0x0a, 0xc8, 0xfb, 0x9d,
  929. 0x43, 0x23, 0xde, 0x2e, 0xe9, 0x63, 0x63, 0x54, 0x87, 0x62, 0xbb, 0x83, 0x8d, 0xd6, 0xa0, 0x87,
  930. 0x5f, 0xc6, 0x67, 0x49, 0x82, 0xda, 0x8e, 0xcf, 0xeb, 0x7f, 0x8e, 0x7e, 0x0e, 0xe5, 0xfe, 0xcb,
  931. 0xe7, 0x87, 0x9d, 0xee, 0x6f, 0x4c, 0x1e, 0x31, 0xad, 0x3d, 0x5a, 0x2c, 0xf5, 0x7b, 0x1b, 0x60,
  932. 0x32, 0xf5, 0xc9, 0xd0, 0x0a, 0x89, 0xdd, 0x17, 0xd7, 0x39, 0x73, 0x16, 0x24, 0xd4, 0x82, 0x9d,
  933. 0x78, 0xe9, 0x7a, 0xb3, 0x8c, 0xf6, 0xf1, 0x62, 0xa9, 0x7f, 0xf8, 0x9d, 0xeb, 0x57, 0xbb, 0x17,
  934. 0x24, 0xf4, 0x00, 0xf2, 0x51, 0x90, 0xb8, 0x92, 0x92, 0x4b, 0xa3, 0x05, 0x7b, 0x7f, 0x91, 0xa0,
  935. 0xb8, 0x52, 0x33, 0x46, 0x78, 0xb7, 0x67, 0x1a, 0x18, 0xf7, 0x70, 0xcc, 0xc0, 0xca, 0xd9, 0xa5,
  936. 0x7c, 0x88, 0xee, 0x41, 0xfe, 0xc0, 0xe8, 0x1a, 0xb8, 0xd3, 0x8a, 0x1b, 0x63, 0x05, 0x39, 0x20,
  937. 0x1e, 0xf1, 0x9d, 0x21, 0xfa, 0x08, 0xca, 0xdd, 0x9e, 0xd9, 0x3f, 0x6e, 0x3d, 0x8b, 0x8f, 0xce,
  938. 0xf7, 0x4f, 0x84, 0xea, 0xcf, 0x86, 0xa7, 0x9c, 0xcf, 0x3d, 0xd6, 0x43, 0x2f, 0x1a, 0x87, 0x9d,
  939. 0xb6, 0x80, 0x66, 0x34, 0x75, 0xb1, 0xd4, 0x6f, 0xae, 0xa0, 0xd1, 0x1d, 0xce, 0xb0, 0x7b, 0x36,
  940. 0x54, 0xbe, 0x5b, 0xb7, 0x90, 0x0e, 0xb9, 0xc6, 0xd1, 0x91, 0xd1, 0x6d, 0xc7, 0x7f, 0xbf, 0xf6,
  941. 0x35, 0xa6, 0x53, 0xe2, 0xd9, 0x0c, 0xb1, 0xdf, 0xc3, 0x07, 0xc6, 0x20, 0xfe, 0xf9, 0x35, 0x62,
  942. 0x9f, 0xb2, 0xb7, 0x54, 0xb3, 0xfe, 0xe6, 0xeb, 0x4a, 0xea, 0xed, 0xd7, 0x95, 0xd4, 0x9b, 0xcb,
  943. 0x8a, 0xf4, 0xf6, 0xb2, 0x22, 0xfd, 0xf3, 0xb2, 0x92, 0xfa, 0xe6, 0xb2, 0x22, 0xfd, 0xf1, 0x5d,
  944. 0x25, 0xf5, 0xd5, 0xbb, 0x8a, 0xf4, 0xf6, 0x5d, 0x25, 0xf5, 0xf7, 0x77, 0x95, 0xd4, 0x49, 0x8e,
  945. 0x6b, 0xde, 0xa7, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x75, 0x30, 0x0d, 0x51, 0x0f, 0x00,
  946. 0x00,
  947. }
  948. func (m *Hello) Marshal() (dAtA []byte, err error) {
  949. size := m.ProtoSize()
  950. dAtA = make([]byte, size)
  951. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  952. if err != nil {
  953. return nil, err
  954. }
  955. return dAtA[:n], nil
  956. }
  957. func (m *Hello) MarshalTo(dAtA []byte) (int, error) {
  958. size := m.ProtoSize()
  959. return m.MarshalToSizedBuffer(dAtA[:size])
  960. }
  961. func (m *Hello) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  962. i := len(dAtA)
  963. _ = i
  964. var l int
  965. _ = l
  966. if len(m.ClientVersion) > 0 {
  967. i -= len(m.ClientVersion)
  968. copy(dAtA[i:], m.ClientVersion)
  969. i = encodeVarintBep(dAtA, i, uint64(len(m.ClientVersion)))
  970. i--
  971. dAtA[i] = 0x1a
  972. }
  973. if len(m.ClientName) > 0 {
  974. i -= len(m.ClientName)
  975. copy(dAtA[i:], m.ClientName)
  976. i = encodeVarintBep(dAtA, i, uint64(len(m.ClientName)))
  977. i--
  978. dAtA[i] = 0x12
  979. }
  980. if len(m.DeviceName) > 0 {
  981. i -= len(m.DeviceName)
  982. copy(dAtA[i:], m.DeviceName)
  983. i = encodeVarintBep(dAtA, i, uint64(len(m.DeviceName)))
  984. i--
  985. dAtA[i] = 0xa
  986. }
  987. return len(dAtA) - i, nil
  988. }
  989. func (m *Header) Marshal() (dAtA []byte, err error) {
  990. size := m.ProtoSize()
  991. dAtA = make([]byte, size)
  992. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  993. if err != nil {
  994. return nil, err
  995. }
  996. return dAtA[:n], nil
  997. }
  998. func (m *Header) MarshalTo(dAtA []byte) (int, error) {
  999. size := m.ProtoSize()
  1000. return m.MarshalToSizedBuffer(dAtA[:size])
  1001. }
  1002. func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1003. i := len(dAtA)
  1004. _ = i
  1005. var l int
  1006. _ = l
  1007. if m.Compression != 0 {
  1008. i = encodeVarintBep(dAtA, i, uint64(m.Compression))
  1009. i--
  1010. dAtA[i] = 0x10
  1011. }
  1012. if m.Type != 0 {
  1013. i = encodeVarintBep(dAtA, i, uint64(m.Type))
  1014. i--
  1015. dAtA[i] = 0x8
  1016. }
  1017. return len(dAtA) - i, nil
  1018. }
  1019. func (m *ClusterConfig) Marshal() (dAtA []byte, err error) {
  1020. size := m.ProtoSize()
  1021. dAtA = make([]byte, size)
  1022. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1023. if err != nil {
  1024. return nil, err
  1025. }
  1026. return dAtA[:n], nil
  1027. }
  1028. func (m *ClusterConfig) MarshalTo(dAtA []byte) (int, error) {
  1029. size := m.ProtoSize()
  1030. return m.MarshalToSizedBuffer(dAtA[:size])
  1031. }
  1032. func (m *ClusterConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1033. i := len(dAtA)
  1034. _ = i
  1035. var l int
  1036. _ = l
  1037. if len(m.Folders) > 0 {
  1038. for iNdEx := len(m.Folders) - 1; iNdEx >= 0; iNdEx-- {
  1039. {
  1040. size, err := m.Folders[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1041. if err != nil {
  1042. return 0, err
  1043. }
  1044. i -= size
  1045. i = encodeVarintBep(dAtA, i, uint64(size))
  1046. }
  1047. i--
  1048. dAtA[i] = 0xa
  1049. }
  1050. }
  1051. return len(dAtA) - i, nil
  1052. }
  1053. func (m *Folder) Marshal() (dAtA []byte, err error) {
  1054. size := m.ProtoSize()
  1055. dAtA = make([]byte, size)
  1056. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1057. if err != nil {
  1058. return nil, err
  1059. }
  1060. return dAtA[:n], nil
  1061. }
  1062. func (m *Folder) MarshalTo(dAtA []byte) (int, error) {
  1063. size := m.ProtoSize()
  1064. return m.MarshalToSizedBuffer(dAtA[:size])
  1065. }
  1066. func (m *Folder) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1067. i := len(dAtA)
  1068. _ = i
  1069. var l int
  1070. _ = l
  1071. if len(m.Devices) > 0 {
  1072. for iNdEx := len(m.Devices) - 1; iNdEx >= 0; iNdEx-- {
  1073. {
  1074. size, err := m.Devices[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1075. if err != nil {
  1076. return 0, err
  1077. }
  1078. i -= size
  1079. i = encodeVarintBep(dAtA, i, uint64(size))
  1080. }
  1081. i--
  1082. dAtA[i] = 0x1
  1083. i--
  1084. dAtA[i] = 0x82
  1085. }
  1086. }
  1087. if m.Paused {
  1088. i--
  1089. if m.Paused {
  1090. dAtA[i] = 1
  1091. } else {
  1092. dAtA[i] = 0
  1093. }
  1094. i--
  1095. dAtA[i] = 0x38
  1096. }
  1097. if m.DisableTempIndexes {
  1098. i--
  1099. if m.DisableTempIndexes {
  1100. dAtA[i] = 1
  1101. } else {
  1102. dAtA[i] = 0
  1103. }
  1104. i--
  1105. dAtA[i] = 0x30
  1106. }
  1107. if m.IgnoreDelete {
  1108. i--
  1109. if m.IgnoreDelete {
  1110. dAtA[i] = 1
  1111. } else {
  1112. dAtA[i] = 0
  1113. }
  1114. i--
  1115. dAtA[i] = 0x28
  1116. }
  1117. if m.IgnorePermissions {
  1118. i--
  1119. if m.IgnorePermissions {
  1120. dAtA[i] = 1
  1121. } else {
  1122. dAtA[i] = 0
  1123. }
  1124. i--
  1125. dAtA[i] = 0x20
  1126. }
  1127. if m.ReadOnly {
  1128. i--
  1129. if m.ReadOnly {
  1130. dAtA[i] = 1
  1131. } else {
  1132. dAtA[i] = 0
  1133. }
  1134. i--
  1135. dAtA[i] = 0x18
  1136. }
  1137. if len(m.Label) > 0 {
  1138. i -= len(m.Label)
  1139. copy(dAtA[i:], m.Label)
  1140. i = encodeVarintBep(dAtA, i, uint64(len(m.Label)))
  1141. i--
  1142. dAtA[i] = 0x12
  1143. }
  1144. if len(m.ID) > 0 {
  1145. i -= len(m.ID)
  1146. copy(dAtA[i:], m.ID)
  1147. i = encodeVarintBep(dAtA, i, uint64(len(m.ID)))
  1148. i--
  1149. dAtA[i] = 0xa
  1150. }
  1151. return len(dAtA) - i, nil
  1152. }
  1153. func (m *Device) Marshal() (dAtA []byte, err error) {
  1154. size := m.ProtoSize()
  1155. dAtA = make([]byte, size)
  1156. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1157. if err != nil {
  1158. return nil, err
  1159. }
  1160. return dAtA[:n], nil
  1161. }
  1162. func (m *Device) MarshalTo(dAtA []byte) (int, error) {
  1163. size := m.ProtoSize()
  1164. return m.MarshalToSizedBuffer(dAtA[:size])
  1165. }
  1166. func (m *Device) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1167. i := len(dAtA)
  1168. _ = i
  1169. var l int
  1170. _ = l
  1171. if m.SkipIntroductionRemovals {
  1172. i--
  1173. if m.SkipIntroductionRemovals {
  1174. dAtA[i] = 1
  1175. } else {
  1176. dAtA[i] = 0
  1177. }
  1178. i--
  1179. dAtA[i] = 0x48
  1180. }
  1181. if m.IndexID != 0 {
  1182. i = encodeVarintBep(dAtA, i, uint64(m.IndexID))
  1183. i--
  1184. dAtA[i] = 0x40
  1185. }
  1186. if m.Introducer {
  1187. i--
  1188. if m.Introducer {
  1189. dAtA[i] = 1
  1190. } else {
  1191. dAtA[i] = 0
  1192. }
  1193. i--
  1194. dAtA[i] = 0x38
  1195. }
  1196. if m.MaxSequence != 0 {
  1197. i = encodeVarintBep(dAtA, i, uint64(m.MaxSequence))
  1198. i--
  1199. dAtA[i] = 0x30
  1200. }
  1201. if len(m.CertName) > 0 {
  1202. i -= len(m.CertName)
  1203. copy(dAtA[i:], m.CertName)
  1204. i = encodeVarintBep(dAtA, i, uint64(len(m.CertName)))
  1205. i--
  1206. dAtA[i] = 0x2a
  1207. }
  1208. if m.Compression != 0 {
  1209. i = encodeVarintBep(dAtA, i, uint64(m.Compression))
  1210. i--
  1211. dAtA[i] = 0x20
  1212. }
  1213. if len(m.Addresses) > 0 {
  1214. for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- {
  1215. i -= len(m.Addresses[iNdEx])
  1216. copy(dAtA[i:], m.Addresses[iNdEx])
  1217. i = encodeVarintBep(dAtA, i, uint64(len(m.Addresses[iNdEx])))
  1218. i--
  1219. dAtA[i] = 0x1a
  1220. }
  1221. }
  1222. if len(m.Name) > 0 {
  1223. i -= len(m.Name)
  1224. copy(dAtA[i:], m.Name)
  1225. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1226. i--
  1227. dAtA[i] = 0x12
  1228. }
  1229. {
  1230. size := m.ID.ProtoSize()
  1231. i -= size
  1232. if _, err := m.ID.MarshalTo(dAtA[i:]); err != nil {
  1233. return 0, err
  1234. }
  1235. i = encodeVarintBep(dAtA, i, uint64(size))
  1236. }
  1237. i--
  1238. dAtA[i] = 0xa
  1239. return len(dAtA) - i, nil
  1240. }
  1241. func (m *Index) Marshal() (dAtA []byte, err error) {
  1242. size := m.ProtoSize()
  1243. dAtA = make([]byte, size)
  1244. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1245. if err != nil {
  1246. return nil, err
  1247. }
  1248. return dAtA[:n], nil
  1249. }
  1250. func (m *Index) MarshalTo(dAtA []byte) (int, error) {
  1251. size := m.ProtoSize()
  1252. return m.MarshalToSizedBuffer(dAtA[:size])
  1253. }
  1254. func (m *Index) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1255. i := len(dAtA)
  1256. _ = i
  1257. var l int
  1258. _ = l
  1259. if len(m.Files) > 0 {
  1260. for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- {
  1261. {
  1262. size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1263. if err != nil {
  1264. return 0, err
  1265. }
  1266. i -= size
  1267. i = encodeVarintBep(dAtA, i, uint64(size))
  1268. }
  1269. i--
  1270. dAtA[i] = 0x12
  1271. }
  1272. }
  1273. if len(m.Folder) > 0 {
  1274. i -= len(m.Folder)
  1275. copy(dAtA[i:], m.Folder)
  1276. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1277. i--
  1278. dAtA[i] = 0xa
  1279. }
  1280. return len(dAtA) - i, nil
  1281. }
  1282. func (m *IndexUpdate) Marshal() (dAtA []byte, err error) {
  1283. size := m.ProtoSize()
  1284. dAtA = make([]byte, size)
  1285. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1286. if err != nil {
  1287. return nil, err
  1288. }
  1289. return dAtA[:n], nil
  1290. }
  1291. func (m *IndexUpdate) MarshalTo(dAtA []byte) (int, error) {
  1292. size := m.ProtoSize()
  1293. return m.MarshalToSizedBuffer(dAtA[:size])
  1294. }
  1295. func (m *IndexUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1296. i := len(dAtA)
  1297. _ = i
  1298. var l int
  1299. _ = l
  1300. if len(m.Files) > 0 {
  1301. for iNdEx := len(m.Files) - 1; iNdEx >= 0; iNdEx-- {
  1302. {
  1303. size, err := m.Files[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1304. if err != nil {
  1305. return 0, err
  1306. }
  1307. i -= size
  1308. i = encodeVarintBep(dAtA, i, uint64(size))
  1309. }
  1310. i--
  1311. dAtA[i] = 0x12
  1312. }
  1313. }
  1314. if len(m.Folder) > 0 {
  1315. i -= len(m.Folder)
  1316. copy(dAtA[i:], m.Folder)
  1317. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1318. i--
  1319. dAtA[i] = 0xa
  1320. }
  1321. return len(dAtA) - i, nil
  1322. }
  1323. func (m *FileInfo) Marshal() (dAtA []byte, err error) {
  1324. size := m.ProtoSize()
  1325. dAtA = make([]byte, size)
  1326. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1327. if err != nil {
  1328. return nil, err
  1329. }
  1330. return dAtA[:n], nil
  1331. }
  1332. func (m *FileInfo) MarshalTo(dAtA []byte) (int, error) {
  1333. size := m.ProtoSize()
  1334. return m.MarshalToSizedBuffer(dAtA[:size])
  1335. }
  1336. func (m *FileInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1337. i := len(dAtA)
  1338. _ = i
  1339. var l int
  1340. _ = l
  1341. if m.LocalFlags != 0 {
  1342. i = encodeVarintBep(dAtA, i, uint64(m.LocalFlags))
  1343. i--
  1344. dAtA[i] = 0x3e
  1345. i--
  1346. dAtA[i] = 0xc0
  1347. }
  1348. if len(m.BlocksHash) > 0 {
  1349. i -= len(m.BlocksHash)
  1350. copy(dAtA[i:], m.BlocksHash)
  1351. i = encodeVarintBep(dAtA, i, uint64(len(m.BlocksHash)))
  1352. i--
  1353. dAtA[i] = 0x1
  1354. i--
  1355. dAtA[i] = 0x92
  1356. }
  1357. if len(m.SymlinkTarget) > 0 {
  1358. i -= len(m.SymlinkTarget)
  1359. copy(dAtA[i:], m.SymlinkTarget)
  1360. i = encodeVarintBep(dAtA, i, uint64(len(m.SymlinkTarget)))
  1361. i--
  1362. dAtA[i] = 0x1
  1363. i--
  1364. dAtA[i] = 0x8a
  1365. }
  1366. if len(m.Blocks) > 0 {
  1367. for iNdEx := len(m.Blocks) - 1; iNdEx >= 0; iNdEx-- {
  1368. {
  1369. size, err := m.Blocks[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1370. if err != nil {
  1371. return 0, err
  1372. }
  1373. i -= size
  1374. i = encodeVarintBep(dAtA, i, uint64(size))
  1375. }
  1376. i--
  1377. dAtA[i] = 0x1
  1378. i--
  1379. dAtA[i] = 0x82
  1380. }
  1381. }
  1382. if m.RawBlockSize != 0 {
  1383. i = encodeVarintBep(dAtA, i, uint64(m.RawBlockSize))
  1384. i--
  1385. dAtA[i] = 0x68
  1386. }
  1387. if m.ModifiedBy != 0 {
  1388. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedBy))
  1389. i--
  1390. dAtA[i] = 0x60
  1391. }
  1392. if m.ModifiedNs != 0 {
  1393. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedNs))
  1394. i--
  1395. dAtA[i] = 0x58
  1396. }
  1397. if m.Sequence != 0 {
  1398. i = encodeVarintBep(dAtA, i, uint64(m.Sequence))
  1399. i--
  1400. dAtA[i] = 0x50
  1401. }
  1402. {
  1403. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  1404. if err != nil {
  1405. return 0, err
  1406. }
  1407. i -= size
  1408. i = encodeVarintBep(dAtA, i, uint64(size))
  1409. }
  1410. i--
  1411. dAtA[i] = 0x4a
  1412. if m.NoPermissions {
  1413. i--
  1414. if m.NoPermissions {
  1415. dAtA[i] = 1
  1416. } else {
  1417. dAtA[i] = 0
  1418. }
  1419. i--
  1420. dAtA[i] = 0x40
  1421. }
  1422. if m.RawInvalid {
  1423. i--
  1424. if m.RawInvalid {
  1425. dAtA[i] = 1
  1426. } else {
  1427. dAtA[i] = 0
  1428. }
  1429. i--
  1430. dAtA[i] = 0x38
  1431. }
  1432. if m.Deleted {
  1433. i--
  1434. if m.Deleted {
  1435. dAtA[i] = 1
  1436. } else {
  1437. dAtA[i] = 0
  1438. }
  1439. i--
  1440. dAtA[i] = 0x30
  1441. }
  1442. if m.ModifiedS != 0 {
  1443. i = encodeVarintBep(dAtA, i, uint64(m.ModifiedS))
  1444. i--
  1445. dAtA[i] = 0x28
  1446. }
  1447. if m.Permissions != 0 {
  1448. i = encodeVarintBep(dAtA, i, uint64(m.Permissions))
  1449. i--
  1450. dAtA[i] = 0x20
  1451. }
  1452. if m.Size != 0 {
  1453. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1454. i--
  1455. dAtA[i] = 0x18
  1456. }
  1457. if m.Type != 0 {
  1458. i = encodeVarintBep(dAtA, i, uint64(m.Type))
  1459. i--
  1460. dAtA[i] = 0x10
  1461. }
  1462. if len(m.Name) > 0 {
  1463. i -= len(m.Name)
  1464. copy(dAtA[i:], m.Name)
  1465. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1466. i--
  1467. dAtA[i] = 0xa
  1468. }
  1469. return len(dAtA) - i, nil
  1470. }
  1471. func (m *BlockInfo) Marshal() (dAtA []byte, err error) {
  1472. size := m.ProtoSize()
  1473. dAtA = make([]byte, size)
  1474. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1475. if err != nil {
  1476. return nil, err
  1477. }
  1478. return dAtA[:n], nil
  1479. }
  1480. func (m *BlockInfo) MarshalTo(dAtA []byte) (int, error) {
  1481. size := m.ProtoSize()
  1482. return m.MarshalToSizedBuffer(dAtA[:size])
  1483. }
  1484. func (m *BlockInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1485. i := len(dAtA)
  1486. _ = i
  1487. var l int
  1488. _ = l
  1489. if m.WeakHash != 0 {
  1490. i = encodeVarintBep(dAtA, i, uint64(m.WeakHash))
  1491. i--
  1492. dAtA[i] = 0x20
  1493. }
  1494. if len(m.Hash) > 0 {
  1495. i -= len(m.Hash)
  1496. copy(dAtA[i:], m.Hash)
  1497. i = encodeVarintBep(dAtA, i, uint64(len(m.Hash)))
  1498. i--
  1499. dAtA[i] = 0x1a
  1500. }
  1501. if m.Size != 0 {
  1502. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1503. i--
  1504. dAtA[i] = 0x10
  1505. }
  1506. if m.Offset != 0 {
  1507. i = encodeVarintBep(dAtA, i, uint64(m.Offset))
  1508. i--
  1509. dAtA[i] = 0x8
  1510. }
  1511. return len(dAtA) - i, nil
  1512. }
  1513. func (m *Vector) Marshal() (dAtA []byte, err error) {
  1514. size := m.ProtoSize()
  1515. dAtA = make([]byte, size)
  1516. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1517. if err != nil {
  1518. return nil, err
  1519. }
  1520. return dAtA[:n], nil
  1521. }
  1522. func (m *Vector) MarshalTo(dAtA []byte) (int, error) {
  1523. size := m.ProtoSize()
  1524. return m.MarshalToSizedBuffer(dAtA[:size])
  1525. }
  1526. func (m *Vector) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1527. i := len(dAtA)
  1528. _ = i
  1529. var l int
  1530. _ = l
  1531. if len(m.Counters) > 0 {
  1532. for iNdEx := len(m.Counters) - 1; iNdEx >= 0; iNdEx-- {
  1533. {
  1534. size, err := m.Counters[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1535. if err != nil {
  1536. return 0, err
  1537. }
  1538. i -= size
  1539. i = encodeVarintBep(dAtA, i, uint64(size))
  1540. }
  1541. i--
  1542. dAtA[i] = 0xa
  1543. }
  1544. }
  1545. return len(dAtA) - i, nil
  1546. }
  1547. func (m *Counter) Marshal() (dAtA []byte, err error) {
  1548. size := m.ProtoSize()
  1549. dAtA = make([]byte, size)
  1550. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1551. if err != nil {
  1552. return nil, err
  1553. }
  1554. return dAtA[:n], nil
  1555. }
  1556. func (m *Counter) MarshalTo(dAtA []byte) (int, error) {
  1557. size := m.ProtoSize()
  1558. return m.MarshalToSizedBuffer(dAtA[:size])
  1559. }
  1560. func (m *Counter) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1561. i := len(dAtA)
  1562. _ = i
  1563. var l int
  1564. _ = l
  1565. if m.Value != 0 {
  1566. i = encodeVarintBep(dAtA, i, uint64(m.Value))
  1567. i--
  1568. dAtA[i] = 0x10
  1569. }
  1570. if m.ID != 0 {
  1571. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1572. i--
  1573. dAtA[i] = 0x8
  1574. }
  1575. return len(dAtA) - i, nil
  1576. }
  1577. func (m *Request) Marshal() (dAtA []byte, err error) {
  1578. size := m.ProtoSize()
  1579. dAtA = make([]byte, size)
  1580. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1581. if err != nil {
  1582. return nil, err
  1583. }
  1584. return dAtA[:n], nil
  1585. }
  1586. func (m *Request) MarshalTo(dAtA []byte) (int, error) {
  1587. size := m.ProtoSize()
  1588. return m.MarshalToSizedBuffer(dAtA[:size])
  1589. }
  1590. func (m *Request) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1591. i := len(dAtA)
  1592. _ = i
  1593. var l int
  1594. _ = l
  1595. if m.WeakHash != 0 {
  1596. i = encodeVarintBep(dAtA, i, uint64(m.WeakHash))
  1597. i--
  1598. dAtA[i] = 0x40
  1599. }
  1600. if m.FromTemporary {
  1601. i--
  1602. if m.FromTemporary {
  1603. dAtA[i] = 1
  1604. } else {
  1605. dAtA[i] = 0
  1606. }
  1607. i--
  1608. dAtA[i] = 0x38
  1609. }
  1610. if len(m.Hash) > 0 {
  1611. i -= len(m.Hash)
  1612. copy(dAtA[i:], m.Hash)
  1613. i = encodeVarintBep(dAtA, i, uint64(len(m.Hash)))
  1614. i--
  1615. dAtA[i] = 0x32
  1616. }
  1617. if m.Size != 0 {
  1618. i = encodeVarintBep(dAtA, i, uint64(m.Size))
  1619. i--
  1620. dAtA[i] = 0x28
  1621. }
  1622. if m.Offset != 0 {
  1623. i = encodeVarintBep(dAtA, i, uint64(m.Offset))
  1624. i--
  1625. dAtA[i] = 0x20
  1626. }
  1627. if len(m.Name) > 0 {
  1628. i -= len(m.Name)
  1629. copy(dAtA[i:], m.Name)
  1630. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1631. i--
  1632. dAtA[i] = 0x1a
  1633. }
  1634. if len(m.Folder) > 0 {
  1635. i -= len(m.Folder)
  1636. copy(dAtA[i:], m.Folder)
  1637. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1638. i--
  1639. dAtA[i] = 0x12
  1640. }
  1641. if m.ID != 0 {
  1642. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1643. i--
  1644. dAtA[i] = 0x8
  1645. }
  1646. return len(dAtA) - i, nil
  1647. }
  1648. func (m *Response) Marshal() (dAtA []byte, err error) {
  1649. size := m.ProtoSize()
  1650. dAtA = make([]byte, size)
  1651. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1652. if err != nil {
  1653. return nil, err
  1654. }
  1655. return dAtA[:n], nil
  1656. }
  1657. func (m *Response) MarshalTo(dAtA []byte) (int, error) {
  1658. size := m.ProtoSize()
  1659. return m.MarshalToSizedBuffer(dAtA[:size])
  1660. }
  1661. func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1662. i := len(dAtA)
  1663. _ = i
  1664. var l int
  1665. _ = l
  1666. if m.Code != 0 {
  1667. i = encodeVarintBep(dAtA, i, uint64(m.Code))
  1668. i--
  1669. dAtA[i] = 0x18
  1670. }
  1671. if len(m.Data) > 0 {
  1672. i -= len(m.Data)
  1673. copy(dAtA[i:], m.Data)
  1674. i = encodeVarintBep(dAtA, i, uint64(len(m.Data)))
  1675. i--
  1676. dAtA[i] = 0x12
  1677. }
  1678. if m.ID != 0 {
  1679. i = encodeVarintBep(dAtA, i, uint64(m.ID))
  1680. i--
  1681. dAtA[i] = 0x8
  1682. }
  1683. return len(dAtA) - i, nil
  1684. }
  1685. func (m *DownloadProgress) Marshal() (dAtA []byte, err error) {
  1686. size := m.ProtoSize()
  1687. dAtA = make([]byte, size)
  1688. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1689. if err != nil {
  1690. return nil, err
  1691. }
  1692. return dAtA[:n], nil
  1693. }
  1694. func (m *DownloadProgress) MarshalTo(dAtA []byte) (int, error) {
  1695. size := m.ProtoSize()
  1696. return m.MarshalToSizedBuffer(dAtA[:size])
  1697. }
  1698. func (m *DownloadProgress) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1699. i := len(dAtA)
  1700. _ = i
  1701. var l int
  1702. _ = l
  1703. if len(m.Updates) > 0 {
  1704. for iNdEx := len(m.Updates) - 1; iNdEx >= 0; iNdEx-- {
  1705. {
  1706. size, err := m.Updates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
  1707. if err != nil {
  1708. return 0, err
  1709. }
  1710. i -= size
  1711. i = encodeVarintBep(dAtA, i, uint64(size))
  1712. }
  1713. i--
  1714. dAtA[i] = 0x12
  1715. }
  1716. }
  1717. if len(m.Folder) > 0 {
  1718. i -= len(m.Folder)
  1719. copy(dAtA[i:], m.Folder)
  1720. i = encodeVarintBep(dAtA, i, uint64(len(m.Folder)))
  1721. i--
  1722. dAtA[i] = 0xa
  1723. }
  1724. return len(dAtA) - i, nil
  1725. }
  1726. func (m *FileDownloadProgressUpdate) Marshal() (dAtA []byte, err error) {
  1727. size := m.ProtoSize()
  1728. dAtA = make([]byte, size)
  1729. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1730. if err != nil {
  1731. return nil, err
  1732. }
  1733. return dAtA[:n], nil
  1734. }
  1735. func (m *FileDownloadProgressUpdate) MarshalTo(dAtA []byte) (int, error) {
  1736. size := m.ProtoSize()
  1737. return m.MarshalToSizedBuffer(dAtA[:size])
  1738. }
  1739. func (m *FileDownloadProgressUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1740. i := len(dAtA)
  1741. _ = i
  1742. var l int
  1743. _ = l
  1744. if m.BlockSize != 0 {
  1745. i = encodeVarintBep(dAtA, i, uint64(m.BlockSize))
  1746. i--
  1747. dAtA[i] = 0x28
  1748. }
  1749. if len(m.BlockIndexes) > 0 {
  1750. for iNdEx := len(m.BlockIndexes) - 1; iNdEx >= 0; iNdEx-- {
  1751. i = encodeVarintBep(dAtA, i, uint64(m.BlockIndexes[iNdEx]))
  1752. i--
  1753. dAtA[i] = 0x20
  1754. }
  1755. }
  1756. {
  1757. size, err := m.Version.MarshalToSizedBuffer(dAtA[:i])
  1758. if err != nil {
  1759. return 0, err
  1760. }
  1761. i -= size
  1762. i = encodeVarintBep(dAtA, i, uint64(size))
  1763. }
  1764. i--
  1765. dAtA[i] = 0x1a
  1766. if len(m.Name) > 0 {
  1767. i -= len(m.Name)
  1768. copy(dAtA[i:], m.Name)
  1769. i = encodeVarintBep(dAtA, i, uint64(len(m.Name)))
  1770. i--
  1771. dAtA[i] = 0x12
  1772. }
  1773. if m.UpdateType != 0 {
  1774. i = encodeVarintBep(dAtA, i, uint64(m.UpdateType))
  1775. i--
  1776. dAtA[i] = 0x8
  1777. }
  1778. return len(dAtA) - i, nil
  1779. }
  1780. func (m *Ping) Marshal() (dAtA []byte, err error) {
  1781. size := m.ProtoSize()
  1782. dAtA = make([]byte, size)
  1783. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1784. if err != nil {
  1785. return nil, err
  1786. }
  1787. return dAtA[:n], nil
  1788. }
  1789. func (m *Ping) MarshalTo(dAtA []byte) (int, error) {
  1790. size := m.ProtoSize()
  1791. return m.MarshalToSizedBuffer(dAtA[:size])
  1792. }
  1793. func (m *Ping) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1794. i := len(dAtA)
  1795. _ = i
  1796. var l int
  1797. _ = l
  1798. return len(dAtA) - i, nil
  1799. }
  1800. func (m *Close) Marshal() (dAtA []byte, err error) {
  1801. size := m.ProtoSize()
  1802. dAtA = make([]byte, size)
  1803. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  1804. if err != nil {
  1805. return nil, err
  1806. }
  1807. return dAtA[:n], nil
  1808. }
  1809. func (m *Close) MarshalTo(dAtA []byte) (int, error) {
  1810. size := m.ProtoSize()
  1811. return m.MarshalToSizedBuffer(dAtA[:size])
  1812. }
  1813. func (m *Close) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  1814. i := len(dAtA)
  1815. _ = i
  1816. var l int
  1817. _ = l
  1818. if len(m.Reason) > 0 {
  1819. i -= len(m.Reason)
  1820. copy(dAtA[i:], m.Reason)
  1821. i = encodeVarintBep(dAtA, i, uint64(len(m.Reason)))
  1822. i--
  1823. dAtA[i] = 0xa
  1824. }
  1825. return len(dAtA) - i, nil
  1826. }
  1827. func encodeVarintBep(dAtA []byte, offset int, v uint64) int {
  1828. offset -= sovBep(v)
  1829. base := offset
  1830. for v >= 1<<7 {
  1831. dAtA[offset] = uint8(v&0x7f | 0x80)
  1832. v >>= 7
  1833. offset++
  1834. }
  1835. dAtA[offset] = uint8(v)
  1836. return base
  1837. }
  1838. func (m *Hello) ProtoSize() (n int) {
  1839. if m == nil {
  1840. return 0
  1841. }
  1842. var l int
  1843. _ = l
  1844. l = len(m.DeviceName)
  1845. if l > 0 {
  1846. n += 1 + l + sovBep(uint64(l))
  1847. }
  1848. l = len(m.ClientName)
  1849. if l > 0 {
  1850. n += 1 + l + sovBep(uint64(l))
  1851. }
  1852. l = len(m.ClientVersion)
  1853. if l > 0 {
  1854. n += 1 + l + sovBep(uint64(l))
  1855. }
  1856. return n
  1857. }
  1858. func (m *Header) ProtoSize() (n int) {
  1859. if m == nil {
  1860. return 0
  1861. }
  1862. var l int
  1863. _ = l
  1864. if m.Type != 0 {
  1865. n += 1 + sovBep(uint64(m.Type))
  1866. }
  1867. if m.Compression != 0 {
  1868. n += 1 + sovBep(uint64(m.Compression))
  1869. }
  1870. return n
  1871. }
  1872. func (m *ClusterConfig) ProtoSize() (n int) {
  1873. if m == nil {
  1874. return 0
  1875. }
  1876. var l int
  1877. _ = l
  1878. if len(m.Folders) > 0 {
  1879. for _, e := range m.Folders {
  1880. l = e.ProtoSize()
  1881. n += 1 + l + sovBep(uint64(l))
  1882. }
  1883. }
  1884. return n
  1885. }
  1886. func (m *Folder) ProtoSize() (n int) {
  1887. if m == nil {
  1888. return 0
  1889. }
  1890. var l int
  1891. _ = l
  1892. l = len(m.ID)
  1893. if l > 0 {
  1894. n += 1 + l + sovBep(uint64(l))
  1895. }
  1896. l = len(m.Label)
  1897. if l > 0 {
  1898. n += 1 + l + sovBep(uint64(l))
  1899. }
  1900. if m.ReadOnly {
  1901. n += 2
  1902. }
  1903. if m.IgnorePermissions {
  1904. n += 2
  1905. }
  1906. if m.IgnoreDelete {
  1907. n += 2
  1908. }
  1909. if m.DisableTempIndexes {
  1910. n += 2
  1911. }
  1912. if m.Paused {
  1913. n += 2
  1914. }
  1915. if len(m.Devices) > 0 {
  1916. for _, e := range m.Devices {
  1917. l = e.ProtoSize()
  1918. n += 2 + l + sovBep(uint64(l))
  1919. }
  1920. }
  1921. return n
  1922. }
  1923. func (m *Device) ProtoSize() (n int) {
  1924. if m == nil {
  1925. return 0
  1926. }
  1927. var l int
  1928. _ = l
  1929. l = m.ID.ProtoSize()
  1930. n += 1 + l + sovBep(uint64(l))
  1931. l = len(m.Name)
  1932. if l > 0 {
  1933. n += 1 + l + sovBep(uint64(l))
  1934. }
  1935. if len(m.Addresses) > 0 {
  1936. for _, s := range m.Addresses {
  1937. l = len(s)
  1938. n += 1 + l + sovBep(uint64(l))
  1939. }
  1940. }
  1941. if m.Compression != 0 {
  1942. n += 1 + sovBep(uint64(m.Compression))
  1943. }
  1944. l = len(m.CertName)
  1945. if l > 0 {
  1946. n += 1 + l + sovBep(uint64(l))
  1947. }
  1948. if m.MaxSequence != 0 {
  1949. n += 1 + sovBep(uint64(m.MaxSequence))
  1950. }
  1951. if m.Introducer {
  1952. n += 2
  1953. }
  1954. if m.IndexID != 0 {
  1955. n += 1 + sovBep(uint64(m.IndexID))
  1956. }
  1957. if m.SkipIntroductionRemovals {
  1958. n += 2
  1959. }
  1960. return n
  1961. }
  1962. func (m *Index) ProtoSize() (n int) {
  1963. if m == nil {
  1964. return 0
  1965. }
  1966. var l int
  1967. _ = l
  1968. l = len(m.Folder)
  1969. if l > 0 {
  1970. n += 1 + l + sovBep(uint64(l))
  1971. }
  1972. if len(m.Files) > 0 {
  1973. for _, e := range m.Files {
  1974. l = e.ProtoSize()
  1975. n += 1 + l + sovBep(uint64(l))
  1976. }
  1977. }
  1978. return n
  1979. }
  1980. func (m *IndexUpdate) ProtoSize() (n int) {
  1981. if m == nil {
  1982. return 0
  1983. }
  1984. var l int
  1985. _ = l
  1986. l = len(m.Folder)
  1987. if l > 0 {
  1988. n += 1 + l + sovBep(uint64(l))
  1989. }
  1990. if len(m.Files) > 0 {
  1991. for _, e := range m.Files {
  1992. l = e.ProtoSize()
  1993. n += 1 + l + sovBep(uint64(l))
  1994. }
  1995. }
  1996. return n
  1997. }
  1998. func (m *FileInfo) ProtoSize() (n int) {
  1999. if m == nil {
  2000. return 0
  2001. }
  2002. var l int
  2003. _ = l
  2004. l = len(m.Name)
  2005. if l > 0 {
  2006. n += 1 + l + sovBep(uint64(l))
  2007. }
  2008. if m.Type != 0 {
  2009. n += 1 + sovBep(uint64(m.Type))
  2010. }
  2011. if m.Size != 0 {
  2012. n += 1 + sovBep(uint64(m.Size))
  2013. }
  2014. if m.Permissions != 0 {
  2015. n += 1 + sovBep(uint64(m.Permissions))
  2016. }
  2017. if m.ModifiedS != 0 {
  2018. n += 1 + sovBep(uint64(m.ModifiedS))
  2019. }
  2020. if m.Deleted {
  2021. n += 2
  2022. }
  2023. if m.RawInvalid {
  2024. n += 2
  2025. }
  2026. if m.NoPermissions {
  2027. n += 2
  2028. }
  2029. l = m.Version.ProtoSize()
  2030. n += 1 + l + sovBep(uint64(l))
  2031. if m.Sequence != 0 {
  2032. n += 1 + sovBep(uint64(m.Sequence))
  2033. }
  2034. if m.ModifiedNs != 0 {
  2035. n += 1 + sovBep(uint64(m.ModifiedNs))
  2036. }
  2037. if m.ModifiedBy != 0 {
  2038. n += 1 + sovBep(uint64(m.ModifiedBy))
  2039. }
  2040. if m.RawBlockSize != 0 {
  2041. n += 1 + sovBep(uint64(m.RawBlockSize))
  2042. }
  2043. if len(m.Blocks) > 0 {
  2044. for _, e := range m.Blocks {
  2045. l = e.ProtoSize()
  2046. n += 2 + l + sovBep(uint64(l))
  2047. }
  2048. }
  2049. l = len(m.SymlinkTarget)
  2050. if l > 0 {
  2051. n += 2 + l + sovBep(uint64(l))
  2052. }
  2053. l = len(m.BlocksHash)
  2054. if l > 0 {
  2055. n += 2 + l + sovBep(uint64(l))
  2056. }
  2057. if m.LocalFlags != 0 {
  2058. n += 2 + sovBep(uint64(m.LocalFlags))
  2059. }
  2060. return n
  2061. }
  2062. func (m *BlockInfo) ProtoSize() (n int) {
  2063. if m == nil {
  2064. return 0
  2065. }
  2066. var l int
  2067. _ = l
  2068. if m.Offset != 0 {
  2069. n += 1 + sovBep(uint64(m.Offset))
  2070. }
  2071. if m.Size != 0 {
  2072. n += 1 + sovBep(uint64(m.Size))
  2073. }
  2074. l = len(m.Hash)
  2075. if l > 0 {
  2076. n += 1 + l + sovBep(uint64(l))
  2077. }
  2078. if m.WeakHash != 0 {
  2079. n += 1 + sovBep(uint64(m.WeakHash))
  2080. }
  2081. return n
  2082. }
  2083. func (m *Vector) ProtoSize() (n int) {
  2084. if m == nil {
  2085. return 0
  2086. }
  2087. var l int
  2088. _ = l
  2089. if len(m.Counters) > 0 {
  2090. for _, e := range m.Counters {
  2091. l = e.ProtoSize()
  2092. n += 1 + l + sovBep(uint64(l))
  2093. }
  2094. }
  2095. return n
  2096. }
  2097. func (m *Counter) ProtoSize() (n int) {
  2098. if m == nil {
  2099. return 0
  2100. }
  2101. var l int
  2102. _ = l
  2103. if m.ID != 0 {
  2104. n += 1 + sovBep(uint64(m.ID))
  2105. }
  2106. if m.Value != 0 {
  2107. n += 1 + sovBep(uint64(m.Value))
  2108. }
  2109. return n
  2110. }
  2111. func (m *Request) ProtoSize() (n int) {
  2112. if m == nil {
  2113. return 0
  2114. }
  2115. var l int
  2116. _ = l
  2117. if m.ID != 0 {
  2118. n += 1 + sovBep(uint64(m.ID))
  2119. }
  2120. l = len(m.Folder)
  2121. if l > 0 {
  2122. n += 1 + l + sovBep(uint64(l))
  2123. }
  2124. l = len(m.Name)
  2125. if l > 0 {
  2126. n += 1 + l + sovBep(uint64(l))
  2127. }
  2128. if m.Offset != 0 {
  2129. n += 1 + sovBep(uint64(m.Offset))
  2130. }
  2131. if m.Size != 0 {
  2132. n += 1 + sovBep(uint64(m.Size))
  2133. }
  2134. l = len(m.Hash)
  2135. if l > 0 {
  2136. n += 1 + l + sovBep(uint64(l))
  2137. }
  2138. if m.FromTemporary {
  2139. n += 2
  2140. }
  2141. if m.WeakHash != 0 {
  2142. n += 1 + sovBep(uint64(m.WeakHash))
  2143. }
  2144. return n
  2145. }
  2146. func (m *Response) ProtoSize() (n int) {
  2147. if m == nil {
  2148. return 0
  2149. }
  2150. var l int
  2151. _ = l
  2152. if m.ID != 0 {
  2153. n += 1 + sovBep(uint64(m.ID))
  2154. }
  2155. l = len(m.Data)
  2156. if l > 0 {
  2157. n += 1 + l + sovBep(uint64(l))
  2158. }
  2159. if m.Code != 0 {
  2160. n += 1 + sovBep(uint64(m.Code))
  2161. }
  2162. return n
  2163. }
  2164. func (m *DownloadProgress) ProtoSize() (n int) {
  2165. if m == nil {
  2166. return 0
  2167. }
  2168. var l int
  2169. _ = l
  2170. l = len(m.Folder)
  2171. if l > 0 {
  2172. n += 1 + l + sovBep(uint64(l))
  2173. }
  2174. if len(m.Updates) > 0 {
  2175. for _, e := range m.Updates {
  2176. l = e.ProtoSize()
  2177. n += 1 + l + sovBep(uint64(l))
  2178. }
  2179. }
  2180. return n
  2181. }
  2182. func (m *FileDownloadProgressUpdate) ProtoSize() (n int) {
  2183. if m == nil {
  2184. return 0
  2185. }
  2186. var l int
  2187. _ = l
  2188. if m.UpdateType != 0 {
  2189. n += 1 + sovBep(uint64(m.UpdateType))
  2190. }
  2191. l = len(m.Name)
  2192. if l > 0 {
  2193. n += 1 + l + sovBep(uint64(l))
  2194. }
  2195. l = m.Version.ProtoSize()
  2196. n += 1 + l + sovBep(uint64(l))
  2197. if len(m.BlockIndexes) > 0 {
  2198. for _, e := range m.BlockIndexes {
  2199. n += 1 + sovBep(uint64(e))
  2200. }
  2201. }
  2202. if m.BlockSize != 0 {
  2203. n += 1 + sovBep(uint64(m.BlockSize))
  2204. }
  2205. return n
  2206. }
  2207. func (m *Ping) ProtoSize() (n int) {
  2208. if m == nil {
  2209. return 0
  2210. }
  2211. var l int
  2212. _ = l
  2213. return n
  2214. }
  2215. func (m *Close) ProtoSize() (n int) {
  2216. if m == nil {
  2217. return 0
  2218. }
  2219. var l int
  2220. _ = l
  2221. l = len(m.Reason)
  2222. if l > 0 {
  2223. n += 1 + l + sovBep(uint64(l))
  2224. }
  2225. return n
  2226. }
  2227. func sovBep(x uint64) (n int) {
  2228. return (math_bits.Len64(x|1) + 6) / 7
  2229. }
  2230. func sozBep(x uint64) (n int) {
  2231. return sovBep(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2232. }
  2233. func (m *Hello) Unmarshal(dAtA []byte) error {
  2234. l := len(dAtA)
  2235. iNdEx := 0
  2236. for iNdEx < l {
  2237. preIndex := iNdEx
  2238. var wire uint64
  2239. for shift := uint(0); ; shift += 7 {
  2240. if shift >= 64 {
  2241. return ErrIntOverflowBep
  2242. }
  2243. if iNdEx >= l {
  2244. return io.ErrUnexpectedEOF
  2245. }
  2246. b := dAtA[iNdEx]
  2247. iNdEx++
  2248. wire |= uint64(b&0x7F) << shift
  2249. if b < 0x80 {
  2250. break
  2251. }
  2252. }
  2253. fieldNum := int32(wire >> 3)
  2254. wireType := int(wire & 0x7)
  2255. if wireType == 4 {
  2256. return fmt.Errorf("proto: Hello: wiretype end group for non-group")
  2257. }
  2258. if fieldNum <= 0 {
  2259. return fmt.Errorf("proto: Hello: illegal tag %d (wire type %d)", fieldNum, wire)
  2260. }
  2261. switch fieldNum {
  2262. case 1:
  2263. if wireType != 2 {
  2264. return fmt.Errorf("proto: wrong wireType = %d for field DeviceName", wireType)
  2265. }
  2266. var stringLen uint64
  2267. for shift := uint(0); ; shift += 7 {
  2268. if shift >= 64 {
  2269. return ErrIntOverflowBep
  2270. }
  2271. if iNdEx >= l {
  2272. return io.ErrUnexpectedEOF
  2273. }
  2274. b := dAtA[iNdEx]
  2275. iNdEx++
  2276. stringLen |= uint64(b&0x7F) << shift
  2277. if b < 0x80 {
  2278. break
  2279. }
  2280. }
  2281. intStringLen := int(stringLen)
  2282. if intStringLen < 0 {
  2283. return ErrInvalidLengthBep
  2284. }
  2285. postIndex := iNdEx + intStringLen
  2286. if postIndex < 0 {
  2287. return ErrInvalidLengthBep
  2288. }
  2289. if postIndex > l {
  2290. return io.ErrUnexpectedEOF
  2291. }
  2292. m.DeviceName = string(dAtA[iNdEx:postIndex])
  2293. iNdEx = postIndex
  2294. case 2:
  2295. if wireType != 2 {
  2296. return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType)
  2297. }
  2298. var stringLen uint64
  2299. for shift := uint(0); ; shift += 7 {
  2300. if shift >= 64 {
  2301. return ErrIntOverflowBep
  2302. }
  2303. if iNdEx >= l {
  2304. return io.ErrUnexpectedEOF
  2305. }
  2306. b := dAtA[iNdEx]
  2307. iNdEx++
  2308. stringLen |= uint64(b&0x7F) << shift
  2309. if b < 0x80 {
  2310. break
  2311. }
  2312. }
  2313. intStringLen := int(stringLen)
  2314. if intStringLen < 0 {
  2315. return ErrInvalidLengthBep
  2316. }
  2317. postIndex := iNdEx + intStringLen
  2318. if postIndex < 0 {
  2319. return ErrInvalidLengthBep
  2320. }
  2321. if postIndex > l {
  2322. return io.ErrUnexpectedEOF
  2323. }
  2324. m.ClientName = string(dAtA[iNdEx:postIndex])
  2325. iNdEx = postIndex
  2326. case 3:
  2327. if wireType != 2 {
  2328. return fmt.Errorf("proto: wrong wireType = %d for field ClientVersion", wireType)
  2329. }
  2330. var stringLen uint64
  2331. for shift := uint(0); ; shift += 7 {
  2332. if shift >= 64 {
  2333. return ErrIntOverflowBep
  2334. }
  2335. if iNdEx >= l {
  2336. return io.ErrUnexpectedEOF
  2337. }
  2338. b := dAtA[iNdEx]
  2339. iNdEx++
  2340. stringLen |= uint64(b&0x7F) << shift
  2341. if b < 0x80 {
  2342. break
  2343. }
  2344. }
  2345. intStringLen := int(stringLen)
  2346. if intStringLen < 0 {
  2347. return ErrInvalidLengthBep
  2348. }
  2349. postIndex := iNdEx + intStringLen
  2350. if postIndex < 0 {
  2351. return ErrInvalidLengthBep
  2352. }
  2353. if postIndex > l {
  2354. return io.ErrUnexpectedEOF
  2355. }
  2356. m.ClientVersion = string(dAtA[iNdEx:postIndex])
  2357. iNdEx = postIndex
  2358. default:
  2359. iNdEx = preIndex
  2360. skippy, err := skipBep(dAtA[iNdEx:])
  2361. if err != nil {
  2362. return err
  2363. }
  2364. if skippy < 0 {
  2365. return ErrInvalidLengthBep
  2366. }
  2367. if (iNdEx + skippy) < 0 {
  2368. return ErrInvalidLengthBep
  2369. }
  2370. if (iNdEx + skippy) > l {
  2371. return io.ErrUnexpectedEOF
  2372. }
  2373. iNdEx += skippy
  2374. }
  2375. }
  2376. if iNdEx > l {
  2377. return io.ErrUnexpectedEOF
  2378. }
  2379. return nil
  2380. }
  2381. func (m *Header) Unmarshal(dAtA []byte) error {
  2382. l := len(dAtA)
  2383. iNdEx := 0
  2384. for iNdEx < l {
  2385. preIndex := iNdEx
  2386. var wire uint64
  2387. for shift := uint(0); ; shift += 7 {
  2388. if shift >= 64 {
  2389. return ErrIntOverflowBep
  2390. }
  2391. if iNdEx >= l {
  2392. return io.ErrUnexpectedEOF
  2393. }
  2394. b := dAtA[iNdEx]
  2395. iNdEx++
  2396. wire |= uint64(b&0x7F) << shift
  2397. if b < 0x80 {
  2398. break
  2399. }
  2400. }
  2401. fieldNum := int32(wire >> 3)
  2402. wireType := int(wire & 0x7)
  2403. if wireType == 4 {
  2404. return fmt.Errorf("proto: Header: wiretype end group for non-group")
  2405. }
  2406. if fieldNum <= 0 {
  2407. return fmt.Errorf("proto: Header: illegal tag %d (wire type %d)", fieldNum, wire)
  2408. }
  2409. switch fieldNum {
  2410. case 1:
  2411. if wireType != 0 {
  2412. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  2413. }
  2414. m.Type = 0
  2415. for shift := uint(0); ; shift += 7 {
  2416. if shift >= 64 {
  2417. return ErrIntOverflowBep
  2418. }
  2419. if iNdEx >= l {
  2420. return io.ErrUnexpectedEOF
  2421. }
  2422. b := dAtA[iNdEx]
  2423. iNdEx++
  2424. m.Type |= MessageType(b&0x7F) << shift
  2425. if b < 0x80 {
  2426. break
  2427. }
  2428. }
  2429. case 2:
  2430. if wireType != 0 {
  2431. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2432. }
  2433. m.Compression = 0
  2434. for shift := uint(0); ; shift += 7 {
  2435. if shift >= 64 {
  2436. return ErrIntOverflowBep
  2437. }
  2438. if iNdEx >= l {
  2439. return io.ErrUnexpectedEOF
  2440. }
  2441. b := dAtA[iNdEx]
  2442. iNdEx++
  2443. m.Compression |= MessageCompression(b&0x7F) << shift
  2444. if b < 0x80 {
  2445. break
  2446. }
  2447. }
  2448. default:
  2449. iNdEx = preIndex
  2450. skippy, err := skipBep(dAtA[iNdEx:])
  2451. if err != nil {
  2452. return err
  2453. }
  2454. if skippy < 0 {
  2455. return ErrInvalidLengthBep
  2456. }
  2457. if (iNdEx + skippy) < 0 {
  2458. return ErrInvalidLengthBep
  2459. }
  2460. if (iNdEx + skippy) > l {
  2461. return io.ErrUnexpectedEOF
  2462. }
  2463. iNdEx += skippy
  2464. }
  2465. }
  2466. if iNdEx > l {
  2467. return io.ErrUnexpectedEOF
  2468. }
  2469. return nil
  2470. }
  2471. func (m *ClusterConfig) Unmarshal(dAtA []byte) error {
  2472. l := len(dAtA)
  2473. iNdEx := 0
  2474. for iNdEx < l {
  2475. preIndex := iNdEx
  2476. var wire uint64
  2477. for shift := uint(0); ; shift += 7 {
  2478. if shift >= 64 {
  2479. return ErrIntOverflowBep
  2480. }
  2481. if iNdEx >= l {
  2482. return io.ErrUnexpectedEOF
  2483. }
  2484. b := dAtA[iNdEx]
  2485. iNdEx++
  2486. wire |= uint64(b&0x7F) << shift
  2487. if b < 0x80 {
  2488. break
  2489. }
  2490. }
  2491. fieldNum := int32(wire >> 3)
  2492. wireType := int(wire & 0x7)
  2493. if wireType == 4 {
  2494. return fmt.Errorf("proto: ClusterConfig: wiretype end group for non-group")
  2495. }
  2496. if fieldNum <= 0 {
  2497. return fmt.Errorf("proto: ClusterConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  2498. }
  2499. switch fieldNum {
  2500. case 1:
  2501. if wireType != 2 {
  2502. return fmt.Errorf("proto: wrong wireType = %d for field Folders", wireType)
  2503. }
  2504. var msglen int
  2505. for shift := uint(0); ; shift += 7 {
  2506. if shift >= 64 {
  2507. return ErrIntOverflowBep
  2508. }
  2509. if iNdEx >= l {
  2510. return io.ErrUnexpectedEOF
  2511. }
  2512. b := dAtA[iNdEx]
  2513. iNdEx++
  2514. msglen |= int(b&0x7F) << shift
  2515. if b < 0x80 {
  2516. break
  2517. }
  2518. }
  2519. if msglen < 0 {
  2520. return ErrInvalidLengthBep
  2521. }
  2522. postIndex := iNdEx + msglen
  2523. if postIndex < 0 {
  2524. return ErrInvalidLengthBep
  2525. }
  2526. if postIndex > l {
  2527. return io.ErrUnexpectedEOF
  2528. }
  2529. m.Folders = append(m.Folders, Folder{})
  2530. if err := m.Folders[len(m.Folders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2531. return err
  2532. }
  2533. iNdEx = postIndex
  2534. default:
  2535. iNdEx = preIndex
  2536. skippy, err := skipBep(dAtA[iNdEx:])
  2537. if err != nil {
  2538. return err
  2539. }
  2540. if skippy < 0 {
  2541. return ErrInvalidLengthBep
  2542. }
  2543. if (iNdEx + skippy) < 0 {
  2544. return ErrInvalidLengthBep
  2545. }
  2546. if (iNdEx + skippy) > l {
  2547. return io.ErrUnexpectedEOF
  2548. }
  2549. iNdEx += skippy
  2550. }
  2551. }
  2552. if iNdEx > l {
  2553. return io.ErrUnexpectedEOF
  2554. }
  2555. return nil
  2556. }
  2557. func (m *Folder) Unmarshal(dAtA []byte) error {
  2558. l := len(dAtA)
  2559. iNdEx := 0
  2560. for iNdEx < l {
  2561. preIndex := iNdEx
  2562. var wire uint64
  2563. for shift := uint(0); ; shift += 7 {
  2564. if shift >= 64 {
  2565. return ErrIntOverflowBep
  2566. }
  2567. if iNdEx >= l {
  2568. return io.ErrUnexpectedEOF
  2569. }
  2570. b := dAtA[iNdEx]
  2571. iNdEx++
  2572. wire |= uint64(b&0x7F) << shift
  2573. if b < 0x80 {
  2574. break
  2575. }
  2576. }
  2577. fieldNum := int32(wire >> 3)
  2578. wireType := int(wire & 0x7)
  2579. if wireType == 4 {
  2580. return fmt.Errorf("proto: Folder: wiretype end group for non-group")
  2581. }
  2582. if fieldNum <= 0 {
  2583. return fmt.Errorf("proto: Folder: illegal tag %d (wire type %d)", fieldNum, wire)
  2584. }
  2585. switch fieldNum {
  2586. case 1:
  2587. if wireType != 2 {
  2588. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2589. }
  2590. var stringLen uint64
  2591. for shift := uint(0); ; shift += 7 {
  2592. if shift >= 64 {
  2593. return ErrIntOverflowBep
  2594. }
  2595. if iNdEx >= l {
  2596. return io.ErrUnexpectedEOF
  2597. }
  2598. b := dAtA[iNdEx]
  2599. iNdEx++
  2600. stringLen |= uint64(b&0x7F) << shift
  2601. if b < 0x80 {
  2602. break
  2603. }
  2604. }
  2605. intStringLen := int(stringLen)
  2606. if intStringLen < 0 {
  2607. return ErrInvalidLengthBep
  2608. }
  2609. postIndex := iNdEx + intStringLen
  2610. if postIndex < 0 {
  2611. return ErrInvalidLengthBep
  2612. }
  2613. if postIndex > l {
  2614. return io.ErrUnexpectedEOF
  2615. }
  2616. m.ID = string(dAtA[iNdEx:postIndex])
  2617. iNdEx = postIndex
  2618. case 2:
  2619. if wireType != 2 {
  2620. return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType)
  2621. }
  2622. var stringLen uint64
  2623. for shift := uint(0); ; shift += 7 {
  2624. if shift >= 64 {
  2625. return ErrIntOverflowBep
  2626. }
  2627. if iNdEx >= l {
  2628. return io.ErrUnexpectedEOF
  2629. }
  2630. b := dAtA[iNdEx]
  2631. iNdEx++
  2632. stringLen |= uint64(b&0x7F) << shift
  2633. if b < 0x80 {
  2634. break
  2635. }
  2636. }
  2637. intStringLen := int(stringLen)
  2638. if intStringLen < 0 {
  2639. return ErrInvalidLengthBep
  2640. }
  2641. postIndex := iNdEx + intStringLen
  2642. if postIndex < 0 {
  2643. return ErrInvalidLengthBep
  2644. }
  2645. if postIndex > l {
  2646. return io.ErrUnexpectedEOF
  2647. }
  2648. m.Label = string(dAtA[iNdEx:postIndex])
  2649. iNdEx = postIndex
  2650. case 3:
  2651. if wireType != 0 {
  2652. return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
  2653. }
  2654. var v int
  2655. for shift := uint(0); ; shift += 7 {
  2656. if shift >= 64 {
  2657. return ErrIntOverflowBep
  2658. }
  2659. if iNdEx >= l {
  2660. return io.ErrUnexpectedEOF
  2661. }
  2662. b := dAtA[iNdEx]
  2663. iNdEx++
  2664. v |= int(b&0x7F) << shift
  2665. if b < 0x80 {
  2666. break
  2667. }
  2668. }
  2669. m.ReadOnly = bool(v != 0)
  2670. case 4:
  2671. if wireType != 0 {
  2672. return fmt.Errorf("proto: wrong wireType = %d for field IgnorePermissions", wireType)
  2673. }
  2674. var v int
  2675. for shift := uint(0); ; shift += 7 {
  2676. if shift >= 64 {
  2677. return ErrIntOverflowBep
  2678. }
  2679. if iNdEx >= l {
  2680. return io.ErrUnexpectedEOF
  2681. }
  2682. b := dAtA[iNdEx]
  2683. iNdEx++
  2684. v |= int(b&0x7F) << shift
  2685. if b < 0x80 {
  2686. break
  2687. }
  2688. }
  2689. m.IgnorePermissions = bool(v != 0)
  2690. case 5:
  2691. if wireType != 0 {
  2692. return fmt.Errorf("proto: wrong wireType = %d for field IgnoreDelete", wireType)
  2693. }
  2694. var v int
  2695. for shift := uint(0); ; shift += 7 {
  2696. if shift >= 64 {
  2697. return ErrIntOverflowBep
  2698. }
  2699. if iNdEx >= l {
  2700. return io.ErrUnexpectedEOF
  2701. }
  2702. b := dAtA[iNdEx]
  2703. iNdEx++
  2704. v |= int(b&0x7F) << shift
  2705. if b < 0x80 {
  2706. break
  2707. }
  2708. }
  2709. m.IgnoreDelete = bool(v != 0)
  2710. case 6:
  2711. if wireType != 0 {
  2712. return fmt.Errorf("proto: wrong wireType = %d for field DisableTempIndexes", wireType)
  2713. }
  2714. var v int
  2715. for shift := uint(0); ; shift += 7 {
  2716. if shift >= 64 {
  2717. return ErrIntOverflowBep
  2718. }
  2719. if iNdEx >= l {
  2720. return io.ErrUnexpectedEOF
  2721. }
  2722. b := dAtA[iNdEx]
  2723. iNdEx++
  2724. v |= int(b&0x7F) << shift
  2725. if b < 0x80 {
  2726. break
  2727. }
  2728. }
  2729. m.DisableTempIndexes = bool(v != 0)
  2730. case 7:
  2731. if wireType != 0 {
  2732. return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType)
  2733. }
  2734. var v int
  2735. for shift := uint(0); ; shift += 7 {
  2736. if shift >= 64 {
  2737. return ErrIntOverflowBep
  2738. }
  2739. if iNdEx >= l {
  2740. return io.ErrUnexpectedEOF
  2741. }
  2742. b := dAtA[iNdEx]
  2743. iNdEx++
  2744. v |= int(b&0x7F) << shift
  2745. if b < 0x80 {
  2746. break
  2747. }
  2748. }
  2749. m.Paused = bool(v != 0)
  2750. case 16:
  2751. if wireType != 2 {
  2752. return fmt.Errorf("proto: wrong wireType = %d for field Devices", wireType)
  2753. }
  2754. var msglen int
  2755. for shift := uint(0); ; shift += 7 {
  2756. if shift >= 64 {
  2757. return ErrIntOverflowBep
  2758. }
  2759. if iNdEx >= l {
  2760. return io.ErrUnexpectedEOF
  2761. }
  2762. b := dAtA[iNdEx]
  2763. iNdEx++
  2764. msglen |= int(b&0x7F) << shift
  2765. if b < 0x80 {
  2766. break
  2767. }
  2768. }
  2769. if msglen < 0 {
  2770. return ErrInvalidLengthBep
  2771. }
  2772. postIndex := iNdEx + msglen
  2773. if postIndex < 0 {
  2774. return ErrInvalidLengthBep
  2775. }
  2776. if postIndex > l {
  2777. return io.ErrUnexpectedEOF
  2778. }
  2779. m.Devices = append(m.Devices, Device{})
  2780. if err := m.Devices[len(m.Devices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2781. return err
  2782. }
  2783. iNdEx = postIndex
  2784. default:
  2785. iNdEx = preIndex
  2786. skippy, err := skipBep(dAtA[iNdEx:])
  2787. if err != nil {
  2788. return err
  2789. }
  2790. if skippy < 0 {
  2791. return ErrInvalidLengthBep
  2792. }
  2793. if (iNdEx + skippy) < 0 {
  2794. return ErrInvalidLengthBep
  2795. }
  2796. if (iNdEx + skippy) > l {
  2797. return io.ErrUnexpectedEOF
  2798. }
  2799. iNdEx += skippy
  2800. }
  2801. }
  2802. if iNdEx > l {
  2803. return io.ErrUnexpectedEOF
  2804. }
  2805. return nil
  2806. }
  2807. func (m *Device) Unmarshal(dAtA []byte) error {
  2808. l := len(dAtA)
  2809. iNdEx := 0
  2810. for iNdEx < l {
  2811. preIndex := iNdEx
  2812. var wire uint64
  2813. for shift := uint(0); ; shift += 7 {
  2814. if shift >= 64 {
  2815. return ErrIntOverflowBep
  2816. }
  2817. if iNdEx >= l {
  2818. return io.ErrUnexpectedEOF
  2819. }
  2820. b := dAtA[iNdEx]
  2821. iNdEx++
  2822. wire |= uint64(b&0x7F) << shift
  2823. if b < 0x80 {
  2824. break
  2825. }
  2826. }
  2827. fieldNum := int32(wire >> 3)
  2828. wireType := int(wire & 0x7)
  2829. if wireType == 4 {
  2830. return fmt.Errorf("proto: Device: wiretype end group for non-group")
  2831. }
  2832. if fieldNum <= 0 {
  2833. return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire)
  2834. }
  2835. switch fieldNum {
  2836. case 1:
  2837. if wireType != 2 {
  2838. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2839. }
  2840. var byteLen int
  2841. for shift := uint(0); ; shift += 7 {
  2842. if shift >= 64 {
  2843. return ErrIntOverflowBep
  2844. }
  2845. if iNdEx >= l {
  2846. return io.ErrUnexpectedEOF
  2847. }
  2848. b := dAtA[iNdEx]
  2849. iNdEx++
  2850. byteLen |= int(b&0x7F) << shift
  2851. if b < 0x80 {
  2852. break
  2853. }
  2854. }
  2855. if byteLen < 0 {
  2856. return ErrInvalidLengthBep
  2857. }
  2858. postIndex := iNdEx + byteLen
  2859. if postIndex < 0 {
  2860. return ErrInvalidLengthBep
  2861. }
  2862. if postIndex > l {
  2863. return io.ErrUnexpectedEOF
  2864. }
  2865. if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2866. return err
  2867. }
  2868. iNdEx = postIndex
  2869. case 2:
  2870. if wireType != 2 {
  2871. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  2872. }
  2873. var stringLen uint64
  2874. for shift := uint(0); ; shift += 7 {
  2875. if shift >= 64 {
  2876. return ErrIntOverflowBep
  2877. }
  2878. if iNdEx >= l {
  2879. return io.ErrUnexpectedEOF
  2880. }
  2881. b := dAtA[iNdEx]
  2882. iNdEx++
  2883. stringLen |= uint64(b&0x7F) << shift
  2884. if b < 0x80 {
  2885. break
  2886. }
  2887. }
  2888. intStringLen := int(stringLen)
  2889. if intStringLen < 0 {
  2890. return ErrInvalidLengthBep
  2891. }
  2892. postIndex := iNdEx + intStringLen
  2893. if postIndex < 0 {
  2894. return ErrInvalidLengthBep
  2895. }
  2896. if postIndex > l {
  2897. return io.ErrUnexpectedEOF
  2898. }
  2899. m.Name = string(dAtA[iNdEx:postIndex])
  2900. iNdEx = postIndex
  2901. case 3:
  2902. if wireType != 2 {
  2903. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  2904. }
  2905. var stringLen uint64
  2906. for shift := uint(0); ; shift += 7 {
  2907. if shift >= 64 {
  2908. return ErrIntOverflowBep
  2909. }
  2910. if iNdEx >= l {
  2911. return io.ErrUnexpectedEOF
  2912. }
  2913. b := dAtA[iNdEx]
  2914. iNdEx++
  2915. stringLen |= uint64(b&0x7F) << shift
  2916. if b < 0x80 {
  2917. break
  2918. }
  2919. }
  2920. intStringLen := int(stringLen)
  2921. if intStringLen < 0 {
  2922. return ErrInvalidLengthBep
  2923. }
  2924. postIndex := iNdEx + intStringLen
  2925. if postIndex < 0 {
  2926. return ErrInvalidLengthBep
  2927. }
  2928. if postIndex > l {
  2929. return io.ErrUnexpectedEOF
  2930. }
  2931. m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex]))
  2932. iNdEx = postIndex
  2933. case 4:
  2934. if wireType != 0 {
  2935. return fmt.Errorf("proto: wrong wireType = %d for field Compression", wireType)
  2936. }
  2937. m.Compression = 0
  2938. for shift := uint(0); ; shift += 7 {
  2939. if shift >= 64 {
  2940. return ErrIntOverflowBep
  2941. }
  2942. if iNdEx >= l {
  2943. return io.ErrUnexpectedEOF
  2944. }
  2945. b := dAtA[iNdEx]
  2946. iNdEx++
  2947. m.Compression |= Compression(b&0x7F) << shift
  2948. if b < 0x80 {
  2949. break
  2950. }
  2951. }
  2952. case 5:
  2953. if wireType != 2 {
  2954. return fmt.Errorf("proto: wrong wireType = %d for field CertName", wireType)
  2955. }
  2956. var stringLen uint64
  2957. for shift := uint(0); ; shift += 7 {
  2958. if shift >= 64 {
  2959. return ErrIntOverflowBep
  2960. }
  2961. if iNdEx >= l {
  2962. return io.ErrUnexpectedEOF
  2963. }
  2964. b := dAtA[iNdEx]
  2965. iNdEx++
  2966. stringLen |= uint64(b&0x7F) << shift
  2967. if b < 0x80 {
  2968. break
  2969. }
  2970. }
  2971. intStringLen := int(stringLen)
  2972. if intStringLen < 0 {
  2973. return ErrInvalidLengthBep
  2974. }
  2975. postIndex := iNdEx + intStringLen
  2976. if postIndex < 0 {
  2977. return ErrInvalidLengthBep
  2978. }
  2979. if postIndex > l {
  2980. return io.ErrUnexpectedEOF
  2981. }
  2982. m.CertName = string(dAtA[iNdEx:postIndex])
  2983. iNdEx = postIndex
  2984. case 6:
  2985. if wireType != 0 {
  2986. return fmt.Errorf("proto: wrong wireType = %d for field MaxSequence", wireType)
  2987. }
  2988. m.MaxSequence = 0
  2989. for shift := uint(0); ; shift += 7 {
  2990. if shift >= 64 {
  2991. return ErrIntOverflowBep
  2992. }
  2993. if iNdEx >= l {
  2994. return io.ErrUnexpectedEOF
  2995. }
  2996. b := dAtA[iNdEx]
  2997. iNdEx++
  2998. m.MaxSequence |= int64(b&0x7F) << shift
  2999. if b < 0x80 {
  3000. break
  3001. }
  3002. }
  3003. case 7:
  3004. if wireType != 0 {
  3005. return fmt.Errorf("proto: wrong wireType = %d for field Introducer", wireType)
  3006. }
  3007. var v int
  3008. for shift := uint(0); ; shift += 7 {
  3009. if shift >= 64 {
  3010. return ErrIntOverflowBep
  3011. }
  3012. if iNdEx >= l {
  3013. return io.ErrUnexpectedEOF
  3014. }
  3015. b := dAtA[iNdEx]
  3016. iNdEx++
  3017. v |= int(b&0x7F) << shift
  3018. if b < 0x80 {
  3019. break
  3020. }
  3021. }
  3022. m.Introducer = bool(v != 0)
  3023. case 8:
  3024. if wireType != 0 {
  3025. return fmt.Errorf("proto: wrong wireType = %d for field IndexID", wireType)
  3026. }
  3027. m.IndexID = 0
  3028. for shift := uint(0); ; shift += 7 {
  3029. if shift >= 64 {
  3030. return ErrIntOverflowBep
  3031. }
  3032. if iNdEx >= l {
  3033. return io.ErrUnexpectedEOF
  3034. }
  3035. b := dAtA[iNdEx]
  3036. iNdEx++
  3037. m.IndexID |= IndexID(b&0x7F) << shift
  3038. if b < 0x80 {
  3039. break
  3040. }
  3041. }
  3042. case 9:
  3043. if wireType != 0 {
  3044. return fmt.Errorf("proto: wrong wireType = %d for field SkipIntroductionRemovals", wireType)
  3045. }
  3046. var v int
  3047. for shift := uint(0); ; shift += 7 {
  3048. if shift >= 64 {
  3049. return ErrIntOverflowBep
  3050. }
  3051. if iNdEx >= l {
  3052. return io.ErrUnexpectedEOF
  3053. }
  3054. b := dAtA[iNdEx]
  3055. iNdEx++
  3056. v |= int(b&0x7F) << shift
  3057. if b < 0x80 {
  3058. break
  3059. }
  3060. }
  3061. m.SkipIntroductionRemovals = bool(v != 0)
  3062. default:
  3063. iNdEx = preIndex
  3064. skippy, err := skipBep(dAtA[iNdEx:])
  3065. if err != nil {
  3066. return err
  3067. }
  3068. if skippy < 0 {
  3069. return ErrInvalidLengthBep
  3070. }
  3071. if (iNdEx + skippy) < 0 {
  3072. return ErrInvalidLengthBep
  3073. }
  3074. if (iNdEx + skippy) > l {
  3075. return io.ErrUnexpectedEOF
  3076. }
  3077. iNdEx += skippy
  3078. }
  3079. }
  3080. if iNdEx > l {
  3081. return io.ErrUnexpectedEOF
  3082. }
  3083. return nil
  3084. }
  3085. func (m *Index) Unmarshal(dAtA []byte) error {
  3086. l := len(dAtA)
  3087. iNdEx := 0
  3088. for iNdEx < l {
  3089. preIndex := iNdEx
  3090. var wire uint64
  3091. for shift := uint(0); ; shift += 7 {
  3092. if shift >= 64 {
  3093. return ErrIntOverflowBep
  3094. }
  3095. if iNdEx >= l {
  3096. return io.ErrUnexpectedEOF
  3097. }
  3098. b := dAtA[iNdEx]
  3099. iNdEx++
  3100. wire |= uint64(b&0x7F) << shift
  3101. if b < 0x80 {
  3102. break
  3103. }
  3104. }
  3105. fieldNum := int32(wire >> 3)
  3106. wireType := int(wire & 0x7)
  3107. if wireType == 4 {
  3108. return fmt.Errorf("proto: Index: wiretype end group for non-group")
  3109. }
  3110. if fieldNum <= 0 {
  3111. return fmt.Errorf("proto: Index: illegal tag %d (wire type %d)", fieldNum, wire)
  3112. }
  3113. switch fieldNum {
  3114. case 1:
  3115. if wireType != 2 {
  3116. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3117. }
  3118. var stringLen uint64
  3119. for shift := uint(0); ; shift += 7 {
  3120. if shift >= 64 {
  3121. return ErrIntOverflowBep
  3122. }
  3123. if iNdEx >= l {
  3124. return io.ErrUnexpectedEOF
  3125. }
  3126. b := dAtA[iNdEx]
  3127. iNdEx++
  3128. stringLen |= uint64(b&0x7F) << shift
  3129. if b < 0x80 {
  3130. break
  3131. }
  3132. }
  3133. intStringLen := int(stringLen)
  3134. if intStringLen < 0 {
  3135. return ErrInvalidLengthBep
  3136. }
  3137. postIndex := iNdEx + intStringLen
  3138. if postIndex < 0 {
  3139. return ErrInvalidLengthBep
  3140. }
  3141. if postIndex > l {
  3142. return io.ErrUnexpectedEOF
  3143. }
  3144. m.Folder = string(dAtA[iNdEx:postIndex])
  3145. iNdEx = postIndex
  3146. case 2:
  3147. if wireType != 2 {
  3148. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  3149. }
  3150. var msglen int
  3151. for shift := uint(0); ; shift += 7 {
  3152. if shift >= 64 {
  3153. return ErrIntOverflowBep
  3154. }
  3155. if iNdEx >= l {
  3156. return io.ErrUnexpectedEOF
  3157. }
  3158. b := dAtA[iNdEx]
  3159. iNdEx++
  3160. msglen |= int(b&0x7F) << shift
  3161. if b < 0x80 {
  3162. break
  3163. }
  3164. }
  3165. if msglen < 0 {
  3166. return ErrInvalidLengthBep
  3167. }
  3168. postIndex := iNdEx + msglen
  3169. if postIndex < 0 {
  3170. return ErrInvalidLengthBep
  3171. }
  3172. if postIndex > l {
  3173. return io.ErrUnexpectedEOF
  3174. }
  3175. m.Files = append(m.Files, FileInfo{})
  3176. if err := m.Files[len(m.Files)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3177. return err
  3178. }
  3179. iNdEx = postIndex
  3180. default:
  3181. iNdEx = preIndex
  3182. skippy, err := skipBep(dAtA[iNdEx:])
  3183. if err != nil {
  3184. return err
  3185. }
  3186. if skippy < 0 {
  3187. return ErrInvalidLengthBep
  3188. }
  3189. if (iNdEx + skippy) < 0 {
  3190. return ErrInvalidLengthBep
  3191. }
  3192. if (iNdEx + skippy) > l {
  3193. return io.ErrUnexpectedEOF
  3194. }
  3195. iNdEx += skippy
  3196. }
  3197. }
  3198. if iNdEx > l {
  3199. return io.ErrUnexpectedEOF
  3200. }
  3201. return nil
  3202. }
  3203. func (m *IndexUpdate) Unmarshal(dAtA []byte) error {
  3204. l := len(dAtA)
  3205. iNdEx := 0
  3206. for iNdEx < l {
  3207. preIndex := iNdEx
  3208. var wire uint64
  3209. for shift := uint(0); ; shift += 7 {
  3210. if shift >= 64 {
  3211. return ErrIntOverflowBep
  3212. }
  3213. if iNdEx >= l {
  3214. return io.ErrUnexpectedEOF
  3215. }
  3216. b := dAtA[iNdEx]
  3217. iNdEx++
  3218. wire |= uint64(b&0x7F) << shift
  3219. if b < 0x80 {
  3220. break
  3221. }
  3222. }
  3223. fieldNum := int32(wire >> 3)
  3224. wireType := int(wire & 0x7)
  3225. if wireType == 4 {
  3226. return fmt.Errorf("proto: IndexUpdate: wiretype end group for non-group")
  3227. }
  3228. if fieldNum <= 0 {
  3229. return fmt.Errorf("proto: IndexUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  3230. }
  3231. switch fieldNum {
  3232. case 1:
  3233. if wireType != 2 {
  3234. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  3235. }
  3236. var stringLen uint64
  3237. for shift := uint(0); ; shift += 7 {
  3238. if shift >= 64 {
  3239. return ErrIntOverflowBep
  3240. }
  3241. if iNdEx >= l {
  3242. return io.ErrUnexpectedEOF
  3243. }
  3244. b := dAtA[iNdEx]
  3245. iNdEx++
  3246. stringLen |= uint64(b&0x7F) << shift
  3247. if b < 0x80 {
  3248. break
  3249. }
  3250. }
  3251. intStringLen := int(stringLen)
  3252. if intStringLen < 0 {
  3253. return ErrInvalidLengthBep
  3254. }
  3255. postIndex := iNdEx + intStringLen
  3256. if postIndex < 0 {
  3257. return ErrInvalidLengthBep
  3258. }
  3259. if postIndex > l {
  3260. return io.ErrUnexpectedEOF
  3261. }
  3262. m.Folder = string(dAtA[iNdEx:postIndex])
  3263. iNdEx = postIndex
  3264. case 2:
  3265. if wireType != 2 {
  3266. return fmt.Errorf("proto: wrong wireType = %d for field Files", wireType)
  3267. }
  3268. var msglen int
  3269. for shift := uint(0); ; shift += 7 {
  3270. if shift >= 64 {
  3271. return ErrIntOverflowBep
  3272. }
  3273. if iNdEx >= l {
  3274. return io.ErrUnexpectedEOF
  3275. }
  3276. b := dAtA[iNdEx]
  3277. iNdEx++
  3278. msglen |= int(b&0x7F) << shift
  3279. if b < 0x80 {
  3280. break
  3281. }
  3282. }
  3283. if msglen < 0 {
  3284. return ErrInvalidLengthBep
  3285. }
  3286. postIndex := iNdEx + msglen
  3287. if postIndex < 0 {
  3288. return ErrInvalidLengthBep
  3289. }
  3290. if postIndex > l {
  3291. return io.ErrUnexpectedEOF
  3292. }
  3293. m.Files = append(m.Files, FileInfo{})
  3294. if err := m.Files[len(m.Files)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3295. return err
  3296. }
  3297. iNdEx = postIndex
  3298. default:
  3299. iNdEx = preIndex
  3300. skippy, err := skipBep(dAtA[iNdEx:])
  3301. if err != nil {
  3302. return err
  3303. }
  3304. if skippy < 0 {
  3305. return ErrInvalidLengthBep
  3306. }
  3307. if (iNdEx + skippy) < 0 {
  3308. return ErrInvalidLengthBep
  3309. }
  3310. if (iNdEx + skippy) > l {
  3311. return io.ErrUnexpectedEOF
  3312. }
  3313. iNdEx += skippy
  3314. }
  3315. }
  3316. if iNdEx > l {
  3317. return io.ErrUnexpectedEOF
  3318. }
  3319. return nil
  3320. }
  3321. func (m *FileInfo) Unmarshal(dAtA []byte) error {
  3322. l := len(dAtA)
  3323. iNdEx := 0
  3324. for iNdEx < l {
  3325. preIndex := iNdEx
  3326. var wire uint64
  3327. for shift := uint(0); ; shift += 7 {
  3328. if shift >= 64 {
  3329. return ErrIntOverflowBep
  3330. }
  3331. if iNdEx >= l {
  3332. return io.ErrUnexpectedEOF
  3333. }
  3334. b := dAtA[iNdEx]
  3335. iNdEx++
  3336. wire |= uint64(b&0x7F) << shift
  3337. if b < 0x80 {
  3338. break
  3339. }
  3340. }
  3341. fieldNum := int32(wire >> 3)
  3342. wireType := int(wire & 0x7)
  3343. if wireType == 4 {
  3344. return fmt.Errorf("proto: FileInfo: wiretype end group for non-group")
  3345. }
  3346. if fieldNum <= 0 {
  3347. return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3348. }
  3349. switch fieldNum {
  3350. case 1:
  3351. if wireType != 2 {
  3352. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  3353. }
  3354. var stringLen uint64
  3355. for shift := uint(0); ; shift += 7 {
  3356. if shift >= 64 {
  3357. return ErrIntOverflowBep
  3358. }
  3359. if iNdEx >= l {
  3360. return io.ErrUnexpectedEOF
  3361. }
  3362. b := dAtA[iNdEx]
  3363. iNdEx++
  3364. stringLen |= uint64(b&0x7F) << shift
  3365. if b < 0x80 {
  3366. break
  3367. }
  3368. }
  3369. intStringLen := int(stringLen)
  3370. if intStringLen < 0 {
  3371. return ErrInvalidLengthBep
  3372. }
  3373. postIndex := iNdEx + intStringLen
  3374. if postIndex < 0 {
  3375. return ErrInvalidLengthBep
  3376. }
  3377. if postIndex > l {
  3378. return io.ErrUnexpectedEOF
  3379. }
  3380. m.Name = string(dAtA[iNdEx:postIndex])
  3381. iNdEx = postIndex
  3382. case 2:
  3383. if wireType != 0 {
  3384. return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
  3385. }
  3386. m.Type = 0
  3387. for shift := uint(0); ; shift += 7 {
  3388. if shift >= 64 {
  3389. return ErrIntOverflowBep
  3390. }
  3391. if iNdEx >= l {
  3392. return io.ErrUnexpectedEOF
  3393. }
  3394. b := dAtA[iNdEx]
  3395. iNdEx++
  3396. m.Type |= FileInfoType(b&0x7F) << shift
  3397. if b < 0x80 {
  3398. break
  3399. }
  3400. }
  3401. case 3:
  3402. if wireType != 0 {
  3403. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3404. }
  3405. m.Size = 0
  3406. for shift := uint(0); ; shift += 7 {
  3407. if shift >= 64 {
  3408. return ErrIntOverflowBep
  3409. }
  3410. if iNdEx >= l {
  3411. return io.ErrUnexpectedEOF
  3412. }
  3413. b := dAtA[iNdEx]
  3414. iNdEx++
  3415. m.Size |= int64(b&0x7F) << shift
  3416. if b < 0x80 {
  3417. break
  3418. }
  3419. }
  3420. case 4:
  3421. if wireType != 0 {
  3422. return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType)
  3423. }
  3424. m.Permissions = 0
  3425. for shift := uint(0); ; shift += 7 {
  3426. if shift >= 64 {
  3427. return ErrIntOverflowBep
  3428. }
  3429. if iNdEx >= l {
  3430. return io.ErrUnexpectedEOF
  3431. }
  3432. b := dAtA[iNdEx]
  3433. iNdEx++
  3434. m.Permissions |= uint32(b&0x7F) << shift
  3435. if b < 0x80 {
  3436. break
  3437. }
  3438. }
  3439. case 5:
  3440. if wireType != 0 {
  3441. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedS", wireType)
  3442. }
  3443. m.ModifiedS = 0
  3444. for shift := uint(0); ; shift += 7 {
  3445. if shift >= 64 {
  3446. return ErrIntOverflowBep
  3447. }
  3448. if iNdEx >= l {
  3449. return io.ErrUnexpectedEOF
  3450. }
  3451. b := dAtA[iNdEx]
  3452. iNdEx++
  3453. m.ModifiedS |= int64(b&0x7F) << shift
  3454. if b < 0x80 {
  3455. break
  3456. }
  3457. }
  3458. case 6:
  3459. if wireType != 0 {
  3460. return fmt.Errorf("proto: wrong wireType = %d for field Deleted", wireType)
  3461. }
  3462. var v int
  3463. for shift := uint(0); ; shift += 7 {
  3464. if shift >= 64 {
  3465. return ErrIntOverflowBep
  3466. }
  3467. if iNdEx >= l {
  3468. return io.ErrUnexpectedEOF
  3469. }
  3470. b := dAtA[iNdEx]
  3471. iNdEx++
  3472. v |= int(b&0x7F) << shift
  3473. if b < 0x80 {
  3474. break
  3475. }
  3476. }
  3477. m.Deleted = bool(v != 0)
  3478. case 7:
  3479. if wireType != 0 {
  3480. return fmt.Errorf("proto: wrong wireType = %d for field RawInvalid", wireType)
  3481. }
  3482. var v int
  3483. for shift := uint(0); ; shift += 7 {
  3484. if shift >= 64 {
  3485. return ErrIntOverflowBep
  3486. }
  3487. if iNdEx >= l {
  3488. return io.ErrUnexpectedEOF
  3489. }
  3490. b := dAtA[iNdEx]
  3491. iNdEx++
  3492. v |= int(b&0x7F) << shift
  3493. if b < 0x80 {
  3494. break
  3495. }
  3496. }
  3497. m.RawInvalid = bool(v != 0)
  3498. case 8:
  3499. if wireType != 0 {
  3500. return fmt.Errorf("proto: wrong wireType = %d for field NoPermissions", wireType)
  3501. }
  3502. var v int
  3503. for shift := uint(0); ; shift += 7 {
  3504. if shift >= 64 {
  3505. return ErrIntOverflowBep
  3506. }
  3507. if iNdEx >= l {
  3508. return io.ErrUnexpectedEOF
  3509. }
  3510. b := dAtA[iNdEx]
  3511. iNdEx++
  3512. v |= int(b&0x7F) << shift
  3513. if b < 0x80 {
  3514. break
  3515. }
  3516. }
  3517. m.NoPermissions = bool(v != 0)
  3518. case 9:
  3519. if wireType != 2 {
  3520. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  3521. }
  3522. var msglen int
  3523. for shift := uint(0); ; shift += 7 {
  3524. if shift >= 64 {
  3525. return ErrIntOverflowBep
  3526. }
  3527. if iNdEx >= l {
  3528. return io.ErrUnexpectedEOF
  3529. }
  3530. b := dAtA[iNdEx]
  3531. iNdEx++
  3532. msglen |= int(b&0x7F) << shift
  3533. if b < 0x80 {
  3534. break
  3535. }
  3536. }
  3537. if msglen < 0 {
  3538. return ErrInvalidLengthBep
  3539. }
  3540. postIndex := iNdEx + msglen
  3541. if postIndex < 0 {
  3542. return ErrInvalidLengthBep
  3543. }
  3544. if postIndex > l {
  3545. return io.ErrUnexpectedEOF
  3546. }
  3547. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3548. return err
  3549. }
  3550. iNdEx = postIndex
  3551. case 10:
  3552. if wireType != 0 {
  3553. return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType)
  3554. }
  3555. m.Sequence = 0
  3556. for shift := uint(0); ; shift += 7 {
  3557. if shift >= 64 {
  3558. return ErrIntOverflowBep
  3559. }
  3560. if iNdEx >= l {
  3561. return io.ErrUnexpectedEOF
  3562. }
  3563. b := dAtA[iNdEx]
  3564. iNdEx++
  3565. m.Sequence |= int64(b&0x7F) << shift
  3566. if b < 0x80 {
  3567. break
  3568. }
  3569. }
  3570. case 11:
  3571. if wireType != 0 {
  3572. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedNs", wireType)
  3573. }
  3574. m.ModifiedNs = 0
  3575. for shift := uint(0); ; shift += 7 {
  3576. if shift >= 64 {
  3577. return ErrIntOverflowBep
  3578. }
  3579. if iNdEx >= l {
  3580. return io.ErrUnexpectedEOF
  3581. }
  3582. b := dAtA[iNdEx]
  3583. iNdEx++
  3584. m.ModifiedNs |= int32(b&0x7F) << shift
  3585. if b < 0x80 {
  3586. break
  3587. }
  3588. }
  3589. case 12:
  3590. if wireType != 0 {
  3591. return fmt.Errorf("proto: wrong wireType = %d for field ModifiedBy", wireType)
  3592. }
  3593. m.ModifiedBy = 0
  3594. for shift := uint(0); ; shift += 7 {
  3595. if shift >= 64 {
  3596. return ErrIntOverflowBep
  3597. }
  3598. if iNdEx >= l {
  3599. return io.ErrUnexpectedEOF
  3600. }
  3601. b := dAtA[iNdEx]
  3602. iNdEx++
  3603. m.ModifiedBy |= ShortID(b&0x7F) << shift
  3604. if b < 0x80 {
  3605. break
  3606. }
  3607. }
  3608. case 13:
  3609. if wireType != 0 {
  3610. return fmt.Errorf("proto: wrong wireType = %d for field RawBlockSize", wireType)
  3611. }
  3612. m.RawBlockSize = 0
  3613. for shift := uint(0); ; shift += 7 {
  3614. if shift >= 64 {
  3615. return ErrIntOverflowBep
  3616. }
  3617. if iNdEx >= l {
  3618. return io.ErrUnexpectedEOF
  3619. }
  3620. b := dAtA[iNdEx]
  3621. iNdEx++
  3622. m.RawBlockSize |= int32(b&0x7F) << shift
  3623. if b < 0x80 {
  3624. break
  3625. }
  3626. }
  3627. case 16:
  3628. if wireType != 2 {
  3629. return fmt.Errorf("proto: wrong wireType = %d for field Blocks", wireType)
  3630. }
  3631. var msglen int
  3632. for shift := uint(0); ; shift += 7 {
  3633. if shift >= 64 {
  3634. return ErrIntOverflowBep
  3635. }
  3636. if iNdEx >= l {
  3637. return io.ErrUnexpectedEOF
  3638. }
  3639. b := dAtA[iNdEx]
  3640. iNdEx++
  3641. msglen |= int(b&0x7F) << shift
  3642. if b < 0x80 {
  3643. break
  3644. }
  3645. }
  3646. if msglen < 0 {
  3647. return ErrInvalidLengthBep
  3648. }
  3649. postIndex := iNdEx + msglen
  3650. if postIndex < 0 {
  3651. return ErrInvalidLengthBep
  3652. }
  3653. if postIndex > l {
  3654. return io.ErrUnexpectedEOF
  3655. }
  3656. m.Blocks = append(m.Blocks, BlockInfo{})
  3657. if err := m.Blocks[len(m.Blocks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3658. return err
  3659. }
  3660. iNdEx = postIndex
  3661. case 17:
  3662. if wireType != 2 {
  3663. return fmt.Errorf("proto: wrong wireType = %d for field SymlinkTarget", wireType)
  3664. }
  3665. var stringLen uint64
  3666. for shift := uint(0); ; shift += 7 {
  3667. if shift >= 64 {
  3668. return ErrIntOverflowBep
  3669. }
  3670. if iNdEx >= l {
  3671. return io.ErrUnexpectedEOF
  3672. }
  3673. b := dAtA[iNdEx]
  3674. iNdEx++
  3675. stringLen |= uint64(b&0x7F) << shift
  3676. if b < 0x80 {
  3677. break
  3678. }
  3679. }
  3680. intStringLen := int(stringLen)
  3681. if intStringLen < 0 {
  3682. return ErrInvalidLengthBep
  3683. }
  3684. postIndex := iNdEx + intStringLen
  3685. if postIndex < 0 {
  3686. return ErrInvalidLengthBep
  3687. }
  3688. if postIndex > l {
  3689. return io.ErrUnexpectedEOF
  3690. }
  3691. m.SymlinkTarget = string(dAtA[iNdEx:postIndex])
  3692. iNdEx = postIndex
  3693. case 18:
  3694. if wireType != 2 {
  3695. return fmt.Errorf("proto: wrong wireType = %d for field BlocksHash", wireType)
  3696. }
  3697. var byteLen int
  3698. for shift := uint(0); ; shift += 7 {
  3699. if shift >= 64 {
  3700. return ErrIntOverflowBep
  3701. }
  3702. if iNdEx >= l {
  3703. return io.ErrUnexpectedEOF
  3704. }
  3705. b := dAtA[iNdEx]
  3706. iNdEx++
  3707. byteLen |= int(b&0x7F) << shift
  3708. if b < 0x80 {
  3709. break
  3710. }
  3711. }
  3712. if byteLen < 0 {
  3713. return ErrInvalidLengthBep
  3714. }
  3715. postIndex := iNdEx + byteLen
  3716. if postIndex < 0 {
  3717. return ErrInvalidLengthBep
  3718. }
  3719. if postIndex > l {
  3720. return io.ErrUnexpectedEOF
  3721. }
  3722. m.BlocksHash = append(m.BlocksHash[:0], dAtA[iNdEx:postIndex]...)
  3723. if m.BlocksHash == nil {
  3724. m.BlocksHash = []byte{}
  3725. }
  3726. iNdEx = postIndex
  3727. case 1000:
  3728. if wireType != 0 {
  3729. return fmt.Errorf("proto: wrong wireType = %d for field LocalFlags", wireType)
  3730. }
  3731. m.LocalFlags = 0
  3732. for shift := uint(0); ; shift += 7 {
  3733. if shift >= 64 {
  3734. return ErrIntOverflowBep
  3735. }
  3736. if iNdEx >= l {
  3737. return io.ErrUnexpectedEOF
  3738. }
  3739. b := dAtA[iNdEx]
  3740. iNdEx++
  3741. m.LocalFlags |= uint32(b&0x7F) << shift
  3742. if b < 0x80 {
  3743. break
  3744. }
  3745. }
  3746. default:
  3747. iNdEx = preIndex
  3748. skippy, err := skipBep(dAtA[iNdEx:])
  3749. if err != nil {
  3750. return err
  3751. }
  3752. if skippy < 0 {
  3753. return ErrInvalidLengthBep
  3754. }
  3755. if (iNdEx + skippy) < 0 {
  3756. return ErrInvalidLengthBep
  3757. }
  3758. if (iNdEx + skippy) > l {
  3759. return io.ErrUnexpectedEOF
  3760. }
  3761. iNdEx += skippy
  3762. }
  3763. }
  3764. if iNdEx > l {
  3765. return io.ErrUnexpectedEOF
  3766. }
  3767. return nil
  3768. }
  3769. func (m *BlockInfo) Unmarshal(dAtA []byte) error {
  3770. l := len(dAtA)
  3771. iNdEx := 0
  3772. for iNdEx < l {
  3773. preIndex := iNdEx
  3774. var wire uint64
  3775. for shift := uint(0); ; shift += 7 {
  3776. if shift >= 64 {
  3777. return ErrIntOverflowBep
  3778. }
  3779. if iNdEx >= l {
  3780. return io.ErrUnexpectedEOF
  3781. }
  3782. b := dAtA[iNdEx]
  3783. iNdEx++
  3784. wire |= uint64(b&0x7F) << shift
  3785. if b < 0x80 {
  3786. break
  3787. }
  3788. }
  3789. fieldNum := int32(wire >> 3)
  3790. wireType := int(wire & 0x7)
  3791. if wireType == 4 {
  3792. return fmt.Errorf("proto: BlockInfo: wiretype end group for non-group")
  3793. }
  3794. if fieldNum <= 0 {
  3795. return fmt.Errorf("proto: BlockInfo: illegal tag %d (wire type %d)", fieldNum, wire)
  3796. }
  3797. switch fieldNum {
  3798. case 1:
  3799. if wireType != 0 {
  3800. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  3801. }
  3802. m.Offset = 0
  3803. for shift := uint(0); ; shift += 7 {
  3804. if shift >= 64 {
  3805. return ErrIntOverflowBep
  3806. }
  3807. if iNdEx >= l {
  3808. return io.ErrUnexpectedEOF
  3809. }
  3810. b := dAtA[iNdEx]
  3811. iNdEx++
  3812. m.Offset |= int64(b&0x7F) << shift
  3813. if b < 0x80 {
  3814. break
  3815. }
  3816. }
  3817. case 2:
  3818. if wireType != 0 {
  3819. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  3820. }
  3821. m.Size = 0
  3822. for shift := uint(0); ; shift += 7 {
  3823. if shift >= 64 {
  3824. return ErrIntOverflowBep
  3825. }
  3826. if iNdEx >= l {
  3827. return io.ErrUnexpectedEOF
  3828. }
  3829. b := dAtA[iNdEx]
  3830. iNdEx++
  3831. m.Size |= int32(b&0x7F) << shift
  3832. if b < 0x80 {
  3833. break
  3834. }
  3835. }
  3836. case 3:
  3837. if wireType != 2 {
  3838. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  3839. }
  3840. var byteLen int
  3841. for shift := uint(0); ; shift += 7 {
  3842. if shift >= 64 {
  3843. return ErrIntOverflowBep
  3844. }
  3845. if iNdEx >= l {
  3846. return io.ErrUnexpectedEOF
  3847. }
  3848. b := dAtA[iNdEx]
  3849. iNdEx++
  3850. byteLen |= int(b&0x7F) << shift
  3851. if b < 0x80 {
  3852. break
  3853. }
  3854. }
  3855. if byteLen < 0 {
  3856. return ErrInvalidLengthBep
  3857. }
  3858. postIndex := iNdEx + byteLen
  3859. if postIndex < 0 {
  3860. return ErrInvalidLengthBep
  3861. }
  3862. if postIndex > l {
  3863. return io.ErrUnexpectedEOF
  3864. }
  3865. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  3866. if m.Hash == nil {
  3867. m.Hash = []byte{}
  3868. }
  3869. iNdEx = postIndex
  3870. case 4:
  3871. if wireType != 0 {
  3872. return fmt.Errorf("proto: wrong wireType = %d for field WeakHash", wireType)
  3873. }
  3874. m.WeakHash = 0
  3875. for shift := uint(0); ; shift += 7 {
  3876. if shift >= 64 {
  3877. return ErrIntOverflowBep
  3878. }
  3879. if iNdEx >= l {
  3880. return io.ErrUnexpectedEOF
  3881. }
  3882. b := dAtA[iNdEx]
  3883. iNdEx++
  3884. m.WeakHash |= uint32(b&0x7F) << shift
  3885. if b < 0x80 {
  3886. break
  3887. }
  3888. }
  3889. default:
  3890. iNdEx = preIndex
  3891. skippy, err := skipBep(dAtA[iNdEx:])
  3892. if err != nil {
  3893. return err
  3894. }
  3895. if skippy < 0 {
  3896. return ErrInvalidLengthBep
  3897. }
  3898. if (iNdEx + skippy) < 0 {
  3899. return ErrInvalidLengthBep
  3900. }
  3901. if (iNdEx + skippy) > l {
  3902. return io.ErrUnexpectedEOF
  3903. }
  3904. iNdEx += skippy
  3905. }
  3906. }
  3907. if iNdEx > l {
  3908. return io.ErrUnexpectedEOF
  3909. }
  3910. return nil
  3911. }
  3912. func (m *Vector) Unmarshal(dAtA []byte) error {
  3913. l := len(dAtA)
  3914. iNdEx := 0
  3915. for iNdEx < l {
  3916. preIndex := iNdEx
  3917. var wire uint64
  3918. for shift := uint(0); ; shift += 7 {
  3919. if shift >= 64 {
  3920. return ErrIntOverflowBep
  3921. }
  3922. if iNdEx >= l {
  3923. return io.ErrUnexpectedEOF
  3924. }
  3925. b := dAtA[iNdEx]
  3926. iNdEx++
  3927. wire |= uint64(b&0x7F) << shift
  3928. if b < 0x80 {
  3929. break
  3930. }
  3931. }
  3932. fieldNum := int32(wire >> 3)
  3933. wireType := int(wire & 0x7)
  3934. if wireType == 4 {
  3935. return fmt.Errorf("proto: Vector: wiretype end group for non-group")
  3936. }
  3937. if fieldNum <= 0 {
  3938. return fmt.Errorf("proto: Vector: illegal tag %d (wire type %d)", fieldNum, wire)
  3939. }
  3940. switch fieldNum {
  3941. case 1:
  3942. if wireType != 2 {
  3943. return fmt.Errorf("proto: wrong wireType = %d for field Counters", wireType)
  3944. }
  3945. var msglen int
  3946. for shift := uint(0); ; shift += 7 {
  3947. if shift >= 64 {
  3948. return ErrIntOverflowBep
  3949. }
  3950. if iNdEx >= l {
  3951. return io.ErrUnexpectedEOF
  3952. }
  3953. b := dAtA[iNdEx]
  3954. iNdEx++
  3955. msglen |= int(b&0x7F) << shift
  3956. if b < 0x80 {
  3957. break
  3958. }
  3959. }
  3960. if msglen < 0 {
  3961. return ErrInvalidLengthBep
  3962. }
  3963. postIndex := iNdEx + msglen
  3964. if postIndex < 0 {
  3965. return ErrInvalidLengthBep
  3966. }
  3967. if postIndex > l {
  3968. return io.ErrUnexpectedEOF
  3969. }
  3970. m.Counters = append(m.Counters, Counter{})
  3971. if err := m.Counters[len(m.Counters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3972. return err
  3973. }
  3974. iNdEx = postIndex
  3975. default:
  3976. iNdEx = preIndex
  3977. skippy, err := skipBep(dAtA[iNdEx:])
  3978. if err != nil {
  3979. return err
  3980. }
  3981. if skippy < 0 {
  3982. return ErrInvalidLengthBep
  3983. }
  3984. if (iNdEx + skippy) < 0 {
  3985. return ErrInvalidLengthBep
  3986. }
  3987. if (iNdEx + skippy) > l {
  3988. return io.ErrUnexpectedEOF
  3989. }
  3990. iNdEx += skippy
  3991. }
  3992. }
  3993. if iNdEx > l {
  3994. return io.ErrUnexpectedEOF
  3995. }
  3996. return nil
  3997. }
  3998. func (m *Counter) Unmarshal(dAtA []byte) error {
  3999. l := len(dAtA)
  4000. iNdEx := 0
  4001. for iNdEx < l {
  4002. preIndex := iNdEx
  4003. var wire uint64
  4004. for shift := uint(0); ; shift += 7 {
  4005. if shift >= 64 {
  4006. return ErrIntOverflowBep
  4007. }
  4008. if iNdEx >= l {
  4009. return io.ErrUnexpectedEOF
  4010. }
  4011. b := dAtA[iNdEx]
  4012. iNdEx++
  4013. wire |= uint64(b&0x7F) << shift
  4014. if b < 0x80 {
  4015. break
  4016. }
  4017. }
  4018. fieldNum := int32(wire >> 3)
  4019. wireType := int(wire & 0x7)
  4020. if wireType == 4 {
  4021. return fmt.Errorf("proto: Counter: wiretype end group for non-group")
  4022. }
  4023. if fieldNum <= 0 {
  4024. return fmt.Errorf("proto: Counter: illegal tag %d (wire type %d)", fieldNum, wire)
  4025. }
  4026. switch fieldNum {
  4027. case 1:
  4028. if wireType != 0 {
  4029. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4030. }
  4031. m.ID = 0
  4032. for shift := uint(0); ; shift += 7 {
  4033. if shift >= 64 {
  4034. return ErrIntOverflowBep
  4035. }
  4036. if iNdEx >= l {
  4037. return io.ErrUnexpectedEOF
  4038. }
  4039. b := dAtA[iNdEx]
  4040. iNdEx++
  4041. m.ID |= ShortID(b&0x7F) << shift
  4042. if b < 0x80 {
  4043. break
  4044. }
  4045. }
  4046. case 2:
  4047. if wireType != 0 {
  4048. return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
  4049. }
  4050. m.Value = 0
  4051. for shift := uint(0); ; shift += 7 {
  4052. if shift >= 64 {
  4053. return ErrIntOverflowBep
  4054. }
  4055. if iNdEx >= l {
  4056. return io.ErrUnexpectedEOF
  4057. }
  4058. b := dAtA[iNdEx]
  4059. iNdEx++
  4060. m.Value |= uint64(b&0x7F) << shift
  4061. if b < 0x80 {
  4062. break
  4063. }
  4064. }
  4065. default:
  4066. iNdEx = preIndex
  4067. skippy, err := skipBep(dAtA[iNdEx:])
  4068. if err != nil {
  4069. return err
  4070. }
  4071. if skippy < 0 {
  4072. return ErrInvalidLengthBep
  4073. }
  4074. if (iNdEx + skippy) < 0 {
  4075. return ErrInvalidLengthBep
  4076. }
  4077. if (iNdEx + skippy) > l {
  4078. return io.ErrUnexpectedEOF
  4079. }
  4080. iNdEx += skippy
  4081. }
  4082. }
  4083. if iNdEx > l {
  4084. return io.ErrUnexpectedEOF
  4085. }
  4086. return nil
  4087. }
  4088. func (m *Request) Unmarshal(dAtA []byte) error {
  4089. l := len(dAtA)
  4090. iNdEx := 0
  4091. for iNdEx < l {
  4092. preIndex := iNdEx
  4093. var wire uint64
  4094. for shift := uint(0); ; shift += 7 {
  4095. if shift >= 64 {
  4096. return ErrIntOverflowBep
  4097. }
  4098. if iNdEx >= l {
  4099. return io.ErrUnexpectedEOF
  4100. }
  4101. b := dAtA[iNdEx]
  4102. iNdEx++
  4103. wire |= uint64(b&0x7F) << shift
  4104. if b < 0x80 {
  4105. break
  4106. }
  4107. }
  4108. fieldNum := int32(wire >> 3)
  4109. wireType := int(wire & 0x7)
  4110. if wireType == 4 {
  4111. return fmt.Errorf("proto: Request: wiretype end group for non-group")
  4112. }
  4113. if fieldNum <= 0 {
  4114. return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire)
  4115. }
  4116. switch fieldNum {
  4117. case 1:
  4118. if wireType != 0 {
  4119. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4120. }
  4121. m.ID = 0
  4122. for shift := uint(0); ; shift += 7 {
  4123. if shift >= 64 {
  4124. return ErrIntOverflowBep
  4125. }
  4126. if iNdEx >= l {
  4127. return io.ErrUnexpectedEOF
  4128. }
  4129. b := dAtA[iNdEx]
  4130. iNdEx++
  4131. m.ID |= int32(b&0x7F) << shift
  4132. if b < 0x80 {
  4133. break
  4134. }
  4135. }
  4136. case 2:
  4137. if wireType != 2 {
  4138. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  4139. }
  4140. var stringLen uint64
  4141. for shift := uint(0); ; shift += 7 {
  4142. if shift >= 64 {
  4143. return ErrIntOverflowBep
  4144. }
  4145. if iNdEx >= l {
  4146. return io.ErrUnexpectedEOF
  4147. }
  4148. b := dAtA[iNdEx]
  4149. iNdEx++
  4150. stringLen |= uint64(b&0x7F) << shift
  4151. if b < 0x80 {
  4152. break
  4153. }
  4154. }
  4155. intStringLen := int(stringLen)
  4156. if intStringLen < 0 {
  4157. return ErrInvalidLengthBep
  4158. }
  4159. postIndex := iNdEx + intStringLen
  4160. if postIndex < 0 {
  4161. return ErrInvalidLengthBep
  4162. }
  4163. if postIndex > l {
  4164. return io.ErrUnexpectedEOF
  4165. }
  4166. m.Folder = string(dAtA[iNdEx:postIndex])
  4167. iNdEx = postIndex
  4168. case 3:
  4169. if wireType != 2 {
  4170. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  4171. }
  4172. var stringLen uint64
  4173. for shift := uint(0); ; shift += 7 {
  4174. if shift >= 64 {
  4175. return ErrIntOverflowBep
  4176. }
  4177. if iNdEx >= l {
  4178. return io.ErrUnexpectedEOF
  4179. }
  4180. b := dAtA[iNdEx]
  4181. iNdEx++
  4182. stringLen |= uint64(b&0x7F) << shift
  4183. if b < 0x80 {
  4184. break
  4185. }
  4186. }
  4187. intStringLen := int(stringLen)
  4188. if intStringLen < 0 {
  4189. return ErrInvalidLengthBep
  4190. }
  4191. postIndex := iNdEx + intStringLen
  4192. if postIndex < 0 {
  4193. return ErrInvalidLengthBep
  4194. }
  4195. if postIndex > l {
  4196. return io.ErrUnexpectedEOF
  4197. }
  4198. m.Name = string(dAtA[iNdEx:postIndex])
  4199. iNdEx = postIndex
  4200. case 4:
  4201. if wireType != 0 {
  4202. return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType)
  4203. }
  4204. m.Offset = 0
  4205. for shift := uint(0); ; shift += 7 {
  4206. if shift >= 64 {
  4207. return ErrIntOverflowBep
  4208. }
  4209. if iNdEx >= l {
  4210. return io.ErrUnexpectedEOF
  4211. }
  4212. b := dAtA[iNdEx]
  4213. iNdEx++
  4214. m.Offset |= int64(b&0x7F) << shift
  4215. if b < 0x80 {
  4216. break
  4217. }
  4218. }
  4219. case 5:
  4220. if wireType != 0 {
  4221. return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType)
  4222. }
  4223. m.Size = 0
  4224. for shift := uint(0); ; shift += 7 {
  4225. if shift >= 64 {
  4226. return ErrIntOverflowBep
  4227. }
  4228. if iNdEx >= l {
  4229. return io.ErrUnexpectedEOF
  4230. }
  4231. b := dAtA[iNdEx]
  4232. iNdEx++
  4233. m.Size |= int32(b&0x7F) << shift
  4234. if b < 0x80 {
  4235. break
  4236. }
  4237. }
  4238. case 6:
  4239. if wireType != 2 {
  4240. return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType)
  4241. }
  4242. var byteLen int
  4243. for shift := uint(0); ; shift += 7 {
  4244. if shift >= 64 {
  4245. return ErrIntOverflowBep
  4246. }
  4247. if iNdEx >= l {
  4248. return io.ErrUnexpectedEOF
  4249. }
  4250. b := dAtA[iNdEx]
  4251. iNdEx++
  4252. byteLen |= int(b&0x7F) << shift
  4253. if b < 0x80 {
  4254. break
  4255. }
  4256. }
  4257. if byteLen < 0 {
  4258. return ErrInvalidLengthBep
  4259. }
  4260. postIndex := iNdEx + byteLen
  4261. if postIndex < 0 {
  4262. return ErrInvalidLengthBep
  4263. }
  4264. if postIndex > l {
  4265. return io.ErrUnexpectedEOF
  4266. }
  4267. m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...)
  4268. if m.Hash == nil {
  4269. m.Hash = []byte{}
  4270. }
  4271. iNdEx = postIndex
  4272. case 7:
  4273. if wireType != 0 {
  4274. return fmt.Errorf("proto: wrong wireType = %d for field FromTemporary", wireType)
  4275. }
  4276. var v int
  4277. for shift := uint(0); ; shift += 7 {
  4278. if shift >= 64 {
  4279. return ErrIntOverflowBep
  4280. }
  4281. if iNdEx >= l {
  4282. return io.ErrUnexpectedEOF
  4283. }
  4284. b := dAtA[iNdEx]
  4285. iNdEx++
  4286. v |= int(b&0x7F) << shift
  4287. if b < 0x80 {
  4288. break
  4289. }
  4290. }
  4291. m.FromTemporary = bool(v != 0)
  4292. case 8:
  4293. if wireType != 0 {
  4294. return fmt.Errorf("proto: wrong wireType = %d for field WeakHash", wireType)
  4295. }
  4296. m.WeakHash = 0
  4297. for shift := uint(0); ; shift += 7 {
  4298. if shift >= 64 {
  4299. return ErrIntOverflowBep
  4300. }
  4301. if iNdEx >= l {
  4302. return io.ErrUnexpectedEOF
  4303. }
  4304. b := dAtA[iNdEx]
  4305. iNdEx++
  4306. m.WeakHash |= uint32(b&0x7F) << shift
  4307. if b < 0x80 {
  4308. break
  4309. }
  4310. }
  4311. default:
  4312. iNdEx = preIndex
  4313. skippy, err := skipBep(dAtA[iNdEx:])
  4314. if err != nil {
  4315. return err
  4316. }
  4317. if skippy < 0 {
  4318. return ErrInvalidLengthBep
  4319. }
  4320. if (iNdEx + skippy) < 0 {
  4321. return ErrInvalidLengthBep
  4322. }
  4323. if (iNdEx + skippy) > l {
  4324. return io.ErrUnexpectedEOF
  4325. }
  4326. iNdEx += skippy
  4327. }
  4328. }
  4329. if iNdEx > l {
  4330. return io.ErrUnexpectedEOF
  4331. }
  4332. return nil
  4333. }
  4334. func (m *Response) Unmarshal(dAtA []byte) error {
  4335. l := len(dAtA)
  4336. iNdEx := 0
  4337. for iNdEx < l {
  4338. preIndex := iNdEx
  4339. var wire uint64
  4340. for shift := uint(0); ; shift += 7 {
  4341. if shift >= 64 {
  4342. return ErrIntOverflowBep
  4343. }
  4344. if iNdEx >= l {
  4345. return io.ErrUnexpectedEOF
  4346. }
  4347. b := dAtA[iNdEx]
  4348. iNdEx++
  4349. wire |= uint64(b&0x7F) << shift
  4350. if b < 0x80 {
  4351. break
  4352. }
  4353. }
  4354. fieldNum := int32(wire >> 3)
  4355. wireType := int(wire & 0x7)
  4356. if wireType == 4 {
  4357. return fmt.Errorf("proto: Response: wiretype end group for non-group")
  4358. }
  4359. if fieldNum <= 0 {
  4360. return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire)
  4361. }
  4362. switch fieldNum {
  4363. case 1:
  4364. if wireType != 0 {
  4365. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  4366. }
  4367. m.ID = 0
  4368. for shift := uint(0); ; shift += 7 {
  4369. if shift >= 64 {
  4370. return ErrIntOverflowBep
  4371. }
  4372. if iNdEx >= l {
  4373. return io.ErrUnexpectedEOF
  4374. }
  4375. b := dAtA[iNdEx]
  4376. iNdEx++
  4377. m.ID |= int32(b&0x7F) << shift
  4378. if b < 0x80 {
  4379. break
  4380. }
  4381. }
  4382. case 2:
  4383. if wireType != 2 {
  4384. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  4385. }
  4386. var byteLen int
  4387. for shift := uint(0); ; shift += 7 {
  4388. if shift >= 64 {
  4389. return ErrIntOverflowBep
  4390. }
  4391. if iNdEx >= l {
  4392. return io.ErrUnexpectedEOF
  4393. }
  4394. b := dAtA[iNdEx]
  4395. iNdEx++
  4396. byteLen |= int(b&0x7F) << shift
  4397. if b < 0x80 {
  4398. break
  4399. }
  4400. }
  4401. if byteLen < 0 {
  4402. return ErrInvalidLengthBep
  4403. }
  4404. postIndex := iNdEx + byteLen
  4405. if postIndex < 0 {
  4406. return ErrInvalidLengthBep
  4407. }
  4408. if postIndex > l {
  4409. return io.ErrUnexpectedEOF
  4410. }
  4411. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  4412. if m.Data == nil {
  4413. m.Data = []byte{}
  4414. }
  4415. iNdEx = postIndex
  4416. case 3:
  4417. if wireType != 0 {
  4418. return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  4419. }
  4420. m.Code = 0
  4421. for shift := uint(0); ; shift += 7 {
  4422. if shift >= 64 {
  4423. return ErrIntOverflowBep
  4424. }
  4425. if iNdEx >= l {
  4426. return io.ErrUnexpectedEOF
  4427. }
  4428. b := dAtA[iNdEx]
  4429. iNdEx++
  4430. m.Code |= ErrorCode(b&0x7F) << shift
  4431. if b < 0x80 {
  4432. break
  4433. }
  4434. }
  4435. default:
  4436. iNdEx = preIndex
  4437. skippy, err := skipBep(dAtA[iNdEx:])
  4438. if err != nil {
  4439. return err
  4440. }
  4441. if skippy < 0 {
  4442. return ErrInvalidLengthBep
  4443. }
  4444. if (iNdEx + skippy) < 0 {
  4445. return ErrInvalidLengthBep
  4446. }
  4447. if (iNdEx + skippy) > l {
  4448. return io.ErrUnexpectedEOF
  4449. }
  4450. iNdEx += skippy
  4451. }
  4452. }
  4453. if iNdEx > l {
  4454. return io.ErrUnexpectedEOF
  4455. }
  4456. return nil
  4457. }
  4458. func (m *DownloadProgress) Unmarshal(dAtA []byte) error {
  4459. l := len(dAtA)
  4460. iNdEx := 0
  4461. for iNdEx < l {
  4462. preIndex := iNdEx
  4463. var wire uint64
  4464. for shift := uint(0); ; shift += 7 {
  4465. if shift >= 64 {
  4466. return ErrIntOverflowBep
  4467. }
  4468. if iNdEx >= l {
  4469. return io.ErrUnexpectedEOF
  4470. }
  4471. b := dAtA[iNdEx]
  4472. iNdEx++
  4473. wire |= uint64(b&0x7F) << shift
  4474. if b < 0x80 {
  4475. break
  4476. }
  4477. }
  4478. fieldNum := int32(wire >> 3)
  4479. wireType := int(wire & 0x7)
  4480. if wireType == 4 {
  4481. return fmt.Errorf("proto: DownloadProgress: wiretype end group for non-group")
  4482. }
  4483. if fieldNum <= 0 {
  4484. return fmt.Errorf("proto: DownloadProgress: illegal tag %d (wire type %d)", fieldNum, wire)
  4485. }
  4486. switch fieldNum {
  4487. case 1:
  4488. if wireType != 2 {
  4489. return fmt.Errorf("proto: wrong wireType = %d for field Folder", wireType)
  4490. }
  4491. var stringLen uint64
  4492. for shift := uint(0); ; shift += 7 {
  4493. if shift >= 64 {
  4494. return ErrIntOverflowBep
  4495. }
  4496. if iNdEx >= l {
  4497. return io.ErrUnexpectedEOF
  4498. }
  4499. b := dAtA[iNdEx]
  4500. iNdEx++
  4501. stringLen |= uint64(b&0x7F) << shift
  4502. if b < 0x80 {
  4503. break
  4504. }
  4505. }
  4506. intStringLen := int(stringLen)
  4507. if intStringLen < 0 {
  4508. return ErrInvalidLengthBep
  4509. }
  4510. postIndex := iNdEx + intStringLen
  4511. if postIndex < 0 {
  4512. return ErrInvalidLengthBep
  4513. }
  4514. if postIndex > l {
  4515. return io.ErrUnexpectedEOF
  4516. }
  4517. m.Folder = string(dAtA[iNdEx:postIndex])
  4518. iNdEx = postIndex
  4519. case 2:
  4520. if wireType != 2 {
  4521. return fmt.Errorf("proto: wrong wireType = %d for field Updates", wireType)
  4522. }
  4523. var msglen int
  4524. for shift := uint(0); ; shift += 7 {
  4525. if shift >= 64 {
  4526. return ErrIntOverflowBep
  4527. }
  4528. if iNdEx >= l {
  4529. return io.ErrUnexpectedEOF
  4530. }
  4531. b := dAtA[iNdEx]
  4532. iNdEx++
  4533. msglen |= int(b&0x7F) << shift
  4534. if b < 0x80 {
  4535. break
  4536. }
  4537. }
  4538. if msglen < 0 {
  4539. return ErrInvalidLengthBep
  4540. }
  4541. postIndex := iNdEx + msglen
  4542. if postIndex < 0 {
  4543. return ErrInvalidLengthBep
  4544. }
  4545. if postIndex > l {
  4546. return io.ErrUnexpectedEOF
  4547. }
  4548. m.Updates = append(m.Updates, FileDownloadProgressUpdate{})
  4549. if err := m.Updates[len(m.Updates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4550. return err
  4551. }
  4552. iNdEx = postIndex
  4553. default:
  4554. iNdEx = preIndex
  4555. skippy, err := skipBep(dAtA[iNdEx:])
  4556. if err != nil {
  4557. return err
  4558. }
  4559. if skippy < 0 {
  4560. return ErrInvalidLengthBep
  4561. }
  4562. if (iNdEx + skippy) < 0 {
  4563. return ErrInvalidLengthBep
  4564. }
  4565. if (iNdEx + skippy) > l {
  4566. return io.ErrUnexpectedEOF
  4567. }
  4568. iNdEx += skippy
  4569. }
  4570. }
  4571. if iNdEx > l {
  4572. return io.ErrUnexpectedEOF
  4573. }
  4574. return nil
  4575. }
  4576. func (m *FileDownloadProgressUpdate) Unmarshal(dAtA []byte) error {
  4577. l := len(dAtA)
  4578. iNdEx := 0
  4579. for iNdEx < l {
  4580. preIndex := iNdEx
  4581. var wire uint64
  4582. for shift := uint(0); ; shift += 7 {
  4583. if shift >= 64 {
  4584. return ErrIntOverflowBep
  4585. }
  4586. if iNdEx >= l {
  4587. return io.ErrUnexpectedEOF
  4588. }
  4589. b := dAtA[iNdEx]
  4590. iNdEx++
  4591. wire |= uint64(b&0x7F) << shift
  4592. if b < 0x80 {
  4593. break
  4594. }
  4595. }
  4596. fieldNum := int32(wire >> 3)
  4597. wireType := int(wire & 0x7)
  4598. if wireType == 4 {
  4599. return fmt.Errorf("proto: FileDownloadProgressUpdate: wiretype end group for non-group")
  4600. }
  4601. if fieldNum <= 0 {
  4602. return fmt.Errorf("proto: FileDownloadProgressUpdate: illegal tag %d (wire type %d)", fieldNum, wire)
  4603. }
  4604. switch fieldNum {
  4605. case 1:
  4606. if wireType != 0 {
  4607. return fmt.Errorf("proto: wrong wireType = %d for field UpdateType", wireType)
  4608. }
  4609. m.UpdateType = 0
  4610. for shift := uint(0); ; shift += 7 {
  4611. if shift >= 64 {
  4612. return ErrIntOverflowBep
  4613. }
  4614. if iNdEx >= l {
  4615. return io.ErrUnexpectedEOF
  4616. }
  4617. b := dAtA[iNdEx]
  4618. iNdEx++
  4619. m.UpdateType |= FileDownloadProgressUpdateType(b&0x7F) << shift
  4620. if b < 0x80 {
  4621. break
  4622. }
  4623. }
  4624. case 2:
  4625. if wireType != 2 {
  4626. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  4627. }
  4628. var stringLen uint64
  4629. for shift := uint(0); ; shift += 7 {
  4630. if shift >= 64 {
  4631. return ErrIntOverflowBep
  4632. }
  4633. if iNdEx >= l {
  4634. return io.ErrUnexpectedEOF
  4635. }
  4636. b := dAtA[iNdEx]
  4637. iNdEx++
  4638. stringLen |= uint64(b&0x7F) << shift
  4639. if b < 0x80 {
  4640. break
  4641. }
  4642. }
  4643. intStringLen := int(stringLen)
  4644. if intStringLen < 0 {
  4645. return ErrInvalidLengthBep
  4646. }
  4647. postIndex := iNdEx + intStringLen
  4648. if postIndex < 0 {
  4649. return ErrInvalidLengthBep
  4650. }
  4651. if postIndex > l {
  4652. return io.ErrUnexpectedEOF
  4653. }
  4654. m.Name = string(dAtA[iNdEx:postIndex])
  4655. iNdEx = postIndex
  4656. case 3:
  4657. if wireType != 2 {
  4658. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  4659. }
  4660. var msglen int
  4661. for shift := uint(0); ; shift += 7 {
  4662. if shift >= 64 {
  4663. return ErrIntOverflowBep
  4664. }
  4665. if iNdEx >= l {
  4666. return io.ErrUnexpectedEOF
  4667. }
  4668. b := dAtA[iNdEx]
  4669. iNdEx++
  4670. msglen |= int(b&0x7F) << shift
  4671. if b < 0x80 {
  4672. break
  4673. }
  4674. }
  4675. if msglen < 0 {
  4676. return ErrInvalidLengthBep
  4677. }
  4678. postIndex := iNdEx + msglen
  4679. if postIndex < 0 {
  4680. return ErrInvalidLengthBep
  4681. }
  4682. if postIndex > l {
  4683. return io.ErrUnexpectedEOF
  4684. }
  4685. if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4686. return err
  4687. }
  4688. iNdEx = postIndex
  4689. case 4:
  4690. if wireType == 0 {
  4691. var v int32
  4692. for shift := uint(0); ; shift += 7 {
  4693. if shift >= 64 {
  4694. return ErrIntOverflowBep
  4695. }
  4696. if iNdEx >= l {
  4697. return io.ErrUnexpectedEOF
  4698. }
  4699. b := dAtA[iNdEx]
  4700. iNdEx++
  4701. v |= int32(b&0x7F) << shift
  4702. if b < 0x80 {
  4703. break
  4704. }
  4705. }
  4706. m.BlockIndexes = append(m.BlockIndexes, v)
  4707. } else if wireType == 2 {
  4708. var packedLen int
  4709. for shift := uint(0); ; shift += 7 {
  4710. if shift >= 64 {
  4711. return ErrIntOverflowBep
  4712. }
  4713. if iNdEx >= l {
  4714. return io.ErrUnexpectedEOF
  4715. }
  4716. b := dAtA[iNdEx]
  4717. iNdEx++
  4718. packedLen |= int(b&0x7F) << shift
  4719. if b < 0x80 {
  4720. break
  4721. }
  4722. }
  4723. if packedLen < 0 {
  4724. return ErrInvalidLengthBep
  4725. }
  4726. postIndex := iNdEx + packedLen
  4727. if postIndex < 0 {
  4728. return ErrInvalidLengthBep
  4729. }
  4730. if postIndex > l {
  4731. return io.ErrUnexpectedEOF
  4732. }
  4733. var elementCount int
  4734. var count int
  4735. for _, integer := range dAtA[iNdEx:postIndex] {
  4736. if integer < 128 {
  4737. count++
  4738. }
  4739. }
  4740. elementCount = count
  4741. if elementCount != 0 && len(m.BlockIndexes) == 0 {
  4742. m.BlockIndexes = make([]int32, 0, elementCount)
  4743. }
  4744. for iNdEx < postIndex {
  4745. var v int32
  4746. for shift := uint(0); ; shift += 7 {
  4747. if shift >= 64 {
  4748. return ErrIntOverflowBep
  4749. }
  4750. if iNdEx >= l {
  4751. return io.ErrUnexpectedEOF
  4752. }
  4753. b := dAtA[iNdEx]
  4754. iNdEx++
  4755. v |= int32(b&0x7F) << shift
  4756. if b < 0x80 {
  4757. break
  4758. }
  4759. }
  4760. m.BlockIndexes = append(m.BlockIndexes, v)
  4761. }
  4762. } else {
  4763. return fmt.Errorf("proto: wrong wireType = %d for field BlockIndexes", wireType)
  4764. }
  4765. case 5:
  4766. if wireType != 0 {
  4767. return fmt.Errorf("proto: wrong wireType = %d for field BlockSize", wireType)
  4768. }
  4769. m.BlockSize = 0
  4770. for shift := uint(0); ; shift += 7 {
  4771. if shift >= 64 {
  4772. return ErrIntOverflowBep
  4773. }
  4774. if iNdEx >= l {
  4775. return io.ErrUnexpectedEOF
  4776. }
  4777. b := dAtA[iNdEx]
  4778. iNdEx++
  4779. m.BlockSize |= int32(b&0x7F) << shift
  4780. if b < 0x80 {
  4781. break
  4782. }
  4783. }
  4784. default:
  4785. iNdEx = preIndex
  4786. skippy, err := skipBep(dAtA[iNdEx:])
  4787. if err != nil {
  4788. return err
  4789. }
  4790. if skippy < 0 {
  4791. return ErrInvalidLengthBep
  4792. }
  4793. if (iNdEx + skippy) < 0 {
  4794. return ErrInvalidLengthBep
  4795. }
  4796. if (iNdEx + skippy) > l {
  4797. return io.ErrUnexpectedEOF
  4798. }
  4799. iNdEx += skippy
  4800. }
  4801. }
  4802. if iNdEx > l {
  4803. return io.ErrUnexpectedEOF
  4804. }
  4805. return nil
  4806. }
  4807. func (m *Ping) Unmarshal(dAtA []byte) error {
  4808. l := len(dAtA)
  4809. iNdEx := 0
  4810. for iNdEx < l {
  4811. preIndex := iNdEx
  4812. var wire uint64
  4813. for shift := uint(0); ; shift += 7 {
  4814. if shift >= 64 {
  4815. return ErrIntOverflowBep
  4816. }
  4817. if iNdEx >= l {
  4818. return io.ErrUnexpectedEOF
  4819. }
  4820. b := dAtA[iNdEx]
  4821. iNdEx++
  4822. wire |= uint64(b&0x7F) << shift
  4823. if b < 0x80 {
  4824. break
  4825. }
  4826. }
  4827. fieldNum := int32(wire >> 3)
  4828. wireType := int(wire & 0x7)
  4829. if wireType == 4 {
  4830. return fmt.Errorf("proto: Ping: wiretype end group for non-group")
  4831. }
  4832. if fieldNum <= 0 {
  4833. return fmt.Errorf("proto: Ping: illegal tag %d (wire type %d)", fieldNum, wire)
  4834. }
  4835. switch fieldNum {
  4836. default:
  4837. iNdEx = preIndex
  4838. skippy, err := skipBep(dAtA[iNdEx:])
  4839. if err != nil {
  4840. return err
  4841. }
  4842. if skippy < 0 {
  4843. return ErrInvalidLengthBep
  4844. }
  4845. if (iNdEx + skippy) < 0 {
  4846. return ErrInvalidLengthBep
  4847. }
  4848. if (iNdEx + skippy) > l {
  4849. return io.ErrUnexpectedEOF
  4850. }
  4851. iNdEx += skippy
  4852. }
  4853. }
  4854. if iNdEx > l {
  4855. return io.ErrUnexpectedEOF
  4856. }
  4857. return nil
  4858. }
  4859. func (m *Close) Unmarshal(dAtA []byte) error {
  4860. l := len(dAtA)
  4861. iNdEx := 0
  4862. for iNdEx < l {
  4863. preIndex := iNdEx
  4864. var wire uint64
  4865. for shift := uint(0); ; shift += 7 {
  4866. if shift >= 64 {
  4867. return ErrIntOverflowBep
  4868. }
  4869. if iNdEx >= l {
  4870. return io.ErrUnexpectedEOF
  4871. }
  4872. b := dAtA[iNdEx]
  4873. iNdEx++
  4874. wire |= uint64(b&0x7F) << shift
  4875. if b < 0x80 {
  4876. break
  4877. }
  4878. }
  4879. fieldNum := int32(wire >> 3)
  4880. wireType := int(wire & 0x7)
  4881. if wireType == 4 {
  4882. return fmt.Errorf("proto: Close: wiretype end group for non-group")
  4883. }
  4884. if fieldNum <= 0 {
  4885. return fmt.Errorf("proto: Close: illegal tag %d (wire type %d)", fieldNum, wire)
  4886. }
  4887. switch fieldNum {
  4888. case 1:
  4889. if wireType != 2 {
  4890. return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType)
  4891. }
  4892. var stringLen uint64
  4893. for shift := uint(0); ; shift += 7 {
  4894. if shift >= 64 {
  4895. return ErrIntOverflowBep
  4896. }
  4897. if iNdEx >= l {
  4898. return io.ErrUnexpectedEOF
  4899. }
  4900. b := dAtA[iNdEx]
  4901. iNdEx++
  4902. stringLen |= uint64(b&0x7F) << shift
  4903. if b < 0x80 {
  4904. break
  4905. }
  4906. }
  4907. intStringLen := int(stringLen)
  4908. if intStringLen < 0 {
  4909. return ErrInvalidLengthBep
  4910. }
  4911. postIndex := iNdEx + intStringLen
  4912. if postIndex < 0 {
  4913. return ErrInvalidLengthBep
  4914. }
  4915. if postIndex > l {
  4916. return io.ErrUnexpectedEOF
  4917. }
  4918. m.Reason = string(dAtA[iNdEx:postIndex])
  4919. iNdEx = postIndex
  4920. default:
  4921. iNdEx = preIndex
  4922. skippy, err := skipBep(dAtA[iNdEx:])
  4923. if err != nil {
  4924. return err
  4925. }
  4926. if skippy < 0 {
  4927. return ErrInvalidLengthBep
  4928. }
  4929. if (iNdEx + skippy) < 0 {
  4930. return ErrInvalidLengthBep
  4931. }
  4932. if (iNdEx + skippy) > l {
  4933. return io.ErrUnexpectedEOF
  4934. }
  4935. iNdEx += skippy
  4936. }
  4937. }
  4938. if iNdEx > l {
  4939. return io.ErrUnexpectedEOF
  4940. }
  4941. return nil
  4942. }
  4943. func skipBep(dAtA []byte) (n int, err error) {
  4944. l := len(dAtA)
  4945. iNdEx := 0
  4946. depth := 0
  4947. for iNdEx < l {
  4948. var wire uint64
  4949. for shift := uint(0); ; shift += 7 {
  4950. if shift >= 64 {
  4951. return 0, ErrIntOverflowBep
  4952. }
  4953. if iNdEx >= l {
  4954. return 0, io.ErrUnexpectedEOF
  4955. }
  4956. b := dAtA[iNdEx]
  4957. iNdEx++
  4958. wire |= (uint64(b) & 0x7F) << shift
  4959. if b < 0x80 {
  4960. break
  4961. }
  4962. }
  4963. wireType := int(wire & 0x7)
  4964. switch wireType {
  4965. case 0:
  4966. for shift := uint(0); ; shift += 7 {
  4967. if shift >= 64 {
  4968. return 0, ErrIntOverflowBep
  4969. }
  4970. if iNdEx >= l {
  4971. return 0, io.ErrUnexpectedEOF
  4972. }
  4973. iNdEx++
  4974. if dAtA[iNdEx-1] < 0x80 {
  4975. break
  4976. }
  4977. }
  4978. case 1:
  4979. iNdEx += 8
  4980. case 2:
  4981. var length int
  4982. for shift := uint(0); ; shift += 7 {
  4983. if shift >= 64 {
  4984. return 0, ErrIntOverflowBep
  4985. }
  4986. if iNdEx >= l {
  4987. return 0, io.ErrUnexpectedEOF
  4988. }
  4989. b := dAtA[iNdEx]
  4990. iNdEx++
  4991. length |= (int(b) & 0x7F) << shift
  4992. if b < 0x80 {
  4993. break
  4994. }
  4995. }
  4996. if length < 0 {
  4997. return 0, ErrInvalidLengthBep
  4998. }
  4999. iNdEx += length
  5000. case 3:
  5001. depth++
  5002. case 4:
  5003. if depth == 0 {
  5004. return 0, ErrUnexpectedEndOfGroupBep
  5005. }
  5006. depth--
  5007. case 5:
  5008. iNdEx += 4
  5009. default:
  5010. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  5011. }
  5012. if iNdEx < 0 {
  5013. return 0, ErrInvalidLengthBep
  5014. }
  5015. if depth == 0 {
  5016. return iNdEx, nil
  5017. }
  5018. }
  5019. return 0, io.ErrUnexpectedEOF
  5020. }
  5021. var (
  5022. ErrInvalidLengthBep = fmt.Errorf("proto: negative length found during unmarshaling")
  5023. ErrIntOverflowBep = fmt.Errorf("proto: integer overflow")
  5024. ErrUnexpectedEndOfGroupBep = fmt.Errorf("proto: unexpected end of group")
  5025. )