specs.pb.go 160 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277
  1. // Code generated by protoc-gen-gogo.
  2. // source: specs.proto
  3. // DO NOT EDIT!
  4. package api
  5. import proto "github.com/gogo/protobuf/proto"
  6. import fmt "fmt"
  7. import math "math"
  8. import _ "github.com/gogo/protobuf/gogoproto"
  9. import google_protobuf1 "github.com/gogo/protobuf/types"
  10. import google_protobuf3 "github.com/gogo/protobuf/types"
  11. import github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
  12. import strings "strings"
  13. import reflect "reflect"
  14. import github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
  15. import io "io"
  16. // Reference imports to suppress errors if they are not otherwise used.
  17. var _ = proto.Marshal
  18. var _ = fmt.Errorf
  19. var _ = math.Inf
  20. type NodeSpec_Membership int32
  21. const (
  22. NodeMembershipPending NodeSpec_Membership = 0
  23. NodeMembershipAccepted NodeSpec_Membership = 1
  24. )
  25. var NodeSpec_Membership_name = map[int32]string{
  26. 0: "PENDING",
  27. 1: "ACCEPTED",
  28. }
  29. var NodeSpec_Membership_value = map[string]int32{
  30. "PENDING": 0,
  31. "ACCEPTED": 1,
  32. }
  33. func (x NodeSpec_Membership) String() string {
  34. return proto.EnumName(NodeSpec_Membership_name, int32(x))
  35. }
  36. func (NodeSpec_Membership) EnumDescriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{0, 0} }
  37. type NodeSpec_Availability int32
  38. const (
  39. // Active nodes.
  40. NodeAvailabilityActive NodeSpec_Availability = 0
  41. // Paused nodes won't be considered by the scheduler, preventing any
  42. // further task to run on them.
  43. NodeAvailabilityPause NodeSpec_Availability = 1
  44. // Drained nodes are paused and any task already running on them will
  45. // be evicted.
  46. NodeAvailabilityDrain NodeSpec_Availability = 2
  47. )
  48. var NodeSpec_Availability_name = map[int32]string{
  49. 0: "ACTIVE",
  50. 1: "PAUSE",
  51. 2: "DRAIN",
  52. }
  53. var NodeSpec_Availability_value = map[string]int32{
  54. "ACTIVE": 0,
  55. "PAUSE": 1,
  56. "DRAIN": 2,
  57. }
  58. func (x NodeSpec_Availability) String() string {
  59. return proto.EnumName(NodeSpec_Availability_name, int32(x))
  60. }
  61. func (NodeSpec_Availability) EnumDescriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{0, 1} }
  62. // ResolutionMode specifies the mode of resolution to use for
  63. // internal loadbalancing between tasks which are all within
  64. // the cluster. This is sometimes calls east-west data path.
  65. type EndpointSpec_ResolutionMode int32
  66. const (
  67. // VIP resolution mode specifies that the
  68. // service resolves to a logical IP and the requests
  69. // are sent to that logical IP. Packets hitting that
  70. // logical IP are load balanced to a chosen backend.
  71. ResolutionModeVirtualIP EndpointSpec_ResolutionMode = 0
  72. // DNSRR resolution mode specifies that the
  73. // service directly gets resolved to one of the
  74. // backend IP and the client directly initiates a
  75. // request towards the actual backend. This requires
  76. // that the client does not cache the DNS responses
  77. // when the DNS response TTL is 0.
  78. ResolutionModeDNSRoundRobin EndpointSpec_ResolutionMode = 1
  79. )
  80. var EndpointSpec_ResolutionMode_name = map[int32]string{
  81. 0: "VIP",
  82. 1: "DNSRR",
  83. }
  84. var EndpointSpec_ResolutionMode_value = map[string]int32{
  85. "VIP": 0,
  86. "DNSRR": 1,
  87. }
  88. func (x EndpointSpec_ResolutionMode) String() string {
  89. return proto.EnumName(EndpointSpec_ResolutionMode_name, int32(x))
  90. }
  91. func (EndpointSpec_ResolutionMode) EnumDescriptor() ([]byte, []int) {
  92. return fileDescriptorSpecs, []int{8, 0}
  93. }
  94. type NodeSpec struct {
  95. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  96. // DesiredRole defines the role the node should have.
  97. DesiredRole NodeRole `protobuf:"varint,2,opt,name=desired_role,json=desiredRole,proto3,enum=docker.swarmkit.v1.NodeRole" json:"desired_role,omitempty"`
  98. // Membership controls the admission of the node into the cluster.
  99. Membership NodeSpec_Membership `protobuf:"varint,3,opt,name=membership,proto3,enum=docker.swarmkit.v1.NodeSpec_Membership" json:"membership,omitempty"`
  100. // Availability allows a user to control the current scheduling status of a
  101. // node.
  102. Availability NodeSpec_Availability `protobuf:"varint,4,opt,name=availability,proto3,enum=docker.swarmkit.v1.NodeSpec_Availability" json:"availability,omitempty"`
  103. }
  104. func (m *NodeSpec) Reset() { *m = NodeSpec{} }
  105. func (*NodeSpec) ProtoMessage() {}
  106. func (*NodeSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{0} }
  107. // ServiceSpec defines the properties of a service.
  108. //
  109. // A service instructs the cluster in orchestrating repeated instances of a
  110. // template, implemented as tasks. Based on the number of instances, scheduling
  111. // strategy and restart policy, a number of application-level behaviors can be
  112. // defined.
  113. type ServiceSpec struct {
  114. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  115. // Task defines the task template this service will spawn.
  116. Task TaskSpec `protobuf:"bytes,2,opt,name=task" json:"task"`
  117. // Types that are valid to be assigned to Mode:
  118. // *ServiceSpec_Replicated
  119. // *ServiceSpec_Global
  120. Mode isServiceSpec_Mode `protobuf_oneof:"mode"`
  121. // Update contains settings which affect updates.
  122. Update *UpdateConfig `protobuf:"bytes,6,opt,name=update" json:"update,omitempty"`
  123. // Rollback contains settings which affect rollbacks of updates.
  124. Rollback *UpdateConfig `protobuf:"bytes,9,opt,name=rollback" json:"rollback,omitempty"`
  125. // ServiceSpec.Networks has been deprecated and is replaced by
  126. // Networks field in Task (TaskSpec.Networks).
  127. // This field (ServiceSpec.Networks) is kept for compatibility.
  128. // In case TaskSpec.Networks does not exist, ServiceSpec.Networks
  129. // is still honored if it exists.
  130. Networks []*NetworkAttachmentConfig `protobuf:"bytes,7,rep,name=networks" json:"networks,omitempty"`
  131. // Service endpoint specifies the user provided configuration
  132. // to properly discover and load balance a service.
  133. Endpoint *EndpointSpec `protobuf:"bytes,8,opt,name=endpoint" json:"endpoint,omitempty"`
  134. }
  135. func (m *ServiceSpec) Reset() { *m = ServiceSpec{} }
  136. func (*ServiceSpec) ProtoMessage() {}
  137. func (*ServiceSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{1} }
  138. type isServiceSpec_Mode interface {
  139. isServiceSpec_Mode()
  140. MarshalTo([]byte) (int, error)
  141. Size() int
  142. }
  143. type ServiceSpec_Replicated struct {
  144. Replicated *ReplicatedService `protobuf:"bytes,3,opt,name=replicated,oneof"`
  145. }
  146. type ServiceSpec_Global struct {
  147. Global *GlobalService `protobuf:"bytes,4,opt,name=global,oneof"`
  148. }
  149. func (*ServiceSpec_Replicated) isServiceSpec_Mode() {}
  150. func (*ServiceSpec_Global) isServiceSpec_Mode() {}
  151. func (m *ServiceSpec) GetMode() isServiceSpec_Mode {
  152. if m != nil {
  153. return m.Mode
  154. }
  155. return nil
  156. }
  157. func (m *ServiceSpec) GetReplicated() *ReplicatedService {
  158. if x, ok := m.GetMode().(*ServiceSpec_Replicated); ok {
  159. return x.Replicated
  160. }
  161. return nil
  162. }
  163. func (m *ServiceSpec) GetGlobal() *GlobalService {
  164. if x, ok := m.GetMode().(*ServiceSpec_Global); ok {
  165. return x.Global
  166. }
  167. return nil
  168. }
  169. // XXX_OneofFuncs is for the internal use of the proto package.
  170. func (*ServiceSpec) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  171. return _ServiceSpec_OneofMarshaler, _ServiceSpec_OneofUnmarshaler, _ServiceSpec_OneofSizer, []interface{}{
  172. (*ServiceSpec_Replicated)(nil),
  173. (*ServiceSpec_Global)(nil),
  174. }
  175. }
  176. func _ServiceSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  177. m := msg.(*ServiceSpec)
  178. // mode
  179. switch x := m.Mode.(type) {
  180. case *ServiceSpec_Replicated:
  181. _ = b.EncodeVarint(3<<3 | proto.WireBytes)
  182. if err := b.EncodeMessage(x.Replicated); err != nil {
  183. return err
  184. }
  185. case *ServiceSpec_Global:
  186. _ = b.EncodeVarint(4<<3 | proto.WireBytes)
  187. if err := b.EncodeMessage(x.Global); err != nil {
  188. return err
  189. }
  190. case nil:
  191. default:
  192. return fmt.Errorf("ServiceSpec.Mode has unexpected type %T", x)
  193. }
  194. return nil
  195. }
  196. func _ServiceSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  197. m := msg.(*ServiceSpec)
  198. switch tag {
  199. case 3: // mode.replicated
  200. if wire != proto.WireBytes {
  201. return true, proto.ErrInternalBadWireType
  202. }
  203. msg := new(ReplicatedService)
  204. err := b.DecodeMessage(msg)
  205. m.Mode = &ServiceSpec_Replicated{msg}
  206. return true, err
  207. case 4: // mode.global
  208. if wire != proto.WireBytes {
  209. return true, proto.ErrInternalBadWireType
  210. }
  211. msg := new(GlobalService)
  212. err := b.DecodeMessage(msg)
  213. m.Mode = &ServiceSpec_Global{msg}
  214. return true, err
  215. default:
  216. return false, nil
  217. }
  218. }
  219. func _ServiceSpec_OneofSizer(msg proto.Message) (n int) {
  220. m := msg.(*ServiceSpec)
  221. // mode
  222. switch x := m.Mode.(type) {
  223. case *ServiceSpec_Replicated:
  224. s := proto.Size(x.Replicated)
  225. n += proto.SizeVarint(3<<3 | proto.WireBytes)
  226. n += proto.SizeVarint(uint64(s))
  227. n += s
  228. case *ServiceSpec_Global:
  229. s := proto.Size(x.Global)
  230. n += proto.SizeVarint(4<<3 | proto.WireBytes)
  231. n += proto.SizeVarint(uint64(s))
  232. n += s
  233. case nil:
  234. default:
  235. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  236. }
  237. return n
  238. }
  239. // ReplicatedService sets the reconciliation target to certain number of replicas.
  240. type ReplicatedService struct {
  241. Replicas uint64 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"`
  242. }
  243. func (m *ReplicatedService) Reset() { *m = ReplicatedService{} }
  244. func (*ReplicatedService) ProtoMessage() {}
  245. func (*ReplicatedService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{2} }
  246. // GlobalService represents global service.
  247. type GlobalService struct {
  248. }
  249. func (m *GlobalService) Reset() { *m = GlobalService{} }
  250. func (*GlobalService) ProtoMessage() {}
  251. func (*GlobalService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{3} }
  252. type TaskSpec struct {
  253. // Types that are valid to be assigned to Runtime:
  254. // *TaskSpec_Attachment
  255. // *TaskSpec_Container
  256. // *TaskSpec_Generic
  257. Runtime isTaskSpec_Runtime `protobuf_oneof:"runtime"`
  258. // Resource requirements for the container.
  259. Resources *ResourceRequirements `protobuf:"bytes,2,opt,name=resources" json:"resources,omitempty"`
  260. // RestartPolicy specifies what to do when a task fails or finishes.
  261. Restart *RestartPolicy `protobuf:"bytes,4,opt,name=restart" json:"restart,omitempty"`
  262. // Placement specifies node selection constraints
  263. Placement *Placement `protobuf:"bytes,5,opt,name=placement" json:"placement,omitempty"`
  264. // LogDriver specifies the log driver to use for the task. Any runtime will
  265. // direct logs into the specified driver for the duration of the task.
  266. LogDriver *Driver `protobuf:"bytes,6,opt,name=log_driver,json=logDriver" json:"log_driver,omitempty"`
  267. // Networks specifies the list of network attachment
  268. // configurations (which specify the network and per-network
  269. // aliases) that this task spec is bound to.
  270. Networks []*NetworkAttachmentConfig `protobuf:"bytes,7,rep,name=networks" json:"networks,omitempty"`
  271. // ForceUpdate is a counter that triggers an update even if no relevant
  272. // parameters have been changed. We do this to allow forced restarts
  273. // using the same reconciliation-based mechanism that performs rolling
  274. // updates.
  275. ForceUpdate uint64 `protobuf:"varint,9,opt,name=force_update,json=forceUpdate,proto3" json:"force_update,omitempty"`
  276. }
  277. func (m *TaskSpec) Reset() { *m = TaskSpec{} }
  278. func (*TaskSpec) ProtoMessage() {}
  279. func (*TaskSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{4} }
  280. type isTaskSpec_Runtime interface {
  281. isTaskSpec_Runtime()
  282. MarshalTo([]byte) (int, error)
  283. Size() int
  284. }
  285. type TaskSpec_Attachment struct {
  286. Attachment *NetworkAttachmentSpec `protobuf:"bytes,8,opt,name=attachment,oneof"`
  287. }
  288. type TaskSpec_Container struct {
  289. Container *ContainerSpec `protobuf:"bytes,1,opt,name=container,oneof"`
  290. }
  291. type TaskSpec_Generic struct {
  292. Generic *GenericRuntimeSpec `protobuf:"bytes,10,opt,name=generic,oneof"`
  293. }
  294. func (*TaskSpec_Attachment) isTaskSpec_Runtime() {}
  295. func (*TaskSpec_Container) isTaskSpec_Runtime() {}
  296. func (*TaskSpec_Generic) isTaskSpec_Runtime() {}
  297. func (m *TaskSpec) GetRuntime() isTaskSpec_Runtime {
  298. if m != nil {
  299. return m.Runtime
  300. }
  301. return nil
  302. }
  303. func (m *TaskSpec) GetAttachment() *NetworkAttachmentSpec {
  304. if x, ok := m.GetRuntime().(*TaskSpec_Attachment); ok {
  305. return x.Attachment
  306. }
  307. return nil
  308. }
  309. func (m *TaskSpec) GetContainer() *ContainerSpec {
  310. if x, ok := m.GetRuntime().(*TaskSpec_Container); ok {
  311. return x.Container
  312. }
  313. return nil
  314. }
  315. func (m *TaskSpec) GetGeneric() *GenericRuntimeSpec {
  316. if x, ok := m.GetRuntime().(*TaskSpec_Generic); ok {
  317. return x.Generic
  318. }
  319. return nil
  320. }
  321. // XXX_OneofFuncs is for the internal use of the proto package.
  322. func (*TaskSpec) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  323. return _TaskSpec_OneofMarshaler, _TaskSpec_OneofUnmarshaler, _TaskSpec_OneofSizer, []interface{}{
  324. (*TaskSpec_Attachment)(nil),
  325. (*TaskSpec_Container)(nil),
  326. (*TaskSpec_Generic)(nil),
  327. }
  328. }
  329. func _TaskSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  330. m := msg.(*TaskSpec)
  331. // runtime
  332. switch x := m.Runtime.(type) {
  333. case *TaskSpec_Attachment:
  334. _ = b.EncodeVarint(8<<3 | proto.WireBytes)
  335. if err := b.EncodeMessage(x.Attachment); err != nil {
  336. return err
  337. }
  338. case *TaskSpec_Container:
  339. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  340. if err := b.EncodeMessage(x.Container); err != nil {
  341. return err
  342. }
  343. case *TaskSpec_Generic:
  344. _ = b.EncodeVarint(10<<3 | proto.WireBytes)
  345. if err := b.EncodeMessage(x.Generic); err != nil {
  346. return err
  347. }
  348. case nil:
  349. default:
  350. return fmt.Errorf("TaskSpec.Runtime has unexpected type %T", x)
  351. }
  352. return nil
  353. }
  354. func _TaskSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  355. m := msg.(*TaskSpec)
  356. switch tag {
  357. case 8: // runtime.attachment
  358. if wire != proto.WireBytes {
  359. return true, proto.ErrInternalBadWireType
  360. }
  361. msg := new(NetworkAttachmentSpec)
  362. err := b.DecodeMessage(msg)
  363. m.Runtime = &TaskSpec_Attachment{msg}
  364. return true, err
  365. case 1: // runtime.container
  366. if wire != proto.WireBytes {
  367. return true, proto.ErrInternalBadWireType
  368. }
  369. msg := new(ContainerSpec)
  370. err := b.DecodeMessage(msg)
  371. m.Runtime = &TaskSpec_Container{msg}
  372. return true, err
  373. case 10: // runtime.generic
  374. if wire != proto.WireBytes {
  375. return true, proto.ErrInternalBadWireType
  376. }
  377. msg := new(GenericRuntimeSpec)
  378. err := b.DecodeMessage(msg)
  379. m.Runtime = &TaskSpec_Generic{msg}
  380. return true, err
  381. default:
  382. return false, nil
  383. }
  384. }
  385. func _TaskSpec_OneofSizer(msg proto.Message) (n int) {
  386. m := msg.(*TaskSpec)
  387. // runtime
  388. switch x := m.Runtime.(type) {
  389. case *TaskSpec_Attachment:
  390. s := proto.Size(x.Attachment)
  391. n += proto.SizeVarint(8<<3 | proto.WireBytes)
  392. n += proto.SizeVarint(uint64(s))
  393. n += s
  394. case *TaskSpec_Container:
  395. s := proto.Size(x.Container)
  396. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  397. n += proto.SizeVarint(uint64(s))
  398. n += s
  399. case *TaskSpec_Generic:
  400. s := proto.Size(x.Generic)
  401. n += proto.SizeVarint(10<<3 | proto.WireBytes)
  402. n += proto.SizeVarint(uint64(s))
  403. n += s
  404. case nil:
  405. default:
  406. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  407. }
  408. return n
  409. }
  410. type GenericRuntimeSpec struct {
  411. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
  412. Payload *google_protobuf3.Any `protobuf:"bytes,2,opt,name=payload" json:"payload,omitempty"`
  413. }
  414. func (m *GenericRuntimeSpec) Reset() { *m = GenericRuntimeSpec{} }
  415. func (*GenericRuntimeSpec) ProtoMessage() {}
  416. func (*GenericRuntimeSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{5} }
  417. // NetworkAttachmentSpec specifies runtime parameters required to attach
  418. // a container to a network.
  419. type NetworkAttachmentSpec struct {
  420. // ContainerID specifies a unique ID of the container for which
  421. // this attachment is for.
  422. ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
  423. }
  424. func (m *NetworkAttachmentSpec) Reset() { *m = NetworkAttachmentSpec{} }
  425. func (*NetworkAttachmentSpec) ProtoMessage() {}
  426. func (*NetworkAttachmentSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{6} }
  427. // Container specifies runtime parameters for a container.
  428. type ContainerSpec struct {
  429. // image defines the image reference, as specified in the
  430. // distribution/reference package. This may include a registry host, name,
  431. // tag or digest.
  432. //
  433. // The field will be directly passed to the engine pulling. Well-behaved
  434. // service definitions will used immutable references, either through tags
  435. // that don't change or verifiable digests.
  436. Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
  437. // Labels defines labels to be added to the container at creation time. If
  438. // collisions with system labels occur, these labels will be overridden.
  439. //
  440. // This field *must* remain compatible with the Labels field of
  441. // Annotations.
  442. Labels map[string]string `protobuf:"bytes,2,rep,name=labels" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  443. // Command to run the the container. The first element is a path to the
  444. // executable and the following elements are treated as arguments.
  445. //
  446. // If command is empty, execution will fall back to the image's entrypoint.
  447. //
  448. // Command should only be used when overriding entrypoint.
  449. Command []string `protobuf:"bytes,3,rep,name=command" json:"command,omitempty"`
  450. // Args specifies arguments provided to the image's entrypoint.
  451. //
  452. // If Command and Args are provided, Args will be appended to Command.
  453. Args []string `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
  454. // Hostname specifies the hostname that will be set on containers created by docker swarm.
  455. // All containers for a given service will have the same hostname
  456. Hostname string `protobuf:"bytes,14,opt,name=hostname,proto3" json:"hostname,omitempty"`
  457. // Env specifies the environment variables for the container in NAME=VALUE
  458. // format. These must be compliant with [IEEE Std
  459. // 1003.1-2001](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html).
  460. Env []string `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
  461. // Dir defines the working directory to set for the container process.
  462. Dir string `protobuf:"bytes,6,opt,name=dir,proto3" json:"dir,omitempty"`
  463. // User specifies the user that should be employed to run the container.
  464. //
  465. // Note that the primary group may be specified by appending the group name
  466. // or id to the user name, separated by a `:`. This syntax is
  467. // `<user>:<group>`.
  468. User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"`
  469. // Groups specifies supplementary groups available to the user.
  470. Groups []string `protobuf:"bytes,11,rep,name=groups" json:"groups,omitempty"`
  471. // Privileges specifies security configuration/permissions.
  472. Privileges *Privileges `protobuf:"bytes,22,opt,name=privileges" json:"privileges,omitempty"`
  473. // TTY declares that a TTY should be attached to the standard streams,
  474. // including stdin if it is still open.
  475. TTY bool `protobuf:"varint,13,opt,name=tty,proto3" json:"tty,omitempty"`
  476. // OpenStdin declares that the standard input (stdin) should be open.
  477. OpenStdin bool `protobuf:"varint,18,opt,name=open_stdin,json=openStdin,proto3" json:"open_stdin,omitempty"`
  478. // ReadOnly declares that the container root filesystem is read-only.
  479. // This only impacts the root filesystem, not additional mounts (including
  480. // tmpfs). For additional mounts that are not part of the initial rootfs,
  481. // they will be decided by the modes passed in the mount definition.
  482. ReadOnly bool `protobuf:"varint,19,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
  483. // StopSignal defines the signal to stop the container.
  484. StopSignal string `protobuf:"bytes,20,opt,name=stop_signal,json=stopSignal,proto3" json:"stop_signal,omitempty"`
  485. Mounts []Mount `protobuf:"bytes,8,rep,name=mounts" json:"mounts"`
  486. // StopGracePeriod the grace period for stopping the container before
  487. // forcefully killing the container.
  488. // Note: Can't use stdduration here because this needs to be nullable.
  489. StopGracePeriod *google_protobuf1.Duration `protobuf:"bytes,9,opt,name=stop_grace_period,json=stopGracePeriod" json:"stop_grace_period,omitempty"`
  490. // PullOptions parameterize the behavior of image pulls.
  491. PullOptions *ContainerSpec_PullOptions `protobuf:"bytes,10,opt,name=pull_options,json=pullOptions" json:"pull_options,omitempty"`
  492. // SecretReference contains references to zero or more secrets that
  493. // will be exposed to the container.
  494. Secrets []*SecretReference `protobuf:"bytes,12,rep,name=secrets" json:"secrets,omitempty"`
  495. // ConfigReference contains references to zero or more configs that
  496. // will be exposed to the container.
  497. Configs []*ConfigReference `protobuf:"bytes,21,rep,name=configs" json:"configs,omitempty"`
  498. // Hosts allow additional entries to be specified in /etc/hosts
  499. // that associates IP addresses with hostnames.
  500. // Detailed documentation is available in:
  501. // http://man7.org/linux/man-pages/man5/hosts.5.html
  502. // IP_address canonical_hostname [aliases...]
  503. //
  504. // The format of the Hosts in swarmkit follows the same as
  505. // above.
  506. // This is different from `docker run --add-host <hostname>:<ip>`
  507. // where format is `<hostname>:<ip>`
  508. Hosts []string `protobuf:"bytes,17,rep,name=hosts" json:"hosts,omitempty"`
  509. // DNSConfig allows one to specify DNS related configuration in resolv.conf
  510. DNSConfig *ContainerSpec_DNSConfig `protobuf:"bytes,15,opt,name=dns_config,json=dnsConfig" json:"dns_config,omitempty"`
  511. // Healthcheck describes how to check the container is healthy. If the
  512. // container is considered unhealthy, it will be destroyed, its creating
  513. // task will exit and a new task will be rescheduled elsewhere. A container
  514. // is considered unhealthy after `Retries` number of consecutive failures.
  515. Healthcheck *HealthConfig `protobuf:"bytes,16,opt,name=healthcheck" json:"healthcheck,omitempty"`
  516. }
  517. func (m *ContainerSpec) Reset() { *m = ContainerSpec{} }
  518. func (*ContainerSpec) ProtoMessage() {}
  519. func (*ContainerSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{7} }
  520. // PullOptions allows one to parameterize an image pull.
  521. type ContainerSpec_PullOptions struct {
  522. // RegistryAuth is the registry auth token obtained from the client, required
  523. // to pull private images. This is the unmodified JSON used as part of
  524. // the `X-Registry-Auth` header.
  525. // TODO(nishanttotla): This field will later be deprecated
  526. RegistryAuth string `protobuf:"bytes,64,opt,name=registry_auth,json=registryAuth,proto3" json:"registry_auth,omitempty"`
  527. }
  528. func (m *ContainerSpec_PullOptions) Reset() { *m = ContainerSpec_PullOptions{} }
  529. func (*ContainerSpec_PullOptions) ProtoMessage() {}
  530. func (*ContainerSpec_PullOptions) Descriptor() ([]byte, []int) {
  531. return fileDescriptorSpecs, []int{7, 1}
  532. }
  533. // DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf)
  534. // Detailed documentation is available in:
  535. // http://man7.org/linux/man-pages/man5/resolv.conf.5.html
  536. // TODO: domain is not supported yet
  537. type ContainerSpec_DNSConfig struct {
  538. // Nameservers specifies the IP addresses of the name servers
  539. Nameservers []string `protobuf:"bytes,1,rep,name=nameservers" json:"nameservers,omitempty"`
  540. // Search specifies the search list for host-name lookup
  541. Search []string `protobuf:"bytes,2,rep,name=search" json:"search,omitempty"`
  542. // Options allows certain internal resolver variables to be modified
  543. Options []string `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
  544. }
  545. func (m *ContainerSpec_DNSConfig) Reset() { *m = ContainerSpec_DNSConfig{} }
  546. func (*ContainerSpec_DNSConfig) ProtoMessage() {}
  547. func (*ContainerSpec_DNSConfig) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{7, 2} }
  548. // EndpointSpec defines the properties that can be configured to
  549. // access and loadbalance the service.
  550. type EndpointSpec struct {
  551. Mode EndpointSpec_ResolutionMode `protobuf:"varint,1,opt,name=mode,proto3,enum=docker.swarmkit.v1.EndpointSpec_ResolutionMode" json:"mode,omitempty"`
  552. // List of exposed ports that this service is accessible from
  553. // external to the cluster.
  554. Ports []*PortConfig `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty"`
  555. }
  556. func (m *EndpointSpec) Reset() { *m = EndpointSpec{} }
  557. func (*EndpointSpec) ProtoMessage() {}
  558. func (*EndpointSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{8} }
  559. // NetworkSpec specifies user defined network parameters.
  560. type NetworkSpec struct {
  561. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  562. // DriverConfig specific configuration consumed by the network driver.
  563. DriverConfig *Driver `protobuf:"bytes,2,opt,name=driver_config,json=driverConfig" json:"driver_config,omitempty"`
  564. // IPv6Enabled enables support for IPv6 on the network.
  565. Ipv6Enabled bool `protobuf:"varint,3,opt,name=ipv6_enabled,json=ipv6Enabled,proto3" json:"ipv6_enabled,omitempty"`
  566. // internal restricts external access to the network. This may be
  567. // accomplished by disabling the default gateway or through other means.
  568. Internal bool `protobuf:"varint,4,opt,name=internal,proto3" json:"internal,omitempty"`
  569. IPAM *IPAMOptions `protobuf:"bytes,5,opt,name=ipam" json:"ipam,omitempty"`
  570. // Attachable allows external(to swarm) entities to manually
  571. // attach to this network. With this flag enabled, external
  572. // entities such as containers running in an worker node in
  573. // the cluster can manually attach to this network and access
  574. // the services attached to this network. If this flag is not
  575. // enabled(default case) no manual attachment to this network
  576. // can happen.
  577. Attachable bool `protobuf:"varint,6,opt,name=attachable,proto3" json:"attachable,omitempty"`
  578. // Ingress indicates this network will provide the routing-mesh.
  579. // In older versions, the network providing the routing mesh was
  580. // swarm internally created only and it was identified by the name
  581. // "ingress" and the label "com.docker.swarm.internal": "true".
  582. Ingress bool `protobuf:"varint,7,opt,name=ingress,proto3" json:"ingress,omitempty"`
  583. // ConfigFrom is the source of the configuration for this network.
  584. //
  585. // Types that are valid to be assigned to ConfigFrom:
  586. // *NetworkSpec_Network
  587. ConfigFrom isNetworkSpec_ConfigFrom `protobuf_oneof:"config_from"`
  588. }
  589. func (m *NetworkSpec) Reset() { *m = NetworkSpec{} }
  590. func (*NetworkSpec) ProtoMessage() {}
  591. func (*NetworkSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{9} }
  592. type isNetworkSpec_ConfigFrom interface {
  593. isNetworkSpec_ConfigFrom()
  594. MarshalTo([]byte) (int, error)
  595. Size() int
  596. }
  597. type NetworkSpec_Network struct {
  598. Network string `protobuf:"bytes,8,opt,name=network,proto3,oneof"`
  599. }
  600. func (*NetworkSpec_Network) isNetworkSpec_ConfigFrom() {}
  601. func (m *NetworkSpec) GetConfigFrom() isNetworkSpec_ConfigFrom {
  602. if m != nil {
  603. return m.ConfigFrom
  604. }
  605. return nil
  606. }
  607. func (m *NetworkSpec) GetNetwork() string {
  608. if x, ok := m.GetConfigFrom().(*NetworkSpec_Network); ok {
  609. return x.Network
  610. }
  611. return ""
  612. }
  613. // XXX_OneofFuncs is for the internal use of the proto package.
  614. func (*NetworkSpec) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
  615. return _NetworkSpec_OneofMarshaler, _NetworkSpec_OneofUnmarshaler, _NetworkSpec_OneofSizer, []interface{}{
  616. (*NetworkSpec_Network)(nil),
  617. }
  618. }
  619. func _NetworkSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  620. m := msg.(*NetworkSpec)
  621. // config_from
  622. switch x := m.ConfigFrom.(type) {
  623. case *NetworkSpec_Network:
  624. _ = b.EncodeVarint(8<<3 | proto.WireBytes)
  625. _ = b.EncodeStringBytes(x.Network)
  626. case nil:
  627. default:
  628. return fmt.Errorf("NetworkSpec.ConfigFrom has unexpected type %T", x)
  629. }
  630. return nil
  631. }
  632. func _NetworkSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  633. m := msg.(*NetworkSpec)
  634. switch tag {
  635. case 8: // config_from.network
  636. if wire != proto.WireBytes {
  637. return true, proto.ErrInternalBadWireType
  638. }
  639. x, err := b.DecodeStringBytes()
  640. m.ConfigFrom = &NetworkSpec_Network{x}
  641. return true, err
  642. default:
  643. return false, nil
  644. }
  645. }
  646. func _NetworkSpec_OneofSizer(msg proto.Message) (n int) {
  647. m := msg.(*NetworkSpec)
  648. // config_from
  649. switch x := m.ConfigFrom.(type) {
  650. case *NetworkSpec_Network:
  651. n += proto.SizeVarint(8<<3 | proto.WireBytes)
  652. n += proto.SizeVarint(uint64(len(x.Network)))
  653. n += len(x.Network)
  654. case nil:
  655. default:
  656. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  657. }
  658. return n
  659. }
  660. // ClusterSpec specifies global cluster settings.
  661. type ClusterSpec struct {
  662. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  663. // DEPRECATED: AcceptancePolicy defines the certificate issuance policy.
  664. // Acceptance policy is no longer customizable, and secrets have been
  665. // replaced with join tokens.
  666. AcceptancePolicy AcceptancePolicy `protobuf:"bytes,2,opt,name=acceptance_policy,json=acceptancePolicy" json:"acceptance_policy"`
  667. // Orchestration defines cluster-level orchestration settings.
  668. Orchestration OrchestrationConfig `protobuf:"bytes,3,opt,name=orchestration" json:"orchestration"`
  669. // Raft defines the cluster's raft settings.
  670. Raft RaftConfig `protobuf:"bytes,4,opt,name=raft" json:"raft"`
  671. // Dispatcher defines cluster-level dispatcher settings.
  672. Dispatcher DispatcherConfig `protobuf:"bytes,5,opt,name=dispatcher" json:"dispatcher"`
  673. // CAConfig defines cluster-level certificate authority settings.
  674. CAConfig CAConfig `protobuf:"bytes,6,opt,name=ca_config,json=caConfig" json:"ca_config"`
  675. // TaskDefaults specifies the default values to use for task creation.
  676. TaskDefaults TaskDefaults `protobuf:"bytes,7,opt,name=task_defaults,json=taskDefaults" json:"task_defaults"`
  677. // EncryptionConfig defines the cluster's encryption settings.
  678. EncryptionConfig EncryptionConfig `protobuf:"bytes,8,opt,name=encryption_config,json=encryptionConfig" json:"encryption_config"`
  679. }
  680. func (m *ClusterSpec) Reset() { *m = ClusterSpec{} }
  681. func (*ClusterSpec) ProtoMessage() {}
  682. func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{10} }
  683. // SecretSpec specifies a user-provided secret.
  684. type SecretSpec struct {
  685. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  686. // Data is the secret payload - the maximum size is 500KB (that is, 500*1024 bytes)
  687. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  688. // Templating controls whether and how to evaluate the secret payload as
  689. // a template. If it is not set, no templating is used.
  690. //
  691. // The currently recognized values are:
  692. // - golang: Go templating
  693. Templating *Driver `protobuf:"bytes,3,opt,name=templating" json:"templating,omitempty"`
  694. }
  695. func (m *SecretSpec) Reset() { *m = SecretSpec{} }
  696. func (*SecretSpec) ProtoMessage() {}
  697. func (*SecretSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{11} }
  698. // ConfigSpec specifies user-provided configuration files.
  699. type ConfigSpec struct {
  700. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  701. // Data is the config payload - the maximum size is 500KB (that is, 500*1024 bytes)
  702. // TODO(aaronl): Do we want to revise this to include multiple payloads in a single
  703. // ConfigSpec? Define this to be a tar? etc...
  704. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  705. // Templating controls whether and how to evaluate the secret payload as
  706. // a template. If it is not set, no templating is used.
  707. //
  708. // The currently recognized values are:
  709. // - golang: Go templating
  710. Templating *Driver `protobuf:"bytes,3,opt,name=templating" json:"templating,omitempty"`
  711. }
  712. func (m *ConfigSpec) Reset() { *m = ConfigSpec{} }
  713. func (*ConfigSpec) ProtoMessage() {}
  714. func (*ConfigSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{12} }
  715. func init() {
  716. proto.RegisterType((*NodeSpec)(nil), "docker.swarmkit.v1.NodeSpec")
  717. proto.RegisterType((*ServiceSpec)(nil), "docker.swarmkit.v1.ServiceSpec")
  718. proto.RegisterType((*ReplicatedService)(nil), "docker.swarmkit.v1.ReplicatedService")
  719. proto.RegisterType((*GlobalService)(nil), "docker.swarmkit.v1.GlobalService")
  720. proto.RegisterType((*TaskSpec)(nil), "docker.swarmkit.v1.TaskSpec")
  721. proto.RegisterType((*GenericRuntimeSpec)(nil), "docker.swarmkit.v1.GenericRuntimeSpec")
  722. proto.RegisterType((*NetworkAttachmentSpec)(nil), "docker.swarmkit.v1.NetworkAttachmentSpec")
  723. proto.RegisterType((*ContainerSpec)(nil), "docker.swarmkit.v1.ContainerSpec")
  724. proto.RegisterType((*ContainerSpec_PullOptions)(nil), "docker.swarmkit.v1.ContainerSpec.PullOptions")
  725. proto.RegisterType((*ContainerSpec_DNSConfig)(nil), "docker.swarmkit.v1.ContainerSpec.DNSConfig")
  726. proto.RegisterType((*EndpointSpec)(nil), "docker.swarmkit.v1.EndpointSpec")
  727. proto.RegisterType((*NetworkSpec)(nil), "docker.swarmkit.v1.NetworkSpec")
  728. proto.RegisterType((*ClusterSpec)(nil), "docker.swarmkit.v1.ClusterSpec")
  729. proto.RegisterType((*SecretSpec)(nil), "docker.swarmkit.v1.SecretSpec")
  730. proto.RegisterType((*ConfigSpec)(nil), "docker.swarmkit.v1.ConfigSpec")
  731. proto.RegisterEnum("docker.swarmkit.v1.NodeSpec_Membership", NodeSpec_Membership_name, NodeSpec_Membership_value)
  732. proto.RegisterEnum("docker.swarmkit.v1.NodeSpec_Availability", NodeSpec_Availability_name, NodeSpec_Availability_value)
  733. proto.RegisterEnum("docker.swarmkit.v1.EndpointSpec_ResolutionMode", EndpointSpec_ResolutionMode_name, EndpointSpec_ResolutionMode_value)
  734. }
  735. func (m *NodeSpec) Copy() *NodeSpec {
  736. if m == nil {
  737. return nil
  738. }
  739. o := &NodeSpec{}
  740. o.CopyFrom(m)
  741. return o
  742. }
  743. func (m *NodeSpec) CopyFrom(src interface{}) {
  744. o := src.(*NodeSpec)
  745. *m = *o
  746. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  747. }
  748. func (m *ServiceSpec) Copy() *ServiceSpec {
  749. if m == nil {
  750. return nil
  751. }
  752. o := &ServiceSpec{}
  753. o.CopyFrom(m)
  754. return o
  755. }
  756. func (m *ServiceSpec) CopyFrom(src interface{}) {
  757. o := src.(*ServiceSpec)
  758. *m = *o
  759. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  760. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Task, &o.Task)
  761. if o.Update != nil {
  762. m.Update = &UpdateConfig{}
  763. github_com_docker_swarmkit_api_deepcopy.Copy(m.Update, o.Update)
  764. }
  765. if o.Rollback != nil {
  766. m.Rollback = &UpdateConfig{}
  767. github_com_docker_swarmkit_api_deepcopy.Copy(m.Rollback, o.Rollback)
  768. }
  769. if o.Networks != nil {
  770. m.Networks = make([]*NetworkAttachmentConfig, len(o.Networks))
  771. for i := range m.Networks {
  772. m.Networks[i] = &NetworkAttachmentConfig{}
  773. github_com_docker_swarmkit_api_deepcopy.Copy(m.Networks[i], o.Networks[i])
  774. }
  775. }
  776. if o.Endpoint != nil {
  777. m.Endpoint = &EndpointSpec{}
  778. github_com_docker_swarmkit_api_deepcopy.Copy(m.Endpoint, o.Endpoint)
  779. }
  780. if o.Mode != nil {
  781. switch o.Mode.(type) {
  782. case *ServiceSpec_Replicated:
  783. v := ServiceSpec_Replicated{
  784. Replicated: &ReplicatedService{},
  785. }
  786. github_com_docker_swarmkit_api_deepcopy.Copy(v.Replicated, o.GetReplicated())
  787. m.Mode = &v
  788. case *ServiceSpec_Global:
  789. v := ServiceSpec_Global{
  790. Global: &GlobalService{},
  791. }
  792. github_com_docker_swarmkit_api_deepcopy.Copy(v.Global, o.GetGlobal())
  793. m.Mode = &v
  794. }
  795. }
  796. }
  797. func (m *ReplicatedService) Copy() *ReplicatedService {
  798. if m == nil {
  799. return nil
  800. }
  801. o := &ReplicatedService{}
  802. o.CopyFrom(m)
  803. return o
  804. }
  805. func (m *ReplicatedService) CopyFrom(src interface{}) {
  806. o := src.(*ReplicatedService)
  807. *m = *o
  808. }
  809. func (m *GlobalService) Copy() *GlobalService {
  810. if m == nil {
  811. return nil
  812. }
  813. o := &GlobalService{}
  814. o.CopyFrom(m)
  815. return o
  816. }
  817. func (m *GlobalService) CopyFrom(src interface{}) {}
  818. func (m *TaskSpec) Copy() *TaskSpec {
  819. if m == nil {
  820. return nil
  821. }
  822. o := &TaskSpec{}
  823. o.CopyFrom(m)
  824. return o
  825. }
  826. func (m *TaskSpec) CopyFrom(src interface{}) {
  827. o := src.(*TaskSpec)
  828. *m = *o
  829. if o.Resources != nil {
  830. m.Resources = &ResourceRequirements{}
  831. github_com_docker_swarmkit_api_deepcopy.Copy(m.Resources, o.Resources)
  832. }
  833. if o.Restart != nil {
  834. m.Restart = &RestartPolicy{}
  835. github_com_docker_swarmkit_api_deepcopy.Copy(m.Restart, o.Restart)
  836. }
  837. if o.Placement != nil {
  838. m.Placement = &Placement{}
  839. github_com_docker_swarmkit_api_deepcopy.Copy(m.Placement, o.Placement)
  840. }
  841. if o.LogDriver != nil {
  842. m.LogDriver = &Driver{}
  843. github_com_docker_swarmkit_api_deepcopy.Copy(m.LogDriver, o.LogDriver)
  844. }
  845. if o.Networks != nil {
  846. m.Networks = make([]*NetworkAttachmentConfig, len(o.Networks))
  847. for i := range m.Networks {
  848. m.Networks[i] = &NetworkAttachmentConfig{}
  849. github_com_docker_swarmkit_api_deepcopy.Copy(m.Networks[i], o.Networks[i])
  850. }
  851. }
  852. if o.Runtime != nil {
  853. switch o.Runtime.(type) {
  854. case *TaskSpec_Attachment:
  855. v := TaskSpec_Attachment{
  856. Attachment: &NetworkAttachmentSpec{},
  857. }
  858. github_com_docker_swarmkit_api_deepcopy.Copy(v.Attachment, o.GetAttachment())
  859. m.Runtime = &v
  860. case *TaskSpec_Container:
  861. v := TaskSpec_Container{
  862. Container: &ContainerSpec{},
  863. }
  864. github_com_docker_swarmkit_api_deepcopy.Copy(v.Container, o.GetContainer())
  865. m.Runtime = &v
  866. case *TaskSpec_Generic:
  867. v := TaskSpec_Generic{
  868. Generic: &GenericRuntimeSpec{},
  869. }
  870. github_com_docker_swarmkit_api_deepcopy.Copy(v.Generic, o.GetGeneric())
  871. m.Runtime = &v
  872. }
  873. }
  874. }
  875. func (m *GenericRuntimeSpec) Copy() *GenericRuntimeSpec {
  876. if m == nil {
  877. return nil
  878. }
  879. o := &GenericRuntimeSpec{}
  880. o.CopyFrom(m)
  881. return o
  882. }
  883. func (m *GenericRuntimeSpec) CopyFrom(src interface{}) {
  884. o := src.(*GenericRuntimeSpec)
  885. *m = *o
  886. if o.Payload != nil {
  887. m.Payload = &google_protobuf3.Any{}
  888. github_com_docker_swarmkit_api_deepcopy.Copy(m.Payload, o.Payload)
  889. }
  890. }
  891. func (m *NetworkAttachmentSpec) Copy() *NetworkAttachmentSpec {
  892. if m == nil {
  893. return nil
  894. }
  895. o := &NetworkAttachmentSpec{}
  896. o.CopyFrom(m)
  897. return o
  898. }
  899. func (m *NetworkAttachmentSpec) CopyFrom(src interface{}) {
  900. o := src.(*NetworkAttachmentSpec)
  901. *m = *o
  902. }
  903. func (m *ContainerSpec) Copy() *ContainerSpec {
  904. if m == nil {
  905. return nil
  906. }
  907. o := &ContainerSpec{}
  908. o.CopyFrom(m)
  909. return o
  910. }
  911. func (m *ContainerSpec) CopyFrom(src interface{}) {
  912. o := src.(*ContainerSpec)
  913. *m = *o
  914. if o.Labels != nil {
  915. m.Labels = make(map[string]string, len(o.Labels))
  916. for k, v := range o.Labels {
  917. m.Labels[k] = v
  918. }
  919. }
  920. if o.Command != nil {
  921. m.Command = make([]string, len(o.Command))
  922. copy(m.Command, o.Command)
  923. }
  924. if o.Args != nil {
  925. m.Args = make([]string, len(o.Args))
  926. copy(m.Args, o.Args)
  927. }
  928. if o.Env != nil {
  929. m.Env = make([]string, len(o.Env))
  930. copy(m.Env, o.Env)
  931. }
  932. if o.Groups != nil {
  933. m.Groups = make([]string, len(o.Groups))
  934. copy(m.Groups, o.Groups)
  935. }
  936. if o.Privileges != nil {
  937. m.Privileges = &Privileges{}
  938. github_com_docker_swarmkit_api_deepcopy.Copy(m.Privileges, o.Privileges)
  939. }
  940. if o.Mounts != nil {
  941. m.Mounts = make([]Mount, len(o.Mounts))
  942. for i := range m.Mounts {
  943. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Mounts[i], &o.Mounts[i])
  944. }
  945. }
  946. if o.StopGracePeriod != nil {
  947. m.StopGracePeriod = &google_protobuf1.Duration{}
  948. github_com_docker_swarmkit_api_deepcopy.Copy(m.StopGracePeriod, o.StopGracePeriod)
  949. }
  950. if o.PullOptions != nil {
  951. m.PullOptions = &ContainerSpec_PullOptions{}
  952. github_com_docker_swarmkit_api_deepcopy.Copy(m.PullOptions, o.PullOptions)
  953. }
  954. if o.Secrets != nil {
  955. m.Secrets = make([]*SecretReference, len(o.Secrets))
  956. for i := range m.Secrets {
  957. m.Secrets[i] = &SecretReference{}
  958. github_com_docker_swarmkit_api_deepcopy.Copy(m.Secrets[i], o.Secrets[i])
  959. }
  960. }
  961. if o.Configs != nil {
  962. m.Configs = make([]*ConfigReference, len(o.Configs))
  963. for i := range m.Configs {
  964. m.Configs[i] = &ConfigReference{}
  965. github_com_docker_swarmkit_api_deepcopy.Copy(m.Configs[i], o.Configs[i])
  966. }
  967. }
  968. if o.Hosts != nil {
  969. m.Hosts = make([]string, len(o.Hosts))
  970. copy(m.Hosts, o.Hosts)
  971. }
  972. if o.DNSConfig != nil {
  973. m.DNSConfig = &ContainerSpec_DNSConfig{}
  974. github_com_docker_swarmkit_api_deepcopy.Copy(m.DNSConfig, o.DNSConfig)
  975. }
  976. if o.Healthcheck != nil {
  977. m.Healthcheck = &HealthConfig{}
  978. github_com_docker_swarmkit_api_deepcopy.Copy(m.Healthcheck, o.Healthcheck)
  979. }
  980. }
  981. func (m *ContainerSpec_PullOptions) Copy() *ContainerSpec_PullOptions {
  982. if m == nil {
  983. return nil
  984. }
  985. o := &ContainerSpec_PullOptions{}
  986. o.CopyFrom(m)
  987. return o
  988. }
  989. func (m *ContainerSpec_PullOptions) CopyFrom(src interface{}) {
  990. o := src.(*ContainerSpec_PullOptions)
  991. *m = *o
  992. }
  993. func (m *ContainerSpec_DNSConfig) Copy() *ContainerSpec_DNSConfig {
  994. if m == nil {
  995. return nil
  996. }
  997. o := &ContainerSpec_DNSConfig{}
  998. o.CopyFrom(m)
  999. return o
  1000. }
  1001. func (m *ContainerSpec_DNSConfig) CopyFrom(src interface{}) {
  1002. o := src.(*ContainerSpec_DNSConfig)
  1003. *m = *o
  1004. if o.Nameservers != nil {
  1005. m.Nameservers = make([]string, len(o.Nameservers))
  1006. copy(m.Nameservers, o.Nameservers)
  1007. }
  1008. if o.Search != nil {
  1009. m.Search = make([]string, len(o.Search))
  1010. copy(m.Search, o.Search)
  1011. }
  1012. if o.Options != nil {
  1013. m.Options = make([]string, len(o.Options))
  1014. copy(m.Options, o.Options)
  1015. }
  1016. }
  1017. func (m *EndpointSpec) Copy() *EndpointSpec {
  1018. if m == nil {
  1019. return nil
  1020. }
  1021. o := &EndpointSpec{}
  1022. o.CopyFrom(m)
  1023. return o
  1024. }
  1025. func (m *EndpointSpec) CopyFrom(src interface{}) {
  1026. o := src.(*EndpointSpec)
  1027. *m = *o
  1028. if o.Ports != nil {
  1029. m.Ports = make([]*PortConfig, len(o.Ports))
  1030. for i := range m.Ports {
  1031. m.Ports[i] = &PortConfig{}
  1032. github_com_docker_swarmkit_api_deepcopy.Copy(m.Ports[i], o.Ports[i])
  1033. }
  1034. }
  1035. }
  1036. func (m *NetworkSpec) Copy() *NetworkSpec {
  1037. if m == nil {
  1038. return nil
  1039. }
  1040. o := &NetworkSpec{}
  1041. o.CopyFrom(m)
  1042. return o
  1043. }
  1044. func (m *NetworkSpec) CopyFrom(src interface{}) {
  1045. o := src.(*NetworkSpec)
  1046. *m = *o
  1047. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  1048. if o.DriverConfig != nil {
  1049. m.DriverConfig = &Driver{}
  1050. github_com_docker_swarmkit_api_deepcopy.Copy(m.DriverConfig, o.DriverConfig)
  1051. }
  1052. if o.IPAM != nil {
  1053. m.IPAM = &IPAMOptions{}
  1054. github_com_docker_swarmkit_api_deepcopy.Copy(m.IPAM, o.IPAM)
  1055. }
  1056. if o.ConfigFrom != nil {
  1057. switch o.ConfigFrom.(type) {
  1058. case *NetworkSpec_Network:
  1059. v := NetworkSpec_Network{
  1060. Network: o.GetNetwork(),
  1061. }
  1062. m.ConfigFrom = &v
  1063. }
  1064. }
  1065. }
  1066. func (m *ClusterSpec) Copy() *ClusterSpec {
  1067. if m == nil {
  1068. return nil
  1069. }
  1070. o := &ClusterSpec{}
  1071. o.CopyFrom(m)
  1072. return o
  1073. }
  1074. func (m *ClusterSpec) CopyFrom(src interface{}) {
  1075. o := src.(*ClusterSpec)
  1076. *m = *o
  1077. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  1078. github_com_docker_swarmkit_api_deepcopy.Copy(&m.AcceptancePolicy, &o.AcceptancePolicy)
  1079. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Orchestration, &o.Orchestration)
  1080. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Raft, &o.Raft)
  1081. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Dispatcher, &o.Dispatcher)
  1082. github_com_docker_swarmkit_api_deepcopy.Copy(&m.CAConfig, &o.CAConfig)
  1083. github_com_docker_swarmkit_api_deepcopy.Copy(&m.TaskDefaults, &o.TaskDefaults)
  1084. github_com_docker_swarmkit_api_deepcopy.Copy(&m.EncryptionConfig, &o.EncryptionConfig)
  1085. }
  1086. func (m *SecretSpec) Copy() *SecretSpec {
  1087. if m == nil {
  1088. return nil
  1089. }
  1090. o := &SecretSpec{}
  1091. o.CopyFrom(m)
  1092. return o
  1093. }
  1094. func (m *SecretSpec) CopyFrom(src interface{}) {
  1095. o := src.(*SecretSpec)
  1096. *m = *o
  1097. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  1098. if o.Data != nil {
  1099. m.Data = make([]byte, len(o.Data))
  1100. copy(m.Data, o.Data)
  1101. }
  1102. if o.Templating != nil {
  1103. m.Templating = &Driver{}
  1104. github_com_docker_swarmkit_api_deepcopy.Copy(m.Templating, o.Templating)
  1105. }
  1106. }
  1107. func (m *ConfigSpec) Copy() *ConfigSpec {
  1108. if m == nil {
  1109. return nil
  1110. }
  1111. o := &ConfigSpec{}
  1112. o.CopyFrom(m)
  1113. return o
  1114. }
  1115. func (m *ConfigSpec) CopyFrom(src interface{}) {
  1116. o := src.(*ConfigSpec)
  1117. *m = *o
  1118. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  1119. if o.Data != nil {
  1120. m.Data = make([]byte, len(o.Data))
  1121. copy(m.Data, o.Data)
  1122. }
  1123. if o.Templating != nil {
  1124. m.Templating = &Driver{}
  1125. github_com_docker_swarmkit_api_deepcopy.Copy(m.Templating, o.Templating)
  1126. }
  1127. }
  1128. func (m *NodeSpec) Marshal() (dAtA []byte, err error) {
  1129. size := m.Size()
  1130. dAtA = make([]byte, size)
  1131. n, err := m.MarshalTo(dAtA)
  1132. if err != nil {
  1133. return nil, err
  1134. }
  1135. return dAtA[:n], nil
  1136. }
  1137. func (m *NodeSpec) MarshalTo(dAtA []byte) (int, error) {
  1138. var i int
  1139. _ = i
  1140. var l int
  1141. _ = l
  1142. dAtA[i] = 0xa
  1143. i++
  1144. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  1145. n1, err := m.Annotations.MarshalTo(dAtA[i:])
  1146. if err != nil {
  1147. return 0, err
  1148. }
  1149. i += n1
  1150. if m.DesiredRole != 0 {
  1151. dAtA[i] = 0x10
  1152. i++
  1153. i = encodeVarintSpecs(dAtA, i, uint64(m.DesiredRole))
  1154. }
  1155. if m.Membership != 0 {
  1156. dAtA[i] = 0x18
  1157. i++
  1158. i = encodeVarintSpecs(dAtA, i, uint64(m.Membership))
  1159. }
  1160. if m.Availability != 0 {
  1161. dAtA[i] = 0x20
  1162. i++
  1163. i = encodeVarintSpecs(dAtA, i, uint64(m.Availability))
  1164. }
  1165. return i, nil
  1166. }
  1167. func (m *ServiceSpec) Marshal() (dAtA []byte, err error) {
  1168. size := m.Size()
  1169. dAtA = make([]byte, size)
  1170. n, err := m.MarshalTo(dAtA)
  1171. if err != nil {
  1172. return nil, err
  1173. }
  1174. return dAtA[:n], nil
  1175. }
  1176. func (m *ServiceSpec) MarshalTo(dAtA []byte) (int, error) {
  1177. var i int
  1178. _ = i
  1179. var l int
  1180. _ = l
  1181. dAtA[i] = 0xa
  1182. i++
  1183. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  1184. n2, err := m.Annotations.MarshalTo(dAtA[i:])
  1185. if err != nil {
  1186. return 0, err
  1187. }
  1188. i += n2
  1189. dAtA[i] = 0x12
  1190. i++
  1191. i = encodeVarintSpecs(dAtA, i, uint64(m.Task.Size()))
  1192. n3, err := m.Task.MarshalTo(dAtA[i:])
  1193. if err != nil {
  1194. return 0, err
  1195. }
  1196. i += n3
  1197. if m.Mode != nil {
  1198. nn4, err := m.Mode.MarshalTo(dAtA[i:])
  1199. if err != nil {
  1200. return 0, err
  1201. }
  1202. i += nn4
  1203. }
  1204. if m.Update != nil {
  1205. dAtA[i] = 0x32
  1206. i++
  1207. i = encodeVarintSpecs(dAtA, i, uint64(m.Update.Size()))
  1208. n5, err := m.Update.MarshalTo(dAtA[i:])
  1209. if err != nil {
  1210. return 0, err
  1211. }
  1212. i += n5
  1213. }
  1214. if len(m.Networks) > 0 {
  1215. for _, msg := range m.Networks {
  1216. dAtA[i] = 0x3a
  1217. i++
  1218. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  1219. n, err := msg.MarshalTo(dAtA[i:])
  1220. if err != nil {
  1221. return 0, err
  1222. }
  1223. i += n
  1224. }
  1225. }
  1226. if m.Endpoint != nil {
  1227. dAtA[i] = 0x42
  1228. i++
  1229. i = encodeVarintSpecs(dAtA, i, uint64(m.Endpoint.Size()))
  1230. n6, err := m.Endpoint.MarshalTo(dAtA[i:])
  1231. if err != nil {
  1232. return 0, err
  1233. }
  1234. i += n6
  1235. }
  1236. if m.Rollback != nil {
  1237. dAtA[i] = 0x4a
  1238. i++
  1239. i = encodeVarintSpecs(dAtA, i, uint64(m.Rollback.Size()))
  1240. n7, err := m.Rollback.MarshalTo(dAtA[i:])
  1241. if err != nil {
  1242. return 0, err
  1243. }
  1244. i += n7
  1245. }
  1246. return i, nil
  1247. }
  1248. func (m *ServiceSpec_Replicated) MarshalTo(dAtA []byte) (int, error) {
  1249. i := 0
  1250. if m.Replicated != nil {
  1251. dAtA[i] = 0x1a
  1252. i++
  1253. i = encodeVarintSpecs(dAtA, i, uint64(m.Replicated.Size()))
  1254. n8, err := m.Replicated.MarshalTo(dAtA[i:])
  1255. if err != nil {
  1256. return 0, err
  1257. }
  1258. i += n8
  1259. }
  1260. return i, nil
  1261. }
  1262. func (m *ServiceSpec_Global) MarshalTo(dAtA []byte) (int, error) {
  1263. i := 0
  1264. if m.Global != nil {
  1265. dAtA[i] = 0x22
  1266. i++
  1267. i = encodeVarintSpecs(dAtA, i, uint64(m.Global.Size()))
  1268. n9, err := m.Global.MarshalTo(dAtA[i:])
  1269. if err != nil {
  1270. return 0, err
  1271. }
  1272. i += n9
  1273. }
  1274. return i, nil
  1275. }
  1276. func (m *ReplicatedService) Marshal() (dAtA []byte, err error) {
  1277. size := m.Size()
  1278. dAtA = make([]byte, size)
  1279. n, err := m.MarshalTo(dAtA)
  1280. if err != nil {
  1281. return nil, err
  1282. }
  1283. return dAtA[:n], nil
  1284. }
  1285. func (m *ReplicatedService) MarshalTo(dAtA []byte) (int, error) {
  1286. var i int
  1287. _ = i
  1288. var l int
  1289. _ = l
  1290. if m.Replicas != 0 {
  1291. dAtA[i] = 0x8
  1292. i++
  1293. i = encodeVarintSpecs(dAtA, i, uint64(m.Replicas))
  1294. }
  1295. return i, nil
  1296. }
  1297. func (m *GlobalService) Marshal() (dAtA []byte, err error) {
  1298. size := m.Size()
  1299. dAtA = make([]byte, size)
  1300. n, err := m.MarshalTo(dAtA)
  1301. if err != nil {
  1302. return nil, err
  1303. }
  1304. return dAtA[:n], nil
  1305. }
  1306. func (m *GlobalService) MarshalTo(dAtA []byte) (int, error) {
  1307. var i int
  1308. _ = i
  1309. var l int
  1310. _ = l
  1311. return i, nil
  1312. }
  1313. func (m *TaskSpec) Marshal() (dAtA []byte, err error) {
  1314. size := m.Size()
  1315. dAtA = make([]byte, size)
  1316. n, err := m.MarshalTo(dAtA)
  1317. if err != nil {
  1318. return nil, err
  1319. }
  1320. return dAtA[:n], nil
  1321. }
  1322. func (m *TaskSpec) MarshalTo(dAtA []byte) (int, error) {
  1323. var i int
  1324. _ = i
  1325. var l int
  1326. _ = l
  1327. if m.Runtime != nil {
  1328. nn10, err := m.Runtime.MarshalTo(dAtA[i:])
  1329. if err != nil {
  1330. return 0, err
  1331. }
  1332. i += nn10
  1333. }
  1334. if m.Resources != nil {
  1335. dAtA[i] = 0x12
  1336. i++
  1337. i = encodeVarintSpecs(dAtA, i, uint64(m.Resources.Size()))
  1338. n11, err := m.Resources.MarshalTo(dAtA[i:])
  1339. if err != nil {
  1340. return 0, err
  1341. }
  1342. i += n11
  1343. }
  1344. if m.Restart != nil {
  1345. dAtA[i] = 0x22
  1346. i++
  1347. i = encodeVarintSpecs(dAtA, i, uint64(m.Restart.Size()))
  1348. n12, err := m.Restart.MarshalTo(dAtA[i:])
  1349. if err != nil {
  1350. return 0, err
  1351. }
  1352. i += n12
  1353. }
  1354. if m.Placement != nil {
  1355. dAtA[i] = 0x2a
  1356. i++
  1357. i = encodeVarintSpecs(dAtA, i, uint64(m.Placement.Size()))
  1358. n13, err := m.Placement.MarshalTo(dAtA[i:])
  1359. if err != nil {
  1360. return 0, err
  1361. }
  1362. i += n13
  1363. }
  1364. if m.LogDriver != nil {
  1365. dAtA[i] = 0x32
  1366. i++
  1367. i = encodeVarintSpecs(dAtA, i, uint64(m.LogDriver.Size()))
  1368. n14, err := m.LogDriver.MarshalTo(dAtA[i:])
  1369. if err != nil {
  1370. return 0, err
  1371. }
  1372. i += n14
  1373. }
  1374. if len(m.Networks) > 0 {
  1375. for _, msg := range m.Networks {
  1376. dAtA[i] = 0x3a
  1377. i++
  1378. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  1379. n, err := msg.MarshalTo(dAtA[i:])
  1380. if err != nil {
  1381. return 0, err
  1382. }
  1383. i += n
  1384. }
  1385. }
  1386. if m.ForceUpdate != 0 {
  1387. dAtA[i] = 0x48
  1388. i++
  1389. i = encodeVarintSpecs(dAtA, i, uint64(m.ForceUpdate))
  1390. }
  1391. return i, nil
  1392. }
  1393. func (m *TaskSpec_Container) MarshalTo(dAtA []byte) (int, error) {
  1394. i := 0
  1395. if m.Container != nil {
  1396. dAtA[i] = 0xa
  1397. i++
  1398. i = encodeVarintSpecs(dAtA, i, uint64(m.Container.Size()))
  1399. n15, err := m.Container.MarshalTo(dAtA[i:])
  1400. if err != nil {
  1401. return 0, err
  1402. }
  1403. i += n15
  1404. }
  1405. return i, nil
  1406. }
  1407. func (m *TaskSpec_Attachment) MarshalTo(dAtA []byte) (int, error) {
  1408. i := 0
  1409. if m.Attachment != nil {
  1410. dAtA[i] = 0x42
  1411. i++
  1412. i = encodeVarintSpecs(dAtA, i, uint64(m.Attachment.Size()))
  1413. n16, err := m.Attachment.MarshalTo(dAtA[i:])
  1414. if err != nil {
  1415. return 0, err
  1416. }
  1417. i += n16
  1418. }
  1419. return i, nil
  1420. }
  1421. func (m *TaskSpec_Generic) MarshalTo(dAtA []byte) (int, error) {
  1422. i := 0
  1423. if m.Generic != nil {
  1424. dAtA[i] = 0x52
  1425. i++
  1426. i = encodeVarintSpecs(dAtA, i, uint64(m.Generic.Size()))
  1427. n17, err := m.Generic.MarshalTo(dAtA[i:])
  1428. if err != nil {
  1429. return 0, err
  1430. }
  1431. i += n17
  1432. }
  1433. return i, nil
  1434. }
  1435. func (m *GenericRuntimeSpec) Marshal() (dAtA []byte, err error) {
  1436. size := m.Size()
  1437. dAtA = make([]byte, size)
  1438. n, err := m.MarshalTo(dAtA)
  1439. if err != nil {
  1440. return nil, err
  1441. }
  1442. return dAtA[:n], nil
  1443. }
  1444. func (m *GenericRuntimeSpec) MarshalTo(dAtA []byte) (int, error) {
  1445. var i int
  1446. _ = i
  1447. var l int
  1448. _ = l
  1449. if len(m.Kind) > 0 {
  1450. dAtA[i] = 0xa
  1451. i++
  1452. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Kind)))
  1453. i += copy(dAtA[i:], m.Kind)
  1454. }
  1455. if m.Payload != nil {
  1456. dAtA[i] = 0x12
  1457. i++
  1458. i = encodeVarintSpecs(dAtA, i, uint64(m.Payload.Size()))
  1459. n18, err := m.Payload.MarshalTo(dAtA[i:])
  1460. if err != nil {
  1461. return 0, err
  1462. }
  1463. i += n18
  1464. }
  1465. return i, nil
  1466. }
  1467. func (m *NetworkAttachmentSpec) Marshal() (dAtA []byte, err error) {
  1468. size := m.Size()
  1469. dAtA = make([]byte, size)
  1470. n, err := m.MarshalTo(dAtA)
  1471. if err != nil {
  1472. return nil, err
  1473. }
  1474. return dAtA[:n], nil
  1475. }
  1476. func (m *NetworkAttachmentSpec) MarshalTo(dAtA []byte) (int, error) {
  1477. var i int
  1478. _ = i
  1479. var l int
  1480. _ = l
  1481. if len(m.ContainerID) > 0 {
  1482. dAtA[i] = 0xa
  1483. i++
  1484. i = encodeVarintSpecs(dAtA, i, uint64(len(m.ContainerID)))
  1485. i += copy(dAtA[i:], m.ContainerID)
  1486. }
  1487. return i, nil
  1488. }
  1489. func (m *ContainerSpec) Marshal() (dAtA []byte, err error) {
  1490. size := m.Size()
  1491. dAtA = make([]byte, size)
  1492. n, err := m.MarshalTo(dAtA)
  1493. if err != nil {
  1494. return nil, err
  1495. }
  1496. return dAtA[:n], nil
  1497. }
  1498. func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) {
  1499. var i int
  1500. _ = i
  1501. var l int
  1502. _ = l
  1503. if len(m.Image) > 0 {
  1504. dAtA[i] = 0xa
  1505. i++
  1506. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Image)))
  1507. i += copy(dAtA[i:], m.Image)
  1508. }
  1509. if len(m.Labels) > 0 {
  1510. for k, _ := range m.Labels {
  1511. dAtA[i] = 0x12
  1512. i++
  1513. v := m.Labels[k]
  1514. mapSize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  1515. i = encodeVarintSpecs(dAtA, i, uint64(mapSize))
  1516. dAtA[i] = 0xa
  1517. i++
  1518. i = encodeVarintSpecs(dAtA, i, uint64(len(k)))
  1519. i += copy(dAtA[i:], k)
  1520. dAtA[i] = 0x12
  1521. i++
  1522. i = encodeVarintSpecs(dAtA, i, uint64(len(v)))
  1523. i += copy(dAtA[i:], v)
  1524. }
  1525. }
  1526. if len(m.Command) > 0 {
  1527. for _, s := range m.Command {
  1528. dAtA[i] = 0x1a
  1529. i++
  1530. l = len(s)
  1531. for l >= 1<<7 {
  1532. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1533. l >>= 7
  1534. i++
  1535. }
  1536. dAtA[i] = uint8(l)
  1537. i++
  1538. i += copy(dAtA[i:], s)
  1539. }
  1540. }
  1541. if len(m.Args) > 0 {
  1542. for _, s := range m.Args {
  1543. dAtA[i] = 0x22
  1544. i++
  1545. l = len(s)
  1546. for l >= 1<<7 {
  1547. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1548. l >>= 7
  1549. i++
  1550. }
  1551. dAtA[i] = uint8(l)
  1552. i++
  1553. i += copy(dAtA[i:], s)
  1554. }
  1555. }
  1556. if len(m.Env) > 0 {
  1557. for _, s := range m.Env {
  1558. dAtA[i] = 0x2a
  1559. i++
  1560. l = len(s)
  1561. for l >= 1<<7 {
  1562. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1563. l >>= 7
  1564. i++
  1565. }
  1566. dAtA[i] = uint8(l)
  1567. i++
  1568. i += copy(dAtA[i:], s)
  1569. }
  1570. }
  1571. if len(m.Dir) > 0 {
  1572. dAtA[i] = 0x32
  1573. i++
  1574. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Dir)))
  1575. i += copy(dAtA[i:], m.Dir)
  1576. }
  1577. if len(m.User) > 0 {
  1578. dAtA[i] = 0x3a
  1579. i++
  1580. i = encodeVarintSpecs(dAtA, i, uint64(len(m.User)))
  1581. i += copy(dAtA[i:], m.User)
  1582. }
  1583. if len(m.Mounts) > 0 {
  1584. for _, msg := range m.Mounts {
  1585. dAtA[i] = 0x42
  1586. i++
  1587. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  1588. n, err := msg.MarshalTo(dAtA[i:])
  1589. if err != nil {
  1590. return 0, err
  1591. }
  1592. i += n
  1593. }
  1594. }
  1595. if m.StopGracePeriod != nil {
  1596. dAtA[i] = 0x4a
  1597. i++
  1598. i = encodeVarintSpecs(dAtA, i, uint64(m.StopGracePeriod.Size()))
  1599. n19, err := m.StopGracePeriod.MarshalTo(dAtA[i:])
  1600. if err != nil {
  1601. return 0, err
  1602. }
  1603. i += n19
  1604. }
  1605. if m.PullOptions != nil {
  1606. dAtA[i] = 0x52
  1607. i++
  1608. i = encodeVarintSpecs(dAtA, i, uint64(m.PullOptions.Size()))
  1609. n20, err := m.PullOptions.MarshalTo(dAtA[i:])
  1610. if err != nil {
  1611. return 0, err
  1612. }
  1613. i += n20
  1614. }
  1615. if len(m.Groups) > 0 {
  1616. for _, s := range m.Groups {
  1617. dAtA[i] = 0x5a
  1618. i++
  1619. l = len(s)
  1620. for l >= 1<<7 {
  1621. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1622. l >>= 7
  1623. i++
  1624. }
  1625. dAtA[i] = uint8(l)
  1626. i++
  1627. i += copy(dAtA[i:], s)
  1628. }
  1629. }
  1630. if len(m.Secrets) > 0 {
  1631. for _, msg := range m.Secrets {
  1632. dAtA[i] = 0x62
  1633. i++
  1634. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  1635. n, err := msg.MarshalTo(dAtA[i:])
  1636. if err != nil {
  1637. return 0, err
  1638. }
  1639. i += n
  1640. }
  1641. }
  1642. if m.TTY {
  1643. dAtA[i] = 0x68
  1644. i++
  1645. if m.TTY {
  1646. dAtA[i] = 1
  1647. } else {
  1648. dAtA[i] = 0
  1649. }
  1650. i++
  1651. }
  1652. if len(m.Hostname) > 0 {
  1653. dAtA[i] = 0x72
  1654. i++
  1655. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Hostname)))
  1656. i += copy(dAtA[i:], m.Hostname)
  1657. }
  1658. if m.DNSConfig != nil {
  1659. dAtA[i] = 0x7a
  1660. i++
  1661. i = encodeVarintSpecs(dAtA, i, uint64(m.DNSConfig.Size()))
  1662. n21, err := m.DNSConfig.MarshalTo(dAtA[i:])
  1663. if err != nil {
  1664. return 0, err
  1665. }
  1666. i += n21
  1667. }
  1668. if m.Healthcheck != nil {
  1669. dAtA[i] = 0x82
  1670. i++
  1671. dAtA[i] = 0x1
  1672. i++
  1673. i = encodeVarintSpecs(dAtA, i, uint64(m.Healthcheck.Size()))
  1674. n22, err := m.Healthcheck.MarshalTo(dAtA[i:])
  1675. if err != nil {
  1676. return 0, err
  1677. }
  1678. i += n22
  1679. }
  1680. if len(m.Hosts) > 0 {
  1681. for _, s := range m.Hosts {
  1682. dAtA[i] = 0x8a
  1683. i++
  1684. dAtA[i] = 0x1
  1685. i++
  1686. l = len(s)
  1687. for l >= 1<<7 {
  1688. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1689. l >>= 7
  1690. i++
  1691. }
  1692. dAtA[i] = uint8(l)
  1693. i++
  1694. i += copy(dAtA[i:], s)
  1695. }
  1696. }
  1697. if m.OpenStdin {
  1698. dAtA[i] = 0x90
  1699. i++
  1700. dAtA[i] = 0x1
  1701. i++
  1702. if m.OpenStdin {
  1703. dAtA[i] = 1
  1704. } else {
  1705. dAtA[i] = 0
  1706. }
  1707. i++
  1708. }
  1709. if m.ReadOnly {
  1710. dAtA[i] = 0x98
  1711. i++
  1712. dAtA[i] = 0x1
  1713. i++
  1714. if m.ReadOnly {
  1715. dAtA[i] = 1
  1716. } else {
  1717. dAtA[i] = 0
  1718. }
  1719. i++
  1720. }
  1721. if len(m.StopSignal) > 0 {
  1722. dAtA[i] = 0xa2
  1723. i++
  1724. dAtA[i] = 0x1
  1725. i++
  1726. i = encodeVarintSpecs(dAtA, i, uint64(len(m.StopSignal)))
  1727. i += copy(dAtA[i:], m.StopSignal)
  1728. }
  1729. if len(m.Configs) > 0 {
  1730. for _, msg := range m.Configs {
  1731. dAtA[i] = 0xaa
  1732. i++
  1733. dAtA[i] = 0x1
  1734. i++
  1735. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  1736. n, err := msg.MarshalTo(dAtA[i:])
  1737. if err != nil {
  1738. return 0, err
  1739. }
  1740. i += n
  1741. }
  1742. }
  1743. if m.Privileges != nil {
  1744. dAtA[i] = 0xb2
  1745. i++
  1746. dAtA[i] = 0x1
  1747. i++
  1748. i = encodeVarintSpecs(dAtA, i, uint64(m.Privileges.Size()))
  1749. n23, err := m.Privileges.MarshalTo(dAtA[i:])
  1750. if err != nil {
  1751. return 0, err
  1752. }
  1753. i += n23
  1754. }
  1755. return i, nil
  1756. }
  1757. func (m *ContainerSpec_PullOptions) Marshal() (dAtA []byte, err error) {
  1758. size := m.Size()
  1759. dAtA = make([]byte, size)
  1760. n, err := m.MarshalTo(dAtA)
  1761. if err != nil {
  1762. return nil, err
  1763. }
  1764. return dAtA[:n], nil
  1765. }
  1766. func (m *ContainerSpec_PullOptions) MarshalTo(dAtA []byte) (int, error) {
  1767. var i int
  1768. _ = i
  1769. var l int
  1770. _ = l
  1771. if len(m.RegistryAuth) > 0 {
  1772. dAtA[i] = 0x82
  1773. i++
  1774. dAtA[i] = 0x4
  1775. i++
  1776. i = encodeVarintSpecs(dAtA, i, uint64(len(m.RegistryAuth)))
  1777. i += copy(dAtA[i:], m.RegistryAuth)
  1778. }
  1779. return i, nil
  1780. }
  1781. func (m *ContainerSpec_DNSConfig) Marshal() (dAtA []byte, err error) {
  1782. size := m.Size()
  1783. dAtA = make([]byte, size)
  1784. n, err := m.MarshalTo(dAtA)
  1785. if err != nil {
  1786. return nil, err
  1787. }
  1788. return dAtA[:n], nil
  1789. }
  1790. func (m *ContainerSpec_DNSConfig) MarshalTo(dAtA []byte) (int, error) {
  1791. var i int
  1792. _ = i
  1793. var l int
  1794. _ = l
  1795. if len(m.Nameservers) > 0 {
  1796. for _, s := range m.Nameservers {
  1797. dAtA[i] = 0xa
  1798. i++
  1799. l = len(s)
  1800. for l >= 1<<7 {
  1801. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1802. l >>= 7
  1803. i++
  1804. }
  1805. dAtA[i] = uint8(l)
  1806. i++
  1807. i += copy(dAtA[i:], s)
  1808. }
  1809. }
  1810. if len(m.Search) > 0 {
  1811. for _, s := range m.Search {
  1812. dAtA[i] = 0x12
  1813. i++
  1814. l = len(s)
  1815. for l >= 1<<7 {
  1816. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1817. l >>= 7
  1818. i++
  1819. }
  1820. dAtA[i] = uint8(l)
  1821. i++
  1822. i += copy(dAtA[i:], s)
  1823. }
  1824. }
  1825. if len(m.Options) > 0 {
  1826. for _, s := range m.Options {
  1827. dAtA[i] = 0x1a
  1828. i++
  1829. l = len(s)
  1830. for l >= 1<<7 {
  1831. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  1832. l >>= 7
  1833. i++
  1834. }
  1835. dAtA[i] = uint8(l)
  1836. i++
  1837. i += copy(dAtA[i:], s)
  1838. }
  1839. }
  1840. return i, nil
  1841. }
  1842. func (m *EndpointSpec) Marshal() (dAtA []byte, err error) {
  1843. size := m.Size()
  1844. dAtA = make([]byte, size)
  1845. n, err := m.MarshalTo(dAtA)
  1846. if err != nil {
  1847. return nil, err
  1848. }
  1849. return dAtA[:n], nil
  1850. }
  1851. func (m *EndpointSpec) MarshalTo(dAtA []byte) (int, error) {
  1852. var i int
  1853. _ = i
  1854. var l int
  1855. _ = l
  1856. if m.Mode != 0 {
  1857. dAtA[i] = 0x8
  1858. i++
  1859. i = encodeVarintSpecs(dAtA, i, uint64(m.Mode))
  1860. }
  1861. if len(m.Ports) > 0 {
  1862. for _, msg := range m.Ports {
  1863. dAtA[i] = 0x12
  1864. i++
  1865. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  1866. n, err := msg.MarshalTo(dAtA[i:])
  1867. if err != nil {
  1868. return 0, err
  1869. }
  1870. i += n
  1871. }
  1872. }
  1873. return i, nil
  1874. }
  1875. func (m *NetworkSpec) Marshal() (dAtA []byte, err error) {
  1876. size := m.Size()
  1877. dAtA = make([]byte, size)
  1878. n, err := m.MarshalTo(dAtA)
  1879. if err != nil {
  1880. return nil, err
  1881. }
  1882. return dAtA[:n], nil
  1883. }
  1884. func (m *NetworkSpec) MarshalTo(dAtA []byte) (int, error) {
  1885. var i int
  1886. _ = i
  1887. var l int
  1888. _ = l
  1889. dAtA[i] = 0xa
  1890. i++
  1891. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  1892. n24, err := m.Annotations.MarshalTo(dAtA[i:])
  1893. if err != nil {
  1894. return 0, err
  1895. }
  1896. i += n24
  1897. if m.DriverConfig != nil {
  1898. dAtA[i] = 0x12
  1899. i++
  1900. i = encodeVarintSpecs(dAtA, i, uint64(m.DriverConfig.Size()))
  1901. n25, err := m.DriverConfig.MarshalTo(dAtA[i:])
  1902. if err != nil {
  1903. return 0, err
  1904. }
  1905. i += n25
  1906. }
  1907. if m.Ipv6Enabled {
  1908. dAtA[i] = 0x18
  1909. i++
  1910. if m.Ipv6Enabled {
  1911. dAtA[i] = 1
  1912. } else {
  1913. dAtA[i] = 0
  1914. }
  1915. i++
  1916. }
  1917. if m.Internal {
  1918. dAtA[i] = 0x20
  1919. i++
  1920. if m.Internal {
  1921. dAtA[i] = 1
  1922. } else {
  1923. dAtA[i] = 0
  1924. }
  1925. i++
  1926. }
  1927. if m.IPAM != nil {
  1928. dAtA[i] = 0x2a
  1929. i++
  1930. i = encodeVarintSpecs(dAtA, i, uint64(m.IPAM.Size()))
  1931. n26, err := m.IPAM.MarshalTo(dAtA[i:])
  1932. if err != nil {
  1933. return 0, err
  1934. }
  1935. i += n26
  1936. }
  1937. if m.Attachable {
  1938. dAtA[i] = 0x30
  1939. i++
  1940. if m.Attachable {
  1941. dAtA[i] = 1
  1942. } else {
  1943. dAtA[i] = 0
  1944. }
  1945. i++
  1946. }
  1947. if m.Ingress {
  1948. dAtA[i] = 0x38
  1949. i++
  1950. if m.Ingress {
  1951. dAtA[i] = 1
  1952. } else {
  1953. dAtA[i] = 0
  1954. }
  1955. i++
  1956. }
  1957. if m.ConfigFrom != nil {
  1958. nn27, err := m.ConfigFrom.MarshalTo(dAtA[i:])
  1959. if err != nil {
  1960. return 0, err
  1961. }
  1962. i += nn27
  1963. }
  1964. return i, nil
  1965. }
  1966. func (m *NetworkSpec_Network) MarshalTo(dAtA []byte) (int, error) {
  1967. i := 0
  1968. dAtA[i] = 0x42
  1969. i++
  1970. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Network)))
  1971. i += copy(dAtA[i:], m.Network)
  1972. return i, nil
  1973. }
  1974. func (m *ClusterSpec) Marshal() (dAtA []byte, err error) {
  1975. size := m.Size()
  1976. dAtA = make([]byte, size)
  1977. n, err := m.MarshalTo(dAtA)
  1978. if err != nil {
  1979. return nil, err
  1980. }
  1981. return dAtA[:n], nil
  1982. }
  1983. func (m *ClusterSpec) MarshalTo(dAtA []byte) (int, error) {
  1984. var i int
  1985. _ = i
  1986. var l int
  1987. _ = l
  1988. dAtA[i] = 0xa
  1989. i++
  1990. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  1991. n28, err := m.Annotations.MarshalTo(dAtA[i:])
  1992. if err != nil {
  1993. return 0, err
  1994. }
  1995. i += n28
  1996. dAtA[i] = 0x12
  1997. i++
  1998. i = encodeVarintSpecs(dAtA, i, uint64(m.AcceptancePolicy.Size()))
  1999. n29, err := m.AcceptancePolicy.MarshalTo(dAtA[i:])
  2000. if err != nil {
  2001. return 0, err
  2002. }
  2003. i += n29
  2004. dAtA[i] = 0x1a
  2005. i++
  2006. i = encodeVarintSpecs(dAtA, i, uint64(m.Orchestration.Size()))
  2007. n30, err := m.Orchestration.MarshalTo(dAtA[i:])
  2008. if err != nil {
  2009. return 0, err
  2010. }
  2011. i += n30
  2012. dAtA[i] = 0x22
  2013. i++
  2014. i = encodeVarintSpecs(dAtA, i, uint64(m.Raft.Size()))
  2015. n31, err := m.Raft.MarshalTo(dAtA[i:])
  2016. if err != nil {
  2017. return 0, err
  2018. }
  2019. i += n31
  2020. dAtA[i] = 0x2a
  2021. i++
  2022. i = encodeVarintSpecs(dAtA, i, uint64(m.Dispatcher.Size()))
  2023. n32, err := m.Dispatcher.MarshalTo(dAtA[i:])
  2024. if err != nil {
  2025. return 0, err
  2026. }
  2027. i += n32
  2028. dAtA[i] = 0x32
  2029. i++
  2030. i = encodeVarintSpecs(dAtA, i, uint64(m.CAConfig.Size()))
  2031. n33, err := m.CAConfig.MarshalTo(dAtA[i:])
  2032. if err != nil {
  2033. return 0, err
  2034. }
  2035. i += n33
  2036. dAtA[i] = 0x3a
  2037. i++
  2038. i = encodeVarintSpecs(dAtA, i, uint64(m.TaskDefaults.Size()))
  2039. n34, err := m.TaskDefaults.MarshalTo(dAtA[i:])
  2040. if err != nil {
  2041. return 0, err
  2042. }
  2043. i += n34
  2044. dAtA[i] = 0x42
  2045. i++
  2046. i = encodeVarintSpecs(dAtA, i, uint64(m.EncryptionConfig.Size()))
  2047. n35, err := m.EncryptionConfig.MarshalTo(dAtA[i:])
  2048. if err != nil {
  2049. return 0, err
  2050. }
  2051. i += n35
  2052. return i, nil
  2053. }
  2054. func (m *SecretSpec) Marshal() (dAtA []byte, err error) {
  2055. size := m.Size()
  2056. dAtA = make([]byte, size)
  2057. n, err := m.MarshalTo(dAtA)
  2058. if err != nil {
  2059. return nil, err
  2060. }
  2061. return dAtA[:n], nil
  2062. }
  2063. func (m *SecretSpec) MarshalTo(dAtA []byte) (int, error) {
  2064. var i int
  2065. _ = i
  2066. var l int
  2067. _ = l
  2068. dAtA[i] = 0xa
  2069. i++
  2070. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  2071. n36, err := m.Annotations.MarshalTo(dAtA[i:])
  2072. if err != nil {
  2073. return 0, err
  2074. }
  2075. i += n36
  2076. if len(m.Data) > 0 {
  2077. dAtA[i] = 0x12
  2078. i++
  2079. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Data)))
  2080. i += copy(dAtA[i:], m.Data)
  2081. }
  2082. if m.Templating != nil {
  2083. dAtA[i] = 0x1a
  2084. i++
  2085. i = encodeVarintSpecs(dAtA, i, uint64(m.Templating.Size()))
  2086. n37, err := m.Templating.MarshalTo(dAtA[i:])
  2087. if err != nil {
  2088. return 0, err
  2089. }
  2090. i += n37
  2091. }
  2092. return i, nil
  2093. }
  2094. func (m *ConfigSpec) Marshal() (dAtA []byte, err error) {
  2095. size := m.Size()
  2096. dAtA = make([]byte, size)
  2097. n, err := m.MarshalTo(dAtA)
  2098. if err != nil {
  2099. return nil, err
  2100. }
  2101. return dAtA[:n], nil
  2102. }
  2103. func (m *ConfigSpec) MarshalTo(dAtA []byte) (int, error) {
  2104. var i int
  2105. _ = i
  2106. var l int
  2107. _ = l
  2108. dAtA[i] = 0xa
  2109. i++
  2110. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  2111. n38, err := m.Annotations.MarshalTo(dAtA[i:])
  2112. if err != nil {
  2113. return 0, err
  2114. }
  2115. i += n38
  2116. if len(m.Data) > 0 {
  2117. dAtA[i] = 0x12
  2118. i++
  2119. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Data)))
  2120. i += copy(dAtA[i:], m.Data)
  2121. }
  2122. if m.Templating != nil {
  2123. dAtA[i] = 0x1a
  2124. i++
  2125. i = encodeVarintSpecs(dAtA, i, uint64(m.Templating.Size()))
  2126. n39, err := m.Templating.MarshalTo(dAtA[i:])
  2127. if err != nil {
  2128. return 0, err
  2129. }
  2130. i += n39
  2131. }
  2132. return i, nil
  2133. }
  2134. func encodeFixed64Specs(dAtA []byte, offset int, v uint64) int {
  2135. dAtA[offset] = uint8(v)
  2136. dAtA[offset+1] = uint8(v >> 8)
  2137. dAtA[offset+2] = uint8(v >> 16)
  2138. dAtA[offset+3] = uint8(v >> 24)
  2139. dAtA[offset+4] = uint8(v >> 32)
  2140. dAtA[offset+5] = uint8(v >> 40)
  2141. dAtA[offset+6] = uint8(v >> 48)
  2142. dAtA[offset+7] = uint8(v >> 56)
  2143. return offset + 8
  2144. }
  2145. func encodeFixed32Specs(dAtA []byte, offset int, v uint32) int {
  2146. dAtA[offset] = uint8(v)
  2147. dAtA[offset+1] = uint8(v >> 8)
  2148. dAtA[offset+2] = uint8(v >> 16)
  2149. dAtA[offset+3] = uint8(v >> 24)
  2150. return offset + 4
  2151. }
  2152. func encodeVarintSpecs(dAtA []byte, offset int, v uint64) int {
  2153. for v >= 1<<7 {
  2154. dAtA[offset] = uint8(v&0x7f | 0x80)
  2155. v >>= 7
  2156. offset++
  2157. }
  2158. dAtA[offset] = uint8(v)
  2159. return offset + 1
  2160. }
  2161. func (m *NodeSpec) Size() (n int) {
  2162. var l int
  2163. _ = l
  2164. l = m.Annotations.Size()
  2165. n += 1 + l + sovSpecs(uint64(l))
  2166. if m.DesiredRole != 0 {
  2167. n += 1 + sovSpecs(uint64(m.DesiredRole))
  2168. }
  2169. if m.Membership != 0 {
  2170. n += 1 + sovSpecs(uint64(m.Membership))
  2171. }
  2172. if m.Availability != 0 {
  2173. n += 1 + sovSpecs(uint64(m.Availability))
  2174. }
  2175. return n
  2176. }
  2177. func (m *ServiceSpec) Size() (n int) {
  2178. var l int
  2179. _ = l
  2180. l = m.Annotations.Size()
  2181. n += 1 + l + sovSpecs(uint64(l))
  2182. l = m.Task.Size()
  2183. n += 1 + l + sovSpecs(uint64(l))
  2184. if m.Mode != nil {
  2185. n += m.Mode.Size()
  2186. }
  2187. if m.Update != nil {
  2188. l = m.Update.Size()
  2189. n += 1 + l + sovSpecs(uint64(l))
  2190. }
  2191. if len(m.Networks) > 0 {
  2192. for _, e := range m.Networks {
  2193. l = e.Size()
  2194. n += 1 + l + sovSpecs(uint64(l))
  2195. }
  2196. }
  2197. if m.Endpoint != nil {
  2198. l = m.Endpoint.Size()
  2199. n += 1 + l + sovSpecs(uint64(l))
  2200. }
  2201. if m.Rollback != nil {
  2202. l = m.Rollback.Size()
  2203. n += 1 + l + sovSpecs(uint64(l))
  2204. }
  2205. return n
  2206. }
  2207. func (m *ServiceSpec_Replicated) Size() (n int) {
  2208. var l int
  2209. _ = l
  2210. if m.Replicated != nil {
  2211. l = m.Replicated.Size()
  2212. n += 1 + l + sovSpecs(uint64(l))
  2213. }
  2214. return n
  2215. }
  2216. func (m *ServiceSpec_Global) Size() (n int) {
  2217. var l int
  2218. _ = l
  2219. if m.Global != nil {
  2220. l = m.Global.Size()
  2221. n += 1 + l + sovSpecs(uint64(l))
  2222. }
  2223. return n
  2224. }
  2225. func (m *ReplicatedService) Size() (n int) {
  2226. var l int
  2227. _ = l
  2228. if m.Replicas != 0 {
  2229. n += 1 + sovSpecs(uint64(m.Replicas))
  2230. }
  2231. return n
  2232. }
  2233. func (m *GlobalService) Size() (n int) {
  2234. var l int
  2235. _ = l
  2236. return n
  2237. }
  2238. func (m *TaskSpec) Size() (n int) {
  2239. var l int
  2240. _ = l
  2241. if m.Runtime != nil {
  2242. n += m.Runtime.Size()
  2243. }
  2244. if m.Resources != nil {
  2245. l = m.Resources.Size()
  2246. n += 1 + l + sovSpecs(uint64(l))
  2247. }
  2248. if m.Restart != nil {
  2249. l = m.Restart.Size()
  2250. n += 1 + l + sovSpecs(uint64(l))
  2251. }
  2252. if m.Placement != nil {
  2253. l = m.Placement.Size()
  2254. n += 1 + l + sovSpecs(uint64(l))
  2255. }
  2256. if m.LogDriver != nil {
  2257. l = m.LogDriver.Size()
  2258. n += 1 + l + sovSpecs(uint64(l))
  2259. }
  2260. if len(m.Networks) > 0 {
  2261. for _, e := range m.Networks {
  2262. l = e.Size()
  2263. n += 1 + l + sovSpecs(uint64(l))
  2264. }
  2265. }
  2266. if m.ForceUpdate != 0 {
  2267. n += 1 + sovSpecs(uint64(m.ForceUpdate))
  2268. }
  2269. return n
  2270. }
  2271. func (m *TaskSpec_Container) Size() (n int) {
  2272. var l int
  2273. _ = l
  2274. if m.Container != nil {
  2275. l = m.Container.Size()
  2276. n += 1 + l + sovSpecs(uint64(l))
  2277. }
  2278. return n
  2279. }
  2280. func (m *TaskSpec_Attachment) Size() (n int) {
  2281. var l int
  2282. _ = l
  2283. if m.Attachment != nil {
  2284. l = m.Attachment.Size()
  2285. n += 1 + l + sovSpecs(uint64(l))
  2286. }
  2287. return n
  2288. }
  2289. func (m *TaskSpec_Generic) Size() (n int) {
  2290. var l int
  2291. _ = l
  2292. if m.Generic != nil {
  2293. l = m.Generic.Size()
  2294. n += 1 + l + sovSpecs(uint64(l))
  2295. }
  2296. return n
  2297. }
  2298. func (m *GenericRuntimeSpec) Size() (n int) {
  2299. var l int
  2300. _ = l
  2301. l = len(m.Kind)
  2302. if l > 0 {
  2303. n += 1 + l + sovSpecs(uint64(l))
  2304. }
  2305. if m.Payload != nil {
  2306. l = m.Payload.Size()
  2307. n += 1 + l + sovSpecs(uint64(l))
  2308. }
  2309. return n
  2310. }
  2311. func (m *NetworkAttachmentSpec) Size() (n int) {
  2312. var l int
  2313. _ = l
  2314. l = len(m.ContainerID)
  2315. if l > 0 {
  2316. n += 1 + l + sovSpecs(uint64(l))
  2317. }
  2318. return n
  2319. }
  2320. func (m *ContainerSpec) Size() (n int) {
  2321. var l int
  2322. _ = l
  2323. l = len(m.Image)
  2324. if l > 0 {
  2325. n += 1 + l + sovSpecs(uint64(l))
  2326. }
  2327. if len(m.Labels) > 0 {
  2328. for k, v := range m.Labels {
  2329. _ = k
  2330. _ = v
  2331. mapEntrySize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  2332. n += mapEntrySize + 1 + sovSpecs(uint64(mapEntrySize))
  2333. }
  2334. }
  2335. if len(m.Command) > 0 {
  2336. for _, s := range m.Command {
  2337. l = len(s)
  2338. n += 1 + l + sovSpecs(uint64(l))
  2339. }
  2340. }
  2341. if len(m.Args) > 0 {
  2342. for _, s := range m.Args {
  2343. l = len(s)
  2344. n += 1 + l + sovSpecs(uint64(l))
  2345. }
  2346. }
  2347. if len(m.Env) > 0 {
  2348. for _, s := range m.Env {
  2349. l = len(s)
  2350. n += 1 + l + sovSpecs(uint64(l))
  2351. }
  2352. }
  2353. l = len(m.Dir)
  2354. if l > 0 {
  2355. n += 1 + l + sovSpecs(uint64(l))
  2356. }
  2357. l = len(m.User)
  2358. if l > 0 {
  2359. n += 1 + l + sovSpecs(uint64(l))
  2360. }
  2361. if len(m.Mounts) > 0 {
  2362. for _, e := range m.Mounts {
  2363. l = e.Size()
  2364. n += 1 + l + sovSpecs(uint64(l))
  2365. }
  2366. }
  2367. if m.StopGracePeriod != nil {
  2368. l = m.StopGracePeriod.Size()
  2369. n += 1 + l + sovSpecs(uint64(l))
  2370. }
  2371. if m.PullOptions != nil {
  2372. l = m.PullOptions.Size()
  2373. n += 1 + l + sovSpecs(uint64(l))
  2374. }
  2375. if len(m.Groups) > 0 {
  2376. for _, s := range m.Groups {
  2377. l = len(s)
  2378. n += 1 + l + sovSpecs(uint64(l))
  2379. }
  2380. }
  2381. if len(m.Secrets) > 0 {
  2382. for _, e := range m.Secrets {
  2383. l = e.Size()
  2384. n += 1 + l + sovSpecs(uint64(l))
  2385. }
  2386. }
  2387. if m.TTY {
  2388. n += 2
  2389. }
  2390. l = len(m.Hostname)
  2391. if l > 0 {
  2392. n += 1 + l + sovSpecs(uint64(l))
  2393. }
  2394. if m.DNSConfig != nil {
  2395. l = m.DNSConfig.Size()
  2396. n += 1 + l + sovSpecs(uint64(l))
  2397. }
  2398. if m.Healthcheck != nil {
  2399. l = m.Healthcheck.Size()
  2400. n += 2 + l + sovSpecs(uint64(l))
  2401. }
  2402. if len(m.Hosts) > 0 {
  2403. for _, s := range m.Hosts {
  2404. l = len(s)
  2405. n += 2 + l + sovSpecs(uint64(l))
  2406. }
  2407. }
  2408. if m.OpenStdin {
  2409. n += 3
  2410. }
  2411. if m.ReadOnly {
  2412. n += 3
  2413. }
  2414. l = len(m.StopSignal)
  2415. if l > 0 {
  2416. n += 2 + l + sovSpecs(uint64(l))
  2417. }
  2418. if len(m.Configs) > 0 {
  2419. for _, e := range m.Configs {
  2420. l = e.Size()
  2421. n += 2 + l + sovSpecs(uint64(l))
  2422. }
  2423. }
  2424. if m.Privileges != nil {
  2425. l = m.Privileges.Size()
  2426. n += 2 + l + sovSpecs(uint64(l))
  2427. }
  2428. return n
  2429. }
  2430. func (m *ContainerSpec_PullOptions) Size() (n int) {
  2431. var l int
  2432. _ = l
  2433. l = len(m.RegistryAuth)
  2434. if l > 0 {
  2435. n += 2 + l + sovSpecs(uint64(l))
  2436. }
  2437. return n
  2438. }
  2439. func (m *ContainerSpec_DNSConfig) Size() (n int) {
  2440. var l int
  2441. _ = l
  2442. if len(m.Nameservers) > 0 {
  2443. for _, s := range m.Nameservers {
  2444. l = len(s)
  2445. n += 1 + l + sovSpecs(uint64(l))
  2446. }
  2447. }
  2448. if len(m.Search) > 0 {
  2449. for _, s := range m.Search {
  2450. l = len(s)
  2451. n += 1 + l + sovSpecs(uint64(l))
  2452. }
  2453. }
  2454. if len(m.Options) > 0 {
  2455. for _, s := range m.Options {
  2456. l = len(s)
  2457. n += 1 + l + sovSpecs(uint64(l))
  2458. }
  2459. }
  2460. return n
  2461. }
  2462. func (m *EndpointSpec) Size() (n int) {
  2463. var l int
  2464. _ = l
  2465. if m.Mode != 0 {
  2466. n += 1 + sovSpecs(uint64(m.Mode))
  2467. }
  2468. if len(m.Ports) > 0 {
  2469. for _, e := range m.Ports {
  2470. l = e.Size()
  2471. n += 1 + l + sovSpecs(uint64(l))
  2472. }
  2473. }
  2474. return n
  2475. }
  2476. func (m *NetworkSpec) Size() (n int) {
  2477. var l int
  2478. _ = l
  2479. l = m.Annotations.Size()
  2480. n += 1 + l + sovSpecs(uint64(l))
  2481. if m.DriverConfig != nil {
  2482. l = m.DriverConfig.Size()
  2483. n += 1 + l + sovSpecs(uint64(l))
  2484. }
  2485. if m.Ipv6Enabled {
  2486. n += 2
  2487. }
  2488. if m.Internal {
  2489. n += 2
  2490. }
  2491. if m.IPAM != nil {
  2492. l = m.IPAM.Size()
  2493. n += 1 + l + sovSpecs(uint64(l))
  2494. }
  2495. if m.Attachable {
  2496. n += 2
  2497. }
  2498. if m.Ingress {
  2499. n += 2
  2500. }
  2501. if m.ConfigFrom != nil {
  2502. n += m.ConfigFrom.Size()
  2503. }
  2504. return n
  2505. }
  2506. func (m *NetworkSpec_Network) Size() (n int) {
  2507. var l int
  2508. _ = l
  2509. l = len(m.Network)
  2510. n += 1 + l + sovSpecs(uint64(l))
  2511. return n
  2512. }
  2513. func (m *ClusterSpec) Size() (n int) {
  2514. var l int
  2515. _ = l
  2516. l = m.Annotations.Size()
  2517. n += 1 + l + sovSpecs(uint64(l))
  2518. l = m.AcceptancePolicy.Size()
  2519. n += 1 + l + sovSpecs(uint64(l))
  2520. l = m.Orchestration.Size()
  2521. n += 1 + l + sovSpecs(uint64(l))
  2522. l = m.Raft.Size()
  2523. n += 1 + l + sovSpecs(uint64(l))
  2524. l = m.Dispatcher.Size()
  2525. n += 1 + l + sovSpecs(uint64(l))
  2526. l = m.CAConfig.Size()
  2527. n += 1 + l + sovSpecs(uint64(l))
  2528. l = m.TaskDefaults.Size()
  2529. n += 1 + l + sovSpecs(uint64(l))
  2530. l = m.EncryptionConfig.Size()
  2531. n += 1 + l + sovSpecs(uint64(l))
  2532. return n
  2533. }
  2534. func (m *SecretSpec) Size() (n int) {
  2535. var l int
  2536. _ = l
  2537. l = m.Annotations.Size()
  2538. n += 1 + l + sovSpecs(uint64(l))
  2539. l = len(m.Data)
  2540. if l > 0 {
  2541. n += 1 + l + sovSpecs(uint64(l))
  2542. }
  2543. if m.Templating != nil {
  2544. l = m.Templating.Size()
  2545. n += 1 + l + sovSpecs(uint64(l))
  2546. }
  2547. return n
  2548. }
  2549. func (m *ConfigSpec) Size() (n int) {
  2550. var l int
  2551. _ = l
  2552. l = m.Annotations.Size()
  2553. n += 1 + l + sovSpecs(uint64(l))
  2554. l = len(m.Data)
  2555. if l > 0 {
  2556. n += 1 + l + sovSpecs(uint64(l))
  2557. }
  2558. if m.Templating != nil {
  2559. l = m.Templating.Size()
  2560. n += 1 + l + sovSpecs(uint64(l))
  2561. }
  2562. return n
  2563. }
  2564. func sovSpecs(x uint64) (n int) {
  2565. for {
  2566. n++
  2567. x >>= 7
  2568. if x == 0 {
  2569. break
  2570. }
  2571. }
  2572. return n
  2573. }
  2574. func sozSpecs(x uint64) (n int) {
  2575. return sovSpecs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  2576. }
  2577. func (this *NodeSpec) String() string {
  2578. if this == nil {
  2579. return "nil"
  2580. }
  2581. s := strings.Join([]string{`&NodeSpec{`,
  2582. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  2583. `DesiredRole:` + fmt.Sprintf("%v", this.DesiredRole) + `,`,
  2584. `Membership:` + fmt.Sprintf("%v", this.Membership) + `,`,
  2585. `Availability:` + fmt.Sprintf("%v", this.Availability) + `,`,
  2586. `}`,
  2587. }, "")
  2588. return s
  2589. }
  2590. func (this *ServiceSpec) String() string {
  2591. if this == nil {
  2592. return "nil"
  2593. }
  2594. s := strings.Join([]string{`&ServiceSpec{`,
  2595. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  2596. `Task:` + strings.Replace(strings.Replace(this.Task.String(), "TaskSpec", "TaskSpec", 1), `&`, ``, 1) + `,`,
  2597. `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
  2598. `Update:` + strings.Replace(fmt.Sprintf("%v", this.Update), "UpdateConfig", "UpdateConfig", 1) + `,`,
  2599. `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachmentConfig", "NetworkAttachmentConfig", 1) + `,`,
  2600. `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "EndpointSpec", "EndpointSpec", 1) + `,`,
  2601. `Rollback:` + strings.Replace(fmt.Sprintf("%v", this.Rollback), "UpdateConfig", "UpdateConfig", 1) + `,`,
  2602. `}`,
  2603. }, "")
  2604. return s
  2605. }
  2606. func (this *ServiceSpec_Replicated) String() string {
  2607. if this == nil {
  2608. return "nil"
  2609. }
  2610. s := strings.Join([]string{`&ServiceSpec_Replicated{`,
  2611. `Replicated:` + strings.Replace(fmt.Sprintf("%v", this.Replicated), "ReplicatedService", "ReplicatedService", 1) + `,`,
  2612. `}`,
  2613. }, "")
  2614. return s
  2615. }
  2616. func (this *ServiceSpec_Global) String() string {
  2617. if this == nil {
  2618. return "nil"
  2619. }
  2620. s := strings.Join([]string{`&ServiceSpec_Global{`,
  2621. `Global:` + strings.Replace(fmt.Sprintf("%v", this.Global), "GlobalService", "GlobalService", 1) + `,`,
  2622. `}`,
  2623. }, "")
  2624. return s
  2625. }
  2626. func (this *ReplicatedService) String() string {
  2627. if this == nil {
  2628. return "nil"
  2629. }
  2630. s := strings.Join([]string{`&ReplicatedService{`,
  2631. `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
  2632. `}`,
  2633. }, "")
  2634. return s
  2635. }
  2636. func (this *GlobalService) String() string {
  2637. if this == nil {
  2638. return "nil"
  2639. }
  2640. s := strings.Join([]string{`&GlobalService{`,
  2641. `}`,
  2642. }, "")
  2643. return s
  2644. }
  2645. func (this *TaskSpec) String() string {
  2646. if this == nil {
  2647. return "nil"
  2648. }
  2649. s := strings.Join([]string{`&TaskSpec{`,
  2650. `Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`,
  2651. `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "ResourceRequirements", "ResourceRequirements", 1) + `,`,
  2652. `Restart:` + strings.Replace(fmt.Sprintf("%v", this.Restart), "RestartPolicy", "RestartPolicy", 1) + `,`,
  2653. `Placement:` + strings.Replace(fmt.Sprintf("%v", this.Placement), "Placement", "Placement", 1) + `,`,
  2654. `LogDriver:` + strings.Replace(fmt.Sprintf("%v", this.LogDriver), "Driver", "Driver", 1) + `,`,
  2655. `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachmentConfig", "NetworkAttachmentConfig", 1) + `,`,
  2656. `ForceUpdate:` + fmt.Sprintf("%v", this.ForceUpdate) + `,`,
  2657. `}`,
  2658. }, "")
  2659. return s
  2660. }
  2661. func (this *TaskSpec_Container) String() string {
  2662. if this == nil {
  2663. return "nil"
  2664. }
  2665. s := strings.Join([]string{`&TaskSpec_Container{`,
  2666. `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerSpec", "ContainerSpec", 1) + `,`,
  2667. `}`,
  2668. }, "")
  2669. return s
  2670. }
  2671. func (this *TaskSpec_Attachment) String() string {
  2672. if this == nil {
  2673. return "nil"
  2674. }
  2675. s := strings.Join([]string{`&TaskSpec_Attachment{`,
  2676. `Attachment:` + strings.Replace(fmt.Sprintf("%v", this.Attachment), "NetworkAttachmentSpec", "NetworkAttachmentSpec", 1) + `,`,
  2677. `}`,
  2678. }, "")
  2679. return s
  2680. }
  2681. func (this *TaskSpec_Generic) String() string {
  2682. if this == nil {
  2683. return "nil"
  2684. }
  2685. s := strings.Join([]string{`&TaskSpec_Generic{`,
  2686. `Generic:` + strings.Replace(fmt.Sprintf("%v", this.Generic), "GenericRuntimeSpec", "GenericRuntimeSpec", 1) + `,`,
  2687. `}`,
  2688. }, "")
  2689. return s
  2690. }
  2691. func (this *GenericRuntimeSpec) String() string {
  2692. if this == nil {
  2693. return "nil"
  2694. }
  2695. s := strings.Join([]string{`&GenericRuntimeSpec{`,
  2696. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  2697. `Payload:` + strings.Replace(fmt.Sprintf("%v", this.Payload), "Any", "google_protobuf3.Any", 1) + `,`,
  2698. `}`,
  2699. }, "")
  2700. return s
  2701. }
  2702. func (this *NetworkAttachmentSpec) String() string {
  2703. if this == nil {
  2704. return "nil"
  2705. }
  2706. s := strings.Join([]string{`&NetworkAttachmentSpec{`,
  2707. `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
  2708. `}`,
  2709. }, "")
  2710. return s
  2711. }
  2712. func (this *ContainerSpec) String() string {
  2713. if this == nil {
  2714. return "nil"
  2715. }
  2716. keysForLabels := make([]string, 0, len(this.Labels))
  2717. for k, _ := range this.Labels {
  2718. keysForLabels = append(keysForLabels, k)
  2719. }
  2720. github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
  2721. mapStringForLabels := "map[string]string{"
  2722. for _, k := range keysForLabels {
  2723. mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
  2724. }
  2725. mapStringForLabels += "}"
  2726. s := strings.Join([]string{`&ContainerSpec{`,
  2727. `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
  2728. `Labels:` + mapStringForLabels + `,`,
  2729. `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
  2730. `Args:` + fmt.Sprintf("%v", this.Args) + `,`,
  2731. `Env:` + fmt.Sprintf("%v", this.Env) + `,`,
  2732. `Dir:` + fmt.Sprintf("%v", this.Dir) + `,`,
  2733. `User:` + fmt.Sprintf("%v", this.User) + `,`,
  2734. `Mounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1), `&`, ``, 1) + `,`,
  2735. `StopGracePeriod:` + strings.Replace(fmt.Sprintf("%v", this.StopGracePeriod), "Duration", "google_protobuf1.Duration", 1) + `,`,
  2736. `PullOptions:` + strings.Replace(fmt.Sprintf("%v", this.PullOptions), "ContainerSpec_PullOptions", "ContainerSpec_PullOptions", 1) + `,`,
  2737. `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
  2738. `Secrets:` + strings.Replace(fmt.Sprintf("%v", this.Secrets), "SecretReference", "SecretReference", 1) + `,`,
  2739. `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
  2740. `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
  2741. `DNSConfig:` + strings.Replace(fmt.Sprintf("%v", this.DNSConfig), "ContainerSpec_DNSConfig", "ContainerSpec_DNSConfig", 1) + `,`,
  2742. `Healthcheck:` + strings.Replace(fmt.Sprintf("%v", this.Healthcheck), "HealthConfig", "HealthConfig", 1) + `,`,
  2743. `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`,
  2744. `OpenStdin:` + fmt.Sprintf("%v", this.OpenStdin) + `,`,
  2745. `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
  2746. `StopSignal:` + fmt.Sprintf("%v", this.StopSignal) + `,`,
  2747. `Configs:` + strings.Replace(fmt.Sprintf("%v", this.Configs), "ConfigReference", "ConfigReference", 1) + `,`,
  2748. `Privileges:` + strings.Replace(fmt.Sprintf("%v", this.Privileges), "Privileges", "Privileges", 1) + `,`,
  2749. `}`,
  2750. }, "")
  2751. return s
  2752. }
  2753. func (this *ContainerSpec_PullOptions) String() string {
  2754. if this == nil {
  2755. return "nil"
  2756. }
  2757. s := strings.Join([]string{`&ContainerSpec_PullOptions{`,
  2758. `RegistryAuth:` + fmt.Sprintf("%v", this.RegistryAuth) + `,`,
  2759. `}`,
  2760. }, "")
  2761. return s
  2762. }
  2763. func (this *ContainerSpec_DNSConfig) String() string {
  2764. if this == nil {
  2765. return "nil"
  2766. }
  2767. s := strings.Join([]string{`&ContainerSpec_DNSConfig{`,
  2768. `Nameservers:` + fmt.Sprintf("%v", this.Nameservers) + `,`,
  2769. `Search:` + fmt.Sprintf("%v", this.Search) + `,`,
  2770. `Options:` + fmt.Sprintf("%v", this.Options) + `,`,
  2771. `}`,
  2772. }, "")
  2773. return s
  2774. }
  2775. func (this *EndpointSpec) String() string {
  2776. if this == nil {
  2777. return "nil"
  2778. }
  2779. s := strings.Join([]string{`&EndpointSpec{`,
  2780. `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
  2781. `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "PortConfig", "PortConfig", 1) + `,`,
  2782. `}`,
  2783. }, "")
  2784. return s
  2785. }
  2786. func (this *NetworkSpec) String() string {
  2787. if this == nil {
  2788. return "nil"
  2789. }
  2790. s := strings.Join([]string{`&NetworkSpec{`,
  2791. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  2792. `DriverConfig:` + strings.Replace(fmt.Sprintf("%v", this.DriverConfig), "Driver", "Driver", 1) + `,`,
  2793. `Ipv6Enabled:` + fmt.Sprintf("%v", this.Ipv6Enabled) + `,`,
  2794. `Internal:` + fmt.Sprintf("%v", this.Internal) + `,`,
  2795. `IPAM:` + strings.Replace(fmt.Sprintf("%v", this.IPAM), "IPAMOptions", "IPAMOptions", 1) + `,`,
  2796. `Attachable:` + fmt.Sprintf("%v", this.Attachable) + `,`,
  2797. `Ingress:` + fmt.Sprintf("%v", this.Ingress) + `,`,
  2798. `ConfigFrom:` + fmt.Sprintf("%v", this.ConfigFrom) + `,`,
  2799. `}`,
  2800. }, "")
  2801. return s
  2802. }
  2803. func (this *NetworkSpec_Network) String() string {
  2804. if this == nil {
  2805. return "nil"
  2806. }
  2807. s := strings.Join([]string{`&NetworkSpec_Network{`,
  2808. `Network:` + fmt.Sprintf("%v", this.Network) + `,`,
  2809. `}`,
  2810. }, "")
  2811. return s
  2812. }
  2813. func (this *ClusterSpec) String() string {
  2814. if this == nil {
  2815. return "nil"
  2816. }
  2817. s := strings.Join([]string{`&ClusterSpec{`,
  2818. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  2819. `AcceptancePolicy:` + strings.Replace(strings.Replace(this.AcceptancePolicy.String(), "AcceptancePolicy", "AcceptancePolicy", 1), `&`, ``, 1) + `,`,
  2820. `Orchestration:` + strings.Replace(strings.Replace(this.Orchestration.String(), "OrchestrationConfig", "OrchestrationConfig", 1), `&`, ``, 1) + `,`,
  2821. `Raft:` + strings.Replace(strings.Replace(this.Raft.String(), "RaftConfig", "RaftConfig", 1), `&`, ``, 1) + `,`,
  2822. `Dispatcher:` + strings.Replace(strings.Replace(this.Dispatcher.String(), "DispatcherConfig", "DispatcherConfig", 1), `&`, ``, 1) + `,`,
  2823. `CAConfig:` + strings.Replace(strings.Replace(this.CAConfig.String(), "CAConfig", "CAConfig", 1), `&`, ``, 1) + `,`,
  2824. `TaskDefaults:` + strings.Replace(strings.Replace(this.TaskDefaults.String(), "TaskDefaults", "TaskDefaults", 1), `&`, ``, 1) + `,`,
  2825. `EncryptionConfig:` + strings.Replace(strings.Replace(this.EncryptionConfig.String(), "EncryptionConfig", "EncryptionConfig", 1), `&`, ``, 1) + `,`,
  2826. `}`,
  2827. }, "")
  2828. return s
  2829. }
  2830. func (this *SecretSpec) String() string {
  2831. if this == nil {
  2832. return "nil"
  2833. }
  2834. s := strings.Join([]string{`&SecretSpec{`,
  2835. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  2836. `Data:` + fmt.Sprintf("%v", this.Data) + `,`,
  2837. `Templating:` + strings.Replace(fmt.Sprintf("%v", this.Templating), "Driver", "Driver", 1) + `,`,
  2838. `}`,
  2839. }, "")
  2840. return s
  2841. }
  2842. func (this *ConfigSpec) String() string {
  2843. if this == nil {
  2844. return "nil"
  2845. }
  2846. s := strings.Join([]string{`&ConfigSpec{`,
  2847. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  2848. `Data:` + fmt.Sprintf("%v", this.Data) + `,`,
  2849. `Templating:` + strings.Replace(fmt.Sprintf("%v", this.Templating), "Driver", "Driver", 1) + `,`,
  2850. `}`,
  2851. }, "")
  2852. return s
  2853. }
  2854. func valueToStringSpecs(v interface{}) string {
  2855. rv := reflect.ValueOf(v)
  2856. if rv.IsNil() {
  2857. return "nil"
  2858. }
  2859. pv := reflect.Indirect(rv).Interface()
  2860. return fmt.Sprintf("*%v", pv)
  2861. }
  2862. func (m *NodeSpec) Unmarshal(dAtA []byte) error {
  2863. l := len(dAtA)
  2864. iNdEx := 0
  2865. for iNdEx < l {
  2866. preIndex := iNdEx
  2867. var wire uint64
  2868. for shift := uint(0); ; shift += 7 {
  2869. if shift >= 64 {
  2870. return ErrIntOverflowSpecs
  2871. }
  2872. if iNdEx >= l {
  2873. return io.ErrUnexpectedEOF
  2874. }
  2875. b := dAtA[iNdEx]
  2876. iNdEx++
  2877. wire |= (uint64(b) & 0x7F) << shift
  2878. if b < 0x80 {
  2879. break
  2880. }
  2881. }
  2882. fieldNum := int32(wire >> 3)
  2883. wireType := int(wire & 0x7)
  2884. if wireType == 4 {
  2885. return fmt.Errorf("proto: NodeSpec: wiretype end group for non-group")
  2886. }
  2887. if fieldNum <= 0 {
  2888. return fmt.Errorf("proto: NodeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  2889. }
  2890. switch fieldNum {
  2891. case 1:
  2892. if wireType != 2 {
  2893. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  2894. }
  2895. var msglen int
  2896. for shift := uint(0); ; shift += 7 {
  2897. if shift >= 64 {
  2898. return ErrIntOverflowSpecs
  2899. }
  2900. if iNdEx >= l {
  2901. return io.ErrUnexpectedEOF
  2902. }
  2903. b := dAtA[iNdEx]
  2904. iNdEx++
  2905. msglen |= (int(b) & 0x7F) << shift
  2906. if b < 0x80 {
  2907. break
  2908. }
  2909. }
  2910. if msglen < 0 {
  2911. return ErrInvalidLengthSpecs
  2912. }
  2913. postIndex := iNdEx + msglen
  2914. if postIndex > l {
  2915. return io.ErrUnexpectedEOF
  2916. }
  2917. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  2918. return err
  2919. }
  2920. iNdEx = postIndex
  2921. case 2:
  2922. if wireType != 0 {
  2923. return fmt.Errorf("proto: wrong wireType = %d for field DesiredRole", wireType)
  2924. }
  2925. m.DesiredRole = 0
  2926. for shift := uint(0); ; shift += 7 {
  2927. if shift >= 64 {
  2928. return ErrIntOverflowSpecs
  2929. }
  2930. if iNdEx >= l {
  2931. return io.ErrUnexpectedEOF
  2932. }
  2933. b := dAtA[iNdEx]
  2934. iNdEx++
  2935. m.DesiredRole |= (NodeRole(b) & 0x7F) << shift
  2936. if b < 0x80 {
  2937. break
  2938. }
  2939. }
  2940. case 3:
  2941. if wireType != 0 {
  2942. return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
  2943. }
  2944. m.Membership = 0
  2945. for shift := uint(0); ; shift += 7 {
  2946. if shift >= 64 {
  2947. return ErrIntOverflowSpecs
  2948. }
  2949. if iNdEx >= l {
  2950. return io.ErrUnexpectedEOF
  2951. }
  2952. b := dAtA[iNdEx]
  2953. iNdEx++
  2954. m.Membership |= (NodeSpec_Membership(b) & 0x7F) << shift
  2955. if b < 0x80 {
  2956. break
  2957. }
  2958. }
  2959. case 4:
  2960. if wireType != 0 {
  2961. return fmt.Errorf("proto: wrong wireType = %d for field Availability", wireType)
  2962. }
  2963. m.Availability = 0
  2964. for shift := uint(0); ; shift += 7 {
  2965. if shift >= 64 {
  2966. return ErrIntOverflowSpecs
  2967. }
  2968. if iNdEx >= l {
  2969. return io.ErrUnexpectedEOF
  2970. }
  2971. b := dAtA[iNdEx]
  2972. iNdEx++
  2973. m.Availability |= (NodeSpec_Availability(b) & 0x7F) << shift
  2974. if b < 0x80 {
  2975. break
  2976. }
  2977. }
  2978. default:
  2979. iNdEx = preIndex
  2980. skippy, err := skipSpecs(dAtA[iNdEx:])
  2981. if err != nil {
  2982. return err
  2983. }
  2984. if skippy < 0 {
  2985. return ErrInvalidLengthSpecs
  2986. }
  2987. if (iNdEx + skippy) > l {
  2988. return io.ErrUnexpectedEOF
  2989. }
  2990. iNdEx += skippy
  2991. }
  2992. }
  2993. if iNdEx > l {
  2994. return io.ErrUnexpectedEOF
  2995. }
  2996. return nil
  2997. }
  2998. func (m *ServiceSpec) Unmarshal(dAtA []byte) error {
  2999. l := len(dAtA)
  3000. iNdEx := 0
  3001. for iNdEx < l {
  3002. preIndex := iNdEx
  3003. var wire uint64
  3004. for shift := uint(0); ; shift += 7 {
  3005. if shift >= 64 {
  3006. return ErrIntOverflowSpecs
  3007. }
  3008. if iNdEx >= l {
  3009. return io.ErrUnexpectedEOF
  3010. }
  3011. b := dAtA[iNdEx]
  3012. iNdEx++
  3013. wire |= (uint64(b) & 0x7F) << shift
  3014. if b < 0x80 {
  3015. break
  3016. }
  3017. }
  3018. fieldNum := int32(wire >> 3)
  3019. wireType := int(wire & 0x7)
  3020. if wireType == 4 {
  3021. return fmt.Errorf("proto: ServiceSpec: wiretype end group for non-group")
  3022. }
  3023. if fieldNum <= 0 {
  3024. return fmt.Errorf("proto: ServiceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3025. }
  3026. switch fieldNum {
  3027. case 1:
  3028. if wireType != 2 {
  3029. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  3030. }
  3031. var msglen int
  3032. for shift := uint(0); ; shift += 7 {
  3033. if shift >= 64 {
  3034. return ErrIntOverflowSpecs
  3035. }
  3036. if iNdEx >= l {
  3037. return io.ErrUnexpectedEOF
  3038. }
  3039. b := dAtA[iNdEx]
  3040. iNdEx++
  3041. msglen |= (int(b) & 0x7F) << shift
  3042. if b < 0x80 {
  3043. break
  3044. }
  3045. }
  3046. if msglen < 0 {
  3047. return ErrInvalidLengthSpecs
  3048. }
  3049. postIndex := iNdEx + msglen
  3050. if postIndex > l {
  3051. return io.ErrUnexpectedEOF
  3052. }
  3053. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3054. return err
  3055. }
  3056. iNdEx = postIndex
  3057. case 2:
  3058. if wireType != 2 {
  3059. return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
  3060. }
  3061. var msglen int
  3062. for shift := uint(0); ; shift += 7 {
  3063. if shift >= 64 {
  3064. return ErrIntOverflowSpecs
  3065. }
  3066. if iNdEx >= l {
  3067. return io.ErrUnexpectedEOF
  3068. }
  3069. b := dAtA[iNdEx]
  3070. iNdEx++
  3071. msglen |= (int(b) & 0x7F) << shift
  3072. if b < 0x80 {
  3073. break
  3074. }
  3075. }
  3076. if msglen < 0 {
  3077. return ErrInvalidLengthSpecs
  3078. }
  3079. postIndex := iNdEx + msglen
  3080. if postIndex > l {
  3081. return io.ErrUnexpectedEOF
  3082. }
  3083. if err := m.Task.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3084. return err
  3085. }
  3086. iNdEx = postIndex
  3087. case 3:
  3088. if wireType != 2 {
  3089. return fmt.Errorf("proto: wrong wireType = %d for field Replicated", wireType)
  3090. }
  3091. var msglen int
  3092. for shift := uint(0); ; shift += 7 {
  3093. if shift >= 64 {
  3094. return ErrIntOverflowSpecs
  3095. }
  3096. if iNdEx >= l {
  3097. return io.ErrUnexpectedEOF
  3098. }
  3099. b := dAtA[iNdEx]
  3100. iNdEx++
  3101. msglen |= (int(b) & 0x7F) << shift
  3102. if b < 0x80 {
  3103. break
  3104. }
  3105. }
  3106. if msglen < 0 {
  3107. return ErrInvalidLengthSpecs
  3108. }
  3109. postIndex := iNdEx + msglen
  3110. if postIndex > l {
  3111. return io.ErrUnexpectedEOF
  3112. }
  3113. v := &ReplicatedService{}
  3114. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3115. return err
  3116. }
  3117. m.Mode = &ServiceSpec_Replicated{v}
  3118. iNdEx = postIndex
  3119. case 4:
  3120. if wireType != 2 {
  3121. return fmt.Errorf("proto: wrong wireType = %d for field Global", wireType)
  3122. }
  3123. var msglen int
  3124. for shift := uint(0); ; shift += 7 {
  3125. if shift >= 64 {
  3126. return ErrIntOverflowSpecs
  3127. }
  3128. if iNdEx >= l {
  3129. return io.ErrUnexpectedEOF
  3130. }
  3131. b := dAtA[iNdEx]
  3132. iNdEx++
  3133. msglen |= (int(b) & 0x7F) << shift
  3134. if b < 0x80 {
  3135. break
  3136. }
  3137. }
  3138. if msglen < 0 {
  3139. return ErrInvalidLengthSpecs
  3140. }
  3141. postIndex := iNdEx + msglen
  3142. if postIndex > l {
  3143. return io.ErrUnexpectedEOF
  3144. }
  3145. v := &GlobalService{}
  3146. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3147. return err
  3148. }
  3149. m.Mode = &ServiceSpec_Global{v}
  3150. iNdEx = postIndex
  3151. case 6:
  3152. if wireType != 2 {
  3153. return fmt.Errorf("proto: wrong wireType = %d for field Update", wireType)
  3154. }
  3155. var msglen int
  3156. for shift := uint(0); ; shift += 7 {
  3157. if shift >= 64 {
  3158. return ErrIntOverflowSpecs
  3159. }
  3160. if iNdEx >= l {
  3161. return io.ErrUnexpectedEOF
  3162. }
  3163. b := dAtA[iNdEx]
  3164. iNdEx++
  3165. msglen |= (int(b) & 0x7F) << shift
  3166. if b < 0x80 {
  3167. break
  3168. }
  3169. }
  3170. if msglen < 0 {
  3171. return ErrInvalidLengthSpecs
  3172. }
  3173. postIndex := iNdEx + msglen
  3174. if postIndex > l {
  3175. return io.ErrUnexpectedEOF
  3176. }
  3177. if m.Update == nil {
  3178. m.Update = &UpdateConfig{}
  3179. }
  3180. if err := m.Update.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3181. return err
  3182. }
  3183. iNdEx = postIndex
  3184. case 7:
  3185. if wireType != 2 {
  3186. return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
  3187. }
  3188. var msglen int
  3189. for shift := uint(0); ; shift += 7 {
  3190. if shift >= 64 {
  3191. return ErrIntOverflowSpecs
  3192. }
  3193. if iNdEx >= l {
  3194. return io.ErrUnexpectedEOF
  3195. }
  3196. b := dAtA[iNdEx]
  3197. iNdEx++
  3198. msglen |= (int(b) & 0x7F) << shift
  3199. if b < 0x80 {
  3200. break
  3201. }
  3202. }
  3203. if msglen < 0 {
  3204. return ErrInvalidLengthSpecs
  3205. }
  3206. postIndex := iNdEx + msglen
  3207. if postIndex > l {
  3208. return io.ErrUnexpectedEOF
  3209. }
  3210. m.Networks = append(m.Networks, &NetworkAttachmentConfig{})
  3211. if err := m.Networks[len(m.Networks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3212. return err
  3213. }
  3214. iNdEx = postIndex
  3215. case 8:
  3216. if wireType != 2 {
  3217. return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
  3218. }
  3219. var msglen int
  3220. for shift := uint(0); ; shift += 7 {
  3221. if shift >= 64 {
  3222. return ErrIntOverflowSpecs
  3223. }
  3224. if iNdEx >= l {
  3225. return io.ErrUnexpectedEOF
  3226. }
  3227. b := dAtA[iNdEx]
  3228. iNdEx++
  3229. msglen |= (int(b) & 0x7F) << shift
  3230. if b < 0x80 {
  3231. break
  3232. }
  3233. }
  3234. if msglen < 0 {
  3235. return ErrInvalidLengthSpecs
  3236. }
  3237. postIndex := iNdEx + msglen
  3238. if postIndex > l {
  3239. return io.ErrUnexpectedEOF
  3240. }
  3241. if m.Endpoint == nil {
  3242. m.Endpoint = &EndpointSpec{}
  3243. }
  3244. if err := m.Endpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3245. return err
  3246. }
  3247. iNdEx = postIndex
  3248. case 9:
  3249. if wireType != 2 {
  3250. return fmt.Errorf("proto: wrong wireType = %d for field Rollback", wireType)
  3251. }
  3252. var msglen int
  3253. for shift := uint(0); ; shift += 7 {
  3254. if shift >= 64 {
  3255. return ErrIntOverflowSpecs
  3256. }
  3257. if iNdEx >= l {
  3258. return io.ErrUnexpectedEOF
  3259. }
  3260. b := dAtA[iNdEx]
  3261. iNdEx++
  3262. msglen |= (int(b) & 0x7F) << shift
  3263. if b < 0x80 {
  3264. break
  3265. }
  3266. }
  3267. if msglen < 0 {
  3268. return ErrInvalidLengthSpecs
  3269. }
  3270. postIndex := iNdEx + msglen
  3271. if postIndex > l {
  3272. return io.ErrUnexpectedEOF
  3273. }
  3274. if m.Rollback == nil {
  3275. m.Rollback = &UpdateConfig{}
  3276. }
  3277. if err := m.Rollback.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3278. return err
  3279. }
  3280. iNdEx = postIndex
  3281. default:
  3282. iNdEx = preIndex
  3283. skippy, err := skipSpecs(dAtA[iNdEx:])
  3284. if err != nil {
  3285. return err
  3286. }
  3287. if skippy < 0 {
  3288. return ErrInvalidLengthSpecs
  3289. }
  3290. if (iNdEx + skippy) > l {
  3291. return io.ErrUnexpectedEOF
  3292. }
  3293. iNdEx += skippy
  3294. }
  3295. }
  3296. if iNdEx > l {
  3297. return io.ErrUnexpectedEOF
  3298. }
  3299. return nil
  3300. }
  3301. func (m *ReplicatedService) Unmarshal(dAtA []byte) error {
  3302. l := len(dAtA)
  3303. iNdEx := 0
  3304. for iNdEx < l {
  3305. preIndex := iNdEx
  3306. var wire uint64
  3307. for shift := uint(0); ; shift += 7 {
  3308. if shift >= 64 {
  3309. return ErrIntOverflowSpecs
  3310. }
  3311. if iNdEx >= l {
  3312. return io.ErrUnexpectedEOF
  3313. }
  3314. b := dAtA[iNdEx]
  3315. iNdEx++
  3316. wire |= (uint64(b) & 0x7F) << shift
  3317. if b < 0x80 {
  3318. break
  3319. }
  3320. }
  3321. fieldNum := int32(wire >> 3)
  3322. wireType := int(wire & 0x7)
  3323. if wireType == 4 {
  3324. return fmt.Errorf("proto: ReplicatedService: wiretype end group for non-group")
  3325. }
  3326. if fieldNum <= 0 {
  3327. return fmt.Errorf("proto: ReplicatedService: illegal tag %d (wire type %d)", fieldNum, wire)
  3328. }
  3329. switch fieldNum {
  3330. case 1:
  3331. if wireType != 0 {
  3332. return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
  3333. }
  3334. m.Replicas = 0
  3335. for shift := uint(0); ; shift += 7 {
  3336. if shift >= 64 {
  3337. return ErrIntOverflowSpecs
  3338. }
  3339. if iNdEx >= l {
  3340. return io.ErrUnexpectedEOF
  3341. }
  3342. b := dAtA[iNdEx]
  3343. iNdEx++
  3344. m.Replicas |= (uint64(b) & 0x7F) << shift
  3345. if b < 0x80 {
  3346. break
  3347. }
  3348. }
  3349. default:
  3350. iNdEx = preIndex
  3351. skippy, err := skipSpecs(dAtA[iNdEx:])
  3352. if err != nil {
  3353. return err
  3354. }
  3355. if skippy < 0 {
  3356. return ErrInvalidLengthSpecs
  3357. }
  3358. if (iNdEx + skippy) > l {
  3359. return io.ErrUnexpectedEOF
  3360. }
  3361. iNdEx += skippy
  3362. }
  3363. }
  3364. if iNdEx > l {
  3365. return io.ErrUnexpectedEOF
  3366. }
  3367. return nil
  3368. }
  3369. func (m *GlobalService) Unmarshal(dAtA []byte) error {
  3370. l := len(dAtA)
  3371. iNdEx := 0
  3372. for iNdEx < l {
  3373. preIndex := iNdEx
  3374. var wire uint64
  3375. for shift := uint(0); ; shift += 7 {
  3376. if shift >= 64 {
  3377. return ErrIntOverflowSpecs
  3378. }
  3379. if iNdEx >= l {
  3380. return io.ErrUnexpectedEOF
  3381. }
  3382. b := dAtA[iNdEx]
  3383. iNdEx++
  3384. wire |= (uint64(b) & 0x7F) << shift
  3385. if b < 0x80 {
  3386. break
  3387. }
  3388. }
  3389. fieldNum := int32(wire >> 3)
  3390. wireType := int(wire & 0x7)
  3391. if wireType == 4 {
  3392. return fmt.Errorf("proto: GlobalService: wiretype end group for non-group")
  3393. }
  3394. if fieldNum <= 0 {
  3395. return fmt.Errorf("proto: GlobalService: illegal tag %d (wire type %d)", fieldNum, wire)
  3396. }
  3397. switch fieldNum {
  3398. default:
  3399. iNdEx = preIndex
  3400. skippy, err := skipSpecs(dAtA[iNdEx:])
  3401. if err != nil {
  3402. return err
  3403. }
  3404. if skippy < 0 {
  3405. return ErrInvalidLengthSpecs
  3406. }
  3407. if (iNdEx + skippy) > l {
  3408. return io.ErrUnexpectedEOF
  3409. }
  3410. iNdEx += skippy
  3411. }
  3412. }
  3413. if iNdEx > l {
  3414. return io.ErrUnexpectedEOF
  3415. }
  3416. return nil
  3417. }
  3418. func (m *TaskSpec) Unmarshal(dAtA []byte) error {
  3419. l := len(dAtA)
  3420. iNdEx := 0
  3421. for iNdEx < l {
  3422. preIndex := iNdEx
  3423. var wire uint64
  3424. for shift := uint(0); ; shift += 7 {
  3425. if shift >= 64 {
  3426. return ErrIntOverflowSpecs
  3427. }
  3428. if iNdEx >= l {
  3429. return io.ErrUnexpectedEOF
  3430. }
  3431. b := dAtA[iNdEx]
  3432. iNdEx++
  3433. wire |= (uint64(b) & 0x7F) << shift
  3434. if b < 0x80 {
  3435. break
  3436. }
  3437. }
  3438. fieldNum := int32(wire >> 3)
  3439. wireType := int(wire & 0x7)
  3440. if wireType == 4 {
  3441. return fmt.Errorf("proto: TaskSpec: wiretype end group for non-group")
  3442. }
  3443. if fieldNum <= 0 {
  3444. return fmt.Errorf("proto: TaskSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3445. }
  3446. switch fieldNum {
  3447. case 1:
  3448. if wireType != 2 {
  3449. return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
  3450. }
  3451. var msglen int
  3452. for shift := uint(0); ; shift += 7 {
  3453. if shift >= 64 {
  3454. return ErrIntOverflowSpecs
  3455. }
  3456. if iNdEx >= l {
  3457. return io.ErrUnexpectedEOF
  3458. }
  3459. b := dAtA[iNdEx]
  3460. iNdEx++
  3461. msglen |= (int(b) & 0x7F) << shift
  3462. if b < 0x80 {
  3463. break
  3464. }
  3465. }
  3466. if msglen < 0 {
  3467. return ErrInvalidLengthSpecs
  3468. }
  3469. postIndex := iNdEx + msglen
  3470. if postIndex > l {
  3471. return io.ErrUnexpectedEOF
  3472. }
  3473. v := &ContainerSpec{}
  3474. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3475. return err
  3476. }
  3477. m.Runtime = &TaskSpec_Container{v}
  3478. iNdEx = postIndex
  3479. case 2:
  3480. if wireType != 2 {
  3481. return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
  3482. }
  3483. var msglen int
  3484. for shift := uint(0); ; shift += 7 {
  3485. if shift >= 64 {
  3486. return ErrIntOverflowSpecs
  3487. }
  3488. if iNdEx >= l {
  3489. return io.ErrUnexpectedEOF
  3490. }
  3491. b := dAtA[iNdEx]
  3492. iNdEx++
  3493. msglen |= (int(b) & 0x7F) << shift
  3494. if b < 0x80 {
  3495. break
  3496. }
  3497. }
  3498. if msglen < 0 {
  3499. return ErrInvalidLengthSpecs
  3500. }
  3501. postIndex := iNdEx + msglen
  3502. if postIndex > l {
  3503. return io.ErrUnexpectedEOF
  3504. }
  3505. if m.Resources == nil {
  3506. m.Resources = &ResourceRequirements{}
  3507. }
  3508. if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3509. return err
  3510. }
  3511. iNdEx = postIndex
  3512. case 4:
  3513. if wireType != 2 {
  3514. return fmt.Errorf("proto: wrong wireType = %d for field Restart", wireType)
  3515. }
  3516. var msglen int
  3517. for shift := uint(0); ; shift += 7 {
  3518. if shift >= 64 {
  3519. return ErrIntOverflowSpecs
  3520. }
  3521. if iNdEx >= l {
  3522. return io.ErrUnexpectedEOF
  3523. }
  3524. b := dAtA[iNdEx]
  3525. iNdEx++
  3526. msglen |= (int(b) & 0x7F) << shift
  3527. if b < 0x80 {
  3528. break
  3529. }
  3530. }
  3531. if msglen < 0 {
  3532. return ErrInvalidLengthSpecs
  3533. }
  3534. postIndex := iNdEx + msglen
  3535. if postIndex > l {
  3536. return io.ErrUnexpectedEOF
  3537. }
  3538. if m.Restart == nil {
  3539. m.Restart = &RestartPolicy{}
  3540. }
  3541. if err := m.Restart.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3542. return err
  3543. }
  3544. iNdEx = postIndex
  3545. case 5:
  3546. if wireType != 2 {
  3547. return fmt.Errorf("proto: wrong wireType = %d for field Placement", wireType)
  3548. }
  3549. var msglen int
  3550. for shift := uint(0); ; shift += 7 {
  3551. if shift >= 64 {
  3552. return ErrIntOverflowSpecs
  3553. }
  3554. if iNdEx >= l {
  3555. return io.ErrUnexpectedEOF
  3556. }
  3557. b := dAtA[iNdEx]
  3558. iNdEx++
  3559. msglen |= (int(b) & 0x7F) << shift
  3560. if b < 0x80 {
  3561. break
  3562. }
  3563. }
  3564. if msglen < 0 {
  3565. return ErrInvalidLengthSpecs
  3566. }
  3567. postIndex := iNdEx + msglen
  3568. if postIndex > l {
  3569. return io.ErrUnexpectedEOF
  3570. }
  3571. if m.Placement == nil {
  3572. m.Placement = &Placement{}
  3573. }
  3574. if err := m.Placement.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3575. return err
  3576. }
  3577. iNdEx = postIndex
  3578. case 6:
  3579. if wireType != 2 {
  3580. return fmt.Errorf("proto: wrong wireType = %d for field LogDriver", wireType)
  3581. }
  3582. var msglen int
  3583. for shift := uint(0); ; shift += 7 {
  3584. if shift >= 64 {
  3585. return ErrIntOverflowSpecs
  3586. }
  3587. if iNdEx >= l {
  3588. return io.ErrUnexpectedEOF
  3589. }
  3590. b := dAtA[iNdEx]
  3591. iNdEx++
  3592. msglen |= (int(b) & 0x7F) << shift
  3593. if b < 0x80 {
  3594. break
  3595. }
  3596. }
  3597. if msglen < 0 {
  3598. return ErrInvalidLengthSpecs
  3599. }
  3600. postIndex := iNdEx + msglen
  3601. if postIndex > l {
  3602. return io.ErrUnexpectedEOF
  3603. }
  3604. if m.LogDriver == nil {
  3605. m.LogDriver = &Driver{}
  3606. }
  3607. if err := m.LogDriver.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3608. return err
  3609. }
  3610. iNdEx = postIndex
  3611. case 7:
  3612. if wireType != 2 {
  3613. return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
  3614. }
  3615. var msglen int
  3616. for shift := uint(0); ; shift += 7 {
  3617. if shift >= 64 {
  3618. return ErrIntOverflowSpecs
  3619. }
  3620. if iNdEx >= l {
  3621. return io.ErrUnexpectedEOF
  3622. }
  3623. b := dAtA[iNdEx]
  3624. iNdEx++
  3625. msglen |= (int(b) & 0x7F) << shift
  3626. if b < 0x80 {
  3627. break
  3628. }
  3629. }
  3630. if msglen < 0 {
  3631. return ErrInvalidLengthSpecs
  3632. }
  3633. postIndex := iNdEx + msglen
  3634. if postIndex > l {
  3635. return io.ErrUnexpectedEOF
  3636. }
  3637. m.Networks = append(m.Networks, &NetworkAttachmentConfig{})
  3638. if err := m.Networks[len(m.Networks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3639. return err
  3640. }
  3641. iNdEx = postIndex
  3642. case 8:
  3643. if wireType != 2 {
  3644. return fmt.Errorf("proto: wrong wireType = %d for field Attachment", wireType)
  3645. }
  3646. var msglen int
  3647. for shift := uint(0); ; shift += 7 {
  3648. if shift >= 64 {
  3649. return ErrIntOverflowSpecs
  3650. }
  3651. if iNdEx >= l {
  3652. return io.ErrUnexpectedEOF
  3653. }
  3654. b := dAtA[iNdEx]
  3655. iNdEx++
  3656. msglen |= (int(b) & 0x7F) << shift
  3657. if b < 0x80 {
  3658. break
  3659. }
  3660. }
  3661. if msglen < 0 {
  3662. return ErrInvalidLengthSpecs
  3663. }
  3664. postIndex := iNdEx + msglen
  3665. if postIndex > l {
  3666. return io.ErrUnexpectedEOF
  3667. }
  3668. v := &NetworkAttachmentSpec{}
  3669. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3670. return err
  3671. }
  3672. m.Runtime = &TaskSpec_Attachment{v}
  3673. iNdEx = postIndex
  3674. case 9:
  3675. if wireType != 0 {
  3676. return fmt.Errorf("proto: wrong wireType = %d for field ForceUpdate", wireType)
  3677. }
  3678. m.ForceUpdate = 0
  3679. for shift := uint(0); ; shift += 7 {
  3680. if shift >= 64 {
  3681. return ErrIntOverflowSpecs
  3682. }
  3683. if iNdEx >= l {
  3684. return io.ErrUnexpectedEOF
  3685. }
  3686. b := dAtA[iNdEx]
  3687. iNdEx++
  3688. m.ForceUpdate |= (uint64(b) & 0x7F) << shift
  3689. if b < 0x80 {
  3690. break
  3691. }
  3692. }
  3693. case 10:
  3694. if wireType != 2 {
  3695. return fmt.Errorf("proto: wrong wireType = %d for field Generic", wireType)
  3696. }
  3697. var msglen int
  3698. for shift := uint(0); ; shift += 7 {
  3699. if shift >= 64 {
  3700. return ErrIntOverflowSpecs
  3701. }
  3702. if iNdEx >= l {
  3703. return io.ErrUnexpectedEOF
  3704. }
  3705. b := dAtA[iNdEx]
  3706. iNdEx++
  3707. msglen |= (int(b) & 0x7F) << shift
  3708. if b < 0x80 {
  3709. break
  3710. }
  3711. }
  3712. if msglen < 0 {
  3713. return ErrInvalidLengthSpecs
  3714. }
  3715. postIndex := iNdEx + msglen
  3716. if postIndex > l {
  3717. return io.ErrUnexpectedEOF
  3718. }
  3719. v := &GenericRuntimeSpec{}
  3720. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3721. return err
  3722. }
  3723. m.Runtime = &TaskSpec_Generic{v}
  3724. iNdEx = postIndex
  3725. default:
  3726. iNdEx = preIndex
  3727. skippy, err := skipSpecs(dAtA[iNdEx:])
  3728. if err != nil {
  3729. return err
  3730. }
  3731. if skippy < 0 {
  3732. return ErrInvalidLengthSpecs
  3733. }
  3734. if (iNdEx + skippy) > l {
  3735. return io.ErrUnexpectedEOF
  3736. }
  3737. iNdEx += skippy
  3738. }
  3739. }
  3740. if iNdEx > l {
  3741. return io.ErrUnexpectedEOF
  3742. }
  3743. return nil
  3744. }
  3745. func (m *GenericRuntimeSpec) Unmarshal(dAtA []byte) error {
  3746. l := len(dAtA)
  3747. iNdEx := 0
  3748. for iNdEx < l {
  3749. preIndex := iNdEx
  3750. var wire uint64
  3751. for shift := uint(0); ; shift += 7 {
  3752. if shift >= 64 {
  3753. return ErrIntOverflowSpecs
  3754. }
  3755. if iNdEx >= l {
  3756. return io.ErrUnexpectedEOF
  3757. }
  3758. b := dAtA[iNdEx]
  3759. iNdEx++
  3760. wire |= (uint64(b) & 0x7F) << shift
  3761. if b < 0x80 {
  3762. break
  3763. }
  3764. }
  3765. fieldNum := int32(wire >> 3)
  3766. wireType := int(wire & 0x7)
  3767. if wireType == 4 {
  3768. return fmt.Errorf("proto: GenericRuntimeSpec: wiretype end group for non-group")
  3769. }
  3770. if fieldNum <= 0 {
  3771. return fmt.Errorf("proto: GenericRuntimeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3772. }
  3773. switch fieldNum {
  3774. case 1:
  3775. if wireType != 2 {
  3776. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  3777. }
  3778. var stringLen uint64
  3779. for shift := uint(0); ; shift += 7 {
  3780. if shift >= 64 {
  3781. return ErrIntOverflowSpecs
  3782. }
  3783. if iNdEx >= l {
  3784. return io.ErrUnexpectedEOF
  3785. }
  3786. b := dAtA[iNdEx]
  3787. iNdEx++
  3788. stringLen |= (uint64(b) & 0x7F) << shift
  3789. if b < 0x80 {
  3790. break
  3791. }
  3792. }
  3793. intStringLen := int(stringLen)
  3794. if intStringLen < 0 {
  3795. return ErrInvalidLengthSpecs
  3796. }
  3797. postIndex := iNdEx + intStringLen
  3798. if postIndex > l {
  3799. return io.ErrUnexpectedEOF
  3800. }
  3801. m.Kind = string(dAtA[iNdEx:postIndex])
  3802. iNdEx = postIndex
  3803. case 2:
  3804. if wireType != 2 {
  3805. return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
  3806. }
  3807. var msglen int
  3808. for shift := uint(0); ; shift += 7 {
  3809. if shift >= 64 {
  3810. return ErrIntOverflowSpecs
  3811. }
  3812. if iNdEx >= l {
  3813. return io.ErrUnexpectedEOF
  3814. }
  3815. b := dAtA[iNdEx]
  3816. iNdEx++
  3817. msglen |= (int(b) & 0x7F) << shift
  3818. if b < 0x80 {
  3819. break
  3820. }
  3821. }
  3822. if msglen < 0 {
  3823. return ErrInvalidLengthSpecs
  3824. }
  3825. postIndex := iNdEx + msglen
  3826. if postIndex > l {
  3827. return io.ErrUnexpectedEOF
  3828. }
  3829. if m.Payload == nil {
  3830. m.Payload = &google_protobuf3.Any{}
  3831. }
  3832. if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  3833. return err
  3834. }
  3835. iNdEx = postIndex
  3836. default:
  3837. iNdEx = preIndex
  3838. skippy, err := skipSpecs(dAtA[iNdEx:])
  3839. if err != nil {
  3840. return err
  3841. }
  3842. if skippy < 0 {
  3843. return ErrInvalidLengthSpecs
  3844. }
  3845. if (iNdEx + skippy) > l {
  3846. return io.ErrUnexpectedEOF
  3847. }
  3848. iNdEx += skippy
  3849. }
  3850. }
  3851. if iNdEx > l {
  3852. return io.ErrUnexpectedEOF
  3853. }
  3854. return nil
  3855. }
  3856. func (m *NetworkAttachmentSpec) Unmarshal(dAtA []byte) error {
  3857. l := len(dAtA)
  3858. iNdEx := 0
  3859. for iNdEx < l {
  3860. preIndex := iNdEx
  3861. var wire uint64
  3862. for shift := uint(0); ; shift += 7 {
  3863. if shift >= 64 {
  3864. return ErrIntOverflowSpecs
  3865. }
  3866. if iNdEx >= l {
  3867. return io.ErrUnexpectedEOF
  3868. }
  3869. b := dAtA[iNdEx]
  3870. iNdEx++
  3871. wire |= (uint64(b) & 0x7F) << shift
  3872. if b < 0x80 {
  3873. break
  3874. }
  3875. }
  3876. fieldNum := int32(wire >> 3)
  3877. wireType := int(wire & 0x7)
  3878. if wireType == 4 {
  3879. return fmt.Errorf("proto: NetworkAttachmentSpec: wiretype end group for non-group")
  3880. }
  3881. if fieldNum <= 0 {
  3882. return fmt.Errorf("proto: NetworkAttachmentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3883. }
  3884. switch fieldNum {
  3885. case 1:
  3886. if wireType != 2 {
  3887. return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
  3888. }
  3889. var stringLen uint64
  3890. for shift := uint(0); ; shift += 7 {
  3891. if shift >= 64 {
  3892. return ErrIntOverflowSpecs
  3893. }
  3894. if iNdEx >= l {
  3895. return io.ErrUnexpectedEOF
  3896. }
  3897. b := dAtA[iNdEx]
  3898. iNdEx++
  3899. stringLen |= (uint64(b) & 0x7F) << shift
  3900. if b < 0x80 {
  3901. break
  3902. }
  3903. }
  3904. intStringLen := int(stringLen)
  3905. if intStringLen < 0 {
  3906. return ErrInvalidLengthSpecs
  3907. }
  3908. postIndex := iNdEx + intStringLen
  3909. if postIndex > l {
  3910. return io.ErrUnexpectedEOF
  3911. }
  3912. m.ContainerID = string(dAtA[iNdEx:postIndex])
  3913. iNdEx = postIndex
  3914. default:
  3915. iNdEx = preIndex
  3916. skippy, err := skipSpecs(dAtA[iNdEx:])
  3917. if err != nil {
  3918. return err
  3919. }
  3920. if skippy < 0 {
  3921. return ErrInvalidLengthSpecs
  3922. }
  3923. if (iNdEx + skippy) > l {
  3924. return io.ErrUnexpectedEOF
  3925. }
  3926. iNdEx += skippy
  3927. }
  3928. }
  3929. if iNdEx > l {
  3930. return io.ErrUnexpectedEOF
  3931. }
  3932. return nil
  3933. }
  3934. func (m *ContainerSpec) Unmarshal(dAtA []byte) error {
  3935. l := len(dAtA)
  3936. iNdEx := 0
  3937. for iNdEx < l {
  3938. preIndex := iNdEx
  3939. var wire uint64
  3940. for shift := uint(0); ; shift += 7 {
  3941. if shift >= 64 {
  3942. return ErrIntOverflowSpecs
  3943. }
  3944. if iNdEx >= l {
  3945. return io.ErrUnexpectedEOF
  3946. }
  3947. b := dAtA[iNdEx]
  3948. iNdEx++
  3949. wire |= (uint64(b) & 0x7F) << shift
  3950. if b < 0x80 {
  3951. break
  3952. }
  3953. }
  3954. fieldNum := int32(wire >> 3)
  3955. wireType := int(wire & 0x7)
  3956. if wireType == 4 {
  3957. return fmt.Errorf("proto: ContainerSpec: wiretype end group for non-group")
  3958. }
  3959. if fieldNum <= 0 {
  3960. return fmt.Errorf("proto: ContainerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3961. }
  3962. switch fieldNum {
  3963. case 1:
  3964. if wireType != 2 {
  3965. return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
  3966. }
  3967. var stringLen uint64
  3968. for shift := uint(0); ; shift += 7 {
  3969. if shift >= 64 {
  3970. return ErrIntOverflowSpecs
  3971. }
  3972. if iNdEx >= l {
  3973. return io.ErrUnexpectedEOF
  3974. }
  3975. b := dAtA[iNdEx]
  3976. iNdEx++
  3977. stringLen |= (uint64(b) & 0x7F) << shift
  3978. if b < 0x80 {
  3979. break
  3980. }
  3981. }
  3982. intStringLen := int(stringLen)
  3983. if intStringLen < 0 {
  3984. return ErrInvalidLengthSpecs
  3985. }
  3986. postIndex := iNdEx + intStringLen
  3987. if postIndex > l {
  3988. return io.ErrUnexpectedEOF
  3989. }
  3990. m.Image = string(dAtA[iNdEx:postIndex])
  3991. iNdEx = postIndex
  3992. case 2:
  3993. if wireType != 2 {
  3994. return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
  3995. }
  3996. var msglen int
  3997. for shift := uint(0); ; shift += 7 {
  3998. if shift >= 64 {
  3999. return ErrIntOverflowSpecs
  4000. }
  4001. if iNdEx >= l {
  4002. return io.ErrUnexpectedEOF
  4003. }
  4004. b := dAtA[iNdEx]
  4005. iNdEx++
  4006. msglen |= (int(b) & 0x7F) << shift
  4007. if b < 0x80 {
  4008. break
  4009. }
  4010. }
  4011. if msglen < 0 {
  4012. return ErrInvalidLengthSpecs
  4013. }
  4014. postIndex := iNdEx + msglen
  4015. if postIndex > l {
  4016. return io.ErrUnexpectedEOF
  4017. }
  4018. var keykey uint64
  4019. for shift := uint(0); ; shift += 7 {
  4020. if shift >= 64 {
  4021. return ErrIntOverflowSpecs
  4022. }
  4023. if iNdEx >= l {
  4024. return io.ErrUnexpectedEOF
  4025. }
  4026. b := dAtA[iNdEx]
  4027. iNdEx++
  4028. keykey |= (uint64(b) & 0x7F) << shift
  4029. if b < 0x80 {
  4030. break
  4031. }
  4032. }
  4033. var stringLenmapkey uint64
  4034. for shift := uint(0); ; shift += 7 {
  4035. if shift >= 64 {
  4036. return ErrIntOverflowSpecs
  4037. }
  4038. if iNdEx >= l {
  4039. return io.ErrUnexpectedEOF
  4040. }
  4041. b := dAtA[iNdEx]
  4042. iNdEx++
  4043. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  4044. if b < 0x80 {
  4045. break
  4046. }
  4047. }
  4048. intStringLenmapkey := int(stringLenmapkey)
  4049. if intStringLenmapkey < 0 {
  4050. return ErrInvalidLengthSpecs
  4051. }
  4052. postStringIndexmapkey := iNdEx + intStringLenmapkey
  4053. if postStringIndexmapkey > l {
  4054. return io.ErrUnexpectedEOF
  4055. }
  4056. mapkey := string(dAtA[iNdEx:postStringIndexmapkey])
  4057. iNdEx = postStringIndexmapkey
  4058. if m.Labels == nil {
  4059. m.Labels = make(map[string]string)
  4060. }
  4061. if iNdEx < postIndex {
  4062. var valuekey uint64
  4063. for shift := uint(0); ; shift += 7 {
  4064. if shift >= 64 {
  4065. return ErrIntOverflowSpecs
  4066. }
  4067. if iNdEx >= l {
  4068. return io.ErrUnexpectedEOF
  4069. }
  4070. b := dAtA[iNdEx]
  4071. iNdEx++
  4072. valuekey |= (uint64(b) & 0x7F) << shift
  4073. if b < 0x80 {
  4074. break
  4075. }
  4076. }
  4077. var stringLenmapvalue uint64
  4078. for shift := uint(0); ; shift += 7 {
  4079. if shift >= 64 {
  4080. return ErrIntOverflowSpecs
  4081. }
  4082. if iNdEx >= l {
  4083. return io.ErrUnexpectedEOF
  4084. }
  4085. b := dAtA[iNdEx]
  4086. iNdEx++
  4087. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  4088. if b < 0x80 {
  4089. break
  4090. }
  4091. }
  4092. intStringLenmapvalue := int(stringLenmapvalue)
  4093. if intStringLenmapvalue < 0 {
  4094. return ErrInvalidLengthSpecs
  4095. }
  4096. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  4097. if postStringIndexmapvalue > l {
  4098. return io.ErrUnexpectedEOF
  4099. }
  4100. mapvalue := string(dAtA[iNdEx:postStringIndexmapvalue])
  4101. iNdEx = postStringIndexmapvalue
  4102. m.Labels[mapkey] = mapvalue
  4103. } else {
  4104. var mapvalue string
  4105. m.Labels[mapkey] = mapvalue
  4106. }
  4107. iNdEx = postIndex
  4108. case 3:
  4109. if wireType != 2 {
  4110. return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
  4111. }
  4112. var stringLen uint64
  4113. for shift := uint(0); ; shift += 7 {
  4114. if shift >= 64 {
  4115. return ErrIntOverflowSpecs
  4116. }
  4117. if iNdEx >= l {
  4118. return io.ErrUnexpectedEOF
  4119. }
  4120. b := dAtA[iNdEx]
  4121. iNdEx++
  4122. stringLen |= (uint64(b) & 0x7F) << shift
  4123. if b < 0x80 {
  4124. break
  4125. }
  4126. }
  4127. intStringLen := int(stringLen)
  4128. if intStringLen < 0 {
  4129. return ErrInvalidLengthSpecs
  4130. }
  4131. postIndex := iNdEx + intStringLen
  4132. if postIndex > l {
  4133. return io.ErrUnexpectedEOF
  4134. }
  4135. m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
  4136. iNdEx = postIndex
  4137. case 4:
  4138. if wireType != 2 {
  4139. return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
  4140. }
  4141. var stringLen uint64
  4142. for shift := uint(0); ; shift += 7 {
  4143. if shift >= 64 {
  4144. return ErrIntOverflowSpecs
  4145. }
  4146. if iNdEx >= l {
  4147. return io.ErrUnexpectedEOF
  4148. }
  4149. b := dAtA[iNdEx]
  4150. iNdEx++
  4151. stringLen |= (uint64(b) & 0x7F) << shift
  4152. if b < 0x80 {
  4153. break
  4154. }
  4155. }
  4156. intStringLen := int(stringLen)
  4157. if intStringLen < 0 {
  4158. return ErrInvalidLengthSpecs
  4159. }
  4160. postIndex := iNdEx + intStringLen
  4161. if postIndex > l {
  4162. return io.ErrUnexpectedEOF
  4163. }
  4164. m.Args = append(m.Args, string(dAtA[iNdEx:postIndex]))
  4165. iNdEx = postIndex
  4166. case 5:
  4167. if wireType != 2 {
  4168. return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
  4169. }
  4170. var stringLen uint64
  4171. for shift := uint(0); ; shift += 7 {
  4172. if shift >= 64 {
  4173. return ErrIntOverflowSpecs
  4174. }
  4175. if iNdEx >= l {
  4176. return io.ErrUnexpectedEOF
  4177. }
  4178. b := dAtA[iNdEx]
  4179. iNdEx++
  4180. stringLen |= (uint64(b) & 0x7F) << shift
  4181. if b < 0x80 {
  4182. break
  4183. }
  4184. }
  4185. intStringLen := int(stringLen)
  4186. if intStringLen < 0 {
  4187. return ErrInvalidLengthSpecs
  4188. }
  4189. postIndex := iNdEx + intStringLen
  4190. if postIndex > l {
  4191. return io.ErrUnexpectedEOF
  4192. }
  4193. m.Env = append(m.Env, string(dAtA[iNdEx:postIndex]))
  4194. iNdEx = postIndex
  4195. case 6:
  4196. if wireType != 2 {
  4197. return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType)
  4198. }
  4199. var stringLen uint64
  4200. for shift := uint(0); ; shift += 7 {
  4201. if shift >= 64 {
  4202. return ErrIntOverflowSpecs
  4203. }
  4204. if iNdEx >= l {
  4205. return io.ErrUnexpectedEOF
  4206. }
  4207. b := dAtA[iNdEx]
  4208. iNdEx++
  4209. stringLen |= (uint64(b) & 0x7F) << shift
  4210. if b < 0x80 {
  4211. break
  4212. }
  4213. }
  4214. intStringLen := int(stringLen)
  4215. if intStringLen < 0 {
  4216. return ErrInvalidLengthSpecs
  4217. }
  4218. postIndex := iNdEx + intStringLen
  4219. if postIndex > l {
  4220. return io.ErrUnexpectedEOF
  4221. }
  4222. m.Dir = string(dAtA[iNdEx:postIndex])
  4223. iNdEx = postIndex
  4224. case 7:
  4225. if wireType != 2 {
  4226. return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
  4227. }
  4228. var stringLen uint64
  4229. for shift := uint(0); ; shift += 7 {
  4230. if shift >= 64 {
  4231. return ErrIntOverflowSpecs
  4232. }
  4233. if iNdEx >= l {
  4234. return io.ErrUnexpectedEOF
  4235. }
  4236. b := dAtA[iNdEx]
  4237. iNdEx++
  4238. stringLen |= (uint64(b) & 0x7F) << shift
  4239. if b < 0x80 {
  4240. break
  4241. }
  4242. }
  4243. intStringLen := int(stringLen)
  4244. if intStringLen < 0 {
  4245. return ErrInvalidLengthSpecs
  4246. }
  4247. postIndex := iNdEx + intStringLen
  4248. if postIndex > l {
  4249. return io.ErrUnexpectedEOF
  4250. }
  4251. m.User = string(dAtA[iNdEx:postIndex])
  4252. iNdEx = postIndex
  4253. case 8:
  4254. if wireType != 2 {
  4255. return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
  4256. }
  4257. var msglen int
  4258. for shift := uint(0); ; shift += 7 {
  4259. if shift >= 64 {
  4260. return ErrIntOverflowSpecs
  4261. }
  4262. if iNdEx >= l {
  4263. return io.ErrUnexpectedEOF
  4264. }
  4265. b := dAtA[iNdEx]
  4266. iNdEx++
  4267. msglen |= (int(b) & 0x7F) << shift
  4268. if b < 0x80 {
  4269. break
  4270. }
  4271. }
  4272. if msglen < 0 {
  4273. return ErrInvalidLengthSpecs
  4274. }
  4275. postIndex := iNdEx + msglen
  4276. if postIndex > l {
  4277. return io.ErrUnexpectedEOF
  4278. }
  4279. m.Mounts = append(m.Mounts, Mount{})
  4280. if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4281. return err
  4282. }
  4283. iNdEx = postIndex
  4284. case 9:
  4285. if wireType != 2 {
  4286. return fmt.Errorf("proto: wrong wireType = %d for field StopGracePeriod", wireType)
  4287. }
  4288. var msglen int
  4289. for shift := uint(0); ; shift += 7 {
  4290. if shift >= 64 {
  4291. return ErrIntOverflowSpecs
  4292. }
  4293. if iNdEx >= l {
  4294. return io.ErrUnexpectedEOF
  4295. }
  4296. b := dAtA[iNdEx]
  4297. iNdEx++
  4298. msglen |= (int(b) & 0x7F) << shift
  4299. if b < 0x80 {
  4300. break
  4301. }
  4302. }
  4303. if msglen < 0 {
  4304. return ErrInvalidLengthSpecs
  4305. }
  4306. postIndex := iNdEx + msglen
  4307. if postIndex > l {
  4308. return io.ErrUnexpectedEOF
  4309. }
  4310. if m.StopGracePeriod == nil {
  4311. m.StopGracePeriod = &google_protobuf1.Duration{}
  4312. }
  4313. if err := m.StopGracePeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4314. return err
  4315. }
  4316. iNdEx = postIndex
  4317. case 10:
  4318. if wireType != 2 {
  4319. return fmt.Errorf("proto: wrong wireType = %d for field PullOptions", wireType)
  4320. }
  4321. var msglen int
  4322. for shift := uint(0); ; shift += 7 {
  4323. if shift >= 64 {
  4324. return ErrIntOverflowSpecs
  4325. }
  4326. if iNdEx >= l {
  4327. return io.ErrUnexpectedEOF
  4328. }
  4329. b := dAtA[iNdEx]
  4330. iNdEx++
  4331. msglen |= (int(b) & 0x7F) << shift
  4332. if b < 0x80 {
  4333. break
  4334. }
  4335. }
  4336. if msglen < 0 {
  4337. return ErrInvalidLengthSpecs
  4338. }
  4339. postIndex := iNdEx + msglen
  4340. if postIndex > l {
  4341. return io.ErrUnexpectedEOF
  4342. }
  4343. if m.PullOptions == nil {
  4344. m.PullOptions = &ContainerSpec_PullOptions{}
  4345. }
  4346. if err := m.PullOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4347. return err
  4348. }
  4349. iNdEx = postIndex
  4350. case 11:
  4351. if wireType != 2 {
  4352. return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
  4353. }
  4354. var stringLen uint64
  4355. for shift := uint(0); ; shift += 7 {
  4356. if shift >= 64 {
  4357. return ErrIntOverflowSpecs
  4358. }
  4359. if iNdEx >= l {
  4360. return io.ErrUnexpectedEOF
  4361. }
  4362. b := dAtA[iNdEx]
  4363. iNdEx++
  4364. stringLen |= (uint64(b) & 0x7F) << shift
  4365. if b < 0x80 {
  4366. break
  4367. }
  4368. }
  4369. intStringLen := int(stringLen)
  4370. if intStringLen < 0 {
  4371. return ErrInvalidLengthSpecs
  4372. }
  4373. postIndex := iNdEx + intStringLen
  4374. if postIndex > l {
  4375. return io.ErrUnexpectedEOF
  4376. }
  4377. m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
  4378. iNdEx = postIndex
  4379. case 12:
  4380. if wireType != 2 {
  4381. return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType)
  4382. }
  4383. var msglen int
  4384. for shift := uint(0); ; shift += 7 {
  4385. if shift >= 64 {
  4386. return ErrIntOverflowSpecs
  4387. }
  4388. if iNdEx >= l {
  4389. return io.ErrUnexpectedEOF
  4390. }
  4391. b := dAtA[iNdEx]
  4392. iNdEx++
  4393. msglen |= (int(b) & 0x7F) << shift
  4394. if b < 0x80 {
  4395. break
  4396. }
  4397. }
  4398. if msglen < 0 {
  4399. return ErrInvalidLengthSpecs
  4400. }
  4401. postIndex := iNdEx + msglen
  4402. if postIndex > l {
  4403. return io.ErrUnexpectedEOF
  4404. }
  4405. m.Secrets = append(m.Secrets, &SecretReference{})
  4406. if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4407. return err
  4408. }
  4409. iNdEx = postIndex
  4410. case 13:
  4411. if wireType != 0 {
  4412. return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
  4413. }
  4414. var v int
  4415. for shift := uint(0); ; shift += 7 {
  4416. if shift >= 64 {
  4417. return ErrIntOverflowSpecs
  4418. }
  4419. if iNdEx >= l {
  4420. return io.ErrUnexpectedEOF
  4421. }
  4422. b := dAtA[iNdEx]
  4423. iNdEx++
  4424. v |= (int(b) & 0x7F) << shift
  4425. if b < 0x80 {
  4426. break
  4427. }
  4428. }
  4429. m.TTY = bool(v != 0)
  4430. case 14:
  4431. if wireType != 2 {
  4432. return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
  4433. }
  4434. var stringLen uint64
  4435. for shift := uint(0); ; shift += 7 {
  4436. if shift >= 64 {
  4437. return ErrIntOverflowSpecs
  4438. }
  4439. if iNdEx >= l {
  4440. return io.ErrUnexpectedEOF
  4441. }
  4442. b := dAtA[iNdEx]
  4443. iNdEx++
  4444. stringLen |= (uint64(b) & 0x7F) << shift
  4445. if b < 0x80 {
  4446. break
  4447. }
  4448. }
  4449. intStringLen := int(stringLen)
  4450. if intStringLen < 0 {
  4451. return ErrInvalidLengthSpecs
  4452. }
  4453. postIndex := iNdEx + intStringLen
  4454. if postIndex > l {
  4455. return io.ErrUnexpectedEOF
  4456. }
  4457. m.Hostname = string(dAtA[iNdEx:postIndex])
  4458. iNdEx = postIndex
  4459. case 15:
  4460. if wireType != 2 {
  4461. return fmt.Errorf("proto: wrong wireType = %d for field DNSConfig", wireType)
  4462. }
  4463. var msglen int
  4464. for shift := uint(0); ; shift += 7 {
  4465. if shift >= 64 {
  4466. return ErrIntOverflowSpecs
  4467. }
  4468. if iNdEx >= l {
  4469. return io.ErrUnexpectedEOF
  4470. }
  4471. b := dAtA[iNdEx]
  4472. iNdEx++
  4473. msglen |= (int(b) & 0x7F) << shift
  4474. if b < 0x80 {
  4475. break
  4476. }
  4477. }
  4478. if msglen < 0 {
  4479. return ErrInvalidLengthSpecs
  4480. }
  4481. postIndex := iNdEx + msglen
  4482. if postIndex > l {
  4483. return io.ErrUnexpectedEOF
  4484. }
  4485. if m.DNSConfig == nil {
  4486. m.DNSConfig = &ContainerSpec_DNSConfig{}
  4487. }
  4488. if err := m.DNSConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4489. return err
  4490. }
  4491. iNdEx = postIndex
  4492. case 16:
  4493. if wireType != 2 {
  4494. return fmt.Errorf("proto: wrong wireType = %d for field Healthcheck", wireType)
  4495. }
  4496. var msglen int
  4497. for shift := uint(0); ; shift += 7 {
  4498. if shift >= 64 {
  4499. return ErrIntOverflowSpecs
  4500. }
  4501. if iNdEx >= l {
  4502. return io.ErrUnexpectedEOF
  4503. }
  4504. b := dAtA[iNdEx]
  4505. iNdEx++
  4506. msglen |= (int(b) & 0x7F) << shift
  4507. if b < 0x80 {
  4508. break
  4509. }
  4510. }
  4511. if msglen < 0 {
  4512. return ErrInvalidLengthSpecs
  4513. }
  4514. postIndex := iNdEx + msglen
  4515. if postIndex > l {
  4516. return io.ErrUnexpectedEOF
  4517. }
  4518. if m.Healthcheck == nil {
  4519. m.Healthcheck = &HealthConfig{}
  4520. }
  4521. if err := m.Healthcheck.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4522. return err
  4523. }
  4524. iNdEx = postIndex
  4525. case 17:
  4526. if wireType != 2 {
  4527. return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
  4528. }
  4529. var stringLen uint64
  4530. for shift := uint(0); ; shift += 7 {
  4531. if shift >= 64 {
  4532. return ErrIntOverflowSpecs
  4533. }
  4534. if iNdEx >= l {
  4535. return io.ErrUnexpectedEOF
  4536. }
  4537. b := dAtA[iNdEx]
  4538. iNdEx++
  4539. stringLen |= (uint64(b) & 0x7F) << shift
  4540. if b < 0x80 {
  4541. break
  4542. }
  4543. }
  4544. intStringLen := int(stringLen)
  4545. if intStringLen < 0 {
  4546. return ErrInvalidLengthSpecs
  4547. }
  4548. postIndex := iNdEx + intStringLen
  4549. if postIndex > l {
  4550. return io.ErrUnexpectedEOF
  4551. }
  4552. m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex]))
  4553. iNdEx = postIndex
  4554. case 18:
  4555. if wireType != 0 {
  4556. return fmt.Errorf("proto: wrong wireType = %d for field OpenStdin", wireType)
  4557. }
  4558. var v int
  4559. for shift := uint(0); ; shift += 7 {
  4560. if shift >= 64 {
  4561. return ErrIntOverflowSpecs
  4562. }
  4563. if iNdEx >= l {
  4564. return io.ErrUnexpectedEOF
  4565. }
  4566. b := dAtA[iNdEx]
  4567. iNdEx++
  4568. v |= (int(b) & 0x7F) << shift
  4569. if b < 0x80 {
  4570. break
  4571. }
  4572. }
  4573. m.OpenStdin = bool(v != 0)
  4574. case 19:
  4575. if wireType != 0 {
  4576. return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
  4577. }
  4578. var v int
  4579. for shift := uint(0); ; shift += 7 {
  4580. if shift >= 64 {
  4581. return ErrIntOverflowSpecs
  4582. }
  4583. if iNdEx >= l {
  4584. return io.ErrUnexpectedEOF
  4585. }
  4586. b := dAtA[iNdEx]
  4587. iNdEx++
  4588. v |= (int(b) & 0x7F) << shift
  4589. if b < 0x80 {
  4590. break
  4591. }
  4592. }
  4593. m.ReadOnly = bool(v != 0)
  4594. case 20:
  4595. if wireType != 2 {
  4596. return fmt.Errorf("proto: wrong wireType = %d for field StopSignal", wireType)
  4597. }
  4598. var stringLen uint64
  4599. for shift := uint(0); ; shift += 7 {
  4600. if shift >= 64 {
  4601. return ErrIntOverflowSpecs
  4602. }
  4603. if iNdEx >= l {
  4604. return io.ErrUnexpectedEOF
  4605. }
  4606. b := dAtA[iNdEx]
  4607. iNdEx++
  4608. stringLen |= (uint64(b) & 0x7F) << shift
  4609. if b < 0x80 {
  4610. break
  4611. }
  4612. }
  4613. intStringLen := int(stringLen)
  4614. if intStringLen < 0 {
  4615. return ErrInvalidLengthSpecs
  4616. }
  4617. postIndex := iNdEx + intStringLen
  4618. if postIndex > l {
  4619. return io.ErrUnexpectedEOF
  4620. }
  4621. m.StopSignal = string(dAtA[iNdEx:postIndex])
  4622. iNdEx = postIndex
  4623. case 21:
  4624. if wireType != 2 {
  4625. return fmt.Errorf("proto: wrong wireType = %d for field Configs", wireType)
  4626. }
  4627. var msglen int
  4628. for shift := uint(0); ; shift += 7 {
  4629. if shift >= 64 {
  4630. return ErrIntOverflowSpecs
  4631. }
  4632. if iNdEx >= l {
  4633. return io.ErrUnexpectedEOF
  4634. }
  4635. b := dAtA[iNdEx]
  4636. iNdEx++
  4637. msglen |= (int(b) & 0x7F) << shift
  4638. if b < 0x80 {
  4639. break
  4640. }
  4641. }
  4642. if msglen < 0 {
  4643. return ErrInvalidLengthSpecs
  4644. }
  4645. postIndex := iNdEx + msglen
  4646. if postIndex > l {
  4647. return io.ErrUnexpectedEOF
  4648. }
  4649. m.Configs = append(m.Configs, &ConfigReference{})
  4650. if err := m.Configs[len(m.Configs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4651. return err
  4652. }
  4653. iNdEx = postIndex
  4654. case 22:
  4655. if wireType != 2 {
  4656. return fmt.Errorf("proto: wrong wireType = %d for field Privileges", wireType)
  4657. }
  4658. var msglen int
  4659. for shift := uint(0); ; shift += 7 {
  4660. if shift >= 64 {
  4661. return ErrIntOverflowSpecs
  4662. }
  4663. if iNdEx >= l {
  4664. return io.ErrUnexpectedEOF
  4665. }
  4666. b := dAtA[iNdEx]
  4667. iNdEx++
  4668. msglen |= (int(b) & 0x7F) << shift
  4669. if b < 0x80 {
  4670. break
  4671. }
  4672. }
  4673. if msglen < 0 {
  4674. return ErrInvalidLengthSpecs
  4675. }
  4676. postIndex := iNdEx + msglen
  4677. if postIndex > l {
  4678. return io.ErrUnexpectedEOF
  4679. }
  4680. if m.Privileges == nil {
  4681. m.Privileges = &Privileges{}
  4682. }
  4683. if err := m.Privileges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4684. return err
  4685. }
  4686. iNdEx = postIndex
  4687. default:
  4688. iNdEx = preIndex
  4689. skippy, err := skipSpecs(dAtA[iNdEx:])
  4690. if err != nil {
  4691. return err
  4692. }
  4693. if skippy < 0 {
  4694. return ErrInvalidLengthSpecs
  4695. }
  4696. if (iNdEx + skippy) > l {
  4697. return io.ErrUnexpectedEOF
  4698. }
  4699. iNdEx += skippy
  4700. }
  4701. }
  4702. if iNdEx > l {
  4703. return io.ErrUnexpectedEOF
  4704. }
  4705. return nil
  4706. }
  4707. func (m *ContainerSpec_PullOptions) Unmarshal(dAtA []byte) error {
  4708. l := len(dAtA)
  4709. iNdEx := 0
  4710. for iNdEx < l {
  4711. preIndex := iNdEx
  4712. var wire uint64
  4713. for shift := uint(0); ; shift += 7 {
  4714. if shift >= 64 {
  4715. return ErrIntOverflowSpecs
  4716. }
  4717. if iNdEx >= l {
  4718. return io.ErrUnexpectedEOF
  4719. }
  4720. b := dAtA[iNdEx]
  4721. iNdEx++
  4722. wire |= (uint64(b) & 0x7F) << shift
  4723. if b < 0x80 {
  4724. break
  4725. }
  4726. }
  4727. fieldNum := int32(wire >> 3)
  4728. wireType := int(wire & 0x7)
  4729. if wireType == 4 {
  4730. return fmt.Errorf("proto: PullOptions: wiretype end group for non-group")
  4731. }
  4732. if fieldNum <= 0 {
  4733. return fmt.Errorf("proto: PullOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  4734. }
  4735. switch fieldNum {
  4736. case 64:
  4737. if wireType != 2 {
  4738. return fmt.Errorf("proto: wrong wireType = %d for field RegistryAuth", wireType)
  4739. }
  4740. var stringLen uint64
  4741. for shift := uint(0); ; shift += 7 {
  4742. if shift >= 64 {
  4743. return ErrIntOverflowSpecs
  4744. }
  4745. if iNdEx >= l {
  4746. return io.ErrUnexpectedEOF
  4747. }
  4748. b := dAtA[iNdEx]
  4749. iNdEx++
  4750. stringLen |= (uint64(b) & 0x7F) << shift
  4751. if b < 0x80 {
  4752. break
  4753. }
  4754. }
  4755. intStringLen := int(stringLen)
  4756. if intStringLen < 0 {
  4757. return ErrInvalidLengthSpecs
  4758. }
  4759. postIndex := iNdEx + intStringLen
  4760. if postIndex > l {
  4761. return io.ErrUnexpectedEOF
  4762. }
  4763. m.RegistryAuth = string(dAtA[iNdEx:postIndex])
  4764. iNdEx = postIndex
  4765. default:
  4766. iNdEx = preIndex
  4767. skippy, err := skipSpecs(dAtA[iNdEx:])
  4768. if err != nil {
  4769. return err
  4770. }
  4771. if skippy < 0 {
  4772. return ErrInvalidLengthSpecs
  4773. }
  4774. if (iNdEx + skippy) > l {
  4775. return io.ErrUnexpectedEOF
  4776. }
  4777. iNdEx += skippy
  4778. }
  4779. }
  4780. if iNdEx > l {
  4781. return io.ErrUnexpectedEOF
  4782. }
  4783. return nil
  4784. }
  4785. func (m *ContainerSpec_DNSConfig) Unmarshal(dAtA []byte) error {
  4786. l := len(dAtA)
  4787. iNdEx := 0
  4788. for iNdEx < l {
  4789. preIndex := iNdEx
  4790. var wire uint64
  4791. for shift := uint(0); ; shift += 7 {
  4792. if shift >= 64 {
  4793. return ErrIntOverflowSpecs
  4794. }
  4795. if iNdEx >= l {
  4796. return io.ErrUnexpectedEOF
  4797. }
  4798. b := dAtA[iNdEx]
  4799. iNdEx++
  4800. wire |= (uint64(b) & 0x7F) << shift
  4801. if b < 0x80 {
  4802. break
  4803. }
  4804. }
  4805. fieldNum := int32(wire >> 3)
  4806. wireType := int(wire & 0x7)
  4807. if wireType == 4 {
  4808. return fmt.Errorf("proto: DNSConfig: wiretype end group for non-group")
  4809. }
  4810. if fieldNum <= 0 {
  4811. return fmt.Errorf("proto: DNSConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  4812. }
  4813. switch fieldNum {
  4814. case 1:
  4815. if wireType != 2 {
  4816. return fmt.Errorf("proto: wrong wireType = %d for field Nameservers", wireType)
  4817. }
  4818. var stringLen uint64
  4819. for shift := uint(0); ; shift += 7 {
  4820. if shift >= 64 {
  4821. return ErrIntOverflowSpecs
  4822. }
  4823. if iNdEx >= l {
  4824. return io.ErrUnexpectedEOF
  4825. }
  4826. b := dAtA[iNdEx]
  4827. iNdEx++
  4828. stringLen |= (uint64(b) & 0x7F) << shift
  4829. if b < 0x80 {
  4830. break
  4831. }
  4832. }
  4833. intStringLen := int(stringLen)
  4834. if intStringLen < 0 {
  4835. return ErrInvalidLengthSpecs
  4836. }
  4837. postIndex := iNdEx + intStringLen
  4838. if postIndex > l {
  4839. return io.ErrUnexpectedEOF
  4840. }
  4841. m.Nameservers = append(m.Nameservers, string(dAtA[iNdEx:postIndex]))
  4842. iNdEx = postIndex
  4843. case 2:
  4844. if wireType != 2 {
  4845. return fmt.Errorf("proto: wrong wireType = %d for field Search", wireType)
  4846. }
  4847. var stringLen uint64
  4848. for shift := uint(0); ; shift += 7 {
  4849. if shift >= 64 {
  4850. return ErrIntOverflowSpecs
  4851. }
  4852. if iNdEx >= l {
  4853. return io.ErrUnexpectedEOF
  4854. }
  4855. b := dAtA[iNdEx]
  4856. iNdEx++
  4857. stringLen |= (uint64(b) & 0x7F) << shift
  4858. if b < 0x80 {
  4859. break
  4860. }
  4861. }
  4862. intStringLen := int(stringLen)
  4863. if intStringLen < 0 {
  4864. return ErrInvalidLengthSpecs
  4865. }
  4866. postIndex := iNdEx + intStringLen
  4867. if postIndex > l {
  4868. return io.ErrUnexpectedEOF
  4869. }
  4870. m.Search = append(m.Search, string(dAtA[iNdEx:postIndex]))
  4871. iNdEx = postIndex
  4872. case 3:
  4873. if wireType != 2 {
  4874. return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
  4875. }
  4876. var stringLen uint64
  4877. for shift := uint(0); ; shift += 7 {
  4878. if shift >= 64 {
  4879. return ErrIntOverflowSpecs
  4880. }
  4881. if iNdEx >= l {
  4882. return io.ErrUnexpectedEOF
  4883. }
  4884. b := dAtA[iNdEx]
  4885. iNdEx++
  4886. stringLen |= (uint64(b) & 0x7F) << shift
  4887. if b < 0x80 {
  4888. break
  4889. }
  4890. }
  4891. intStringLen := int(stringLen)
  4892. if intStringLen < 0 {
  4893. return ErrInvalidLengthSpecs
  4894. }
  4895. postIndex := iNdEx + intStringLen
  4896. if postIndex > l {
  4897. return io.ErrUnexpectedEOF
  4898. }
  4899. m.Options = append(m.Options, string(dAtA[iNdEx:postIndex]))
  4900. iNdEx = postIndex
  4901. default:
  4902. iNdEx = preIndex
  4903. skippy, err := skipSpecs(dAtA[iNdEx:])
  4904. if err != nil {
  4905. return err
  4906. }
  4907. if skippy < 0 {
  4908. return ErrInvalidLengthSpecs
  4909. }
  4910. if (iNdEx + skippy) > l {
  4911. return io.ErrUnexpectedEOF
  4912. }
  4913. iNdEx += skippy
  4914. }
  4915. }
  4916. if iNdEx > l {
  4917. return io.ErrUnexpectedEOF
  4918. }
  4919. return nil
  4920. }
  4921. func (m *EndpointSpec) Unmarshal(dAtA []byte) error {
  4922. l := len(dAtA)
  4923. iNdEx := 0
  4924. for iNdEx < l {
  4925. preIndex := iNdEx
  4926. var wire uint64
  4927. for shift := uint(0); ; shift += 7 {
  4928. if shift >= 64 {
  4929. return ErrIntOverflowSpecs
  4930. }
  4931. if iNdEx >= l {
  4932. return io.ErrUnexpectedEOF
  4933. }
  4934. b := dAtA[iNdEx]
  4935. iNdEx++
  4936. wire |= (uint64(b) & 0x7F) << shift
  4937. if b < 0x80 {
  4938. break
  4939. }
  4940. }
  4941. fieldNum := int32(wire >> 3)
  4942. wireType := int(wire & 0x7)
  4943. if wireType == 4 {
  4944. return fmt.Errorf("proto: EndpointSpec: wiretype end group for non-group")
  4945. }
  4946. if fieldNum <= 0 {
  4947. return fmt.Errorf("proto: EndpointSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  4948. }
  4949. switch fieldNum {
  4950. case 1:
  4951. if wireType != 0 {
  4952. return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
  4953. }
  4954. m.Mode = 0
  4955. for shift := uint(0); ; shift += 7 {
  4956. if shift >= 64 {
  4957. return ErrIntOverflowSpecs
  4958. }
  4959. if iNdEx >= l {
  4960. return io.ErrUnexpectedEOF
  4961. }
  4962. b := dAtA[iNdEx]
  4963. iNdEx++
  4964. m.Mode |= (EndpointSpec_ResolutionMode(b) & 0x7F) << shift
  4965. if b < 0x80 {
  4966. break
  4967. }
  4968. }
  4969. case 2:
  4970. if wireType != 2 {
  4971. return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
  4972. }
  4973. var msglen int
  4974. for shift := uint(0); ; shift += 7 {
  4975. if shift >= 64 {
  4976. return ErrIntOverflowSpecs
  4977. }
  4978. if iNdEx >= l {
  4979. return io.ErrUnexpectedEOF
  4980. }
  4981. b := dAtA[iNdEx]
  4982. iNdEx++
  4983. msglen |= (int(b) & 0x7F) << shift
  4984. if b < 0x80 {
  4985. break
  4986. }
  4987. }
  4988. if msglen < 0 {
  4989. return ErrInvalidLengthSpecs
  4990. }
  4991. postIndex := iNdEx + msglen
  4992. if postIndex > l {
  4993. return io.ErrUnexpectedEOF
  4994. }
  4995. m.Ports = append(m.Ports, &PortConfig{})
  4996. if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4997. return err
  4998. }
  4999. iNdEx = postIndex
  5000. default:
  5001. iNdEx = preIndex
  5002. skippy, err := skipSpecs(dAtA[iNdEx:])
  5003. if err != nil {
  5004. return err
  5005. }
  5006. if skippy < 0 {
  5007. return ErrInvalidLengthSpecs
  5008. }
  5009. if (iNdEx + skippy) > l {
  5010. return io.ErrUnexpectedEOF
  5011. }
  5012. iNdEx += skippy
  5013. }
  5014. }
  5015. if iNdEx > l {
  5016. return io.ErrUnexpectedEOF
  5017. }
  5018. return nil
  5019. }
  5020. func (m *NetworkSpec) Unmarshal(dAtA []byte) error {
  5021. l := len(dAtA)
  5022. iNdEx := 0
  5023. for iNdEx < l {
  5024. preIndex := iNdEx
  5025. var wire uint64
  5026. for shift := uint(0); ; shift += 7 {
  5027. if shift >= 64 {
  5028. return ErrIntOverflowSpecs
  5029. }
  5030. if iNdEx >= l {
  5031. return io.ErrUnexpectedEOF
  5032. }
  5033. b := dAtA[iNdEx]
  5034. iNdEx++
  5035. wire |= (uint64(b) & 0x7F) << shift
  5036. if b < 0x80 {
  5037. break
  5038. }
  5039. }
  5040. fieldNum := int32(wire >> 3)
  5041. wireType := int(wire & 0x7)
  5042. if wireType == 4 {
  5043. return fmt.Errorf("proto: NetworkSpec: wiretype end group for non-group")
  5044. }
  5045. if fieldNum <= 0 {
  5046. return fmt.Errorf("proto: NetworkSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5047. }
  5048. switch fieldNum {
  5049. case 1:
  5050. if wireType != 2 {
  5051. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  5052. }
  5053. var msglen int
  5054. for shift := uint(0); ; shift += 7 {
  5055. if shift >= 64 {
  5056. return ErrIntOverflowSpecs
  5057. }
  5058. if iNdEx >= l {
  5059. return io.ErrUnexpectedEOF
  5060. }
  5061. b := dAtA[iNdEx]
  5062. iNdEx++
  5063. msglen |= (int(b) & 0x7F) << shift
  5064. if b < 0x80 {
  5065. break
  5066. }
  5067. }
  5068. if msglen < 0 {
  5069. return ErrInvalidLengthSpecs
  5070. }
  5071. postIndex := iNdEx + msglen
  5072. if postIndex > l {
  5073. return io.ErrUnexpectedEOF
  5074. }
  5075. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5076. return err
  5077. }
  5078. iNdEx = postIndex
  5079. case 2:
  5080. if wireType != 2 {
  5081. return fmt.Errorf("proto: wrong wireType = %d for field DriverConfig", wireType)
  5082. }
  5083. var msglen int
  5084. for shift := uint(0); ; shift += 7 {
  5085. if shift >= 64 {
  5086. return ErrIntOverflowSpecs
  5087. }
  5088. if iNdEx >= l {
  5089. return io.ErrUnexpectedEOF
  5090. }
  5091. b := dAtA[iNdEx]
  5092. iNdEx++
  5093. msglen |= (int(b) & 0x7F) << shift
  5094. if b < 0x80 {
  5095. break
  5096. }
  5097. }
  5098. if msglen < 0 {
  5099. return ErrInvalidLengthSpecs
  5100. }
  5101. postIndex := iNdEx + msglen
  5102. if postIndex > l {
  5103. return io.ErrUnexpectedEOF
  5104. }
  5105. if m.DriverConfig == nil {
  5106. m.DriverConfig = &Driver{}
  5107. }
  5108. if err := m.DriverConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5109. return err
  5110. }
  5111. iNdEx = postIndex
  5112. case 3:
  5113. if wireType != 0 {
  5114. return fmt.Errorf("proto: wrong wireType = %d for field Ipv6Enabled", wireType)
  5115. }
  5116. var v int
  5117. for shift := uint(0); ; shift += 7 {
  5118. if shift >= 64 {
  5119. return ErrIntOverflowSpecs
  5120. }
  5121. if iNdEx >= l {
  5122. return io.ErrUnexpectedEOF
  5123. }
  5124. b := dAtA[iNdEx]
  5125. iNdEx++
  5126. v |= (int(b) & 0x7F) << shift
  5127. if b < 0x80 {
  5128. break
  5129. }
  5130. }
  5131. m.Ipv6Enabled = bool(v != 0)
  5132. case 4:
  5133. if wireType != 0 {
  5134. return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
  5135. }
  5136. var v int
  5137. for shift := uint(0); ; shift += 7 {
  5138. if shift >= 64 {
  5139. return ErrIntOverflowSpecs
  5140. }
  5141. if iNdEx >= l {
  5142. return io.ErrUnexpectedEOF
  5143. }
  5144. b := dAtA[iNdEx]
  5145. iNdEx++
  5146. v |= (int(b) & 0x7F) << shift
  5147. if b < 0x80 {
  5148. break
  5149. }
  5150. }
  5151. m.Internal = bool(v != 0)
  5152. case 5:
  5153. if wireType != 2 {
  5154. return fmt.Errorf("proto: wrong wireType = %d for field IPAM", wireType)
  5155. }
  5156. var msglen int
  5157. for shift := uint(0); ; shift += 7 {
  5158. if shift >= 64 {
  5159. return ErrIntOverflowSpecs
  5160. }
  5161. if iNdEx >= l {
  5162. return io.ErrUnexpectedEOF
  5163. }
  5164. b := dAtA[iNdEx]
  5165. iNdEx++
  5166. msglen |= (int(b) & 0x7F) << shift
  5167. if b < 0x80 {
  5168. break
  5169. }
  5170. }
  5171. if msglen < 0 {
  5172. return ErrInvalidLengthSpecs
  5173. }
  5174. postIndex := iNdEx + msglen
  5175. if postIndex > l {
  5176. return io.ErrUnexpectedEOF
  5177. }
  5178. if m.IPAM == nil {
  5179. m.IPAM = &IPAMOptions{}
  5180. }
  5181. if err := m.IPAM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5182. return err
  5183. }
  5184. iNdEx = postIndex
  5185. case 6:
  5186. if wireType != 0 {
  5187. return fmt.Errorf("proto: wrong wireType = %d for field Attachable", wireType)
  5188. }
  5189. var v int
  5190. for shift := uint(0); ; shift += 7 {
  5191. if shift >= 64 {
  5192. return ErrIntOverflowSpecs
  5193. }
  5194. if iNdEx >= l {
  5195. return io.ErrUnexpectedEOF
  5196. }
  5197. b := dAtA[iNdEx]
  5198. iNdEx++
  5199. v |= (int(b) & 0x7F) << shift
  5200. if b < 0x80 {
  5201. break
  5202. }
  5203. }
  5204. m.Attachable = bool(v != 0)
  5205. case 7:
  5206. if wireType != 0 {
  5207. return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
  5208. }
  5209. var v int
  5210. for shift := uint(0); ; shift += 7 {
  5211. if shift >= 64 {
  5212. return ErrIntOverflowSpecs
  5213. }
  5214. if iNdEx >= l {
  5215. return io.ErrUnexpectedEOF
  5216. }
  5217. b := dAtA[iNdEx]
  5218. iNdEx++
  5219. v |= (int(b) & 0x7F) << shift
  5220. if b < 0x80 {
  5221. break
  5222. }
  5223. }
  5224. m.Ingress = bool(v != 0)
  5225. case 8:
  5226. if wireType != 2 {
  5227. return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
  5228. }
  5229. var stringLen uint64
  5230. for shift := uint(0); ; shift += 7 {
  5231. if shift >= 64 {
  5232. return ErrIntOverflowSpecs
  5233. }
  5234. if iNdEx >= l {
  5235. return io.ErrUnexpectedEOF
  5236. }
  5237. b := dAtA[iNdEx]
  5238. iNdEx++
  5239. stringLen |= (uint64(b) & 0x7F) << shift
  5240. if b < 0x80 {
  5241. break
  5242. }
  5243. }
  5244. intStringLen := int(stringLen)
  5245. if intStringLen < 0 {
  5246. return ErrInvalidLengthSpecs
  5247. }
  5248. postIndex := iNdEx + intStringLen
  5249. if postIndex > l {
  5250. return io.ErrUnexpectedEOF
  5251. }
  5252. m.ConfigFrom = &NetworkSpec_Network{string(dAtA[iNdEx:postIndex])}
  5253. iNdEx = postIndex
  5254. default:
  5255. iNdEx = preIndex
  5256. skippy, err := skipSpecs(dAtA[iNdEx:])
  5257. if err != nil {
  5258. return err
  5259. }
  5260. if skippy < 0 {
  5261. return ErrInvalidLengthSpecs
  5262. }
  5263. if (iNdEx + skippy) > l {
  5264. return io.ErrUnexpectedEOF
  5265. }
  5266. iNdEx += skippy
  5267. }
  5268. }
  5269. if iNdEx > l {
  5270. return io.ErrUnexpectedEOF
  5271. }
  5272. return nil
  5273. }
  5274. func (m *ClusterSpec) Unmarshal(dAtA []byte) error {
  5275. l := len(dAtA)
  5276. iNdEx := 0
  5277. for iNdEx < l {
  5278. preIndex := iNdEx
  5279. var wire uint64
  5280. for shift := uint(0); ; shift += 7 {
  5281. if shift >= 64 {
  5282. return ErrIntOverflowSpecs
  5283. }
  5284. if iNdEx >= l {
  5285. return io.ErrUnexpectedEOF
  5286. }
  5287. b := dAtA[iNdEx]
  5288. iNdEx++
  5289. wire |= (uint64(b) & 0x7F) << shift
  5290. if b < 0x80 {
  5291. break
  5292. }
  5293. }
  5294. fieldNum := int32(wire >> 3)
  5295. wireType := int(wire & 0x7)
  5296. if wireType == 4 {
  5297. return fmt.Errorf("proto: ClusterSpec: wiretype end group for non-group")
  5298. }
  5299. if fieldNum <= 0 {
  5300. return fmt.Errorf("proto: ClusterSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5301. }
  5302. switch fieldNum {
  5303. case 1:
  5304. if wireType != 2 {
  5305. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  5306. }
  5307. var msglen int
  5308. for shift := uint(0); ; shift += 7 {
  5309. if shift >= 64 {
  5310. return ErrIntOverflowSpecs
  5311. }
  5312. if iNdEx >= l {
  5313. return io.ErrUnexpectedEOF
  5314. }
  5315. b := dAtA[iNdEx]
  5316. iNdEx++
  5317. msglen |= (int(b) & 0x7F) << shift
  5318. if b < 0x80 {
  5319. break
  5320. }
  5321. }
  5322. if msglen < 0 {
  5323. return ErrInvalidLengthSpecs
  5324. }
  5325. postIndex := iNdEx + msglen
  5326. if postIndex > l {
  5327. return io.ErrUnexpectedEOF
  5328. }
  5329. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5330. return err
  5331. }
  5332. iNdEx = postIndex
  5333. case 2:
  5334. if wireType != 2 {
  5335. return fmt.Errorf("proto: wrong wireType = %d for field AcceptancePolicy", wireType)
  5336. }
  5337. var msglen int
  5338. for shift := uint(0); ; shift += 7 {
  5339. if shift >= 64 {
  5340. return ErrIntOverflowSpecs
  5341. }
  5342. if iNdEx >= l {
  5343. return io.ErrUnexpectedEOF
  5344. }
  5345. b := dAtA[iNdEx]
  5346. iNdEx++
  5347. msglen |= (int(b) & 0x7F) << shift
  5348. if b < 0x80 {
  5349. break
  5350. }
  5351. }
  5352. if msglen < 0 {
  5353. return ErrInvalidLengthSpecs
  5354. }
  5355. postIndex := iNdEx + msglen
  5356. if postIndex > l {
  5357. return io.ErrUnexpectedEOF
  5358. }
  5359. if err := m.AcceptancePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5360. return err
  5361. }
  5362. iNdEx = postIndex
  5363. case 3:
  5364. if wireType != 2 {
  5365. return fmt.Errorf("proto: wrong wireType = %d for field Orchestration", wireType)
  5366. }
  5367. var msglen int
  5368. for shift := uint(0); ; shift += 7 {
  5369. if shift >= 64 {
  5370. return ErrIntOverflowSpecs
  5371. }
  5372. if iNdEx >= l {
  5373. return io.ErrUnexpectedEOF
  5374. }
  5375. b := dAtA[iNdEx]
  5376. iNdEx++
  5377. msglen |= (int(b) & 0x7F) << shift
  5378. if b < 0x80 {
  5379. break
  5380. }
  5381. }
  5382. if msglen < 0 {
  5383. return ErrInvalidLengthSpecs
  5384. }
  5385. postIndex := iNdEx + msglen
  5386. if postIndex > l {
  5387. return io.ErrUnexpectedEOF
  5388. }
  5389. if err := m.Orchestration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5390. return err
  5391. }
  5392. iNdEx = postIndex
  5393. case 4:
  5394. if wireType != 2 {
  5395. return fmt.Errorf("proto: wrong wireType = %d for field Raft", wireType)
  5396. }
  5397. var msglen int
  5398. for shift := uint(0); ; shift += 7 {
  5399. if shift >= 64 {
  5400. return ErrIntOverflowSpecs
  5401. }
  5402. if iNdEx >= l {
  5403. return io.ErrUnexpectedEOF
  5404. }
  5405. b := dAtA[iNdEx]
  5406. iNdEx++
  5407. msglen |= (int(b) & 0x7F) << shift
  5408. if b < 0x80 {
  5409. break
  5410. }
  5411. }
  5412. if msglen < 0 {
  5413. return ErrInvalidLengthSpecs
  5414. }
  5415. postIndex := iNdEx + msglen
  5416. if postIndex > l {
  5417. return io.ErrUnexpectedEOF
  5418. }
  5419. if err := m.Raft.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5420. return err
  5421. }
  5422. iNdEx = postIndex
  5423. case 5:
  5424. if wireType != 2 {
  5425. return fmt.Errorf("proto: wrong wireType = %d for field Dispatcher", wireType)
  5426. }
  5427. var msglen int
  5428. for shift := uint(0); ; shift += 7 {
  5429. if shift >= 64 {
  5430. return ErrIntOverflowSpecs
  5431. }
  5432. if iNdEx >= l {
  5433. return io.ErrUnexpectedEOF
  5434. }
  5435. b := dAtA[iNdEx]
  5436. iNdEx++
  5437. msglen |= (int(b) & 0x7F) << shift
  5438. if b < 0x80 {
  5439. break
  5440. }
  5441. }
  5442. if msglen < 0 {
  5443. return ErrInvalidLengthSpecs
  5444. }
  5445. postIndex := iNdEx + msglen
  5446. if postIndex > l {
  5447. return io.ErrUnexpectedEOF
  5448. }
  5449. if err := m.Dispatcher.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5450. return err
  5451. }
  5452. iNdEx = postIndex
  5453. case 6:
  5454. if wireType != 2 {
  5455. return fmt.Errorf("proto: wrong wireType = %d for field CAConfig", wireType)
  5456. }
  5457. var msglen int
  5458. for shift := uint(0); ; shift += 7 {
  5459. if shift >= 64 {
  5460. return ErrIntOverflowSpecs
  5461. }
  5462. if iNdEx >= l {
  5463. return io.ErrUnexpectedEOF
  5464. }
  5465. b := dAtA[iNdEx]
  5466. iNdEx++
  5467. msglen |= (int(b) & 0x7F) << shift
  5468. if b < 0x80 {
  5469. break
  5470. }
  5471. }
  5472. if msglen < 0 {
  5473. return ErrInvalidLengthSpecs
  5474. }
  5475. postIndex := iNdEx + msglen
  5476. if postIndex > l {
  5477. return io.ErrUnexpectedEOF
  5478. }
  5479. if err := m.CAConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5480. return err
  5481. }
  5482. iNdEx = postIndex
  5483. case 7:
  5484. if wireType != 2 {
  5485. return fmt.Errorf("proto: wrong wireType = %d for field TaskDefaults", wireType)
  5486. }
  5487. var msglen int
  5488. for shift := uint(0); ; shift += 7 {
  5489. if shift >= 64 {
  5490. return ErrIntOverflowSpecs
  5491. }
  5492. if iNdEx >= l {
  5493. return io.ErrUnexpectedEOF
  5494. }
  5495. b := dAtA[iNdEx]
  5496. iNdEx++
  5497. msglen |= (int(b) & 0x7F) << shift
  5498. if b < 0x80 {
  5499. break
  5500. }
  5501. }
  5502. if msglen < 0 {
  5503. return ErrInvalidLengthSpecs
  5504. }
  5505. postIndex := iNdEx + msglen
  5506. if postIndex > l {
  5507. return io.ErrUnexpectedEOF
  5508. }
  5509. if err := m.TaskDefaults.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5510. return err
  5511. }
  5512. iNdEx = postIndex
  5513. case 8:
  5514. if wireType != 2 {
  5515. return fmt.Errorf("proto: wrong wireType = %d for field EncryptionConfig", wireType)
  5516. }
  5517. var msglen int
  5518. for shift := uint(0); ; shift += 7 {
  5519. if shift >= 64 {
  5520. return ErrIntOverflowSpecs
  5521. }
  5522. if iNdEx >= l {
  5523. return io.ErrUnexpectedEOF
  5524. }
  5525. b := dAtA[iNdEx]
  5526. iNdEx++
  5527. msglen |= (int(b) & 0x7F) << shift
  5528. if b < 0x80 {
  5529. break
  5530. }
  5531. }
  5532. if msglen < 0 {
  5533. return ErrInvalidLengthSpecs
  5534. }
  5535. postIndex := iNdEx + msglen
  5536. if postIndex > l {
  5537. return io.ErrUnexpectedEOF
  5538. }
  5539. if err := m.EncryptionConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5540. return err
  5541. }
  5542. iNdEx = postIndex
  5543. default:
  5544. iNdEx = preIndex
  5545. skippy, err := skipSpecs(dAtA[iNdEx:])
  5546. if err != nil {
  5547. return err
  5548. }
  5549. if skippy < 0 {
  5550. return ErrInvalidLengthSpecs
  5551. }
  5552. if (iNdEx + skippy) > l {
  5553. return io.ErrUnexpectedEOF
  5554. }
  5555. iNdEx += skippy
  5556. }
  5557. }
  5558. if iNdEx > l {
  5559. return io.ErrUnexpectedEOF
  5560. }
  5561. return nil
  5562. }
  5563. func (m *SecretSpec) Unmarshal(dAtA []byte) error {
  5564. l := len(dAtA)
  5565. iNdEx := 0
  5566. for iNdEx < l {
  5567. preIndex := iNdEx
  5568. var wire uint64
  5569. for shift := uint(0); ; shift += 7 {
  5570. if shift >= 64 {
  5571. return ErrIntOverflowSpecs
  5572. }
  5573. if iNdEx >= l {
  5574. return io.ErrUnexpectedEOF
  5575. }
  5576. b := dAtA[iNdEx]
  5577. iNdEx++
  5578. wire |= (uint64(b) & 0x7F) << shift
  5579. if b < 0x80 {
  5580. break
  5581. }
  5582. }
  5583. fieldNum := int32(wire >> 3)
  5584. wireType := int(wire & 0x7)
  5585. if wireType == 4 {
  5586. return fmt.Errorf("proto: SecretSpec: wiretype end group for non-group")
  5587. }
  5588. if fieldNum <= 0 {
  5589. return fmt.Errorf("proto: SecretSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5590. }
  5591. switch fieldNum {
  5592. case 1:
  5593. if wireType != 2 {
  5594. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  5595. }
  5596. var msglen int
  5597. for shift := uint(0); ; shift += 7 {
  5598. if shift >= 64 {
  5599. return ErrIntOverflowSpecs
  5600. }
  5601. if iNdEx >= l {
  5602. return io.ErrUnexpectedEOF
  5603. }
  5604. b := dAtA[iNdEx]
  5605. iNdEx++
  5606. msglen |= (int(b) & 0x7F) << shift
  5607. if b < 0x80 {
  5608. break
  5609. }
  5610. }
  5611. if msglen < 0 {
  5612. return ErrInvalidLengthSpecs
  5613. }
  5614. postIndex := iNdEx + msglen
  5615. if postIndex > l {
  5616. return io.ErrUnexpectedEOF
  5617. }
  5618. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5619. return err
  5620. }
  5621. iNdEx = postIndex
  5622. case 2:
  5623. if wireType != 2 {
  5624. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  5625. }
  5626. var byteLen int
  5627. for shift := uint(0); ; shift += 7 {
  5628. if shift >= 64 {
  5629. return ErrIntOverflowSpecs
  5630. }
  5631. if iNdEx >= l {
  5632. return io.ErrUnexpectedEOF
  5633. }
  5634. b := dAtA[iNdEx]
  5635. iNdEx++
  5636. byteLen |= (int(b) & 0x7F) << shift
  5637. if b < 0x80 {
  5638. break
  5639. }
  5640. }
  5641. if byteLen < 0 {
  5642. return ErrInvalidLengthSpecs
  5643. }
  5644. postIndex := iNdEx + byteLen
  5645. if postIndex > l {
  5646. return io.ErrUnexpectedEOF
  5647. }
  5648. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  5649. if m.Data == nil {
  5650. m.Data = []byte{}
  5651. }
  5652. iNdEx = postIndex
  5653. case 3:
  5654. if wireType != 2 {
  5655. return fmt.Errorf("proto: wrong wireType = %d for field Templating", wireType)
  5656. }
  5657. var msglen int
  5658. for shift := uint(0); ; shift += 7 {
  5659. if shift >= 64 {
  5660. return ErrIntOverflowSpecs
  5661. }
  5662. if iNdEx >= l {
  5663. return io.ErrUnexpectedEOF
  5664. }
  5665. b := dAtA[iNdEx]
  5666. iNdEx++
  5667. msglen |= (int(b) & 0x7F) << shift
  5668. if b < 0x80 {
  5669. break
  5670. }
  5671. }
  5672. if msglen < 0 {
  5673. return ErrInvalidLengthSpecs
  5674. }
  5675. postIndex := iNdEx + msglen
  5676. if postIndex > l {
  5677. return io.ErrUnexpectedEOF
  5678. }
  5679. if m.Templating == nil {
  5680. m.Templating = &Driver{}
  5681. }
  5682. if err := m.Templating.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5683. return err
  5684. }
  5685. iNdEx = postIndex
  5686. default:
  5687. iNdEx = preIndex
  5688. skippy, err := skipSpecs(dAtA[iNdEx:])
  5689. if err != nil {
  5690. return err
  5691. }
  5692. if skippy < 0 {
  5693. return ErrInvalidLengthSpecs
  5694. }
  5695. if (iNdEx + skippy) > l {
  5696. return io.ErrUnexpectedEOF
  5697. }
  5698. iNdEx += skippy
  5699. }
  5700. }
  5701. if iNdEx > l {
  5702. return io.ErrUnexpectedEOF
  5703. }
  5704. return nil
  5705. }
  5706. func (m *ConfigSpec) Unmarshal(dAtA []byte) error {
  5707. l := len(dAtA)
  5708. iNdEx := 0
  5709. for iNdEx < l {
  5710. preIndex := iNdEx
  5711. var wire uint64
  5712. for shift := uint(0); ; shift += 7 {
  5713. if shift >= 64 {
  5714. return ErrIntOverflowSpecs
  5715. }
  5716. if iNdEx >= l {
  5717. return io.ErrUnexpectedEOF
  5718. }
  5719. b := dAtA[iNdEx]
  5720. iNdEx++
  5721. wire |= (uint64(b) & 0x7F) << shift
  5722. if b < 0x80 {
  5723. break
  5724. }
  5725. }
  5726. fieldNum := int32(wire >> 3)
  5727. wireType := int(wire & 0x7)
  5728. if wireType == 4 {
  5729. return fmt.Errorf("proto: ConfigSpec: wiretype end group for non-group")
  5730. }
  5731. if fieldNum <= 0 {
  5732. return fmt.Errorf("proto: ConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5733. }
  5734. switch fieldNum {
  5735. case 1:
  5736. if wireType != 2 {
  5737. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  5738. }
  5739. var msglen int
  5740. for shift := uint(0); ; shift += 7 {
  5741. if shift >= 64 {
  5742. return ErrIntOverflowSpecs
  5743. }
  5744. if iNdEx >= l {
  5745. return io.ErrUnexpectedEOF
  5746. }
  5747. b := dAtA[iNdEx]
  5748. iNdEx++
  5749. msglen |= (int(b) & 0x7F) << shift
  5750. if b < 0x80 {
  5751. break
  5752. }
  5753. }
  5754. if msglen < 0 {
  5755. return ErrInvalidLengthSpecs
  5756. }
  5757. postIndex := iNdEx + msglen
  5758. if postIndex > l {
  5759. return io.ErrUnexpectedEOF
  5760. }
  5761. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5762. return err
  5763. }
  5764. iNdEx = postIndex
  5765. case 2:
  5766. if wireType != 2 {
  5767. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  5768. }
  5769. var byteLen int
  5770. for shift := uint(0); ; shift += 7 {
  5771. if shift >= 64 {
  5772. return ErrIntOverflowSpecs
  5773. }
  5774. if iNdEx >= l {
  5775. return io.ErrUnexpectedEOF
  5776. }
  5777. b := dAtA[iNdEx]
  5778. iNdEx++
  5779. byteLen |= (int(b) & 0x7F) << shift
  5780. if b < 0x80 {
  5781. break
  5782. }
  5783. }
  5784. if byteLen < 0 {
  5785. return ErrInvalidLengthSpecs
  5786. }
  5787. postIndex := iNdEx + byteLen
  5788. if postIndex > l {
  5789. return io.ErrUnexpectedEOF
  5790. }
  5791. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  5792. if m.Data == nil {
  5793. m.Data = []byte{}
  5794. }
  5795. iNdEx = postIndex
  5796. case 3:
  5797. if wireType != 2 {
  5798. return fmt.Errorf("proto: wrong wireType = %d for field Templating", wireType)
  5799. }
  5800. var msglen int
  5801. for shift := uint(0); ; shift += 7 {
  5802. if shift >= 64 {
  5803. return ErrIntOverflowSpecs
  5804. }
  5805. if iNdEx >= l {
  5806. return io.ErrUnexpectedEOF
  5807. }
  5808. b := dAtA[iNdEx]
  5809. iNdEx++
  5810. msglen |= (int(b) & 0x7F) << shift
  5811. if b < 0x80 {
  5812. break
  5813. }
  5814. }
  5815. if msglen < 0 {
  5816. return ErrInvalidLengthSpecs
  5817. }
  5818. postIndex := iNdEx + msglen
  5819. if postIndex > l {
  5820. return io.ErrUnexpectedEOF
  5821. }
  5822. if m.Templating == nil {
  5823. m.Templating = &Driver{}
  5824. }
  5825. if err := m.Templating.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5826. return err
  5827. }
  5828. iNdEx = postIndex
  5829. default:
  5830. iNdEx = preIndex
  5831. skippy, err := skipSpecs(dAtA[iNdEx:])
  5832. if err != nil {
  5833. return err
  5834. }
  5835. if skippy < 0 {
  5836. return ErrInvalidLengthSpecs
  5837. }
  5838. if (iNdEx + skippy) > l {
  5839. return io.ErrUnexpectedEOF
  5840. }
  5841. iNdEx += skippy
  5842. }
  5843. }
  5844. if iNdEx > l {
  5845. return io.ErrUnexpectedEOF
  5846. }
  5847. return nil
  5848. }
  5849. func skipSpecs(dAtA []byte) (n int, err error) {
  5850. l := len(dAtA)
  5851. iNdEx := 0
  5852. for iNdEx < l {
  5853. var wire uint64
  5854. for shift := uint(0); ; shift += 7 {
  5855. if shift >= 64 {
  5856. return 0, ErrIntOverflowSpecs
  5857. }
  5858. if iNdEx >= l {
  5859. return 0, io.ErrUnexpectedEOF
  5860. }
  5861. b := dAtA[iNdEx]
  5862. iNdEx++
  5863. wire |= (uint64(b) & 0x7F) << shift
  5864. if b < 0x80 {
  5865. break
  5866. }
  5867. }
  5868. wireType := int(wire & 0x7)
  5869. switch wireType {
  5870. case 0:
  5871. for shift := uint(0); ; shift += 7 {
  5872. if shift >= 64 {
  5873. return 0, ErrIntOverflowSpecs
  5874. }
  5875. if iNdEx >= l {
  5876. return 0, io.ErrUnexpectedEOF
  5877. }
  5878. iNdEx++
  5879. if dAtA[iNdEx-1] < 0x80 {
  5880. break
  5881. }
  5882. }
  5883. return iNdEx, nil
  5884. case 1:
  5885. iNdEx += 8
  5886. return iNdEx, nil
  5887. case 2:
  5888. var length int
  5889. for shift := uint(0); ; shift += 7 {
  5890. if shift >= 64 {
  5891. return 0, ErrIntOverflowSpecs
  5892. }
  5893. if iNdEx >= l {
  5894. return 0, io.ErrUnexpectedEOF
  5895. }
  5896. b := dAtA[iNdEx]
  5897. iNdEx++
  5898. length |= (int(b) & 0x7F) << shift
  5899. if b < 0x80 {
  5900. break
  5901. }
  5902. }
  5903. iNdEx += length
  5904. if length < 0 {
  5905. return 0, ErrInvalidLengthSpecs
  5906. }
  5907. return iNdEx, nil
  5908. case 3:
  5909. for {
  5910. var innerWire uint64
  5911. var start int = iNdEx
  5912. for shift := uint(0); ; shift += 7 {
  5913. if shift >= 64 {
  5914. return 0, ErrIntOverflowSpecs
  5915. }
  5916. if iNdEx >= l {
  5917. return 0, io.ErrUnexpectedEOF
  5918. }
  5919. b := dAtA[iNdEx]
  5920. iNdEx++
  5921. innerWire |= (uint64(b) & 0x7F) << shift
  5922. if b < 0x80 {
  5923. break
  5924. }
  5925. }
  5926. innerWireType := int(innerWire & 0x7)
  5927. if innerWireType == 4 {
  5928. break
  5929. }
  5930. next, err := skipSpecs(dAtA[start:])
  5931. if err != nil {
  5932. return 0, err
  5933. }
  5934. iNdEx = start + next
  5935. }
  5936. return iNdEx, nil
  5937. case 4:
  5938. return iNdEx, nil
  5939. case 5:
  5940. iNdEx += 4
  5941. return iNdEx, nil
  5942. default:
  5943. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  5944. }
  5945. }
  5946. panic("unreachable")
  5947. }
  5948. var (
  5949. ErrInvalidLengthSpecs = fmt.Errorf("proto: negative length found during unmarshaling")
  5950. ErrIntOverflowSpecs = fmt.Errorf("proto: integer overflow")
  5951. )
  5952. func init() { proto.RegisterFile("specs.proto", fileDescriptorSpecs) }
  5953. var fileDescriptorSpecs = []byte{
  5954. // 1867 bytes of a gzipped FileDescriptorProto
  5955. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x73, 0x1b, 0x49,
  5956. 0x15, 0xb6, 0x6c, 0x59, 0x3f, 0xde, 0xc8, 0x89, 0xd2, 0x24, 0x61, 0xa2, 0xb0, 0xb2, 0xa2, 0x0d,
  5957. 0xc1, 0xcb, 0x16, 0x72, 0x61, 0xa8, 0x25, 0xbb, 0x61, 0x01, 0xc9, 0x12, 0x8e, 0x31, 0x76, 0x54,
  5958. 0x6d, 0x6f, 0x20, 0x27, 0x55, 0x7b, 0xa6, 0x3d, 0x9a, 0xf2, 0xa8, 0x7b, 0xe8, 0xe9, 0xd1, 0x96,
  5959. 0x6e, 0x1c, 0xb7, 0x72, 0xe5, 0xec, 0xe2, 0x40, 0xf1, 0xbf, 0xe4, 0x48, 0x71, 0xe2, 0xe4, 0x62,
  5960. 0xfd, 0x2f, 0x70, 0xe3, 0x02, 0xd5, 0x3d, 0x3d, 0xd2, 0x28, 0x19, 0x27, 0xa9, 0x22, 0x07, 0x6e,
  5961. 0xdd, 0xaf, 0xbf, 0xef, 0xcd, 0xeb, 0xd7, 0x5f, 0xf7, 0x7b, 0x03, 0x56, 0x14, 0x52, 0x27, 0xea,
  5962. 0x84, 0x82, 0x4b, 0x8e, 0x90, 0xcb, 0x9d, 0x73, 0x2a, 0x3a, 0xd1, 0xd7, 0x44, 0x4c, 0xce, 0x7d,
  5963. 0xd9, 0x99, 0xfe, 0xb8, 0x61, 0xc9, 0x59, 0x48, 0x0d, 0xa0, 0x71, 0xdb, 0xe3, 0x1e, 0xd7, 0xc3,
  5964. 0x6d, 0x35, 0x32, 0xd6, 0xa6, 0xc7, 0xb9, 0x17, 0xd0, 0x6d, 0x3d, 0x3b, 0x8d, 0xcf, 0xb6, 0xdd,
  5965. 0x58, 0x10, 0xe9, 0x73, 0x66, 0xd6, 0xef, 0xbd, 0xbe, 0x4e, 0xd8, 0x2c, 0x59, 0x6a, 0x5f, 0x14,
  5966. 0xa1, 0x72, 0xc4, 0x5d, 0x7a, 0x1c, 0x52, 0x07, 0xed, 0x81, 0x45, 0x18, 0xe3, 0x52, 0x73, 0x23,
  5967. 0xbb, 0xd0, 0x2a, 0x6c, 0x59, 0x3b, 0x9b, 0x9d, 0x37, 0x83, 0xea, 0x74, 0x17, 0xb0, 0x5e, 0xf1,
  5968. 0xd5, 0xe5, 0xe6, 0x0a, 0xce, 0x32, 0xd1, 0x2f, 0xa1, 0xe6, 0xd2, 0xc8, 0x17, 0xd4, 0x1d, 0x09,
  5969. 0x1e, 0x50, 0x7b, 0xb5, 0x55, 0xd8, 0xba, 0xb1, 0xf3, 0xbd, 0x3c, 0x4f, 0xea, 0xe3, 0x98, 0x07,
  5970. 0x14, 0x5b, 0x86, 0xa1, 0x26, 0x68, 0x0f, 0x60, 0x42, 0x27, 0xa7, 0x54, 0x44, 0x63, 0x3f, 0xb4,
  5971. 0xd7, 0x34, 0xfd, 0x07, 0xd7, 0xd1, 0x55, 0xec, 0x9d, 0xc3, 0x39, 0x1c, 0x67, 0xa8, 0xe8, 0x10,
  5972. 0x6a, 0x64, 0x4a, 0xfc, 0x80, 0x9c, 0xfa, 0x81, 0x2f, 0x67, 0x76, 0x51, 0xbb, 0xfa, 0xe4, 0xad,
  5973. 0xae, 0xba, 0x19, 0x02, 0x5e, 0xa2, 0xb7, 0x5d, 0x80, 0xc5, 0x87, 0xd0, 0x23, 0x28, 0x0f, 0x07,
  5974. 0x47, 0xfd, 0xfd, 0xa3, 0xbd, 0xfa, 0x4a, 0xe3, 0xde, 0xcb, 0x8b, 0xd6, 0x1d, 0xe5, 0x63, 0x01,
  5975. 0x18, 0x52, 0xe6, 0xfa, 0xcc, 0x43, 0x5b, 0x50, 0xe9, 0xee, 0xee, 0x0e, 0x86, 0x27, 0x83, 0x7e,
  5976. 0xbd, 0xd0, 0x68, 0xbc, 0xbc, 0x68, 0xdd, 0x5d, 0x06, 0x76, 0x1d, 0x87, 0x86, 0x92, 0xba, 0x8d,
  5977. 0xe2, 0x37, 0x7f, 0x69, 0xae, 0xb4, 0xbf, 0x29, 0x40, 0x2d, 0x1b, 0x04, 0x7a, 0x04, 0xa5, 0xee,
  5978. 0xee, 0xc9, 0xfe, 0xf3, 0x41, 0x7d, 0x65, 0x41, 0xcf, 0x22, 0xba, 0x8e, 0xf4, 0xa7, 0x14, 0x3d,
  5979. 0x84, 0xf5, 0x61, 0xf7, 0xab, 0xe3, 0x41, 0xbd, 0xb0, 0x08, 0x27, 0x0b, 0x1b, 0x92, 0x38, 0xd2,
  5980. 0xa8, 0x3e, 0xee, 0xee, 0x1f, 0xd5, 0x57, 0xf3, 0x51, 0x7d, 0x41, 0x7c, 0x66, 0x42, 0xf9, 0x73,
  5981. 0x11, 0xac, 0x63, 0x2a, 0xa6, 0xbe, 0xf3, 0x81, 0x25, 0xf2, 0x19, 0x14, 0x25, 0x89, 0xce, 0xb5,
  5982. 0x34, 0xac, 0x7c, 0x69, 0x9c, 0x90, 0xe8, 0x5c, 0x7d, 0xd4, 0xd0, 0x35, 0x5e, 0x29, 0x43, 0xd0,
  5983. 0x30, 0xf0, 0x1d, 0x22, 0xa9, 0xab, 0x95, 0x61, 0xed, 0x7c, 0x3f, 0x8f, 0x8d, 0xe7, 0x28, 0x13,
  5984. 0xff, 0xd3, 0x15, 0x9c, 0xa1, 0xa2, 0x27, 0x50, 0xf2, 0x02, 0x7e, 0x4a, 0x02, 0xad, 0x09, 0x6b,
  5985. 0xe7, 0x41, 0x9e, 0x93, 0x3d, 0x8d, 0x58, 0x38, 0x30, 0x14, 0xf4, 0x18, 0x4a, 0x71, 0xe8, 0x12,
  5986. 0x49, 0xed, 0x92, 0x26, 0xb7, 0xf2, 0xc8, 0x5f, 0x69, 0xc4, 0x2e, 0x67, 0x67, 0xbe, 0x87, 0x0d,
  5987. 0x1e, 0x1d, 0x40, 0x85, 0x51, 0xf9, 0x35, 0x17, 0xe7, 0x91, 0x5d, 0x6e, 0xad, 0x6d, 0x59, 0x3b,
  5988. 0x9f, 0xe6, 0x8a, 0x31, 0xc1, 0x74, 0xa5, 0x24, 0xce, 0x78, 0x42, 0x99, 0x4c, 0xdc, 0xf4, 0x56,
  5989. 0xed, 0x02, 0x9e, 0x3b, 0x40, 0x3f, 0x87, 0x0a, 0x65, 0x6e, 0xc8, 0x7d, 0x26, 0xed, 0xca, 0xf5,
  5990. 0x81, 0x0c, 0x0c, 0x46, 0x25, 0x13, 0xcf, 0x19, 0x8a, 0x2d, 0x78, 0x10, 0x9c, 0x12, 0xe7, 0xdc,
  5991. 0xae, 0xbe, 0xe7, 0x36, 0xe6, 0x8c, 0x5e, 0x09, 0x8a, 0x13, 0xee, 0xd2, 0xf6, 0x36, 0xdc, 0x7a,
  5992. 0x23, 0xd5, 0xa8, 0x01, 0x15, 0x93, 0xea, 0x44, 0x23, 0x45, 0x3c, 0x9f, 0xb7, 0x6f, 0xc2, 0xc6,
  5993. 0x52, 0x5a, 0xdb, 0x7f, 0x2f, 0x42, 0x25, 0x3d, 0x6b, 0xd4, 0x85, 0xaa, 0xc3, 0x99, 0x24, 0x3e,
  5994. 0xa3, 0xc2, 0xc8, 0x2b, 0xf7, 0x64, 0x76, 0x53, 0x90, 0x62, 0x3d, 0x5d, 0xc1, 0x0b, 0x16, 0xfa,
  5995. 0x35, 0x54, 0x05, 0x8d, 0x78, 0x2c, 0x1c, 0x1a, 0x19, 0x7d, 0x6d, 0xe5, 0x2b, 0x24, 0x01, 0x61,
  5996. 0xfa, 0x87, 0xd8, 0x17, 0x54, 0x65, 0x39, 0xc2, 0x0b, 0x2a, 0x7a, 0x02, 0x65, 0x41, 0x23, 0x49,
  5997. 0x84, 0x7c, 0x9b, 0x44, 0x70, 0x02, 0x19, 0xf2, 0xc0, 0x77, 0x66, 0x38, 0x65, 0xa0, 0x27, 0x50,
  5998. 0x0d, 0x03, 0xe2, 0x68, 0xaf, 0xf6, 0xba, 0xa6, 0x7f, 0x94, 0x47, 0x1f, 0xa6, 0x20, 0xbc, 0xc0,
  5999. 0xa3, 0xcf, 0x01, 0x02, 0xee, 0x8d, 0x5c, 0xe1, 0x4f, 0xa9, 0x30, 0x12, 0x6b, 0xe4, 0xb1, 0xfb,
  6000. 0x1a, 0x81, 0xab, 0x01, 0xf7, 0x92, 0x21, 0xda, 0xfb, 0x9f, 0xf4, 0x95, 0xd1, 0xd6, 0x01, 0x00,
  6001. 0x99, 0xaf, 0x1a, 0x75, 0x7d, 0xf2, 0x5e, 0xae, 0xcc, 0x89, 0x64, 0xe8, 0xe8, 0x01, 0xd4, 0xce,
  6002. 0xb8, 0x70, 0xe8, 0xc8, 0xdc, 0x9a, 0xaa, 0xd6, 0x84, 0xa5, 0x6d, 0x89, 0xbe, 0x50, 0x0f, 0xca,
  6003. 0x1e, 0x65, 0x54, 0xf8, 0x8e, 0x0d, 0xfa, 0x63, 0x8f, 0x72, 0x2f, 0x64, 0x02, 0xc1, 0x31, 0x93,
  6004. 0xfe, 0x84, 0x9a, 0x2f, 0xa5, 0xc4, 0x5e, 0x15, 0xca, 0x22, 0x59, 0x69, 0xff, 0x1e, 0xd0, 0x9b,
  6005. 0x58, 0x84, 0xa0, 0x78, 0xee, 0x33, 0x57, 0x0b, 0xab, 0x8a, 0xf5, 0x18, 0x75, 0xa0, 0x1c, 0x92,
  6006. 0x59, 0xc0, 0x89, 0x6b, 0xc4, 0x72, 0xbb, 0x93, 0xd4, 0xcb, 0x4e, 0x5a, 0x2f, 0x3b, 0x5d, 0x36,
  6007. 0xc3, 0x29, 0xa8, 0x7d, 0x00, 0x77, 0x72, 0xb7, 0x8c, 0x76, 0xa0, 0x36, 0x17, 0xe1, 0xc8, 0x37,
  6008. 0x1f, 0xe9, 0xdd, 0xbc, 0xba, 0xdc, 0xb4, 0xe6, 0x6a, 0xdd, 0xef, 0x63, 0x6b, 0x0e, 0xda, 0x77,
  6009. 0xdb, 0x7f, 0xaa, 0xc2, 0xc6, 0x92, 0x94, 0xd1, 0x6d, 0x58, 0xf7, 0x27, 0xc4, 0xa3, 0x26, 0xc6,
  6010. 0x64, 0x82, 0x06, 0x50, 0x0a, 0xc8, 0x29, 0x0d, 0x94, 0xa0, 0xd5, 0xa1, 0xfe, 0xe8, 0x9d, 0x77,
  6011. 0xa2, 0xf3, 0x5b, 0x8d, 0x1f, 0x30, 0x29, 0x66, 0xd8, 0x90, 0x91, 0x0d, 0x65, 0x87, 0x4f, 0x26,
  6012. 0x84, 0xa9, 0xa7, 0x73, 0x6d, 0xab, 0x8a, 0xd3, 0xa9, 0xca, 0x0c, 0x11, 0x5e, 0x64, 0x17, 0xb5,
  6013. 0x59, 0x8f, 0x51, 0x1d, 0xd6, 0x28, 0x9b, 0xda, 0xeb, 0xda, 0xa4, 0x86, 0xca, 0xe2, 0xfa, 0x89,
  6014. 0x22, 0xab, 0x58, 0x0d, 0x15, 0x2f, 0x8e, 0xa8, 0xb0, 0xcb, 0x49, 0x46, 0xd5, 0x18, 0xfd, 0x0c,
  6015. 0x4a, 0x13, 0x1e, 0x33, 0x19, 0xd9, 0x15, 0x1d, 0xec, 0xbd, 0xbc, 0x60, 0x0f, 0x15, 0xc2, 0x3c,
  6016. 0xed, 0x06, 0x8e, 0x06, 0x70, 0x2b, 0x92, 0x3c, 0x1c, 0x79, 0x82, 0x38, 0x74, 0x14, 0x52, 0xe1,
  6017. 0x73, 0xd7, 0x3c, 0x4d, 0xf7, 0xde, 0x38, 0x94, 0xbe, 0x69, 0x72, 0xf0, 0x4d, 0xc5, 0xd9, 0x53,
  6018. 0x94, 0xa1, 0x66, 0xa0, 0x21, 0xd4, 0xc2, 0x38, 0x08, 0x46, 0x3c, 0x4c, 0xaa, 0x54, 0xa2, 0xa7,
  6019. 0xf7, 0x48, 0xd9, 0x30, 0x0e, 0x82, 0x67, 0x09, 0x09, 0x5b, 0xe1, 0x62, 0x82, 0xee, 0x42, 0xc9,
  6020. 0x13, 0x3c, 0x0e, 0x23, 0xdb, 0xd2, 0xc9, 0x30, 0x33, 0xf4, 0x25, 0x94, 0x23, 0xea, 0x08, 0x2a,
  6021. 0x23, 0xbb, 0xa6, 0xb7, 0xfa, 0x71, 0xde, 0x47, 0x8e, 0x35, 0x04, 0xd3, 0x33, 0x2a, 0x28, 0x73,
  6022. 0x28, 0x4e, 0x39, 0xe8, 0x1e, 0xac, 0x49, 0x39, 0xb3, 0x37, 0x5a, 0x85, 0xad, 0x4a, 0xaf, 0x7c,
  6023. 0x75, 0xb9, 0xb9, 0x76, 0x72, 0xf2, 0x02, 0x2b, 0x9b, 0x7a, 0x41, 0xc7, 0x3c, 0x92, 0x8c, 0x4c,
  6024. 0xa8, 0x7d, 0x43, 0xe7, 0x76, 0x3e, 0x47, 0x2f, 0x00, 0x5c, 0x16, 0x8d, 0x1c, 0x7d, 0x65, 0xed,
  6025. 0x9b, 0x7a, 0x77, 0x9f, 0xbe, 0x7b, 0x77, 0xfd, 0xa3, 0x63, 0x53, 0x45, 0x36, 0xae, 0x2e, 0x37,
  6026. 0xab, 0xf3, 0x29, 0xae, 0xba, 0x2c, 0x4a, 0x86, 0xa8, 0x07, 0xd6, 0x98, 0x92, 0x40, 0x8e, 0x9d,
  6027. 0x31, 0x75, 0xce, 0xed, 0xfa, 0xf5, 0x65, 0xe1, 0xa9, 0x86, 0x19, 0x0f, 0x59, 0x92, 0x52, 0xb0,
  6028. 0x0a, 0x35, 0xb2, 0x6f, 0xe9, 0x5c, 0x25, 0x13, 0xf4, 0x11, 0x00, 0x0f, 0x29, 0x1b, 0x45, 0xd2,
  6029. 0xf5, 0x99, 0x8d, 0xd4, 0x96, 0x71, 0x55, 0x59, 0x8e, 0x95, 0x01, 0xdd, 0x57, 0x8f, 0x36, 0x71,
  6030. 0x47, 0x9c, 0x05, 0x33, 0xfb, 0x3b, 0x7a, 0xb5, 0xa2, 0x0c, 0xcf, 0x58, 0x30, 0x43, 0x9b, 0x60,
  6031. 0x69, 0x5d, 0x44, 0xbe, 0xc7, 0x48, 0x60, 0xdf, 0xd6, 0xf9, 0x00, 0x65, 0x3a, 0xd6, 0x16, 0x75,
  6032. 0x0e, 0x49, 0x36, 0x22, 0xfb, 0xce, 0xf5, 0xe7, 0x60, 0x82, 0x5d, 0x9c, 0x83, 0xe1, 0xa0, 0x5f,
  6033. 0x00, 0x84, 0xc2, 0x9f, 0xfa, 0x01, 0xf5, 0x68, 0x64, 0xdf, 0xd5, 0x9b, 0x6e, 0xe6, 0xbe, 0xd6,
  6034. 0x73, 0x14, 0xce, 0x30, 0x1a, 0x9f, 0x83, 0x95, 0xb9, 0x6d, 0xea, 0x96, 0x9c, 0xd3, 0x99, 0xb9,
  6035. 0xc0, 0x6a, 0xa8, 0x52, 0x32, 0x25, 0x41, 0x9c, 0x74, 0xc2, 0x55, 0x9c, 0x4c, 0xbe, 0x58, 0x7d,
  6036. 0x5c, 0x68, 0xec, 0x80, 0x95, 0x51, 0x1d, 0xfa, 0x18, 0x36, 0x04, 0xf5, 0xfc, 0x48, 0x8a, 0xd9,
  6037. 0x88, 0xc4, 0x72, 0x6c, 0xff, 0x4a, 0x13, 0x6a, 0xa9, 0xb1, 0x1b, 0xcb, 0x71, 0x63, 0x04, 0x8b,
  6038. 0xc3, 0x43, 0x2d, 0xb0, 0x94, 0x28, 0x22, 0x2a, 0xa6, 0x54, 0xa8, 0x6a, 0xab, 0x72, 0x9e, 0x35,
  6039. 0x29, 0xf1, 0x46, 0x94, 0x08, 0x67, 0xac, 0xdf, 0x8e, 0x2a, 0x36, 0x33, 0xf5, 0x18, 0xa4, 0x37,
  6040. 0xc4, 0x3c, 0x06, 0x66, 0xda, 0xfe, 0x57, 0x01, 0x6a, 0xd9, 0xa6, 0x01, 0xed, 0x26, 0xc5, 0x5e,
  6041. 0x6f, 0xe9, 0xc6, 0xce, 0xf6, 0xbb, 0x9a, 0x0c, 0x5d, 0x5a, 0x83, 0x58, 0x39, 0x3b, 0x54, 0xfd,
  6042. 0xbd, 0x26, 0xa3, 0x9f, 0xc2, 0x7a, 0xc8, 0x85, 0x4c, 0x9f, 0xb0, 0xfc, 0x04, 0x73, 0x91, 0x96,
  6043. 0xa2, 0x04, 0xdc, 0x1e, 0xc3, 0x8d, 0x65, 0x6f, 0xe8, 0x21, 0xac, 0x3d, 0xdf, 0x1f, 0xd6, 0x57,
  6044. 0x1a, 0xf7, 0x5f, 0x5e, 0xb4, 0xbe, 0xbb, 0xbc, 0xf8, 0xdc, 0x17, 0x32, 0x26, 0xc1, 0xfe, 0x10,
  6045. 0xfd, 0x10, 0xd6, 0xfb, 0x47, 0xc7, 0x18, 0xd7, 0x0b, 0x8d, 0xcd, 0x97, 0x17, 0xad, 0xfb, 0xcb,
  6046. 0x38, 0xb5, 0xc4, 0x63, 0xe6, 0x62, 0x7e, 0x3a, 0xef, 0x75, 0xff, 0xbd, 0x0a, 0x96, 0x79, 0xd9,
  6047. 0x3f, 0xf4, 0xef, 0xd0, 0x46, 0x52, 0xca, 0xd3, 0x2b, 0xbb, 0xfa, 0xce, 0x8a, 0x5e, 0x4b, 0x08,
  6048. 0xe6, 0x8c, 0x1f, 0x40, 0xcd, 0x0f, 0xa7, 0x9f, 0x8d, 0x28, 0x23, 0xa7, 0x81, 0x69, 0x7b, 0x2b,
  6049. 0xd8, 0x52, 0xb6, 0x41, 0x62, 0x52, 0xef, 0x85, 0xcf, 0x24, 0x15, 0xcc, 0x34, 0xb4, 0x15, 0x3c,
  6050. 0x9f, 0xa3, 0x2f, 0xa1, 0xe8, 0x87, 0x64, 0x62, 0xda, 0x90, 0xdc, 0x1d, 0xec, 0x0f, 0xbb, 0x87,
  6051. 0x46, 0x83, 0xbd, 0xca, 0xd5, 0xe5, 0x66, 0x51, 0x19, 0xb0, 0xa6, 0xa1, 0x66, 0xda, 0x09, 0xa8,
  6052. 0x2f, 0xe9, 0xb7, 0xbf, 0x82, 0x33, 0x16, 0xa5, 0x23, 0x9f, 0x79, 0x82, 0x46, 0x91, 0xae, 0x02,
  6053. 0x15, 0x9c, 0x4e, 0x51, 0x03, 0xca, 0xa6, 0x9f, 0xd0, 0x0d, 0x44, 0x55, 0xd5, 0x6a, 0x63, 0xe8,
  6054. 0x6d, 0x80, 0x95, 0x64, 0x63, 0x74, 0x26, 0xf8, 0xa4, 0xfd, 0x9f, 0x22, 0x58, 0xbb, 0x41, 0x1c,
  6055. 0x49, 0x53, 0x06, 0x3f, 0x58, 0xf2, 0x5f, 0xc0, 0x2d, 0xa2, 0x7f, 0xaf, 0x08, 0x53, 0x35, 0x45,
  6056. 0xb7, 0x69, 0xe6, 0x00, 0x1e, 0xe6, 0xba, 0x9b, 0x83, 0x93, 0x96, 0xae, 0x57, 0x52, 0x3e, 0xed,
  6057. 0x02, 0xae, 0x93, 0xd7, 0x56, 0xd0, 0x31, 0x6c, 0x70, 0xe1, 0x8c, 0x69, 0x24, 0x93, 0x4a, 0x64,
  6058. 0x7e, 0x47, 0x72, 0x7f, 0x54, 0x9f, 0x65, 0x81, 0xe6, 0x19, 0x4e, 0xa2, 0x5d, 0xf6, 0x81, 0x1e,
  6059. 0x43, 0x51, 0x90, 0xb3, 0xb4, 0xe5, 0xcc, 0xbd, 0x24, 0x98, 0x9c, 0xc9, 0x25, 0x17, 0x9a, 0x81,
  6060. 0x7e, 0x03, 0xe0, 0xfa, 0x51, 0x48, 0xa4, 0x33, 0xa6, 0xc2, 0x1c, 0x76, 0xee, 0x16, 0xfb, 0x73,
  6061. 0xd4, 0x92, 0x97, 0x0c, 0x1b, 0x1d, 0x40, 0xd5, 0x21, 0xa9, 0x5c, 0x4b, 0xd7, 0xff, 0xa3, 0xed,
  6062. 0x76, 0x8d, 0x8b, 0xba, 0x72, 0x71, 0x75, 0xb9, 0x59, 0x49, 0x2d, 0xb8, 0xe2, 0x10, 0x23, 0xdf,
  6063. 0x03, 0xd8, 0x50, 0xff, 0x6e, 0x23, 0x97, 0x9e, 0x91, 0x38, 0x90, 0x89, 0x4c, 0xae, 0x29, 0x2b,
  6064. 0xea, 0x47, 0xa0, 0x6f, 0x70, 0x26, 0xae, 0x9a, 0xcc, 0xd8, 0xd0, 0xef, 0xe0, 0x16, 0x65, 0x8e,
  6065. 0x98, 0x69, 0xb1, 0xa6, 0x11, 0x56, 0xae, 0xdf, 0xec, 0x60, 0x0e, 0x5e, 0xda, 0x6c, 0x9d, 0xbe,
  6066. 0x66, 0x6f, 0xff, 0xb5, 0x00, 0x90, 0x54, 0xea, 0x0f, 0x2b, 0x40, 0x04, 0x45, 0x97, 0x48, 0xa2,
  6067. 0x35, 0x57, 0xc3, 0x7a, 0x8c, 0xbe, 0x00, 0x90, 0x74, 0x12, 0x06, 0x44, 0xfa, 0xcc, 0x33, 0xb2,
  6068. 0x79, 0xdb, 0x73, 0x90, 0x41, 0xeb, 0x38, 0x93, 0x90, 0xff, 0xaf, 0xe3, 0xec, 0xd9, 0xaf, 0xbe,
  6069. 0x6d, 0xae, 0xfc, 0xe3, 0xdb, 0xe6, 0xca, 0x1f, 0xaf, 0x9a, 0x85, 0x57, 0x57, 0xcd, 0xc2, 0xdf,
  6070. 0xae, 0x9a, 0x85, 0x7f, 0x5e, 0x35, 0x0b, 0xa7, 0x25, 0xdd, 0xc3, 0xfd, 0xe4, 0xbf, 0x01, 0x00,
  6071. 0x00, 0xff, 0xff, 0x06, 0x93, 0x6e, 0xba, 0xfc, 0x12, 0x00, 0x00,
  6072. }