specs.pb.go 219 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: github.com/docker/swarmkit/api/specs.proto
  3. package api
  4. import (
  5. fmt "fmt"
  6. github_com_docker_swarmkit_api_deepcopy "github.com/docker/swarmkit/api/deepcopy"
  7. _ "github.com/gogo/protobuf/gogoproto"
  8. proto "github.com/gogo/protobuf/proto"
  9. github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys"
  10. types "github.com/gogo/protobuf/types"
  11. io "io"
  12. math "math"
  13. reflect "reflect"
  14. strings "strings"
  15. )
  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. // This is a compile-time assertion to ensure that this generated file
  21. // is compatible with the proto package it is being compiled against.
  22. // A compilation error at this line likely means your copy of the
  23. // proto package needs to be updated.
  24. const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
  25. type NodeSpec_Membership int32
  26. const (
  27. NodeMembershipPending NodeSpec_Membership = 0
  28. NodeMembershipAccepted NodeSpec_Membership = 1
  29. )
  30. var NodeSpec_Membership_name = map[int32]string{
  31. 0: "PENDING",
  32. 1: "ACCEPTED",
  33. }
  34. var NodeSpec_Membership_value = map[string]int32{
  35. "PENDING": 0,
  36. "ACCEPTED": 1,
  37. }
  38. func (x NodeSpec_Membership) String() string {
  39. return proto.EnumName(NodeSpec_Membership_name, int32(x))
  40. }
  41. func (NodeSpec_Membership) EnumDescriptor() ([]byte, []int) {
  42. return fileDescriptor_6589acc608f7d4fd, []int{0, 0}
  43. }
  44. type NodeSpec_Availability int32
  45. const (
  46. // Active nodes.
  47. NodeAvailabilityActive NodeSpec_Availability = 0
  48. // Paused nodes won't be considered by the scheduler, preventing any
  49. // further task to run on them.
  50. NodeAvailabilityPause NodeSpec_Availability = 1
  51. // Drained nodes are paused and any task already running on them will
  52. // be evicted.
  53. NodeAvailabilityDrain NodeSpec_Availability = 2
  54. )
  55. var NodeSpec_Availability_name = map[int32]string{
  56. 0: "ACTIVE",
  57. 1: "PAUSE",
  58. 2: "DRAIN",
  59. }
  60. var NodeSpec_Availability_value = map[string]int32{
  61. "ACTIVE": 0,
  62. "PAUSE": 1,
  63. "DRAIN": 2,
  64. }
  65. func (x NodeSpec_Availability) String() string {
  66. return proto.EnumName(NodeSpec_Availability_name, int32(x))
  67. }
  68. func (NodeSpec_Availability) EnumDescriptor() ([]byte, []int) {
  69. return fileDescriptor_6589acc608f7d4fd, []int{0, 1}
  70. }
  71. type ContainerSpec_Isolation int32
  72. const (
  73. // ISOLATION_DEFAULT uses whatever default value from the container runtime
  74. ContainerIsolationDefault ContainerSpec_Isolation = 0
  75. // ISOLATION_PROCESS forces windows container isolation
  76. ContainerIsolationProcess ContainerSpec_Isolation = 1
  77. // ISOLATION_HYPERV forces Hyper-V isolation
  78. ContainerIsolationHyperV ContainerSpec_Isolation = 2
  79. )
  80. var ContainerSpec_Isolation_name = map[int32]string{
  81. 0: "ISOLATION_DEFAULT",
  82. 1: "ISOLATION_PROCESS",
  83. 2: "ISOLATION_HYPERV",
  84. }
  85. var ContainerSpec_Isolation_value = map[string]int32{
  86. "ISOLATION_DEFAULT": 0,
  87. "ISOLATION_PROCESS": 1,
  88. "ISOLATION_HYPERV": 2,
  89. }
  90. func (x ContainerSpec_Isolation) String() string {
  91. return proto.EnumName(ContainerSpec_Isolation_name, int32(x))
  92. }
  93. func (ContainerSpec_Isolation) EnumDescriptor() ([]byte, []int) {
  94. return fileDescriptor_6589acc608f7d4fd, []int{10, 0}
  95. }
  96. // ResolutionMode specifies the mode of resolution to use for
  97. // internal loadbalancing between tasks which are all within
  98. // the cluster. This is sometimes calls east-west data path.
  99. type EndpointSpec_ResolutionMode int32
  100. const (
  101. // VIP resolution mode specifies that the
  102. // service resolves to a logical IP and the requests
  103. // are sent to that logical IP. Packets hitting that
  104. // logical IP are load balanced to a chosen backend.
  105. ResolutionModeVirtualIP EndpointSpec_ResolutionMode = 0
  106. // DNSRR resolution mode specifies that the
  107. // service directly gets resolved to one of the
  108. // backend IP and the client directly initiates a
  109. // request towards the actual backend. This requires
  110. // that the client does not cache the DNS responses
  111. // when the DNS response TTL is 0.
  112. ResolutionModeDNSRoundRobin EndpointSpec_ResolutionMode = 1
  113. )
  114. var EndpointSpec_ResolutionMode_name = map[int32]string{
  115. 0: "VIP",
  116. 1: "DNSRR",
  117. }
  118. var EndpointSpec_ResolutionMode_value = map[string]int32{
  119. "VIP": 0,
  120. "DNSRR": 1,
  121. }
  122. func (x EndpointSpec_ResolutionMode) String() string {
  123. return proto.EnumName(EndpointSpec_ResolutionMode_name, int32(x))
  124. }
  125. func (EndpointSpec_ResolutionMode) EnumDescriptor() ([]byte, []int) {
  126. return fileDescriptor_6589acc608f7d4fd, []int{11, 0}
  127. }
  128. type NodeSpec struct {
  129. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations,proto3" json:"annotations"`
  130. // DesiredRole defines the role the node should have.
  131. DesiredRole NodeRole `protobuf:"varint,2,opt,name=desired_role,json=desiredRole,proto3,enum=docker.swarmkit.v1.NodeRole" json:"desired_role,omitempty"`
  132. // Membership controls the admission of the node into the cluster.
  133. Membership NodeSpec_Membership `protobuf:"varint,3,opt,name=membership,proto3,enum=docker.swarmkit.v1.NodeSpec_Membership" json:"membership,omitempty"`
  134. // Availability allows a user to control the current scheduling status of a
  135. // node.
  136. Availability NodeSpec_Availability `protobuf:"varint,4,opt,name=availability,proto3,enum=docker.swarmkit.v1.NodeSpec_Availability" json:"availability,omitempty"`
  137. }
  138. func (m *NodeSpec) Reset() { *m = NodeSpec{} }
  139. func (*NodeSpec) ProtoMessage() {}
  140. func (*NodeSpec) Descriptor() ([]byte, []int) {
  141. return fileDescriptor_6589acc608f7d4fd, []int{0}
  142. }
  143. func (m *NodeSpec) XXX_Unmarshal(b []byte) error {
  144. return m.Unmarshal(b)
  145. }
  146. func (m *NodeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  147. if deterministic {
  148. return xxx_messageInfo_NodeSpec.Marshal(b, m, deterministic)
  149. } else {
  150. b = b[:cap(b)]
  151. n, err := m.MarshalTo(b)
  152. if err != nil {
  153. return nil, err
  154. }
  155. return b[:n], nil
  156. }
  157. }
  158. func (m *NodeSpec) XXX_Merge(src proto.Message) {
  159. xxx_messageInfo_NodeSpec.Merge(m, src)
  160. }
  161. func (m *NodeSpec) XXX_Size() int {
  162. return m.Size()
  163. }
  164. func (m *NodeSpec) XXX_DiscardUnknown() {
  165. xxx_messageInfo_NodeSpec.DiscardUnknown(m)
  166. }
  167. var xxx_messageInfo_NodeSpec proto.InternalMessageInfo
  168. // ServiceSpec defines the properties of a service.
  169. //
  170. // A service instructs the cluster in orchestrating repeated instances of a
  171. // template, implemented as tasks. Based on the number of instances, scheduling
  172. // strategy and restart policy, a number of application-level behaviors can be
  173. // defined.
  174. type ServiceSpec struct {
  175. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations,proto3" json:"annotations"`
  176. // Task defines the task template this service will spawn.
  177. Task TaskSpec `protobuf:"bytes,2,opt,name=task,proto3" json:"task"`
  178. // Types that are valid to be assigned to Mode:
  179. // *ServiceSpec_Replicated
  180. // *ServiceSpec_Global
  181. // *ServiceSpec_ReplicatedJob
  182. // *ServiceSpec_GlobalJob
  183. Mode isServiceSpec_Mode `protobuf_oneof:"mode"`
  184. // Update contains settings which affect updates.
  185. Update *UpdateConfig `protobuf:"bytes,6,opt,name=update,proto3" json:"update,omitempty"`
  186. // Rollback contains settings which affect rollbacks of updates.
  187. Rollback *UpdateConfig `protobuf:"bytes,9,opt,name=rollback,proto3" json:"rollback,omitempty"`
  188. // ServiceSpec.Networks has been deprecated and is replaced by
  189. // Networks field in Task (TaskSpec.Networks).
  190. // This field (ServiceSpec.Networks) is kept for compatibility.
  191. // In case TaskSpec.Networks does not exist, ServiceSpec.Networks
  192. // is still honored if it exists.
  193. Networks []*NetworkAttachmentConfig `protobuf:"bytes,7,rep,name=networks,proto3" json:"networks,omitempty"` // Deprecated: Do not use.
  194. // Service endpoint specifies the user provided configuration
  195. // to properly discover and load balance a service.
  196. Endpoint *EndpointSpec `protobuf:"bytes,8,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
  197. }
  198. func (m *ServiceSpec) Reset() { *m = ServiceSpec{} }
  199. func (*ServiceSpec) ProtoMessage() {}
  200. func (*ServiceSpec) Descriptor() ([]byte, []int) {
  201. return fileDescriptor_6589acc608f7d4fd, []int{1}
  202. }
  203. func (m *ServiceSpec) XXX_Unmarshal(b []byte) error {
  204. return m.Unmarshal(b)
  205. }
  206. func (m *ServiceSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  207. if deterministic {
  208. return xxx_messageInfo_ServiceSpec.Marshal(b, m, deterministic)
  209. } else {
  210. b = b[:cap(b)]
  211. n, err := m.MarshalTo(b)
  212. if err != nil {
  213. return nil, err
  214. }
  215. return b[:n], nil
  216. }
  217. }
  218. func (m *ServiceSpec) XXX_Merge(src proto.Message) {
  219. xxx_messageInfo_ServiceSpec.Merge(m, src)
  220. }
  221. func (m *ServiceSpec) XXX_Size() int {
  222. return m.Size()
  223. }
  224. func (m *ServiceSpec) XXX_DiscardUnknown() {
  225. xxx_messageInfo_ServiceSpec.DiscardUnknown(m)
  226. }
  227. var xxx_messageInfo_ServiceSpec proto.InternalMessageInfo
  228. type isServiceSpec_Mode interface {
  229. isServiceSpec_Mode()
  230. MarshalTo([]byte) (int, error)
  231. Size() int
  232. }
  233. type ServiceSpec_Replicated struct {
  234. Replicated *ReplicatedService `protobuf:"bytes,3,opt,name=replicated,proto3,oneof"`
  235. }
  236. type ServiceSpec_Global struct {
  237. Global *GlobalService `protobuf:"bytes,4,opt,name=global,proto3,oneof"`
  238. }
  239. type ServiceSpec_ReplicatedJob struct {
  240. ReplicatedJob *ReplicatedJob `protobuf:"bytes,10,opt,name=replicated_job,json=replicatedJob,proto3,oneof"`
  241. }
  242. type ServiceSpec_GlobalJob struct {
  243. GlobalJob *GlobalJob `protobuf:"bytes,11,opt,name=global_job,json=globalJob,proto3,oneof"`
  244. }
  245. func (*ServiceSpec_Replicated) isServiceSpec_Mode() {}
  246. func (*ServiceSpec_Global) isServiceSpec_Mode() {}
  247. func (*ServiceSpec_ReplicatedJob) isServiceSpec_Mode() {}
  248. func (*ServiceSpec_GlobalJob) isServiceSpec_Mode() {}
  249. func (m *ServiceSpec) GetMode() isServiceSpec_Mode {
  250. if m != nil {
  251. return m.Mode
  252. }
  253. return nil
  254. }
  255. func (m *ServiceSpec) GetReplicated() *ReplicatedService {
  256. if x, ok := m.GetMode().(*ServiceSpec_Replicated); ok {
  257. return x.Replicated
  258. }
  259. return nil
  260. }
  261. func (m *ServiceSpec) GetGlobal() *GlobalService {
  262. if x, ok := m.GetMode().(*ServiceSpec_Global); ok {
  263. return x.Global
  264. }
  265. return nil
  266. }
  267. func (m *ServiceSpec) GetReplicatedJob() *ReplicatedJob {
  268. if x, ok := m.GetMode().(*ServiceSpec_ReplicatedJob); ok {
  269. return x.ReplicatedJob
  270. }
  271. return nil
  272. }
  273. func (m *ServiceSpec) GetGlobalJob() *GlobalJob {
  274. if x, ok := m.GetMode().(*ServiceSpec_GlobalJob); ok {
  275. return x.GlobalJob
  276. }
  277. return nil
  278. }
  279. // XXX_OneofFuncs is for the internal use of the proto package.
  280. 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{}) {
  281. return _ServiceSpec_OneofMarshaler, _ServiceSpec_OneofUnmarshaler, _ServiceSpec_OneofSizer, []interface{}{
  282. (*ServiceSpec_Replicated)(nil),
  283. (*ServiceSpec_Global)(nil),
  284. (*ServiceSpec_ReplicatedJob)(nil),
  285. (*ServiceSpec_GlobalJob)(nil),
  286. }
  287. }
  288. func _ServiceSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  289. m := msg.(*ServiceSpec)
  290. // mode
  291. switch x := m.Mode.(type) {
  292. case *ServiceSpec_Replicated:
  293. _ = b.EncodeVarint(3<<3 | proto.WireBytes)
  294. if err := b.EncodeMessage(x.Replicated); err != nil {
  295. return err
  296. }
  297. case *ServiceSpec_Global:
  298. _ = b.EncodeVarint(4<<3 | proto.WireBytes)
  299. if err := b.EncodeMessage(x.Global); err != nil {
  300. return err
  301. }
  302. case *ServiceSpec_ReplicatedJob:
  303. _ = b.EncodeVarint(10<<3 | proto.WireBytes)
  304. if err := b.EncodeMessage(x.ReplicatedJob); err != nil {
  305. return err
  306. }
  307. case *ServiceSpec_GlobalJob:
  308. _ = b.EncodeVarint(11<<3 | proto.WireBytes)
  309. if err := b.EncodeMessage(x.GlobalJob); err != nil {
  310. return err
  311. }
  312. case nil:
  313. default:
  314. return fmt.Errorf("ServiceSpec.Mode has unexpected type %T", x)
  315. }
  316. return nil
  317. }
  318. func _ServiceSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  319. m := msg.(*ServiceSpec)
  320. switch tag {
  321. case 3: // mode.replicated
  322. if wire != proto.WireBytes {
  323. return true, proto.ErrInternalBadWireType
  324. }
  325. msg := new(ReplicatedService)
  326. err := b.DecodeMessage(msg)
  327. m.Mode = &ServiceSpec_Replicated{msg}
  328. return true, err
  329. case 4: // mode.global
  330. if wire != proto.WireBytes {
  331. return true, proto.ErrInternalBadWireType
  332. }
  333. msg := new(GlobalService)
  334. err := b.DecodeMessage(msg)
  335. m.Mode = &ServiceSpec_Global{msg}
  336. return true, err
  337. case 10: // mode.replicated_job
  338. if wire != proto.WireBytes {
  339. return true, proto.ErrInternalBadWireType
  340. }
  341. msg := new(ReplicatedJob)
  342. err := b.DecodeMessage(msg)
  343. m.Mode = &ServiceSpec_ReplicatedJob{msg}
  344. return true, err
  345. case 11: // mode.global_job
  346. if wire != proto.WireBytes {
  347. return true, proto.ErrInternalBadWireType
  348. }
  349. msg := new(GlobalJob)
  350. err := b.DecodeMessage(msg)
  351. m.Mode = &ServiceSpec_GlobalJob{msg}
  352. return true, err
  353. default:
  354. return false, nil
  355. }
  356. }
  357. func _ServiceSpec_OneofSizer(msg proto.Message) (n int) {
  358. m := msg.(*ServiceSpec)
  359. // mode
  360. switch x := m.Mode.(type) {
  361. case *ServiceSpec_Replicated:
  362. s := proto.Size(x.Replicated)
  363. n += 1 // tag and wire
  364. n += proto.SizeVarint(uint64(s))
  365. n += s
  366. case *ServiceSpec_Global:
  367. s := proto.Size(x.Global)
  368. n += 1 // tag and wire
  369. n += proto.SizeVarint(uint64(s))
  370. n += s
  371. case *ServiceSpec_ReplicatedJob:
  372. s := proto.Size(x.ReplicatedJob)
  373. n += 1 // tag and wire
  374. n += proto.SizeVarint(uint64(s))
  375. n += s
  376. case *ServiceSpec_GlobalJob:
  377. s := proto.Size(x.GlobalJob)
  378. n += 1 // tag and wire
  379. n += proto.SizeVarint(uint64(s))
  380. n += s
  381. case nil:
  382. default:
  383. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  384. }
  385. return n
  386. }
  387. // ReplicatedService sets the reconciliation target to certain number of replicas.
  388. type ReplicatedService struct {
  389. Replicas uint64 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"`
  390. }
  391. func (m *ReplicatedService) Reset() { *m = ReplicatedService{} }
  392. func (*ReplicatedService) ProtoMessage() {}
  393. func (*ReplicatedService) Descriptor() ([]byte, []int) {
  394. return fileDescriptor_6589acc608f7d4fd, []int{2}
  395. }
  396. func (m *ReplicatedService) XXX_Unmarshal(b []byte) error {
  397. return m.Unmarshal(b)
  398. }
  399. func (m *ReplicatedService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  400. if deterministic {
  401. return xxx_messageInfo_ReplicatedService.Marshal(b, m, deterministic)
  402. } else {
  403. b = b[:cap(b)]
  404. n, err := m.MarshalTo(b)
  405. if err != nil {
  406. return nil, err
  407. }
  408. return b[:n], nil
  409. }
  410. }
  411. func (m *ReplicatedService) XXX_Merge(src proto.Message) {
  412. xxx_messageInfo_ReplicatedService.Merge(m, src)
  413. }
  414. func (m *ReplicatedService) XXX_Size() int {
  415. return m.Size()
  416. }
  417. func (m *ReplicatedService) XXX_DiscardUnknown() {
  418. xxx_messageInfo_ReplicatedService.DiscardUnknown(m)
  419. }
  420. var xxx_messageInfo_ReplicatedService proto.InternalMessageInfo
  421. // GlobalService represents global service.
  422. type GlobalService struct {
  423. }
  424. func (m *GlobalService) Reset() { *m = GlobalService{} }
  425. func (*GlobalService) ProtoMessage() {}
  426. func (*GlobalService) Descriptor() ([]byte, []int) {
  427. return fileDescriptor_6589acc608f7d4fd, []int{3}
  428. }
  429. func (m *GlobalService) XXX_Unmarshal(b []byte) error {
  430. return m.Unmarshal(b)
  431. }
  432. func (m *GlobalService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  433. if deterministic {
  434. return xxx_messageInfo_GlobalService.Marshal(b, m, deterministic)
  435. } else {
  436. b = b[:cap(b)]
  437. n, err := m.MarshalTo(b)
  438. if err != nil {
  439. return nil, err
  440. }
  441. return b[:n], nil
  442. }
  443. }
  444. func (m *GlobalService) XXX_Merge(src proto.Message) {
  445. xxx_messageInfo_GlobalService.Merge(m, src)
  446. }
  447. func (m *GlobalService) XXX_Size() int {
  448. return m.Size()
  449. }
  450. func (m *GlobalService) XXX_DiscardUnknown() {
  451. xxx_messageInfo_GlobalService.DiscardUnknown(m)
  452. }
  453. var xxx_messageInfo_GlobalService proto.InternalMessageInfo
  454. // ReplicatedJob is a certain type of one-off job which executes many Tasks in
  455. // parallel until the specified number of Tasks have succeeded.
  456. type ReplicatedJob struct {
  457. // MaxConcurrent indicates the maximum number of Tasks that should be
  458. // executing simultaneously at any given time.
  459. MaxConcurrent uint64 `protobuf:"varint,1,opt,name=max_concurrent,json=maxConcurrent,proto3" json:"max_concurrent,omitempty"`
  460. // TotalCompletions sets the total number of Tasks desired to run to
  461. // completion. This is also the absolute maximum number of Tasks that will
  462. // be executed in parallel. That is, if this number is smaller than
  463. // MaxConcurrent, only this many replicas will run.
  464. TotalCompletions uint64 `protobuf:"varint,2,opt,name=total_completions,json=totalCompletions,proto3" json:"total_completions,omitempty"`
  465. }
  466. func (m *ReplicatedJob) Reset() { *m = ReplicatedJob{} }
  467. func (*ReplicatedJob) ProtoMessage() {}
  468. func (*ReplicatedJob) Descriptor() ([]byte, []int) {
  469. return fileDescriptor_6589acc608f7d4fd, []int{4}
  470. }
  471. func (m *ReplicatedJob) XXX_Unmarshal(b []byte) error {
  472. return m.Unmarshal(b)
  473. }
  474. func (m *ReplicatedJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  475. if deterministic {
  476. return xxx_messageInfo_ReplicatedJob.Marshal(b, m, deterministic)
  477. } else {
  478. b = b[:cap(b)]
  479. n, err := m.MarshalTo(b)
  480. if err != nil {
  481. return nil, err
  482. }
  483. return b[:n], nil
  484. }
  485. }
  486. func (m *ReplicatedJob) XXX_Merge(src proto.Message) {
  487. xxx_messageInfo_ReplicatedJob.Merge(m, src)
  488. }
  489. func (m *ReplicatedJob) XXX_Size() int {
  490. return m.Size()
  491. }
  492. func (m *ReplicatedJob) XXX_DiscardUnknown() {
  493. xxx_messageInfo_ReplicatedJob.DiscardUnknown(m)
  494. }
  495. var xxx_messageInfo_ReplicatedJob proto.InternalMessageInfo
  496. // GlobalJob is a type of one-off job which executes one Task on every node
  497. // matching the service's placement constraints.
  498. type GlobalJob struct {
  499. }
  500. func (m *GlobalJob) Reset() { *m = GlobalJob{} }
  501. func (*GlobalJob) ProtoMessage() {}
  502. func (*GlobalJob) Descriptor() ([]byte, []int) {
  503. return fileDescriptor_6589acc608f7d4fd, []int{5}
  504. }
  505. func (m *GlobalJob) XXX_Unmarshal(b []byte) error {
  506. return m.Unmarshal(b)
  507. }
  508. func (m *GlobalJob) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  509. if deterministic {
  510. return xxx_messageInfo_GlobalJob.Marshal(b, m, deterministic)
  511. } else {
  512. b = b[:cap(b)]
  513. n, err := m.MarshalTo(b)
  514. if err != nil {
  515. return nil, err
  516. }
  517. return b[:n], nil
  518. }
  519. }
  520. func (m *GlobalJob) XXX_Merge(src proto.Message) {
  521. xxx_messageInfo_GlobalJob.Merge(m, src)
  522. }
  523. func (m *GlobalJob) XXX_Size() int {
  524. return m.Size()
  525. }
  526. func (m *GlobalJob) XXX_DiscardUnknown() {
  527. xxx_messageInfo_GlobalJob.DiscardUnknown(m)
  528. }
  529. var xxx_messageInfo_GlobalJob proto.InternalMessageInfo
  530. type TaskSpec struct {
  531. // Types that are valid to be assigned to Runtime:
  532. // *TaskSpec_Attachment
  533. // *TaskSpec_Container
  534. // *TaskSpec_Generic
  535. Runtime isTaskSpec_Runtime `protobuf_oneof:"runtime"`
  536. // Resource requirements for the container.
  537. Resources *ResourceRequirements `protobuf:"bytes,2,opt,name=resources,proto3" json:"resources,omitempty"`
  538. // RestartPolicy specifies what to do when a task fails or finishes.
  539. Restart *RestartPolicy `protobuf:"bytes,4,opt,name=restart,proto3" json:"restart,omitempty"`
  540. // Placement specifies node selection constraints
  541. Placement *Placement `protobuf:"bytes,5,opt,name=placement,proto3" json:"placement,omitempty"`
  542. // LogDriver specifies the log driver to use for the task. Any runtime will
  543. // direct logs into the specified driver for the duration of the task.
  544. LogDriver *Driver `protobuf:"bytes,6,opt,name=log_driver,json=logDriver,proto3" json:"log_driver,omitempty"`
  545. // Networks specifies the list of network attachment
  546. // configurations (which specify the network and per-network
  547. // aliases) that this task spec is bound to.
  548. Networks []*NetworkAttachmentConfig `protobuf:"bytes,7,rep,name=networks,proto3" json:"networks,omitempty"`
  549. // ForceUpdate is a counter that triggers an update even if no relevant
  550. // parameters have been changed. We do this to allow forced restarts
  551. // using the same reconciliation-based mechanism that performs rolling
  552. // updates.
  553. ForceUpdate uint64 `protobuf:"varint,9,opt,name=force_update,json=forceUpdate,proto3" json:"force_update,omitempty"`
  554. // ResourceReferences provides a generic way to specify resources that
  555. // are used by this task, and should be sent down to agents along with
  556. // the task. Inside the runtime field there may be more specific
  557. // information about how to use the resource, but ResourceReferences
  558. // establishes the relationship at the store level, and instructs the
  559. // dispatcher to send the related objects.
  560. //
  561. // ResourceReferences is a list of ResourceReferences used by the task.
  562. ResourceReferences []ResourceReference `protobuf:"bytes,11,rep,name=resource_references,json=resourceReferences,proto3" json:"resource_references"`
  563. }
  564. func (m *TaskSpec) Reset() { *m = TaskSpec{} }
  565. func (*TaskSpec) ProtoMessage() {}
  566. func (*TaskSpec) Descriptor() ([]byte, []int) {
  567. return fileDescriptor_6589acc608f7d4fd, []int{6}
  568. }
  569. func (m *TaskSpec) XXX_Unmarshal(b []byte) error {
  570. return m.Unmarshal(b)
  571. }
  572. func (m *TaskSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  573. if deterministic {
  574. return xxx_messageInfo_TaskSpec.Marshal(b, m, deterministic)
  575. } else {
  576. b = b[:cap(b)]
  577. n, err := m.MarshalTo(b)
  578. if err != nil {
  579. return nil, err
  580. }
  581. return b[:n], nil
  582. }
  583. }
  584. func (m *TaskSpec) XXX_Merge(src proto.Message) {
  585. xxx_messageInfo_TaskSpec.Merge(m, src)
  586. }
  587. func (m *TaskSpec) XXX_Size() int {
  588. return m.Size()
  589. }
  590. func (m *TaskSpec) XXX_DiscardUnknown() {
  591. xxx_messageInfo_TaskSpec.DiscardUnknown(m)
  592. }
  593. var xxx_messageInfo_TaskSpec proto.InternalMessageInfo
  594. type isTaskSpec_Runtime interface {
  595. isTaskSpec_Runtime()
  596. MarshalTo([]byte) (int, error)
  597. Size() int
  598. }
  599. type TaskSpec_Attachment struct {
  600. Attachment *NetworkAttachmentSpec `protobuf:"bytes,8,opt,name=attachment,proto3,oneof"`
  601. }
  602. type TaskSpec_Container struct {
  603. Container *ContainerSpec `protobuf:"bytes,1,opt,name=container,proto3,oneof"`
  604. }
  605. type TaskSpec_Generic struct {
  606. Generic *GenericRuntimeSpec `protobuf:"bytes,10,opt,name=generic,proto3,oneof"`
  607. }
  608. func (*TaskSpec_Attachment) isTaskSpec_Runtime() {}
  609. func (*TaskSpec_Container) isTaskSpec_Runtime() {}
  610. func (*TaskSpec_Generic) isTaskSpec_Runtime() {}
  611. func (m *TaskSpec) GetRuntime() isTaskSpec_Runtime {
  612. if m != nil {
  613. return m.Runtime
  614. }
  615. return nil
  616. }
  617. func (m *TaskSpec) GetAttachment() *NetworkAttachmentSpec {
  618. if x, ok := m.GetRuntime().(*TaskSpec_Attachment); ok {
  619. return x.Attachment
  620. }
  621. return nil
  622. }
  623. func (m *TaskSpec) GetContainer() *ContainerSpec {
  624. if x, ok := m.GetRuntime().(*TaskSpec_Container); ok {
  625. return x.Container
  626. }
  627. return nil
  628. }
  629. func (m *TaskSpec) GetGeneric() *GenericRuntimeSpec {
  630. if x, ok := m.GetRuntime().(*TaskSpec_Generic); ok {
  631. return x.Generic
  632. }
  633. return nil
  634. }
  635. // XXX_OneofFuncs is for the internal use of the proto package.
  636. 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{}) {
  637. return _TaskSpec_OneofMarshaler, _TaskSpec_OneofUnmarshaler, _TaskSpec_OneofSizer, []interface{}{
  638. (*TaskSpec_Attachment)(nil),
  639. (*TaskSpec_Container)(nil),
  640. (*TaskSpec_Generic)(nil),
  641. }
  642. }
  643. func _TaskSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  644. m := msg.(*TaskSpec)
  645. // runtime
  646. switch x := m.Runtime.(type) {
  647. case *TaskSpec_Attachment:
  648. _ = b.EncodeVarint(8<<3 | proto.WireBytes)
  649. if err := b.EncodeMessage(x.Attachment); err != nil {
  650. return err
  651. }
  652. case *TaskSpec_Container:
  653. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  654. if err := b.EncodeMessage(x.Container); err != nil {
  655. return err
  656. }
  657. case *TaskSpec_Generic:
  658. _ = b.EncodeVarint(10<<3 | proto.WireBytes)
  659. if err := b.EncodeMessage(x.Generic); err != nil {
  660. return err
  661. }
  662. case nil:
  663. default:
  664. return fmt.Errorf("TaskSpec.Runtime has unexpected type %T", x)
  665. }
  666. return nil
  667. }
  668. func _TaskSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  669. m := msg.(*TaskSpec)
  670. switch tag {
  671. case 8: // runtime.attachment
  672. if wire != proto.WireBytes {
  673. return true, proto.ErrInternalBadWireType
  674. }
  675. msg := new(NetworkAttachmentSpec)
  676. err := b.DecodeMessage(msg)
  677. m.Runtime = &TaskSpec_Attachment{msg}
  678. return true, err
  679. case 1: // runtime.container
  680. if wire != proto.WireBytes {
  681. return true, proto.ErrInternalBadWireType
  682. }
  683. msg := new(ContainerSpec)
  684. err := b.DecodeMessage(msg)
  685. m.Runtime = &TaskSpec_Container{msg}
  686. return true, err
  687. case 10: // runtime.generic
  688. if wire != proto.WireBytes {
  689. return true, proto.ErrInternalBadWireType
  690. }
  691. msg := new(GenericRuntimeSpec)
  692. err := b.DecodeMessage(msg)
  693. m.Runtime = &TaskSpec_Generic{msg}
  694. return true, err
  695. default:
  696. return false, nil
  697. }
  698. }
  699. func _TaskSpec_OneofSizer(msg proto.Message) (n int) {
  700. m := msg.(*TaskSpec)
  701. // runtime
  702. switch x := m.Runtime.(type) {
  703. case *TaskSpec_Attachment:
  704. s := proto.Size(x.Attachment)
  705. n += 1 // tag and wire
  706. n += proto.SizeVarint(uint64(s))
  707. n += s
  708. case *TaskSpec_Container:
  709. s := proto.Size(x.Container)
  710. n += 1 // tag and wire
  711. n += proto.SizeVarint(uint64(s))
  712. n += s
  713. case *TaskSpec_Generic:
  714. s := proto.Size(x.Generic)
  715. n += 1 // tag and wire
  716. n += proto.SizeVarint(uint64(s))
  717. n += s
  718. case nil:
  719. default:
  720. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  721. }
  722. return n
  723. }
  724. type ResourceReference struct {
  725. ResourceID string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
  726. ResourceType ResourceType `protobuf:"varint,2,opt,name=resource_type,json=resourceType,proto3,enum=docker.swarmkit.v1.ResourceType" json:"resource_type,omitempty"`
  727. }
  728. func (m *ResourceReference) Reset() { *m = ResourceReference{} }
  729. func (*ResourceReference) ProtoMessage() {}
  730. func (*ResourceReference) Descriptor() ([]byte, []int) {
  731. return fileDescriptor_6589acc608f7d4fd, []int{7}
  732. }
  733. func (m *ResourceReference) XXX_Unmarshal(b []byte) error {
  734. return m.Unmarshal(b)
  735. }
  736. func (m *ResourceReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  737. if deterministic {
  738. return xxx_messageInfo_ResourceReference.Marshal(b, m, deterministic)
  739. } else {
  740. b = b[:cap(b)]
  741. n, err := m.MarshalTo(b)
  742. if err != nil {
  743. return nil, err
  744. }
  745. return b[:n], nil
  746. }
  747. }
  748. func (m *ResourceReference) XXX_Merge(src proto.Message) {
  749. xxx_messageInfo_ResourceReference.Merge(m, src)
  750. }
  751. func (m *ResourceReference) XXX_Size() int {
  752. return m.Size()
  753. }
  754. func (m *ResourceReference) XXX_DiscardUnknown() {
  755. xxx_messageInfo_ResourceReference.DiscardUnknown(m)
  756. }
  757. var xxx_messageInfo_ResourceReference proto.InternalMessageInfo
  758. type GenericRuntimeSpec struct {
  759. Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
  760. Payload *types.Any `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
  761. }
  762. func (m *GenericRuntimeSpec) Reset() { *m = GenericRuntimeSpec{} }
  763. func (*GenericRuntimeSpec) ProtoMessage() {}
  764. func (*GenericRuntimeSpec) Descriptor() ([]byte, []int) {
  765. return fileDescriptor_6589acc608f7d4fd, []int{8}
  766. }
  767. func (m *GenericRuntimeSpec) XXX_Unmarshal(b []byte) error {
  768. return m.Unmarshal(b)
  769. }
  770. func (m *GenericRuntimeSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  771. if deterministic {
  772. return xxx_messageInfo_GenericRuntimeSpec.Marshal(b, m, deterministic)
  773. } else {
  774. b = b[:cap(b)]
  775. n, err := m.MarshalTo(b)
  776. if err != nil {
  777. return nil, err
  778. }
  779. return b[:n], nil
  780. }
  781. }
  782. func (m *GenericRuntimeSpec) XXX_Merge(src proto.Message) {
  783. xxx_messageInfo_GenericRuntimeSpec.Merge(m, src)
  784. }
  785. func (m *GenericRuntimeSpec) XXX_Size() int {
  786. return m.Size()
  787. }
  788. func (m *GenericRuntimeSpec) XXX_DiscardUnknown() {
  789. xxx_messageInfo_GenericRuntimeSpec.DiscardUnknown(m)
  790. }
  791. var xxx_messageInfo_GenericRuntimeSpec proto.InternalMessageInfo
  792. // NetworkAttachmentSpec specifies runtime parameters required to attach
  793. // a container to a network.
  794. type NetworkAttachmentSpec struct {
  795. // ContainerID specifies a unique ID of the container for which
  796. // this attachment is for.
  797. ContainerID string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"`
  798. }
  799. func (m *NetworkAttachmentSpec) Reset() { *m = NetworkAttachmentSpec{} }
  800. func (*NetworkAttachmentSpec) ProtoMessage() {}
  801. func (*NetworkAttachmentSpec) Descriptor() ([]byte, []int) {
  802. return fileDescriptor_6589acc608f7d4fd, []int{9}
  803. }
  804. func (m *NetworkAttachmentSpec) XXX_Unmarshal(b []byte) error {
  805. return m.Unmarshal(b)
  806. }
  807. func (m *NetworkAttachmentSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  808. if deterministic {
  809. return xxx_messageInfo_NetworkAttachmentSpec.Marshal(b, m, deterministic)
  810. } else {
  811. b = b[:cap(b)]
  812. n, err := m.MarshalTo(b)
  813. if err != nil {
  814. return nil, err
  815. }
  816. return b[:n], nil
  817. }
  818. }
  819. func (m *NetworkAttachmentSpec) XXX_Merge(src proto.Message) {
  820. xxx_messageInfo_NetworkAttachmentSpec.Merge(m, src)
  821. }
  822. func (m *NetworkAttachmentSpec) XXX_Size() int {
  823. return m.Size()
  824. }
  825. func (m *NetworkAttachmentSpec) XXX_DiscardUnknown() {
  826. xxx_messageInfo_NetworkAttachmentSpec.DiscardUnknown(m)
  827. }
  828. var xxx_messageInfo_NetworkAttachmentSpec proto.InternalMessageInfo
  829. // Container specifies runtime parameters for a container.
  830. type ContainerSpec struct {
  831. // image defines the image reference, as specified in the
  832. // distribution/reference package. This may include a registry host, name,
  833. // tag or digest.
  834. //
  835. // The field will be directly passed to the engine pulling. Well-behaved
  836. // service definitions will used immutable references, either through tags
  837. // that don't change or verifiable digests.
  838. Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
  839. // Labels defines labels to be added to the container at creation time. If
  840. // collisions with system labels occur, these labels will be overridden.
  841. //
  842. // This field *must* remain compatible with the Labels field of
  843. // Annotations.
  844. Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  845. // Command to run the the container. The first element is a path to the
  846. // executable and the following elements are treated as arguments.
  847. //
  848. // If command is empty, execution will fall back to the image's entrypoint.
  849. //
  850. // Command should only be used when overriding entrypoint.
  851. Command []string `protobuf:"bytes,3,rep,name=command,proto3" json:"command,omitempty"`
  852. // Args specifies arguments provided to the image's entrypoint.
  853. //
  854. // If Command and Args are provided, Args will be appended to Command.
  855. Args []string `protobuf:"bytes,4,rep,name=args,proto3" json:"args,omitempty"`
  856. // Hostname specifies the hostname that will be set on containers created by docker swarm.
  857. // All containers for a given service will have the same hostname
  858. Hostname string `protobuf:"bytes,14,opt,name=hostname,proto3" json:"hostname,omitempty"`
  859. // Env specifies the environment variables for the container in NAME=VALUE
  860. // format. These must be compliant with [IEEE Std
  861. // 1003.1-2001](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html).
  862. Env []string `protobuf:"bytes,5,rep,name=env,proto3" json:"env,omitempty"`
  863. // Dir defines the working directory to set for the container process.
  864. Dir string `protobuf:"bytes,6,opt,name=dir,proto3" json:"dir,omitempty"`
  865. // User specifies the user that should be employed to run the container.
  866. //
  867. // Note that the primary group may be specified by appending the group name
  868. // or id to the user name, separated by a `:`. This syntax is
  869. // `<user>:<group>`.
  870. User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"`
  871. // Groups specifies supplementary groups available to the user.
  872. Groups []string `protobuf:"bytes,11,rep,name=groups,proto3" json:"groups,omitempty"`
  873. // Privileges specifies security configuration/permissions.
  874. Privileges *Privileges `protobuf:"bytes,22,opt,name=privileges,proto3" json:"privileges,omitempty"`
  875. // Init declares that a custom init will be running inside the container, if null, use the daemon's configured settings
  876. Init *types.BoolValue `protobuf:"bytes,23,opt,name=init,proto3" json:"init,omitempty"`
  877. // TTY declares that a TTY should be attached to the standard streams,
  878. // including stdin if it is still open.
  879. TTY bool `protobuf:"varint,13,opt,name=tty,proto3" json:"tty,omitempty"`
  880. // OpenStdin declares that the standard input (stdin) should be open.
  881. OpenStdin bool `protobuf:"varint,18,opt,name=open_stdin,json=openStdin,proto3" json:"open_stdin,omitempty"`
  882. // ReadOnly declares that the container root filesystem is read-only.
  883. // This only impacts the root filesystem, not additional mounts (including
  884. // tmpfs). For additional mounts that are not part of the initial rootfs,
  885. // they will be decided by the modes passed in the mount definition.
  886. ReadOnly bool `protobuf:"varint,19,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"`
  887. // StopSignal defines the signal to stop the container.
  888. StopSignal string `protobuf:"bytes,20,opt,name=stop_signal,json=stopSignal,proto3" json:"stop_signal,omitempty"`
  889. Mounts []Mount `protobuf:"bytes,8,rep,name=mounts,proto3" json:"mounts"`
  890. // StopGracePeriod the grace period for stopping the container before
  891. // forcefully killing the container.
  892. // Note: Can't use stdduration here because this needs to be nullable.
  893. StopGracePeriod *types.Duration `protobuf:"bytes,9,opt,name=stop_grace_period,json=stopGracePeriod,proto3" json:"stop_grace_period,omitempty"`
  894. // PullOptions parameterize the behavior of image pulls.
  895. PullOptions *ContainerSpec_PullOptions `protobuf:"bytes,10,opt,name=pull_options,json=pullOptions,proto3" json:"pull_options,omitempty"`
  896. // SecretReference contains references to zero or more secrets that
  897. // will be exposed to the container.
  898. Secrets []*SecretReference `protobuf:"bytes,12,rep,name=secrets,proto3" json:"secrets,omitempty"`
  899. // ConfigReference contains references to zero or more configs that
  900. // will be exposed to the container.
  901. Configs []*ConfigReference `protobuf:"bytes,21,rep,name=configs,proto3" json:"configs,omitempty"`
  902. // Hosts allow additional entries to be specified in /etc/hosts
  903. // that associates IP addresses with hostnames.
  904. // Detailed documentation is available in:
  905. // http://man7.org/linux/man-pages/man5/hosts.5.html
  906. // IP_address canonical_hostname [aliases...]
  907. //
  908. // The format of the Hosts in swarmkit follows the same as
  909. // above.
  910. // This is different from `docker run --add-host <hostname>:<ip>`
  911. // where format is `<hostname>:<ip>`
  912. Hosts []string `protobuf:"bytes,17,rep,name=hosts,proto3" json:"hosts,omitempty"`
  913. // DNSConfig allows one to specify DNS related configuration in resolv.conf
  914. DNSConfig *ContainerSpec_DNSConfig `protobuf:"bytes,15,opt,name=dns_config,json=dnsConfig,proto3" json:"dns_config,omitempty"`
  915. // Healthcheck describes how to check the container is healthy. If the
  916. // container is considered unhealthy, it will be destroyed, its creating
  917. // task will exit and a new task will be rescheduled elsewhere. A container
  918. // is considered unhealthy after `Retries` number of consecutive failures.
  919. Healthcheck *HealthConfig `protobuf:"bytes,16,opt,name=healthcheck,proto3" json:"healthcheck,omitempty"`
  920. // Isolation defines the isolation level for windows containers (default, process, hyperv).
  921. // Runtimes that don't support it ignore that field
  922. Isolation ContainerSpec_Isolation `protobuf:"varint,24,opt,name=isolation,proto3,enum=docker.swarmkit.v1.ContainerSpec_Isolation" json:"isolation,omitempty"`
  923. // PidsLimit prevents from OS resource damage by applications inside the container
  924. // using fork bomb attack.
  925. PidsLimit int64 `protobuf:"varint,25,opt,name=pidsLimit,proto3" json:"pidsLimit,omitempty"`
  926. // Sysctls sets namespaced kernel parameters (sysctls) in the container. This
  927. // option is equivalent to passing --sysctl to docker run.
  928. //
  929. // Note that while options are subject to the same restrictions as arguments
  930. // passed to the --sysctl flag on docker run, those options are not further
  931. // validated to ensure that they are safe or sensible in a clustered
  932. // environment.
  933. //
  934. // Additionally, sysctls are not validated for support in the underlying
  935. // daemon. For information about supported options, refer to the
  936. // documentation at:
  937. //
  938. // https://docs.docker.com/engine/reference/commandline/run/#configure-namespaced-kernel-parameters-sysctls-at-runtime
  939. Sysctls map[string]string `protobuf:"bytes,26,rep,name=sysctls,proto3" json:"sysctls,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
  940. // CapabilityAdd sets the list of capabilities to add to the default capability list
  941. CapabilityAdd []string `protobuf:"bytes,27,rep,name=capability_add,json=capabilityAdd,proto3" json:"capability_add,omitempty"`
  942. // CapabilityDrop sets the list of capabilities to drop from the default capability list
  943. CapabilityDrop []string `protobuf:"bytes,28,rep,name=capability_drop,json=capabilityDrop,proto3" json:"capability_drop,omitempty"`
  944. // Ulimits defines the list of ulimits to set in the container. This option
  945. // is equivalent to passing --ulimit to docker run.
  946. Ulimits []*ContainerSpec_Ulimit `protobuf:"bytes,29,rep,name=ulimits,proto3" json:"ulimits,omitempty"`
  947. }
  948. func (m *ContainerSpec) Reset() { *m = ContainerSpec{} }
  949. func (*ContainerSpec) ProtoMessage() {}
  950. func (*ContainerSpec) Descriptor() ([]byte, []int) {
  951. return fileDescriptor_6589acc608f7d4fd, []int{10}
  952. }
  953. func (m *ContainerSpec) XXX_Unmarshal(b []byte) error {
  954. return m.Unmarshal(b)
  955. }
  956. func (m *ContainerSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  957. if deterministic {
  958. return xxx_messageInfo_ContainerSpec.Marshal(b, m, deterministic)
  959. } else {
  960. b = b[:cap(b)]
  961. n, err := m.MarshalTo(b)
  962. if err != nil {
  963. return nil, err
  964. }
  965. return b[:n], nil
  966. }
  967. }
  968. func (m *ContainerSpec) XXX_Merge(src proto.Message) {
  969. xxx_messageInfo_ContainerSpec.Merge(m, src)
  970. }
  971. func (m *ContainerSpec) XXX_Size() int {
  972. return m.Size()
  973. }
  974. func (m *ContainerSpec) XXX_DiscardUnknown() {
  975. xxx_messageInfo_ContainerSpec.DiscardUnknown(m)
  976. }
  977. var xxx_messageInfo_ContainerSpec proto.InternalMessageInfo
  978. // PullOptions allows one to parameterize an image pull.
  979. type ContainerSpec_PullOptions struct {
  980. // RegistryAuth is the registry auth token obtained from the client, required
  981. // to pull private images. This is the unmodified JSON used as part of
  982. // the `X-Registry-Auth` header.
  983. // TODO(nishanttotla): This field will later be deprecated
  984. RegistryAuth string `protobuf:"bytes,64,opt,name=registry_auth,json=registryAuth,proto3" json:"registry_auth,omitempty"`
  985. }
  986. func (m *ContainerSpec_PullOptions) Reset() { *m = ContainerSpec_PullOptions{} }
  987. func (*ContainerSpec_PullOptions) ProtoMessage() {}
  988. func (*ContainerSpec_PullOptions) Descriptor() ([]byte, []int) {
  989. return fileDescriptor_6589acc608f7d4fd, []int{10, 1}
  990. }
  991. func (m *ContainerSpec_PullOptions) XXX_Unmarshal(b []byte) error {
  992. return m.Unmarshal(b)
  993. }
  994. func (m *ContainerSpec_PullOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  995. if deterministic {
  996. return xxx_messageInfo_ContainerSpec_PullOptions.Marshal(b, m, deterministic)
  997. } else {
  998. b = b[:cap(b)]
  999. n, err := m.MarshalTo(b)
  1000. if err != nil {
  1001. return nil, err
  1002. }
  1003. return b[:n], nil
  1004. }
  1005. }
  1006. func (m *ContainerSpec_PullOptions) XXX_Merge(src proto.Message) {
  1007. xxx_messageInfo_ContainerSpec_PullOptions.Merge(m, src)
  1008. }
  1009. func (m *ContainerSpec_PullOptions) XXX_Size() int {
  1010. return m.Size()
  1011. }
  1012. func (m *ContainerSpec_PullOptions) XXX_DiscardUnknown() {
  1013. xxx_messageInfo_ContainerSpec_PullOptions.DiscardUnknown(m)
  1014. }
  1015. var xxx_messageInfo_ContainerSpec_PullOptions proto.InternalMessageInfo
  1016. // DNSConfig specifies DNS related configurations in resolver configuration file (resolv.conf)
  1017. // Detailed documentation is available in:
  1018. // http://man7.org/linux/man-pages/man5/resolv.conf.5.html
  1019. // TODO: domain is not supported yet
  1020. type ContainerSpec_DNSConfig struct {
  1021. // Nameservers specifies the IP addresses of the name servers
  1022. Nameservers []string `protobuf:"bytes,1,rep,name=nameservers,proto3" json:"nameservers,omitempty"`
  1023. // Search specifies the search list for host-name lookup
  1024. Search []string `protobuf:"bytes,2,rep,name=search,proto3" json:"search,omitempty"`
  1025. // Options allows certain internal resolver variables to be modified
  1026. Options []string `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"`
  1027. }
  1028. func (m *ContainerSpec_DNSConfig) Reset() { *m = ContainerSpec_DNSConfig{} }
  1029. func (*ContainerSpec_DNSConfig) ProtoMessage() {}
  1030. func (*ContainerSpec_DNSConfig) Descriptor() ([]byte, []int) {
  1031. return fileDescriptor_6589acc608f7d4fd, []int{10, 2}
  1032. }
  1033. func (m *ContainerSpec_DNSConfig) XXX_Unmarshal(b []byte) error {
  1034. return m.Unmarshal(b)
  1035. }
  1036. func (m *ContainerSpec_DNSConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1037. if deterministic {
  1038. return xxx_messageInfo_ContainerSpec_DNSConfig.Marshal(b, m, deterministic)
  1039. } else {
  1040. b = b[:cap(b)]
  1041. n, err := m.MarshalTo(b)
  1042. if err != nil {
  1043. return nil, err
  1044. }
  1045. return b[:n], nil
  1046. }
  1047. }
  1048. func (m *ContainerSpec_DNSConfig) XXX_Merge(src proto.Message) {
  1049. xxx_messageInfo_ContainerSpec_DNSConfig.Merge(m, src)
  1050. }
  1051. func (m *ContainerSpec_DNSConfig) XXX_Size() int {
  1052. return m.Size()
  1053. }
  1054. func (m *ContainerSpec_DNSConfig) XXX_DiscardUnknown() {
  1055. xxx_messageInfo_ContainerSpec_DNSConfig.DiscardUnknown(m)
  1056. }
  1057. var xxx_messageInfo_ContainerSpec_DNSConfig proto.InternalMessageInfo
  1058. type ContainerSpec_Ulimit struct {
  1059. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  1060. Soft int64 `protobuf:"varint,2,opt,name=soft,proto3" json:"soft,omitempty"`
  1061. Hard int64 `protobuf:"varint,3,opt,name=hard,proto3" json:"hard,omitempty"`
  1062. }
  1063. func (m *ContainerSpec_Ulimit) Reset() { *m = ContainerSpec_Ulimit{} }
  1064. func (*ContainerSpec_Ulimit) ProtoMessage() {}
  1065. func (*ContainerSpec_Ulimit) Descriptor() ([]byte, []int) {
  1066. return fileDescriptor_6589acc608f7d4fd, []int{10, 4}
  1067. }
  1068. func (m *ContainerSpec_Ulimit) XXX_Unmarshal(b []byte) error {
  1069. return m.Unmarshal(b)
  1070. }
  1071. func (m *ContainerSpec_Ulimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1072. if deterministic {
  1073. return xxx_messageInfo_ContainerSpec_Ulimit.Marshal(b, m, deterministic)
  1074. } else {
  1075. b = b[:cap(b)]
  1076. n, err := m.MarshalTo(b)
  1077. if err != nil {
  1078. return nil, err
  1079. }
  1080. return b[:n], nil
  1081. }
  1082. }
  1083. func (m *ContainerSpec_Ulimit) XXX_Merge(src proto.Message) {
  1084. xxx_messageInfo_ContainerSpec_Ulimit.Merge(m, src)
  1085. }
  1086. func (m *ContainerSpec_Ulimit) XXX_Size() int {
  1087. return m.Size()
  1088. }
  1089. func (m *ContainerSpec_Ulimit) XXX_DiscardUnknown() {
  1090. xxx_messageInfo_ContainerSpec_Ulimit.DiscardUnknown(m)
  1091. }
  1092. var xxx_messageInfo_ContainerSpec_Ulimit proto.InternalMessageInfo
  1093. // EndpointSpec defines the properties that can be configured to
  1094. // access and loadbalance the service.
  1095. type EndpointSpec struct {
  1096. Mode EndpointSpec_ResolutionMode `protobuf:"varint,1,opt,name=mode,proto3,enum=docker.swarmkit.v1.EndpointSpec_ResolutionMode" json:"mode,omitempty"`
  1097. // List of exposed ports that this service is accessible from
  1098. // external to the cluster.
  1099. Ports []*PortConfig `protobuf:"bytes,2,rep,name=ports,proto3" json:"ports,omitempty"`
  1100. }
  1101. func (m *EndpointSpec) Reset() { *m = EndpointSpec{} }
  1102. func (*EndpointSpec) ProtoMessage() {}
  1103. func (*EndpointSpec) Descriptor() ([]byte, []int) {
  1104. return fileDescriptor_6589acc608f7d4fd, []int{11}
  1105. }
  1106. func (m *EndpointSpec) XXX_Unmarshal(b []byte) error {
  1107. return m.Unmarshal(b)
  1108. }
  1109. func (m *EndpointSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1110. if deterministic {
  1111. return xxx_messageInfo_EndpointSpec.Marshal(b, m, deterministic)
  1112. } else {
  1113. b = b[:cap(b)]
  1114. n, err := m.MarshalTo(b)
  1115. if err != nil {
  1116. return nil, err
  1117. }
  1118. return b[:n], nil
  1119. }
  1120. }
  1121. func (m *EndpointSpec) XXX_Merge(src proto.Message) {
  1122. xxx_messageInfo_EndpointSpec.Merge(m, src)
  1123. }
  1124. func (m *EndpointSpec) XXX_Size() int {
  1125. return m.Size()
  1126. }
  1127. func (m *EndpointSpec) XXX_DiscardUnknown() {
  1128. xxx_messageInfo_EndpointSpec.DiscardUnknown(m)
  1129. }
  1130. var xxx_messageInfo_EndpointSpec proto.InternalMessageInfo
  1131. // NetworkSpec specifies user defined network parameters.
  1132. type NetworkSpec struct {
  1133. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations,proto3" json:"annotations"`
  1134. // DriverConfig specific configuration consumed by the network driver.
  1135. DriverConfig *Driver `protobuf:"bytes,2,opt,name=driver_config,json=driverConfig,proto3" json:"driver_config,omitempty"`
  1136. // IPv6Enabled enables support for IPv6 on the network.
  1137. Ipv6Enabled bool `protobuf:"varint,3,opt,name=ipv6_enabled,json=ipv6Enabled,proto3" json:"ipv6_enabled,omitempty"`
  1138. // internal restricts external access to the network. This may be
  1139. // accomplished by disabling the default gateway or through other means.
  1140. Internal bool `protobuf:"varint,4,opt,name=internal,proto3" json:"internal,omitempty"`
  1141. IPAM *IPAMOptions `protobuf:"bytes,5,opt,name=ipam,proto3" json:"ipam,omitempty"`
  1142. // Attachable allows external(to swarm) entities to manually
  1143. // attach to this network. With this flag enabled, external
  1144. // entities such as containers running in an worker node in
  1145. // the cluster can manually attach to this network and access
  1146. // the services attached to this network. If this flag is not
  1147. // enabled(default case) no manual attachment to this network
  1148. // can happen.
  1149. Attachable bool `protobuf:"varint,6,opt,name=attachable,proto3" json:"attachable,omitempty"`
  1150. // Ingress indicates this network will provide the routing-mesh.
  1151. // In older versions, the network providing the routing mesh was
  1152. // swarm internally created only and it was identified by the name
  1153. // "ingress" and the label "com.docker.swarm.internal": "true".
  1154. Ingress bool `protobuf:"varint,7,opt,name=ingress,proto3" json:"ingress,omitempty"`
  1155. // ConfigFrom is the source of the configuration for this network.
  1156. //
  1157. // Types that are valid to be assigned to ConfigFrom:
  1158. // *NetworkSpec_Network
  1159. ConfigFrom isNetworkSpec_ConfigFrom `protobuf_oneof:"config_from"`
  1160. }
  1161. func (m *NetworkSpec) Reset() { *m = NetworkSpec{} }
  1162. func (*NetworkSpec) ProtoMessage() {}
  1163. func (*NetworkSpec) Descriptor() ([]byte, []int) {
  1164. return fileDescriptor_6589acc608f7d4fd, []int{12}
  1165. }
  1166. func (m *NetworkSpec) XXX_Unmarshal(b []byte) error {
  1167. return m.Unmarshal(b)
  1168. }
  1169. func (m *NetworkSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1170. if deterministic {
  1171. return xxx_messageInfo_NetworkSpec.Marshal(b, m, deterministic)
  1172. } else {
  1173. b = b[:cap(b)]
  1174. n, err := m.MarshalTo(b)
  1175. if err != nil {
  1176. return nil, err
  1177. }
  1178. return b[:n], nil
  1179. }
  1180. }
  1181. func (m *NetworkSpec) XXX_Merge(src proto.Message) {
  1182. xxx_messageInfo_NetworkSpec.Merge(m, src)
  1183. }
  1184. func (m *NetworkSpec) XXX_Size() int {
  1185. return m.Size()
  1186. }
  1187. func (m *NetworkSpec) XXX_DiscardUnknown() {
  1188. xxx_messageInfo_NetworkSpec.DiscardUnknown(m)
  1189. }
  1190. var xxx_messageInfo_NetworkSpec proto.InternalMessageInfo
  1191. type isNetworkSpec_ConfigFrom interface {
  1192. isNetworkSpec_ConfigFrom()
  1193. MarshalTo([]byte) (int, error)
  1194. Size() int
  1195. }
  1196. type NetworkSpec_Network struct {
  1197. Network string `protobuf:"bytes,8,opt,name=network,proto3,oneof"`
  1198. }
  1199. func (*NetworkSpec_Network) isNetworkSpec_ConfigFrom() {}
  1200. func (m *NetworkSpec) GetConfigFrom() isNetworkSpec_ConfigFrom {
  1201. if m != nil {
  1202. return m.ConfigFrom
  1203. }
  1204. return nil
  1205. }
  1206. func (m *NetworkSpec) GetNetwork() string {
  1207. if x, ok := m.GetConfigFrom().(*NetworkSpec_Network); ok {
  1208. return x.Network
  1209. }
  1210. return ""
  1211. }
  1212. // XXX_OneofFuncs is for the internal use of the proto package.
  1213. 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{}) {
  1214. return _NetworkSpec_OneofMarshaler, _NetworkSpec_OneofUnmarshaler, _NetworkSpec_OneofSizer, []interface{}{
  1215. (*NetworkSpec_Network)(nil),
  1216. }
  1217. }
  1218. func _NetworkSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  1219. m := msg.(*NetworkSpec)
  1220. // config_from
  1221. switch x := m.ConfigFrom.(type) {
  1222. case *NetworkSpec_Network:
  1223. _ = b.EncodeVarint(8<<3 | proto.WireBytes)
  1224. _ = b.EncodeStringBytes(x.Network)
  1225. case nil:
  1226. default:
  1227. return fmt.Errorf("NetworkSpec.ConfigFrom has unexpected type %T", x)
  1228. }
  1229. return nil
  1230. }
  1231. func _NetworkSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  1232. m := msg.(*NetworkSpec)
  1233. switch tag {
  1234. case 8: // config_from.network
  1235. if wire != proto.WireBytes {
  1236. return true, proto.ErrInternalBadWireType
  1237. }
  1238. x, err := b.DecodeStringBytes()
  1239. m.ConfigFrom = &NetworkSpec_Network{x}
  1240. return true, err
  1241. default:
  1242. return false, nil
  1243. }
  1244. }
  1245. func _NetworkSpec_OneofSizer(msg proto.Message) (n int) {
  1246. m := msg.(*NetworkSpec)
  1247. // config_from
  1248. switch x := m.ConfigFrom.(type) {
  1249. case *NetworkSpec_Network:
  1250. n += 1 // tag and wire
  1251. n += proto.SizeVarint(uint64(len(x.Network)))
  1252. n += len(x.Network)
  1253. case nil:
  1254. default:
  1255. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  1256. }
  1257. return n
  1258. }
  1259. // ClusterSpec specifies global cluster settings.
  1260. type ClusterSpec struct {
  1261. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations,proto3" json:"annotations"`
  1262. // DEPRECATED: AcceptancePolicy defines the certificate issuance policy.
  1263. // Acceptance policy is no longer customizable, and secrets have been
  1264. // replaced with join tokens.
  1265. AcceptancePolicy AcceptancePolicy `protobuf:"bytes,2,opt,name=acceptance_policy,json=acceptancePolicy,proto3" json:"acceptance_policy"` // Deprecated: Do not use.
  1266. // Orchestration defines cluster-level orchestration settings.
  1267. Orchestration OrchestrationConfig `protobuf:"bytes,3,opt,name=orchestration,proto3" json:"orchestration"`
  1268. // Raft defines the cluster's raft settings.
  1269. Raft RaftConfig `protobuf:"bytes,4,opt,name=raft,proto3" json:"raft"`
  1270. // Dispatcher defines cluster-level dispatcher settings.
  1271. Dispatcher DispatcherConfig `protobuf:"bytes,5,opt,name=dispatcher,proto3" json:"dispatcher"`
  1272. // CAConfig defines cluster-level certificate authority settings.
  1273. CAConfig CAConfig `protobuf:"bytes,6,opt,name=ca_config,json=caConfig,proto3" json:"ca_config"`
  1274. // TaskDefaults specifies the default values to use for task creation.
  1275. TaskDefaults TaskDefaults `protobuf:"bytes,7,opt,name=task_defaults,json=taskDefaults,proto3" json:"task_defaults"`
  1276. // EncryptionConfig defines the cluster's encryption settings.
  1277. EncryptionConfig EncryptionConfig `protobuf:"bytes,8,opt,name=encryption_config,json=encryptionConfig,proto3" json:"encryption_config"`
  1278. }
  1279. func (m *ClusterSpec) Reset() { *m = ClusterSpec{} }
  1280. func (*ClusterSpec) ProtoMessage() {}
  1281. func (*ClusterSpec) Descriptor() ([]byte, []int) {
  1282. return fileDescriptor_6589acc608f7d4fd, []int{13}
  1283. }
  1284. func (m *ClusterSpec) XXX_Unmarshal(b []byte) error {
  1285. return m.Unmarshal(b)
  1286. }
  1287. func (m *ClusterSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1288. if deterministic {
  1289. return xxx_messageInfo_ClusterSpec.Marshal(b, m, deterministic)
  1290. } else {
  1291. b = b[:cap(b)]
  1292. n, err := m.MarshalTo(b)
  1293. if err != nil {
  1294. return nil, err
  1295. }
  1296. return b[:n], nil
  1297. }
  1298. }
  1299. func (m *ClusterSpec) XXX_Merge(src proto.Message) {
  1300. xxx_messageInfo_ClusterSpec.Merge(m, src)
  1301. }
  1302. func (m *ClusterSpec) XXX_Size() int {
  1303. return m.Size()
  1304. }
  1305. func (m *ClusterSpec) XXX_DiscardUnknown() {
  1306. xxx_messageInfo_ClusterSpec.DiscardUnknown(m)
  1307. }
  1308. var xxx_messageInfo_ClusterSpec proto.InternalMessageInfo
  1309. // SecretSpec specifies a user-provided secret.
  1310. type SecretSpec struct {
  1311. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations,proto3" json:"annotations"`
  1312. // Data is the secret payload - the maximum size is 500KB (that is, 500*1024 bytes)
  1313. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1314. // Templating controls whether and how to evaluate the secret payload as
  1315. // a template. If it is not set, no templating is used.
  1316. //
  1317. // The currently recognized values are:
  1318. // - golang: Go templating
  1319. Templating *Driver `protobuf:"bytes,3,opt,name=templating,proto3" json:"templating,omitempty"`
  1320. // Driver is the the secret driver that is used to store the specified secret
  1321. Driver *Driver `protobuf:"bytes,4,opt,name=driver,proto3" json:"driver,omitempty"`
  1322. }
  1323. func (m *SecretSpec) Reset() { *m = SecretSpec{} }
  1324. func (*SecretSpec) ProtoMessage() {}
  1325. func (*SecretSpec) Descriptor() ([]byte, []int) {
  1326. return fileDescriptor_6589acc608f7d4fd, []int{14}
  1327. }
  1328. func (m *SecretSpec) XXX_Unmarshal(b []byte) error {
  1329. return m.Unmarshal(b)
  1330. }
  1331. func (m *SecretSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1332. if deterministic {
  1333. return xxx_messageInfo_SecretSpec.Marshal(b, m, deterministic)
  1334. } else {
  1335. b = b[:cap(b)]
  1336. n, err := m.MarshalTo(b)
  1337. if err != nil {
  1338. return nil, err
  1339. }
  1340. return b[:n], nil
  1341. }
  1342. }
  1343. func (m *SecretSpec) XXX_Merge(src proto.Message) {
  1344. xxx_messageInfo_SecretSpec.Merge(m, src)
  1345. }
  1346. func (m *SecretSpec) XXX_Size() int {
  1347. return m.Size()
  1348. }
  1349. func (m *SecretSpec) XXX_DiscardUnknown() {
  1350. xxx_messageInfo_SecretSpec.DiscardUnknown(m)
  1351. }
  1352. var xxx_messageInfo_SecretSpec proto.InternalMessageInfo
  1353. // ConfigSpec specifies user-provided configuration files.
  1354. type ConfigSpec struct {
  1355. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations,proto3" json:"annotations"`
  1356. // Data is the config payload - the maximum size is 500KB (that is, 500*1024 bytes)
  1357. // TODO(aaronl): Do we want to revise this to include multiple payloads in a single
  1358. // ConfigSpec? Define this to be a tar? etc...
  1359. Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
  1360. // Templating controls whether and how to evaluate the secret payload as
  1361. // a template. If it is not set, no templating is used.
  1362. //
  1363. // The currently recognized values are:
  1364. // - golang: Go templating
  1365. Templating *Driver `protobuf:"bytes,3,opt,name=templating,proto3" json:"templating,omitempty"`
  1366. }
  1367. func (m *ConfigSpec) Reset() { *m = ConfigSpec{} }
  1368. func (*ConfigSpec) ProtoMessage() {}
  1369. func (*ConfigSpec) Descriptor() ([]byte, []int) {
  1370. return fileDescriptor_6589acc608f7d4fd, []int{15}
  1371. }
  1372. func (m *ConfigSpec) XXX_Unmarshal(b []byte) error {
  1373. return m.Unmarshal(b)
  1374. }
  1375. func (m *ConfigSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  1376. if deterministic {
  1377. return xxx_messageInfo_ConfigSpec.Marshal(b, m, deterministic)
  1378. } else {
  1379. b = b[:cap(b)]
  1380. n, err := m.MarshalTo(b)
  1381. if err != nil {
  1382. return nil, err
  1383. }
  1384. return b[:n], nil
  1385. }
  1386. }
  1387. func (m *ConfigSpec) XXX_Merge(src proto.Message) {
  1388. xxx_messageInfo_ConfigSpec.Merge(m, src)
  1389. }
  1390. func (m *ConfigSpec) XXX_Size() int {
  1391. return m.Size()
  1392. }
  1393. func (m *ConfigSpec) XXX_DiscardUnknown() {
  1394. xxx_messageInfo_ConfigSpec.DiscardUnknown(m)
  1395. }
  1396. var xxx_messageInfo_ConfigSpec proto.InternalMessageInfo
  1397. func init() {
  1398. proto.RegisterEnum("docker.swarmkit.v1.NodeSpec_Membership", NodeSpec_Membership_name, NodeSpec_Membership_value)
  1399. proto.RegisterEnum("docker.swarmkit.v1.NodeSpec_Availability", NodeSpec_Availability_name, NodeSpec_Availability_value)
  1400. proto.RegisterEnum("docker.swarmkit.v1.ContainerSpec_Isolation", ContainerSpec_Isolation_name, ContainerSpec_Isolation_value)
  1401. proto.RegisterEnum("docker.swarmkit.v1.EndpointSpec_ResolutionMode", EndpointSpec_ResolutionMode_name, EndpointSpec_ResolutionMode_value)
  1402. proto.RegisterType((*NodeSpec)(nil), "docker.swarmkit.v1.NodeSpec")
  1403. proto.RegisterType((*ServiceSpec)(nil), "docker.swarmkit.v1.ServiceSpec")
  1404. proto.RegisterType((*ReplicatedService)(nil), "docker.swarmkit.v1.ReplicatedService")
  1405. proto.RegisterType((*GlobalService)(nil), "docker.swarmkit.v1.GlobalService")
  1406. proto.RegisterType((*ReplicatedJob)(nil), "docker.swarmkit.v1.ReplicatedJob")
  1407. proto.RegisterType((*GlobalJob)(nil), "docker.swarmkit.v1.GlobalJob")
  1408. proto.RegisterType((*TaskSpec)(nil), "docker.swarmkit.v1.TaskSpec")
  1409. proto.RegisterType((*ResourceReference)(nil), "docker.swarmkit.v1.ResourceReference")
  1410. proto.RegisterType((*GenericRuntimeSpec)(nil), "docker.swarmkit.v1.GenericRuntimeSpec")
  1411. proto.RegisterType((*NetworkAttachmentSpec)(nil), "docker.swarmkit.v1.NetworkAttachmentSpec")
  1412. proto.RegisterType((*ContainerSpec)(nil), "docker.swarmkit.v1.ContainerSpec")
  1413. proto.RegisterMapType((map[string]string)(nil), "docker.swarmkit.v1.ContainerSpec.LabelsEntry")
  1414. proto.RegisterMapType((map[string]string)(nil), "docker.swarmkit.v1.ContainerSpec.SysctlsEntry")
  1415. proto.RegisterType((*ContainerSpec_PullOptions)(nil), "docker.swarmkit.v1.ContainerSpec.PullOptions")
  1416. proto.RegisterType((*ContainerSpec_DNSConfig)(nil), "docker.swarmkit.v1.ContainerSpec.DNSConfig")
  1417. proto.RegisterType((*ContainerSpec_Ulimit)(nil), "docker.swarmkit.v1.ContainerSpec.Ulimit")
  1418. proto.RegisterType((*EndpointSpec)(nil), "docker.swarmkit.v1.EndpointSpec")
  1419. proto.RegisterType((*NetworkSpec)(nil), "docker.swarmkit.v1.NetworkSpec")
  1420. proto.RegisterType((*ClusterSpec)(nil), "docker.swarmkit.v1.ClusterSpec")
  1421. proto.RegisterType((*SecretSpec)(nil), "docker.swarmkit.v1.SecretSpec")
  1422. proto.RegisterType((*ConfigSpec)(nil), "docker.swarmkit.v1.ConfigSpec")
  1423. }
  1424. func init() {
  1425. proto.RegisterFile("github.com/docker/swarmkit/api/specs.proto", fileDescriptor_6589acc608f7d4fd)
  1426. }
  1427. var fileDescriptor_6589acc608f7d4fd = []byte{
  1428. // 2363 bytes of a gzipped FileDescriptorProto
  1429. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x73, 0x1b, 0xc7,
  1430. 0xd1, 0x06, 0x48, 0x10, 0x1f, 0xbd, 0x00, 0x05, 0x8e, 0x65, 0x7b, 0x09, 0x49, 0x20, 0x0c, 0xcb,
  1431. 0x36, 0x6d, 0xd7, 0x0b, 0xd6, 0xcb, 0xb8, 0x1c, 0x7f, 0xc4, 0x49, 0x00, 0x02, 0x96, 0x60, 0x49,
  1432. 0x14, 0x6a, 0x40, 0x29, 0x51, 0x55, 0xaa, 0x50, 0x83, 0xdd, 0x21, 0xb0, 0xe1, 0x62, 0x67, 0x33,
  1433. 0x3b, 0xa0, 0x8d, 0x5b, 0x8e, 0x2e, 0xe5, 0x92, 0x3f, 0xc0, 0x53, 0x2a, 0xa7, 0x5c, 0x92, 0x7f,
  1434. 0x90, 0xa3, 0x8f, 0x3e, 0x3a, 0x17, 0x56, 0x4c, 0xff, 0x84, 0xdc, 0x72, 0x49, 0x6a, 0x66, 0x67,
  1435. 0x17, 0x0b, 0x0a, 0x10, 0x95, 0x8a, 0x0e, 0xb9, 0xcd, 0xf4, 0x3e, 0x4f, 0x4f, 0xcf, 0x4c, 0x77,
  1436. 0x4f, 0xf7, 0xc2, 0x7b, 0x23, 0x47, 0x8c, 0xa7, 0xc3, 0x86, 0xc5, 0x26, 0x7b, 0x36, 0xb3, 0x4e,
  1437. 0x28, 0xdf, 0x0b, 0xbe, 0x24, 0x7c, 0x72, 0xe2, 0x88, 0x3d, 0xe2, 0x3b, 0x7b, 0x81, 0x4f, 0xad,
  1438. 0xa0, 0xe1, 0x73, 0x26, 0x18, 0x42, 0x21, 0xa0, 0x11, 0x01, 0x1a, 0xa7, 0xff, 0x5f, 0xb9, 0x8a,
  1439. 0x2f, 0x66, 0x3e, 0xd5, 0xfc, 0xca, 0xf5, 0x11, 0x1b, 0x31, 0x35, 0xdc, 0x93, 0x23, 0x2d, 0xad,
  1440. 0x8e, 0x18, 0x1b, 0xb9, 0x74, 0x4f, 0xcd, 0x86, 0xd3, 0xe3, 0x3d, 0x7b, 0xca, 0x89, 0x70, 0x98,
  1441. 0xa7, 0xbf, 0x6f, 0x5f, 0xfe, 0x4e, 0xbc, 0xd9, 0x2a, 0xea, 0x97, 0x9c, 0xf8, 0x3e, 0xe5, 0x7a,
  1442. 0xc1, 0xfa, 0x59, 0x06, 0xf2, 0x87, 0xcc, 0xa6, 0x7d, 0x9f, 0x5a, 0xe8, 0x0e, 0x18, 0xc4, 0xf3,
  1443. 0x98, 0x50, 0xba, 0x03, 0x33, 0x5d, 0x4b, 0xef, 0x1a, 0xfb, 0x3b, 0x8d, 0x67, 0xf7, 0xd4, 0x68,
  1444. 0xce, 0x61, 0xad, 0xcc, 0x37, 0xe7, 0x3b, 0x29, 0x9c, 0x64, 0xa2, 0x9f, 0x41, 0xd1, 0xa6, 0x81,
  1445. 0xc3, 0xa9, 0x3d, 0xe0, 0xcc, 0xa5, 0xe6, 0x5a, 0x2d, 0xbd, 0xbb, 0xb9, 0x7f, 0x73, 0x99, 0x26,
  1446. 0xb9, 0x38, 0x66, 0x2e, 0xc5, 0x86, 0x66, 0xc8, 0x09, 0xba, 0x03, 0x30, 0xa1, 0x93, 0x21, 0xe5,
  1447. 0xc1, 0xd8, 0xf1, 0xcd, 0x75, 0x45, 0x7f, 0x67, 0x15, 0x5d, 0xda, 0xde, 0x78, 0x10, 0xc3, 0x71,
  1448. 0x82, 0x8a, 0x1e, 0x40, 0x91, 0x9c, 0x12, 0xc7, 0x25, 0x43, 0xc7, 0x75, 0xc4, 0xcc, 0xcc, 0x28,
  1449. 0x55, 0xef, 0x3e, 0x57, 0x55, 0x33, 0x41, 0xc0, 0x0b, 0xf4, 0xba, 0x0d, 0x30, 0x5f, 0x08, 0xbd,
  1450. 0x0d, 0xb9, 0x5e, 0xe7, 0xb0, 0xdd, 0x3d, 0xbc, 0x53, 0x4e, 0x55, 0xb6, 0x9f, 0x9e, 0xd5, 0x5e,
  1451. 0x95, 0x3a, 0xe6, 0x80, 0x1e, 0xf5, 0x6c, 0xc7, 0x1b, 0xa1, 0x5d, 0xc8, 0x37, 0x0f, 0x0e, 0x3a,
  1452. 0xbd, 0xa3, 0x4e, 0xbb, 0x9c, 0xae, 0x54, 0x9e, 0x9e, 0xd5, 0x5e, 0x5b, 0x04, 0x36, 0x2d, 0x8b,
  1453. 0xfa, 0x82, 0xda, 0x95, 0xcc, 0xd7, 0x7f, 0xa8, 0xa6, 0xea, 0x5f, 0xa7, 0xa1, 0x98, 0x34, 0x02,
  1454. 0xbd, 0x0d, 0xd9, 0xe6, 0xc1, 0x51, 0xf7, 0x71, 0xa7, 0x9c, 0x9a, 0xd3, 0x93, 0x88, 0xa6, 0x25,
  1455. 0x9c, 0x53, 0x8a, 0x6e, 0xc3, 0x46, 0xaf, 0xf9, 0xa8, 0xdf, 0x29, 0xa7, 0xe7, 0xe6, 0x24, 0x61,
  1456. 0x3d, 0x32, 0x0d, 0x14, 0xaa, 0x8d, 0x9b, 0xdd, 0xc3, 0xf2, 0xda, 0x72, 0x54, 0x9b, 0x13, 0xc7,
  1457. 0xd3, 0xa6, 0xfc, 0x69, 0x03, 0x8c, 0x3e, 0xe5, 0xa7, 0x8e, 0xf5, 0x92, 0x5d, 0xe4, 0x43, 0xc8,
  1458. 0x08, 0x12, 0x9c, 0x28, 0xd7, 0x30, 0x96, 0xbb, 0xc6, 0x11, 0x09, 0x4e, 0xe4, 0xa2, 0x9a, 0xae,
  1459. 0xf0, 0xd2, 0x33, 0x38, 0xf5, 0x5d, 0xc7, 0x22, 0x82, 0xda, 0xca, 0x33, 0x8c, 0xfd, 0xb7, 0x96,
  1460. 0xb1, 0x71, 0x8c, 0xd2, 0xf6, 0xdf, 0x4d, 0xe1, 0x04, 0x15, 0x7d, 0x0a, 0xd9, 0x91, 0xcb, 0x86,
  1461. 0xc4, 0x55, 0x3e, 0x61, 0xec, 0xbf, 0xb1, 0x4c, 0xc9, 0x1d, 0x85, 0x98, 0x2b, 0xd0, 0x14, 0xf4,
  1462. 0x05, 0x6c, 0xce, 0x55, 0x0d, 0x7e, 0xcd, 0x86, 0x26, 0xac, 0x56, 0x32, 0xb7, 0xe4, 0x0b, 0x36,
  1463. 0xbc, 0x9b, 0xc2, 0x25, 0x9e, 0x14, 0xa0, 0x9f, 0x02, 0x84, 0x5a, 0x95, 0x1e, 0x43, 0xe9, 0xb9,
  1464. 0xb5, 0xda, 0x98, 0x50, 0x47, 0x61, 0x14, 0x4d, 0xd0, 0x47, 0x90, 0x9d, 0xfa, 0x36, 0x11, 0xd4,
  1465. 0xcc, 0x2a, 0x6e, 0x6d, 0x19, 0xf7, 0x91, 0x42, 0x1c, 0x30, 0xef, 0xd8, 0x19, 0x61, 0x8d, 0x47,
  1466. 0x3f, 0x81, 0x3c, 0x67, 0xae, 0x3b, 0x24, 0xd6, 0x89, 0x59, 0x78, 0x41, 0x6e, 0xcc, 0x40, 0xf7,
  1467. 0x20, 0xef, 0x51, 0xf1, 0x25, 0xe3, 0x27, 0x81, 0x99, 0xab, 0xad, 0xef, 0x1a, 0xfb, 0xef, 0x2f,
  1468. 0x0d, 0xab, 0x10, 0xd3, 0x14, 0x82, 0x58, 0xe3, 0x09, 0xf5, 0x44, 0xa8, 0xa8, 0xb5, 0x66, 0xa6,
  1469. 0x71, 0xac, 0x40, 0x9a, 0x42, 0x3d, 0xdb, 0x67, 0x8e, 0x27, 0xcc, 0xfc, 0x6a, 0x53, 0x3a, 0x1a,
  1470. 0x23, 0xdd, 0x02, 0xc7, 0x8c, 0x56, 0x16, 0x32, 0x13, 0x66, 0xd3, 0xfa, 0x1e, 0x6c, 0x3d, 0x73,
  1471. 0xed, 0xa8, 0x02, 0x79, 0x7d, 0xe0, 0xa1, 0xbf, 0x66, 0x70, 0x3c, 0xaf, 0x5f, 0x83, 0xd2, 0xc2,
  1472. 0x15, 0xd7, 0x2d, 0x28, 0x2d, 0x5c, 0x17, 0x7a, 0x0b, 0x36, 0x27, 0xe4, 0xab, 0x81, 0xc5, 0x3c,
  1473. 0x6b, 0xca, 0x39, 0xf5, 0x84, 0xd6, 0x51, 0x9a, 0x90, 0xaf, 0x0e, 0x62, 0x21, 0x7a, 0x1f, 0xb6,
  1474. 0x04, 0x13, 0xc4, 0x1d, 0x58, 0x6c, 0xe2, 0xbb, 0x34, 0x8c, 0x8e, 0x35, 0x85, 0x2c, 0xab, 0x0f,
  1475. 0x07, 0x73, 0x79, 0xdd, 0x80, 0x42, 0x7c, 0x97, 0xf5, 0x3f, 0x6f, 0x40, 0x3e, 0xf2, 0x74, 0x74,
  1476. 0x0f, 0x80, 0xc4, 0x07, 0xa5, 0x0f, 0xe2, 0xdd, 0x17, 0x3a, 0x55, 0x49, 0x97, 0x1e, 0x3e, 0xa7,
  1477. 0xa3, 0x26, 0x14, 0x2c, 0xe6, 0x09, 0xe2, 0x78, 0x94, 0xeb, 0x48, 0x5d, 0xea, 0x9f, 0x07, 0x11,
  1478. 0x48, 0xeb, 0x98, 0xb3, 0x50, 0x0b, 0x72, 0x23, 0xea, 0x51, 0xee, 0x58, 0xda, 0xc1, 0xdf, 0x5e,
  1479. 0xea, 0x98, 0x21, 0x04, 0x4f, 0x3d, 0xe1, 0x4c, 0xa8, 0xd6, 0x12, 0x11, 0xd1, 0xe7, 0x50, 0xe0,
  1480. 0x34, 0x60, 0x53, 0x6e, 0xd1, 0x40, 0x87, 0xfb, 0xee, 0xf2, 0x30, 0x09, 0x41, 0x98, 0xfe, 0x66,
  1481. 0xea, 0x70, 0x2a, 0xb7, 0x10, 0xe0, 0x39, 0x15, 0x7d, 0x0a, 0x39, 0x4e, 0x03, 0x41, 0xb8, 0x78,
  1482. 0x5e, 0xc4, 0xe2, 0x10, 0xd2, 0x63, 0xae, 0x63, 0xcd, 0x70, 0xc4, 0x40, 0x9f, 0x42, 0xc1, 0x77,
  1483. 0x89, 0xa5, 0xb4, 0x9a, 0x1b, 0xab, 0x63, 0xac, 0x17, 0x81, 0xf0, 0x1c, 0x8f, 0x3e, 0x06, 0x70,
  1484. 0xd9, 0x68, 0x60, 0x73, 0xe7, 0x94, 0x72, 0x1d, 0x65, 0x95, 0x65, 0xec, 0xb6, 0x42, 0xe0, 0x82,
  1485. 0xcb, 0x46, 0xe1, 0x10, 0xdd, 0xf9, 0xaf, 0x82, 0x24, 0x11, 0x20, 0x6f, 0x40, 0xf1, 0x98, 0x71,
  1486. 0x8b, 0x0e, 0x74, 0xac, 0x17, 0x94, 0x6f, 0x19, 0x4a, 0x16, 0x06, 0x28, 0xfa, 0x15, 0xbc, 0x12,
  1487. 0x9d, 0xd6, 0x80, 0xd3, 0x63, 0xca, 0xa9, 0x27, 0x8f, 0xdc, 0x50, 0xcb, 0xbe, 0xf5, 0xfc, 0x23,
  1488. 0xd7, 0x68, 0x9d, 0x6a, 0x11, 0xbf, 0xfc, 0x21, 0x68, 0x15, 0x20, 0xc7, 0xc3, 0x0b, 0xae, 0xff,
  1489. 0x2e, 0x2d, 0xe3, 0xec, 0x12, 0x02, 0xed, 0x81, 0x11, 0x2f, 0xef, 0xd8, 0xca, 0xe1, 0x0a, 0xad,
  1490. 0xcd, 0x8b, 0xf3, 0x1d, 0x88, 0xb0, 0xdd, 0xb6, 0xcc, 0xc0, 0x7a, 0x6c, 0xa3, 0x0e, 0x94, 0x62,
  1491. 0x82, 0x2c, 0x82, 0x74, 0x99, 0x50, 0x7b, 0x9e, 0xa5, 0x47, 0x33, 0x9f, 0xe2, 0x22, 0x4f, 0xcc,
  1492. 0xea, 0xbf, 0x04, 0xf4, 0xac, 0x03, 0x22, 0x04, 0x99, 0x13, 0xc7, 0xd3, 0x66, 0x60, 0x35, 0x46,
  1493. 0x0d, 0xc8, 0xf9, 0x64, 0xe6, 0x32, 0x62, 0x6b, 0x3f, 0xbc, 0xde, 0x08, 0xcb, 0xa3, 0x46, 0x54,
  1494. 0x1e, 0x35, 0x9a, 0xde, 0x0c, 0x47, 0xa0, 0xfa, 0x3d, 0x78, 0x75, 0x69, 0x9c, 0xa1, 0x7d, 0x28,
  1495. 0xc6, 0x31, 0x32, 0xdf, 0xeb, 0xb5, 0x8b, 0xf3, 0x1d, 0x23, 0x0e, 0xa6, 0x6e, 0x1b, 0x1b, 0x31,
  1496. 0xa8, 0x6b, 0xd7, 0xff, 0xba, 0x09, 0xa5, 0x85, 0x48, 0x43, 0xd7, 0x61, 0xc3, 0x99, 0x90, 0x11,
  1497. 0xd5, 0x36, 0x86, 0x13, 0xd4, 0x81, 0xac, 0x4b, 0x86, 0xd4, 0x95, 0xb1, 0x22, 0x2f, 0xee, 0xff,
  1498. 0xae, 0x0c, 0xd9, 0xc6, 0x7d, 0x85, 0xef, 0x78, 0x82, 0xcf, 0xb0, 0x26, 0x23, 0x13, 0x72, 0x16,
  1499. 0x9b, 0x4c, 0x88, 0x27, 0x1f, 0xc9, 0xf5, 0xdd, 0x02, 0x8e, 0xa6, 0xf2, 0x64, 0x08, 0x1f, 0x05,
  1500. 0x66, 0x46, 0x89, 0xd5, 0x58, 0xe6, 0xc8, 0x31, 0x0b, 0x84, 0x47, 0x26, 0xd4, 0xdc, 0x54, 0xd6,
  1501. 0xc4, 0x73, 0x54, 0x86, 0x75, 0xea, 0x9d, 0x9a, 0x1b, 0x0a, 0x2e, 0x87, 0x52, 0x62, 0x3b, 0x61,
  1502. 0x20, 0x14, 0xb0, 0x1c, 0x4a, 0x9d, 0xd3, 0x80, 0x72, 0x33, 0x17, 0x9e, 0xb6, 0x1c, 0xa3, 0xd7,
  1503. 0x20, 0x3b, 0xe2, 0x6c, 0xea, 0x87, 0x1e, 0x58, 0xc0, 0x7a, 0x26, 0xdf, 0x3b, 0x9f, 0x3b, 0xa7,
  1504. 0x8e, 0x4b, 0x47, 0x34, 0x30, 0x5f, 0x53, 0x17, 0x51, 0x5d, 0x1a, 0x8b, 0x31, 0x0a, 0x27, 0x18,
  1505. 0xa8, 0x01, 0x19, 0xc7, 0x73, 0x84, 0xf9, 0xba, 0x8e, 0xc3, 0xcb, 0x57, 0xd8, 0x62, 0xcc, 0x7d,
  1506. 0x4c, 0xdc, 0x29, 0xc5, 0x0a, 0x87, 0xb6, 0x61, 0x5d, 0x88, 0x99, 0x59, 0xaa, 0xa5, 0x77, 0xf3,
  1507. 0xad, 0xdc, 0xc5, 0xf9, 0xce, 0xfa, 0xd1, 0xd1, 0x13, 0x2c, 0x65, 0xe8, 0x16, 0x00, 0xf3, 0xa9,
  1508. 0x37, 0x08, 0x84, 0xed, 0x78, 0x26, 0x92, 0x08, 0x5c, 0x90, 0x92, 0xbe, 0x14, 0xa0, 0x1b, 0x32,
  1509. 0x73, 0x11, 0x7b, 0xc0, 0x3c, 0x77, 0x66, 0xbe, 0xa2, 0xbe, 0xe6, 0xa5, 0xe0, 0xa1, 0xe7, 0xce,
  1510. 0xd0, 0x0e, 0x18, 0x81, 0x60, 0xfe, 0x20, 0x70, 0x46, 0x1e, 0x71, 0xcd, 0xeb, 0x6a, 0xe7, 0x20,
  1511. 0x45, 0x7d, 0x25, 0x41, 0x3f, 0x86, 0xec, 0x84, 0x4d, 0x3d, 0x11, 0x98, 0x79, 0x75, 0x91, 0xdb,
  1512. 0xcb, 0xf6, 0xf8, 0x40, 0x22, 0x74, 0xd4, 0x69, 0x38, 0xea, 0xc0, 0x96, 0xd2, 0x3c, 0xe2, 0xc4,
  1513. 0xa2, 0x03, 0x9f, 0x72, 0x87, 0xd9, 0xfa, 0x7d, 0xde, 0x7e, 0x66, 0xb7, 0x6d, 0xdd, 0x0a, 0xe0,
  1514. 0x6b, 0x92, 0x73, 0x47, 0x52, 0x7a, 0x8a, 0x81, 0x7a, 0x50, 0xf4, 0xa7, 0xae, 0x3b, 0x60, 0x7e,
  1515. 0xf8, 0x1a, 0x85, 0x09, 0xfc, 0x05, 0xdc, 0xa9, 0x37, 0x75, 0xdd, 0x87, 0x21, 0x09, 0x1b, 0xfe,
  1516. 0x7c, 0x82, 0x3e, 0x83, 0x5c, 0x40, 0x2d, 0x4e, 0x45, 0x60, 0x16, 0xd5, 0x96, 0xde, 0x5c, 0xa6,
  1517. 0xac, 0xaf, 0x20, 0x71, 0x5e, 0xc0, 0x11, 0x47, 0xd2, 0x2d, 0x95, 0xd6, 0x02, 0xf3, 0xd5, 0xd5,
  1518. 0x74, 0x9d, 0xf9, 0xe6, 0x74, 0xcd, 0x91, 0xe1, 0x22, 0x7d, 0x32, 0x30, 0xb7, 0x94, 0x3b, 0x85,
  1519. 0x13, 0xf4, 0x04, 0xc0, 0xf6, 0x82, 0x41, 0x08, 0x32, 0xaf, 0xa9, 0x3d, 0xbe, 0x7f, 0xf5, 0x1e,
  1520. 0xdb, 0x87, 0x7d, 0x5d, 0x87, 0x94, 0x2e, 0xce, 0x77, 0x0a, 0xf1, 0x14, 0x17, 0x6c, 0x2f, 0x08,
  1521. 0x87, 0xa8, 0x05, 0xc6, 0x98, 0x12, 0x57, 0x8c, 0xad, 0x31, 0xb5, 0x4e, 0xcc, 0xf2, 0xea, 0xb2,
  1522. 0xe4, 0xae, 0x82, 0x69, 0x0d, 0x49, 0x12, 0xea, 0x42, 0xc1, 0x09, 0x98, 0xab, 0xae, 0xc8, 0x34,
  1523. 0x55, 0x7e, 0x7b, 0x01, 0xeb, 0xba, 0x11, 0x05, 0xcf, 0xd9, 0xe8, 0x26, 0x14, 0x7c, 0xc7, 0x0e,
  1524. 0xee, 0x3b, 0x13, 0x47, 0x98, 0xdb, 0xb5, 0xf4, 0xee, 0x3a, 0x9e, 0x0b, 0xd0, 0x5d, 0xc8, 0x05,
  1525. 0xb3, 0xc0, 0x12, 0x6e, 0x60, 0x56, 0xd4, 0xe1, 0x36, 0xae, 0x5e, 0xa6, 0x1f, 0x12, 0xc2, 0xc4,
  1526. 0x11, 0xd1, 0x65, 0xc5, 0x63, 0x11, 0x5f, 0xf7, 0x02, 0x03, 0x62, 0xdb, 0xe6, 0x0d, 0x75, 0xe0,
  1527. 0xa5, 0xb9, 0xb4, 0x69, 0xdb, 0xe8, 0x1d, 0xb8, 0x96, 0x80, 0xd9, 0x9c, 0xf9, 0xe6, 0x4d, 0x85,
  1528. 0x4b, 0xb0, 0xdb, 0x9c, 0xf9, 0xb2, 0x86, 0x98, 0xba, 0xd2, 0xc6, 0xc0, 0xbc, 0xa5, 0x2c, 0xdb,
  1529. 0xbd, 0xda, 0xb2, 0x47, 0x8a, 0x80, 0x23, 0x62, 0xe5, 0x63, 0x30, 0x12, 0x49, 0x4e, 0x26, 0xa0,
  1530. 0x13, 0x3a, 0xd3, 0x79, 0x53, 0x0e, 0xa5, 0x73, 0x9c, 0xca, 0x98, 0x57, 0x89, 0xbd, 0x80, 0xc3,
  1531. 0xc9, 0x27, 0x6b, 0x1f, 0xa5, 0x2b, 0xfb, 0x60, 0x24, 0x1c, 0x1a, 0xbd, 0x29, 0x1f, 0x9d, 0x91,
  1532. 0x13, 0x08, 0x3e, 0x1b, 0x90, 0xa9, 0x18, 0x9b, 0x3f, 0x57, 0x84, 0x62, 0x24, 0x6c, 0x4e, 0xc5,
  1533. 0xb8, 0x32, 0x80, 0xb9, 0x47, 0xa0, 0x1a, 0x18, 0x32, 0x0f, 0x06, 0x94, 0x9f, 0x52, 0x2e, 0x4b,
  1534. 0x48, 0xb9, 0xc9, 0xa4, 0x48, 0x66, 0xba, 0x80, 0x12, 0x6e, 0x8d, 0x55, 0xca, 0x2e, 0x60, 0x3d,
  1535. 0x93, 0x39, 0x38, 0x0a, 0x3e, 0x9d, 0x83, 0xf5, 0xb4, 0xf2, 0x09, 0x14, 0x93, 0x87, 0xff, 0x1f,
  1536. 0x6d, 0xa8, 0x0d, 0xd9, 0xf0, 0x78, 0x64, 0xd6, 0x55, 0x19, 0x5b, 0xbf, 0x71, 0x2a, 0x5b, 0x23,
  1537. 0xc8, 0x04, 0xec, 0x58, 0x28, 0xda, 0x3a, 0x56, 0x63, 0x29, 0x1b, 0x13, 0x1e, 0x76, 0x4b, 0xeb,
  1538. 0x58, 0x8d, 0xeb, 0x7f, 0x49, 0x43, 0x21, 0x76, 0x33, 0xf4, 0x01, 0x6c, 0x75, 0xfb, 0x0f, 0xef,
  1539. 0x37, 0x8f, 0xba, 0x0f, 0x0f, 0x07, 0xed, 0xce, 0xe7, 0xcd, 0x47, 0xf7, 0x8f, 0xca, 0xa9, 0xca,
  1540. 0xad, 0xa7, 0x67, 0xb5, 0xed, 0xf9, 0x8b, 0x16, 0xc1, 0xdb, 0xf4, 0x98, 0x4c, 0x5d, 0xb1, 0xc8,
  1541. 0xea, 0xe1, 0x87, 0x07, 0x9d, 0x7e, 0xbf, 0x9c, 0x5e, 0xc5, 0xea, 0x71, 0x66, 0xd1, 0x20, 0x40,
  1542. 0xfb, 0x50, 0x9e, 0xb3, 0xee, 0x3e, 0xe9, 0x75, 0xf0, 0xe3, 0xf2, 0x5a, 0xe5, 0xe6, 0xd3, 0xb3,
  1543. 0x9a, 0xf9, 0x2c, 0xe9, 0xee, 0xcc, 0xa7, 0xfc, 0xb1, 0x6e, 0x46, 0xff, 0x91, 0x86, 0x62, 0xb2,
  1544. 0x03, 0x40, 0x07, 0x61, 0xdd, 0xaf, 0x0e, 0x60, 0x73, 0x7f, 0xef, 0xaa, 0x8e, 0x41, 0x55, 0x11,
  1545. 0xee, 0x54, 0xea, 0x7d, 0xc0, 0x6c, 0x8a, 0x15, 0x19, 0x7d, 0x00, 0x1b, 0x3e, 0xe3, 0x22, 0x7a,
  1546. 0x6f, 0x97, 0x3f, 0x45, 0x8c, 0x47, 0x25, 0x59, 0x08, 0xae, 0x8f, 0x61, 0x73, 0x51, 0x1b, 0xba,
  1547. 0x0d, 0xeb, 0x8f, 0xbb, 0xbd, 0x72, 0xaa, 0x72, 0xe3, 0xe9, 0x59, 0xed, 0xf5, 0xc5, 0x8f, 0x8f,
  1548. 0x1d, 0x2e, 0xa6, 0xc4, 0xed, 0xf6, 0xd0, 0x7b, 0xb0, 0xd1, 0x3e, 0xec, 0x63, 0x5c, 0x4e, 0x57,
  1549. 0x76, 0x9e, 0x9e, 0xd5, 0x6e, 0x2c, 0xe2, 0xe4, 0x27, 0x36, 0xf5, 0x6c, 0xcc, 0x86, 0x71, 0x0b,
  1550. 0xfe, 0xcf, 0x35, 0x30, 0x74, 0x19, 0xf2, 0xb2, 0xff, 0xd2, 0x94, 0xc2, 0x92, 0x36, 0xca, 0x9e,
  1551. 0x6b, 0x57, 0x56, 0xb6, 0xc5, 0x90, 0xa0, 0x23, 0xe3, 0x0d, 0x28, 0x3a, 0xfe, 0xe9, 0x87, 0x03,
  1552. 0xea, 0x91, 0xa1, 0xab, 0xbb, 0xf1, 0x3c, 0x36, 0xa4, 0xac, 0x13, 0x8a, 0x64, 0x61, 0xe1, 0x78,
  1553. 0x82, 0x72, 0x4f, 0xf7, 0xd9, 0x79, 0x1c, 0xcf, 0xd1, 0x67, 0x90, 0x71, 0x7c, 0x32, 0xd1, 0xe5,
  1554. 0xf8, 0xd2, 0x1d, 0x74, 0x7b, 0xcd, 0x07, 0x3a, 0x72, 0x5b, 0xf9, 0x8b, 0xf3, 0x9d, 0x8c, 0x14,
  1555. 0x60, 0x45, 0x43, 0xd5, 0xa8, 0x57, 0x92, 0x2b, 0xa9, 0x62, 0x24, 0x8f, 0x13, 0x12, 0x19, 0x7d,
  1556. 0x8e, 0x37, 0xe2, 0x34, 0x08, 0x54, 0x59, 0x92, 0xc7, 0xd1, 0x14, 0x55, 0x20, 0xa7, 0xeb, 0x6a,
  1557. 0xd5, 0x62, 0x15, 0x64, 0xb7, 0xa2, 0x05, 0xad, 0x12, 0x18, 0xe1, 0x69, 0x0c, 0x8e, 0x39, 0x9b,
  1558. 0xd4, 0xff, 0x95, 0x01, 0xe3, 0xc0, 0x9d, 0x06, 0x42, 0xd7, 0x6c, 0x2f, 0xed, 0xf0, 0x9f, 0xc0,
  1559. 0x16, 0x51, 0x7f, 0x7d, 0x88, 0x27, 0x1f, 0x79, 0xd5, 0xae, 0xe8, 0x0b, 0xb8, 0xbd, 0x54, 0x5d,
  1560. 0x0c, 0x0e, 0x5b, 0x9b, 0x56, 0x56, 0xea, 0x34, 0xd3, 0xb8, 0x4c, 0x2e, 0x7d, 0x41, 0x7d, 0x28,
  1561. 0x31, 0x6e, 0x8d, 0x69, 0x20, 0xc2, 0xd2, 0x40, 0xff, 0x25, 0x59, 0xfa, 0xff, 0xec, 0x61, 0x12,
  1562. 0xa8, 0x5f, 0xc4, 0xd0, 0xda, 0x45, 0x1d, 0xe8, 0x23, 0xc8, 0x70, 0x72, 0x1c, 0xb5, 0x5e, 0x4b,
  1563. 0x83, 0x04, 0x93, 0x63, 0xb1, 0xa0, 0x42, 0x31, 0xd0, 0x17, 0x00, 0xb6, 0x13, 0xf8, 0x44, 0x58,
  1564. 0x63, 0xca, 0xf5, 0x65, 0x2f, 0xdd, 0x62, 0x3b, 0x46, 0x2d, 0x68, 0x49, 0xb0, 0xd1, 0x3d, 0x28,
  1565. 0x58, 0x24, 0x72, 0xd7, 0xec, 0xea, 0x5f, 0x47, 0x07, 0x4d, 0xad, 0xa2, 0x2c, 0x55, 0x5c, 0x9c,
  1566. 0xef, 0xe4, 0x23, 0x09, 0xce, 0x5b, 0x44, 0xbb, 0xef, 0x3d, 0x28, 0x09, 0x12, 0x9c, 0x0c, 0xec,
  1567. 0x30, 0x9d, 0x85, 0x6e, 0xb2, 0xe2, 0x85, 0x97, 0x1d, 0xba, 0x4e, 0x7b, 0xd1, 0x75, 0x16, 0x45,
  1568. 0x42, 0x86, 0x7e, 0x01, 0x5b, 0xd4, 0xb3, 0xf8, 0x4c, 0x39, 0x6b, 0x64, 0x61, 0x7e, 0xf5, 0x66,
  1569. 0x3b, 0x31, 0x78, 0x61, 0xb3, 0x65, 0x7a, 0x49, 0x5e, 0xff, 0x5b, 0x1a, 0x20, 0x2c, 0xa9, 0x5e,
  1570. 0xae, 0x03, 0x22, 0xc8, 0xd8, 0x44, 0x10, 0xe5, 0x73, 0x45, 0xac, 0xc6, 0xe8, 0x13, 0x00, 0x41,
  1571. 0x27, 0xbe, 0x4c, 0xbd, 0xde, 0x48, 0xbb, 0xcd, 0xf3, 0xd2, 0x41, 0x02, 0x8d, 0xf6, 0x21, 0xab,
  1572. 0x1b, 0xe4, 0xcc, 0x95, 0x3c, 0x8d, 0xac, 0xff, 0x31, 0x0d, 0x10, 0x6e, 0xf3, 0x7f, 0x7a, 0x6f,
  1573. 0xad, 0xdb, 0xdf, 0x7c, 0x5f, 0x4d, 0x7d, 0xf7, 0x7d, 0x35, 0xf5, 0xdb, 0x8b, 0x6a, 0xfa, 0x9b,
  1574. 0x8b, 0x6a, 0xfa, 0xdb, 0x8b, 0x6a, 0xfa, 0xef, 0x17, 0xd5, 0xf4, 0xef, 0x7f, 0xa8, 0xa6, 0xbe,
  1575. 0xfd, 0xa1, 0x9a, 0xfa, 0xee, 0x87, 0x6a, 0x6a, 0x98, 0x55, 0x45, 0xf9, 0x8f, 0xfe, 0x1d, 0x00,
  1576. 0x00, 0xff, 0xff, 0x74, 0x9e, 0x83, 0x44, 0x31, 0x18, 0x00, 0x00,
  1577. }
  1578. func (m *NodeSpec) Copy() *NodeSpec {
  1579. if m == nil {
  1580. return nil
  1581. }
  1582. o := &NodeSpec{}
  1583. o.CopyFrom(m)
  1584. return o
  1585. }
  1586. func (m *NodeSpec) CopyFrom(src interface{}) {
  1587. o := src.(*NodeSpec)
  1588. *m = *o
  1589. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  1590. }
  1591. func (m *ServiceSpec) Copy() *ServiceSpec {
  1592. if m == nil {
  1593. return nil
  1594. }
  1595. o := &ServiceSpec{}
  1596. o.CopyFrom(m)
  1597. return o
  1598. }
  1599. func (m *ServiceSpec) CopyFrom(src interface{}) {
  1600. o := src.(*ServiceSpec)
  1601. *m = *o
  1602. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  1603. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Task, &o.Task)
  1604. if o.Update != nil {
  1605. m.Update = &UpdateConfig{}
  1606. github_com_docker_swarmkit_api_deepcopy.Copy(m.Update, o.Update)
  1607. }
  1608. if o.Rollback != nil {
  1609. m.Rollback = &UpdateConfig{}
  1610. github_com_docker_swarmkit_api_deepcopy.Copy(m.Rollback, o.Rollback)
  1611. }
  1612. if o.Networks != nil {
  1613. m.Networks = make([]*NetworkAttachmentConfig, len(o.Networks))
  1614. for i := range m.Networks {
  1615. m.Networks[i] = &NetworkAttachmentConfig{}
  1616. github_com_docker_swarmkit_api_deepcopy.Copy(m.Networks[i], o.Networks[i])
  1617. }
  1618. }
  1619. if o.Endpoint != nil {
  1620. m.Endpoint = &EndpointSpec{}
  1621. github_com_docker_swarmkit_api_deepcopy.Copy(m.Endpoint, o.Endpoint)
  1622. }
  1623. if o.Mode != nil {
  1624. switch o.Mode.(type) {
  1625. case *ServiceSpec_Replicated:
  1626. v := ServiceSpec_Replicated{
  1627. Replicated: &ReplicatedService{},
  1628. }
  1629. github_com_docker_swarmkit_api_deepcopy.Copy(v.Replicated, o.GetReplicated())
  1630. m.Mode = &v
  1631. case *ServiceSpec_Global:
  1632. v := ServiceSpec_Global{
  1633. Global: &GlobalService{},
  1634. }
  1635. github_com_docker_swarmkit_api_deepcopy.Copy(v.Global, o.GetGlobal())
  1636. m.Mode = &v
  1637. case *ServiceSpec_ReplicatedJob:
  1638. v := ServiceSpec_ReplicatedJob{
  1639. ReplicatedJob: &ReplicatedJob{},
  1640. }
  1641. github_com_docker_swarmkit_api_deepcopy.Copy(v.ReplicatedJob, o.GetReplicatedJob())
  1642. m.Mode = &v
  1643. case *ServiceSpec_GlobalJob:
  1644. v := ServiceSpec_GlobalJob{
  1645. GlobalJob: &GlobalJob{},
  1646. }
  1647. github_com_docker_swarmkit_api_deepcopy.Copy(v.GlobalJob, o.GetGlobalJob())
  1648. m.Mode = &v
  1649. }
  1650. }
  1651. }
  1652. func (m *ReplicatedService) Copy() *ReplicatedService {
  1653. if m == nil {
  1654. return nil
  1655. }
  1656. o := &ReplicatedService{}
  1657. o.CopyFrom(m)
  1658. return o
  1659. }
  1660. func (m *ReplicatedService) CopyFrom(src interface{}) {
  1661. o := src.(*ReplicatedService)
  1662. *m = *o
  1663. }
  1664. func (m *GlobalService) Copy() *GlobalService {
  1665. if m == nil {
  1666. return nil
  1667. }
  1668. o := &GlobalService{}
  1669. o.CopyFrom(m)
  1670. return o
  1671. }
  1672. func (m *GlobalService) CopyFrom(src interface{}) {}
  1673. func (m *ReplicatedJob) Copy() *ReplicatedJob {
  1674. if m == nil {
  1675. return nil
  1676. }
  1677. o := &ReplicatedJob{}
  1678. o.CopyFrom(m)
  1679. return o
  1680. }
  1681. func (m *ReplicatedJob) CopyFrom(src interface{}) {
  1682. o := src.(*ReplicatedJob)
  1683. *m = *o
  1684. }
  1685. func (m *GlobalJob) Copy() *GlobalJob {
  1686. if m == nil {
  1687. return nil
  1688. }
  1689. o := &GlobalJob{}
  1690. o.CopyFrom(m)
  1691. return o
  1692. }
  1693. func (m *GlobalJob) CopyFrom(src interface{}) {}
  1694. func (m *TaskSpec) Copy() *TaskSpec {
  1695. if m == nil {
  1696. return nil
  1697. }
  1698. o := &TaskSpec{}
  1699. o.CopyFrom(m)
  1700. return o
  1701. }
  1702. func (m *TaskSpec) CopyFrom(src interface{}) {
  1703. o := src.(*TaskSpec)
  1704. *m = *o
  1705. if o.Resources != nil {
  1706. m.Resources = &ResourceRequirements{}
  1707. github_com_docker_swarmkit_api_deepcopy.Copy(m.Resources, o.Resources)
  1708. }
  1709. if o.Restart != nil {
  1710. m.Restart = &RestartPolicy{}
  1711. github_com_docker_swarmkit_api_deepcopy.Copy(m.Restart, o.Restart)
  1712. }
  1713. if o.Placement != nil {
  1714. m.Placement = &Placement{}
  1715. github_com_docker_swarmkit_api_deepcopy.Copy(m.Placement, o.Placement)
  1716. }
  1717. if o.LogDriver != nil {
  1718. m.LogDriver = &Driver{}
  1719. github_com_docker_swarmkit_api_deepcopy.Copy(m.LogDriver, o.LogDriver)
  1720. }
  1721. if o.Networks != nil {
  1722. m.Networks = make([]*NetworkAttachmentConfig, len(o.Networks))
  1723. for i := range m.Networks {
  1724. m.Networks[i] = &NetworkAttachmentConfig{}
  1725. github_com_docker_swarmkit_api_deepcopy.Copy(m.Networks[i], o.Networks[i])
  1726. }
  1727. }
  1728. if o.ResourceReferences != nil {
  1729. m.ResourceReferences = make([]ResourceReference, len(o.ResourceReferences))
  1730. for i := range m.ResourceReferences {
  1731. github_com_docker_swarmkit_api_deepcopy.Copy(&m.ResourceReferences[i], &o.ResourceReferences[i])
  1732. }
  1733. }
  1734. if o.Runtime != nil {
  1735. switch o.Runtime.(type) {
  1736. case *TaskSpec_Attachment:
  1737. v := TaskSpec_Attachment{
  1738. Attachment: &NetworkAttachmentSpec{},
  1739. }
  1740. github_com_docker_swarmkit_api_deepcopy.Copy(v.Attachment, o.GetAttachment())
  1741. m.Runtime = &v
  1742. case *TaskSpec_Container:
  1743. v := TaskSpec_Container{
  1744. Container: &ContainerSpec{},
  1745. }
  1746. github_com_docker_swarmkit_api_deepcopy.Copy(v.Container, o.GetContainer())
  1747. m.Runtime = &v
  1748. case *TaskSpec_Generic:
  1749. v := TaskSpec_Generic{
  1750. Generic: &GenericRuntimeSpec{},
  1751. }
  1752. github_com_docker_swarmkit_api_deepcopy.Copy(v.Generic, o.GetGeneric())
  1753. m.Runtime = &v
  1754. }
  1755. }
  1756. }
  1757. func (m *ResourceReference) Copy() *ResourceReference {
  1758. if m == nil {
  1759. return nil
  1760. }
  1761. o := &ResourceReference{}
  1762. o.CopyFrom(m)
  1763. return o
  1764. }
  1765. func (m *ResourceReference) CopyFrom(src interface{}) {
  1766. o := src.(*ResourceReference)
  1767. *m = *o
  1768. }
  1769. func (m *GenericRuntimeSpec) Copy() *GenericRuntimeSpec {
  1770. if m == nil {
  1771. return nil
  1772. }
  1773. o := &GenericRuntimeSpec{}
  1774. o.CopyFrom(m)
  1775. return o
  1776. }
  1777. func (m *GenericRuntimeSpec) CopyFrom(src interface{}) {
  1778. o := src.(*GenericRuntimeSpec)
  1779. *m = *o
  1780. if o.Payload != nil {
  1781. m.Payload = &types.Any{}
  1782. github_com_docker_swarmkit_api_deepcopy.Copy(m.Payload, o.Payload)
  1783. }
  1784. }
  1785. func (m *NetworkAttachmentSpec) Copy() *NetworkAttachmentSpec {
  1786. if m == nil {
  1787. return nil
  1788. }
  1789. o := &NetworkAttachmentSpec{}
  1790. o.CopyFrom(m)
  1791. return o
  1792. }
  1793. func (m *NetworkAttachmentSpec) CopyFrom(src interface{}) {
  1794. o := src.(*NetworkAttachmentSpec)
  1795. *m = *o
  1796. }
  1797. func (m *ContainerSpec) Copy() *ContainerSpec {
  1798. if m == nil {
  1799. return nil
  1800. }
  1801. o := &ContainerSpec{}
  1802. o.CopyFrom(m)
  1803. return o
  1804. }
  1805. func (m *ContainerSpec) CopyFrom(src interface{}) {
  1806. o := src.(*ContainerSpec)
  1807. *m = *o
  1808. if o.Labels != nil {
  1809. m.Labels = make(map[string]string, len(o.Labels))
  1810. for k, v := range o.Labels {
  1811. m.Labels[k] = v
  1812. }
  1813. }
  1814. if o.Command != nil {
  1815. m.Command = make([]string, len(o.Command))
  1816. copy(m.Command, o.Command)
  1817. }
  1818. if o.Args != nil {
  1819. m.Args = make([]string, len(o.Args))
  1820. copy(m.Args, o.Args)
  1821. }
  1822. if o.Env != nil {
  1823. m.Env = make([]string, len(o.Env))
  1824. copy(m.Env, o.Env)
  1825. }
  1826. if o.Groups != nil {
  1827. m.Groups = make([]string, len(o.Groups))
  1828. copy(m.Groups, o.Groups)
  1829. }
  1830. if o.Privileges != nil {
  1831. m.Privileges = &Privileges{}
  1832. github_com_docker_swarmkit_api_deepcopy.Copy(m.Privileges, o.Privileges)
  1833. }
  1834. if o.Init != nil {
  1835. m.Init = &types.BoolValue{}
  1836. github_com_docker_swarmkit_api_deepcopy.Copy(m.Init, o.Init)
  1837. }
  1838. if o.Mounts != nil {
  1839. m.Mounts = make([]Mount, len(o.Mounts))
  1840. for i := range m.Mounts {
  1841. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Mounts[i], &o.Mounts[i])
  1842. }
  1843. }
  1844. if o.StopGracePeriod != nil {
  1845. m.StopGracePeriod = &types.Duration{}
  1846. github_com_docker_swarmkit_api_deepcopy.Copy(m.StopGracePeriod, o.StopGracePeriod)
  1847. }
  1848. if o.PullOptions != nil {
  1849. m.PullOptions = &ContainerSpec_PullOptions{}
  1850. github_com_docker_swarmkit_api_deepcopy.Copy(m.PullOptions, o.PullOptions)
  1851. }
  1852. if o.Secrets != nil {
  1853. m.Secrets = make([]*SecretReference, len(o.Secrets))
  1854. for i := range m.Secrets {
  1855. m.Secrets[i] = &SecretReference{}
  1856. github_com_docker_swarmkit_api_deepcopy.Copy(m.Secrets[i], o.Secrets[i])
  1857. }
  1858. }
  1859. if o.Configs != nil {
  1860. m.Configs = make([]*ConfigReference, len(o.Configs))
  1861. for i := range m.Configs {
  1862. m.Configs[i] = &ConfigReference{}
  1863. github_com_docker_swarmkit_api_deepcopy.Copy(m.Configs[i], o.Configs[i])
  1864. }
  1865. }
  1866. if o.Hosts != nil {
  1867. m.Hosts = make([]string, len(o.Hosts))
  1868. copy(m.Hosts, o.Hosts)
  1869. }
  1870. if o.DNSConfig != nil {
  1871. m.DNSConfig = &ContainerSpec_DNSConfig{}
  1872. github_com_docker_swarmkit_api_deepcopy.Copy(m.DNSConfig, o.DNSConfig)
  1873. }
  1874. if o.Healthcheck != nil {
  1875. m.Healthcheck = &HealthConfig{}
  1876. github_com_docker_swarmkit_api_deepcopy.Copy(m.Healthcheck, o.Healthcheck)
  1877. }
  1878. if o.Sysctls != nil {
  1879. m.Sysctls = make(map[string]string, len(o.Sysctls))
  1880. for k, v := range o.Sysctls {
  1881. m.Sysctls[k] = v
  1882. }
  1883. }
  1884. if o.CapabilityAdd != nil {
  1885. m.CapabilityAdd = make([]string, len(o.CapabilityAdd))
  1886. copy(m.CapabilityAdd, o.CapabilityAdd)
  1887. }
  1888. if o.CapabilityDrop != nil {
  1889. m.CapabilityDrop = make([]string, len(o.CapabilityDrop))
  1890. copy(m.CapabilityDrop, o.CapabilityDrop)
  1891. }
  1892. if o.Ulimits != nil {
  1893. m.Ulimits = make([]*ContainerSpec_Ulimit, len(o.Ulimits))
  1894. for i := range m.Ulimits {
  1895. m.Ulimits[i] = &ContainerSpec_Ulimit{}
  1896. github_com_docker_swarmkit_api_deepcopy.Copy(m.Ulimits[i], o.Ulimits[i])
  1897. }
  1898. }
  1899. }
  1900. func (m *ContainerSpec_PullOptions) Copy() *ContainerSpec_PullOptions {
  1901. if m == nil {
  1902. return nil
  1903. }
  1904. o := &ContainerSpec_PullOptions{}
  1905. o.CopyFrom(m)
  1906. return o
  1907. }
  1908. func (m *ContainerSpec_PullOptions) CopyFrom(src interface{}) {
  1909. o := src.(*ContainerSpec_PullOptions)
  1910. *m = *o
  1911. }
  1912. func (m *ContainerSpec_DNSConfig) Copy() *ContainerSpec_DNSConfig {
  1913. if m == nil {
  1914. return nil
  1915. }
  1916. o := &ContainerSpec_DNSConfig{}
  1917. o.CopyFrom(m)
  1918. return o
  1919. }
  1920. func (m *ContainerSpec_DNSConfig) CopyFrom(src interface{}) {
  1921. o := src.(*ContainerSpec_DNSConfig)
  1922. *m = *o
  1923. if o.Nameservers != nil {
  1924. m.Nameservers = make([]string, len(o.Nameservers))
  1925. copy(m.Nameservers, o.Nameservers)
  1926. }
  1927. if o.Search != nil {
  1928. m.Search = make([]string, len(o.Search))
  1929. copy(m.Search, o.Search)
  1930. }
  1931. if o.Options != nil {
  1932. m.Options = make([]string, len(o.Options))
  1933. copy(m.Options, o.Options)
  1934. }
  1935. }
  1936. func (m *ContainerSpec_Ulimit) Copy() *ContainerSpec_Ulimit {
  1937. if m == nil {
  1938. return nil
  1939. }
  1940. o := &ContainerSpec_Ulimit{}
  1941. o.CopyFrom(m)
  1942. return o
  1943. }
  1944. func (m *ContainerSpec_Ulimit) CopyFrom(src interface{}) {
  1945. o := src.(*ContainerSpec_Ulimit)
  1946. *m = *o
  1947. }
  1948. func (m *EndpointSpec) Copy() *EndpointSpec {
  1949. if m == nil {
  1950. return nil
  1951. }
  1952. o := &EndpointSpec{}
  1953. o.CopyFrom(m)
  1954. return o
  1955. }
  1956. func (m *EndpointSpec) CopyFrom(src interface{}) {
  1957. o := src.(*EndpointSpec)
  1958. *m = *o
  1959. if o.Ports != nil {
  1960. m.Ports = make([]*PortConfig, len(o.Ports))
  1961. for i := range m.Ports {
  1962. m.Ports[i] = &PortConfig{}
  1963. github_com_docker_swarmkit_api_deepcopy.Copy(m.Ports[i], o.Ports[i])
  1964. }
  1965. }
  1966. }
  1967. func (m *NetworkSpec) Copy() *NetworkSpec {
  1968. if m == nil {
  1969. return nil
  1970. }
  1971. o := &NetworkSpec{}
  1972. o.CopyFrom(m)
  1973. return o
  1974. }
  1975. func (m *NetworkSpec) CopyFrom(src interface{}) {
  1976. o := src.(*NetworkSpec)
  1977. *m = *o
  1978. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  1979. if o.DriverConfig != nil {
  1980. m.DriverConfig = &Driver{}
  1981. github_com_docker_swarmkit_api_deepcopy.Copy(m.DriverConfig, o.DriverConfig)
  1982. }
  1983. if o.IPAM != nil {
  1984. m.IPAM = &IPAMOptions{}
  1985. github_com_docker_swarmkit_api_deepcopy.Copy(m.IPAM, o.IPAM)
  1986. }
  1987. if o.ConfigFrom != nil {
  1988. switch o.ConfigFrom.(type) {
  1989. case *NetworkSpec_Network:
  1990. v := NetworkSpec_Network{
  1991. Network: o.GetNetwork(),
  1992. }
  1993. m.ConfigFrom = &v
  1994. }
  1995. }
  1996. }
  1997. func (m *ClusterSpec) Copy() *ClusterSpec {
  1998. if m == nil {
  1999. return nil
  2000. }
  2001. o := &ClusterSpec{}
  2002. o.CopyFrom(m)
  2003. return o
  2004. }
  2005. func (m *ClusterSpec) CopyFrom(src interface{}) {
  2006. o := src.(*ClusterSpec)
  2007. *m = *o
  2008. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  2009. github_com_docker_swarmkit_api_deepcopy.Copy(&m.AcceptancePolicy, &o.AcceptancePolicy)
  2010. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Orchestration, &o.Orchestration)
  2011. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Raft, &o.Raft)
  2012. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Dispatcher, &o.Dispatcher)
  2013. github_com_docker_swarmkit_api_deepcopy.Copy(&m.CAConfig, &o.CAConfig)
  2014. github_com_docker_swarmkit_api_deepcopy.Copy(&m.TaskDefaults, &o.TaskDefaults)
  2015. github_com_docker_swarmkit_api_deepcopy.Copy(&m.EncryptionConfig, &o.EncryptionConfig)
  2016. }
  2017. func (m *SecretSpec) Copy() *SecretSpec {
  2018. if m == nil {
  2019. return nil
  2020. }
  2021. o := &SecretSpec{}
  2022. o.CopyFrom(m)
  2023. return o
  2024. }
  2025. func (m *SecretSpec) CopyFrom(src interface{}) {
  2026. o := src.(*SecretSpec)
  2027. *m = *o
  2028. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  2029. if o.Data != nil {
  2030. m.Data = make([]byte, len(o.Data))
  2031. copy(m.Data, o.Data)
  2032. }
  2033. if o.Templating != nil {
  2034. m.Templating = &Driver{}
  2035. github_com_docker_swarmkit_api_deepcopy.Copy(m.Templating, o.Templating)
  2036. }
  2037. if o.Driver != nil {
  2038. m.Driver = &Driver{}
  2039. github_com_docker_swarmkit_api_deepcopy.Copy(m.Driver, o.Driver)
  2040. }
  2041. }
  2042. func (m *ConfigSpec) Copy() *ConfigSpec {
  2043. if m == nil {
  2044. return nil
  2045. }
  2046. o := &ConfigSpec{}
  2047. o.CopyFrom(m)
  2048. return o
  2049. }
  2050. func (m *ConfigSpec) CopyFrom(src interface{}) {
  2051. o := src.(*ConfigSpec)
  2052. *m = *o
  2053. github_com_docker_swarmkit_api_deepcopy.Copy(&m.Annotations, &o.Annotations)
  2054. if o.Data != nil {
  2055. m.Data = make([]byte, len(o.Data))
  2056. copy(m.Data, o.Data)
  2057. }
  2058. if o.Templating != nil {
  2059. m.Templating = &Driver{}
  2060. github_com_docker_swarmkit_api_deepcopy.Copy(m.Templating, o.Templating)
  2061. }
  2062. }
  2063. func (m *NodeSpec) Marshal() (dAtA []byte, err error) {
  2064. size := m.Size()
  2065. dAtA = make([]byte, size)
  2066. n, err := m.MarshalTo(dAtA)
  2067. if err != nil {
  2068. return nil, err
  2069. }
  2070. return dAtA[:n], nil
  2071. }
  2072. func (m *NodeSpec) MarshalTo(dAtA []byte) (int, error) {
  2073. var i int
  2074. _ = i
  2075. var l int
  2076. _ = l
  2077. dAtA[i] = 0xa
  2078. i++
  2079. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  2080. n1, err := m.Annotations.MarshalTo(dAtA[i:])
  2081. if err != nil {
  2082. return 0, err
  2083. }
  2084. i += n1
  2085. if m.DesiredRole != 0 {
  2086. dAtA[i] = 0x10
  2087. i++
  2088. i = encodeVarintSpecs(dAtA, i, uint64(m.DesiredRole))
  2089. }
  2090. if m.Membership != 0 {
  2091. dAtA[i] = 0x18
  2092. i++
  2093. i = encodeVarintSpecs(dAtA, i, uint64(m.Membership))
  2094. }
  2095. if m.Availability != 0 {
  2096. dAtA[i] = 0x20
  2097. i++
  2098. i = encodeVarintSpecs(dAtA, i, uint64(m.Availability))
  2099. }
  2100. return i, nil
  2101. }
  2102. func (m *ServiceSpec) Marshal() (dAtA []byte, err error) {
  2103. size := m.Size()
  2104. dAtA = make([]byte, size)
  2105. n, err := m.MarshalTo(dAtA)
  2106. if err != nil {
  2107. return nil, err
  2108. }
  2109. return dAtA[:n], nil
  2110. }
  2111. func (m *ServiceSpec) MarshalTo(dAtA []byte) (int, error) {
  2112. var i int
  2113. _ = i
  2114. var l int
  2115. _ = l
  2116. dAtA[i] = 0xa
  2117. i++
  2118. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  2119. n2, err := m.Annotations.MarshalTo(dAtA[i:])
  2120. if err != nil {
  2121. return 0, err
  2122. }
  2123. i += n2
  2124. dAtA[i] = 0x12
  2125. i++
  2126. i = encodeVarintSpecs(dAtA, i, uint64(m.Task.Size()))
  2127. n3, err := m.Task.MarshalTo(dAtA[i:])
  2128. if err != nil {
  2129. return 0, err
  2130. }
  2131. i += n3
  2132. if m.Mode != nil {
  2133. nn4, err := m.Mode.MarshalTo(dAtA[i:])
  2134. if err != nil {
  2135. return 0, err
  2136. }
  2137. i += nn4
  2138. }
  2139. if m.Update != nil {
  2140. dAtA[i] = 0x32
  2141. i++
  2142. i = encodeVarintSpecs(dAtA, i, uint64(m.Update.Size()))
  2143. n5, err := m.Update.MarshalTo(dAtA[i:])
  2144. if err != nil {
  2145. return 0, err
  2146. }
  2147. i += n5
  2148. }
  2149. if len(m.Networks) > 0 {
  2150. for _, msg := range m.Networks {
  2151. dAtA[i] = 0x3a
  2152. i++
  2153. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  2154. n, err := msg.MarshalTo(dAtA[i:])
  2155. if err != nil {
  2156. return 0, err
  2157. }
  2158. i += n
  2159. }
  2160. }
  2161. if m.Endpoint != nil {
  2162. dAtA[i] = 0x42
  2163. i++
  2164. i = encodeVarintSpecs(dAtA, i, uint64(m.Endpoint.Size()))
  2165. n6, err := m.Endpoint.MarshalTo(dAtA[i:])
  2166. if err != nil {
  2167. return 0, err
  2168. }
  2169. i += n6
  2170. }
  2171. if m.Rollback != nil {
  2172. dAtA[i] = 0x4a
  2173. i++
  2174. i = encodeVarintSpecs(dAtA, i, uint64(m.Rollback.Size()))
  2175. n7, err := m.Rollback.MarshalTo(dAtA[i:])
  2176. if err != nil {
  2177. return 0, err
  2178. }
  2179. i += n7
  2180. }
  2181. return i, nil
  2182. }
  2183. func (m *ServiceSpec_Replicated) MarshalTo(dAtA []byte) (int, error) {
  2184. i := 0
  2185. if m.Replicated != nil {
  2186. dAtA[i] = 0x1a
  2187. i++
  2188. i = encodeVarintSpecs(dAtA, i, uint64(m.Replicated.Size()))
  2189. n8, err := m.Replicated.MarshalTo(dAtA[i:])
  2190. if err != nil {
  2191. return 0, err
  2192. }
  2193. i += n8
  2194. }
  2195. return i, nil
  2196. }
  2197. func (m *ServiceSpec_Global) MarshalTo(dAtA []byte) (int, error) {
  2198. i := 0
  2199. if m.Global != nil {
  2200. dAtA[i] = 0x22
  2201. i++
  2202. i = encodeVarintSpecs(dAtA, i, uint64(m.Global.Size()))
  2203. n9, err := m.Global.MarshalTo(dAtA[i:])
  2204. if err != nil {
  2205. return 0, err
  2206. }
  2207. i += n9
  2208. }
  2209. return i, nil
  2210. }
  2211. func (m *ServiceSpec_ReplicatedJob) MarshalTo(dAtA []byte) (int, error) {
  2212. i := 0
  2213. if m.ReplicatedJob != nil {
  2214. dAtA[i] = 0x52
  2215. i++
  2216. i = encodeVarintSpecs(dAtA, i, uint64(m.ReplicatedJob.Size()))
  2217. n10, err := m.ReplicatedJob.MarshalTo(dAtA[i:])
  2218. if err != nil {
  2219. return 0, err
  2220. }
  2221. i += n10
  2222. }
  2223. return i, nil
  2224. }
  2225. func (m *ServiceSpec_GlobalJob) MarshalTo(dAtA []byte) (int, error) {
  2226. i := 0
  2227. if m.GlobalJob != nil {
  2228. dAtA[i] = 0x5a
  2229. i++
  2230. i = encodeVarintSpecs(dAtA, i, uint64(m.GlobalJob.Size()))
  2231. n11, err := m.GlobalJob.MarshalTo(dAtA[i:])
  2232. if err != nil {
  2233. return 0, err
  2234. }
  2235. i += n11
  2236. }
  2237. return i, nil
  2238. }
  2239. func (m *ReplicatedService) Marshal() (dAtA []byte, err error) {
  2240. size := m.Size()
  2241. dAtA = make([]byte, size)
  2242. n, err := m.MarshalTo(dAtA)
  2243. if err != nil {
  2244. return nil, err
  2245. }
  2246. return dAtA[:n], nil
  2247. }
  2248. func (m *ReplicatedService) MarshalTo(dAtA []byte) (int, error) {
  2249. var i int
  2250. _ = i
  2251. var l int
  2252. _ = l
  2253. if m.Replicas != 0 {
  2254. dAtA[i] = 0x8
  2255. i++
  2256. i = encodeVarintSpecs(dAtA, i, uint64(m.Replicas))
  2257. }
  2258. return i, nil
  2259. }
  2260. func (m *GlobalService) Marshal() (dAtA []byte, err error) {
  2261. size := m.Size()
  2262. dAtA = make([]byte, size)
  2263. n, err := m.MarshalTo(dAtA)
  2264. if err != nil {
  2265. return nil, err
  2266. }
  2267. return dAtA[:n], nil
  2268. }
  2269. func (m *GlobalService) MarshalTo(dAtA []byte) (int, error) {
  2270. var i int
  2271. _ = i
  2272. var l int
  2273. _ = l
  2274. return i, nil
  2275. }
  2276. func (m *ReplicatedJob) Marshal() (dAtA []byte, err error) {
  2277. size := m.Size()
  2278. dAtA = make([]byte, size)
  2279. n, err := m.MarshalTo(dAtA)
  2280. if err != nil {
  2281. return nil, err
  2282. }
  2283. return dAtA[:n], nil
  2284. }
  2285. func (m *ReplicatedJob) MarshalTo(dAtA []byte) (int, error) {
  2286. var i int
  2287. _ = i
  2288. var l int
  2289. _ = l
  2290. if m.MaxConcurrent != 0 {
  2291. dAtA[i] = 0x8
  2292. i++
  2293. i = encodeVarintSpecs(dAtA, i, uint64(m.MaxConcurrent))
  2294. }
  2295. if m.TotalCompletions != 0 {
  2296. dAtA[i] = 0x10
  2297. i++
  2298. i = encodeVarintSpecs(dAtA, i, uint64(m.TotalCompletions))
  2299. }
  2300. return i, nil
  2301. }
  2302. func (m *GlobalJob) Marshal() (dAtA []byte, err error) {
  2303. size := m.Size()
  2304. dAtA = make([]byte, size)
  2305. n, err := m.MarshalTo(dAtA)
  2306. if err != nil {
  2307. return nil, err
  2308. }
  2309. return dAtA[:n], nil
  2310. }
  2311. func (m *GlobalJob) MarshalTo(dAtA []byte) (int, error) {
  2312. var i int
  2313. _ = i
  2314. var l int
  2315. _ = l
  2316. return i, nil
  2317. }
  2318. func (m *TaskSpec) Marshal() (dAtA []byte, err error) {
  2319. size := m.Size()
  2320. dAtA = make([]byte, size)
  2321. n, err := m.MarshalTo(dAtA)
  2322. if err != nil {
  2323. return nil, err
  2324. }
  2325. return dAtA[:n], nil
  2326. }
  2327. func (m *TaskSpec) MarshalTo(dAtA []byte) (int, error) {
  2328. var i int
  2329. _ = i
  2330. var l int
  2331. _ = l
  2332. if m.Runtime != nil {
  2333. nn12, err := m.Runtime.MarshalTo(dAtA[i:])
  2334. if err != nil {
  2335. return 0, err
  2336. }
  2337. i += nn12
  2338. }
  2339. if m.Resources != nil {
  2340. dAtA[i] = 0x12
  2341. i++
  2342. i = encodeVarintSpecs(dAtA, i, uint64(m.Resources.Size()))
  2343. n13, err := m.Resources.MarshalTo(dAtA[i:])
  2344. if err != nil {
  2345. return 0, err
  2346. }
  2347. i += n13
  2348. }
  2349. if m.Restart != nil {
  2350. dAtA[i] = 0x22
  2351. i++
  2352. i = encodeVarintSpecs(dAtA, i, uint64(m.Restart.Size()))
  2353. n14, err := m.Restart.MarshalTo(dAtA[i:])
  2354. if err != nil {
  2355. return 0, err
  2356. }
  2357. i += n14
  2358. }
  2359. if m.Placement != nil {
  2360. dAtA[i] = 0x2a
  2361. i++
  2362. i = encodeVarintSpecs(dAtA, i, uint64(m.Placement.Size()))
  2363. n15, err := m.Placement.MarshalTo(dAtA[i:])
  2364. if err != nil {
  2365. return 0, err
  2366. }
  2367. i += n15
  2368. }
  2369. if m.LogDriver != nil {
  2370. dAtA[i] = 0x32
  2371. i++
  2372. i = encodeVarintSpecs(dAtA, i, uint64(m.LogDriver.Size()))
  2373. n16, err := m.LogDriver.MarshalTo(dAtA[i:])
  2374. if err != nil {
  2375. return 0, err
  2376. }
  2377. i += n16
  2378. }
  2379. if len(m.Networks) > 0 {
  2380. for _, msg := range m.Networks {
  2381. dAtA[i] = 0x3a
  2382. i++
  2383. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  2384. n, err := msg.MarshalTo(dAtA[i:])
  2385. if err != nil {
  2386. return 0, err
  2387. }
  2388. i += n
  2389. }
  2390. }
  2391. if m.ForceUpdate != 0 {
  2392. dAtA[i] = 0x48
  2393. i++
  2394. i = encodeVarintSpecs(dAtA, i, uint64(m.ForceUpdate))
  2395. }
  2396. if len(m.ResourceReferences) > 0 {
  2397. for _, msg := range m.ResourceReferences {
  2398. dAtA[i] = 0x5a
  2399. i++
  2400. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  2401. n, err := msg.MarshalTo(dAtA[i:])
  2402. if err != nil {
  2403. return 0, err
  2404. }
  2405. i += n
  2406. }
  2407. }
  2408. return i, nil
  2409. }
  2410. func (m *TaskSpec_Container) MarshalTo(dAtA []byte) (int, error) {
  2411. i := 0
  2412. if m.Container != nil {
  2413. dAtA[i] = 0xa
  2414. i++
  2415. i = encodeVarintSpecs(dAtA, i, uint64(m.Container.Size()))
  2416. n17, err := m.Container.MarshalTo(dAtA[i:])
  2417. if err != nil {
  2418. return 0, err
  2419. }
  2420. i += n17
  2421. }
  2422. return i, nil
  2423. }
  2424. func (m *TaskSpec_Attachment) MarshalTo(dAtA []byte) (int, error) {
  2425. i := 0
  2426. if m.Attachment != nil {
  2427. dAtA[i] = 0x42
  2428. i++
  2429. i = encodeVarintSpecs(dAtA, i, uint64(m.Attachment.Size()))
  2430. n18, err := m.Attachment.MarshalTo(dAtA[i:])
  2431. if err != nil {
  2432. return 0, err
  2433. }
  2434. i += n18
  2435. }
  2436. return i, nil
  2437. }
  2438. func (m *TaskSpec_Generic) MarshalTo(dAtA []byte) (int, error) {
  2439. i := 0
  2440. if m.Generic != nil {
  2441. dAtA[i] = 0x52
  2442. i++
  2443. i = encodeVarintSpecs(dAtA, i, uint64(m.Generic.Size()))
  2444. n19, err := m.Generic.MarshalTo(dAtA[i:])
  2445. if err != nil {
  2446. return 0, err
  2447. }
  2448. i += n19
  2449. }
  2450. return i, nil
  2451. }
  2452. func (m *ResourceReference) Marshal() (dAtA []byte, err error) {
  2453. size := m.Size()
  2454. dAtA = make([]byte, size)
  2455. n, err := m.MarshalTo(dAtA)
  2456. if err != nil {
  2457. return nil, err
  2458. }
  2459. return dAtA[:n], nil
  2460. }
  2461. func (m *ResourceReference) MarshalTo(dAtA []byte) (int, error) {
  2462. var i int
  2463. _ = i
  2464. var l int
  2465. _ = l
  2466. if len(m.ResourceID) > 0 {
  2467. dAtA[i] = 0xa
  2468. i++
  2469. i = encodeVarintSpecs(dAtA, i, uint64(len(m.ResourceID)))
  2470. i += copy(dAtA[i:], m.ResourceID)
  2471. }
  2472. if m.ResourceType != 0 {
  2473. dAtA[i] = 0x10
  2474. i++
  2475. i = encodeVarintSpecs(dAtA, i, uint64(m.ResourceType))
  2476. }
  2477. return i, nil
  2478. }
  2479. func (m *GenericRuntimeSpec) Marshal() (dAtA []byte, err error) {
  2480. size := m.Size()
  2481. dAtA = make([]byte, size)
  2482. n, err := m.MarshalTo(dAtA)
  2483. if err != nil {
  2484. return nil, err
  2485. }
  2486. return dAtA[:n], nil
  2487. }
  2488. func (m *GenericRuntimeSpec) MarshalTo(dAtA []byte) (int, error) {
  2489. var i int
  2490. _ = i
  2491. var l int
  2492. _ = l
  2493. if len(m.Kind) > 0 {
  2494. dAtA[i] = 0xa
  2495. i++
  2496. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Kind)))
  2497. i += copy(dAtA[i:], m.Kind)
  2498. }
  2499. if m.Payload != nil {
  2500. dAtA[i] = 0x12
  2501. i++
  2502. i = encodeVarintSpecs(dAtA, i, uint64(m.Payload.Size()))
  2503. n20, err := m.Payload.MarshalTo(dAtA[i:])
  2504. if err != nil {
  2505. return 0, err
  2506. }
  2507. i += n20
  2508. }
  2509. return i, nil
  2510. }
  2511. func (m *NetworkAttachmentSpec) Marshal() (dAtA []byte, err error) {
  2512. size := m.Size()
  2513. dAtA = make([]byte, size)
  2514. n, err := m.MarshalTo(dAtA)
  2515. if err != nil {
  2516. return nil, err
  2517. }
  2518. return dAtA[:n], nil
  2519. }
  2520. func (m *NetworkAttachmentSpec) MarshalTo(dAtA []byte) (int, error) {
  2521. var i int
  2522. _ = i
  2523. var l int
  2524. _ = l
  2525. if len(m.ContainerID) > 0 {
  2526. dAtA[i] = 0xa
  2527. i++
  2528. i = encodeVarintSpecs(dAtA, i, uint64(len(m.ContainerID)))
  2529. i += copy(dAtA[i:], m.ContainerID)
  2530. }
  2531. return i, nil
  2532. }
  2533. func (m *ContainerSpec) Marshal() (dAtA []byte, err error) {
  2534. size := m.Size()
  2535. dAtA = make([]byte, size)
  2536. n, err := m.MarshalTo(dAtA)
  2537. if err != nil {
  2538. return nil, err
  2539. }
  2540. return dAtA[:n], nil
  2541. }
  2542. func (m *ContainerSpec) MarshalTo(dAtA []byte) (int, error) {
  2543. var i int
  2544. _ = i
  2545. var l int
  2546. _ = l
  2547. if len(m.Image) > 0 {
  2548. dAtA[i] = 0xa
  2549. i++
  2550. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Image)))
  2551. i += copy(dAtA[i:], m.Image)
  2552. }
  2553. if len(m.Labels) > 0 {
  2554. for k, _ := range m.Labels {
  2555. dAtA[i] = 0x12
  2556. i++
  2557. v := m.Labels[k]
  2558. mapSize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  2559. i = encodeVarintSpecs(dAtA, i, uint64(mapSize))
  2560. dAtA[i] = 0xa
  2561. i++
  2562. i = encodeVarintSpecs(dAtA, i, uint64(len(k)))
  2563. i += copy(dAtA[i:], k)
  2564. dAtA[i] = 0x12
  2565. i++
  2566. i = encodeVarintSpecs(dAtA, i, uint64(len(v)))
  2567. i += copy(dAtA[i:], v)
  2568. }
  2569. }
  2570. if len(m.Command) > 0 {
  2571. for _, s := range m.Command {
  2572. dAtA[i] = 0x1a
  2573. i++
  2574. l = len(s)
  2575. for l >= 1<<7 {
  2576. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2577. l >>= 7
  2578. i++
  2579. }
  2580. dAtA[i] = uint8(l)
  2581. i++
  2582. i += copy(dAtA[i:], s)
  2583. }
  2584. }
  2585. if len(m.Args) > 0 {
  2586. for _, s := range m.Args {
  2587. dAtA[i] = 0x22
  2588. i++
  2589. l = len(s)
  2590. for l >= 1<<7 {
  2591. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2592. l >>= 7
  2593. i++
  2594. }
  2595. dAtA[i] = uint8(l)
  2596. i++
  2597. i += copy(dAtA[i:], s)
  2598. }
  2599. }
  2600. if len(m.Env) > 0 {
  2601. for _, s := range m.Env {
  2602. dAtA[i] = 0x2a
  2603. i++
  2604. l = len(s)
  2605. for l >= 1<<7 {
  2606. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2607. l >>= 7
  2608. i++
  2609. }
  2610. dAtA[i] = uint8(l)
  2611. i++
  2612. i += copy(dAtA[i:], s)
  2613. }
  2614. }
  2615. if len(m.Dir) > 0 {
  2616. dAtA[i] = 0x32
  2617. i++
  2618. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Dir)))
  2619. i += copy(dAtA[i:], m.Dir)
  2620. }
  2621. if len(m.User) > 0 {
  2622. dAtA[i] = 0x3a
  2623. i++
  2624. i = encodeVarintSpecs(dAtA, i, uint64(len(m.User)))
  2625. i += copy(dAtA[i:], m.User)
  2626. }
  2627. if len(m.Mounts) > 0 {
  2628. for _, msg := range m.Mounts {
  2629. dAtA[i] = 0x42
  2630. i++
  2631. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  2632. n, err := msg.MarshalTo(dAtA[i:])
  2633. if err != nil {
  2634. return 0, err
  2635. }
  2636. i += n
  2637. }
  2638. }
  2639. if m.StopGracePeriod != nil {
  2640. dAtA[i] = 0x4a
  2641. i++
  2642. i = encodeVarintSpecs(dAtA, i, uint64(m.StopGracePeriod.Size()))
  2643. n21, err := m.StopGracePeriod.MarshalTo(dAtA[i:])
  2644. if err != nil {
  2645. return 0, err
  2646. }
  2647. i += n21
  2648. }
  2649. if m.PullOptions != nil {
  2650. dAtA[i] = 0x52
  2651. i++
  2652. i = encodeVarintSpecs(dAtA, i, uint64(m.PullOptions.Size()))
  2653. n22, err := m.PullOptions.MarshalTo(dAtA[i:])
  2654. if err != nil {
  2655. return 0, err
  2656. }
  2657. i += n22
  2658. }
  2659. if len(m.Groups) > 0 {
  2660. for _, s := range m.Groups {
  2661. dAtA[i] = 0x5a
  2662. i++
  2663. l = len(s)
  2664. for l >= 1<<7 {
  2665. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2666. l >>= 7
  2667. i++
  2668. }
  2669. dAtA[i] = uint8(l)
  2670. i++
  2671. i += copy(dAtA[i:], s)
  2672. }
  2673. }
  2674. if len(m.Secrets) > 0 {
  2675. for _, msg := range m.Secrets {
  2676. dAtA[i] = 0x62
  2677. i++
  2678. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  2679. n, err := msg.MarshalTo(dAtA[i:])
  2680. if err != nil {
  2681. return 0, err
  2682. }
  2683. i += n
  2684. }
  2685. }
  2686. if m.TTY {
  2687. dAtA[i] = 0x68
  2688. i++
  2689. if m.TTY {
  2690. dAtA[i] = 1
  2691. } else {
  2692. dAtA[i] = 0
  2693. }
  2694. i++
  2695. }
  2696. if len(m.Hostname) > 0 {
  2697. dAtA[i] = 0x72
  2698. i++
  2699. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Hostname)))
  2700. i += copy(dAtA[i:], m.Hostname)
  2701. }
  2702. if m.DNSConfig != nil {
  2703. dAtA[i] = 0x7a
  2704. i++
  2705. i = encodeVarintSpecs(dAtA, i, uint64(m.DNSConfig.Size()))
  2706. n23, err := m.DNSConfig.MarshalTo(dAtA[i:])
  2707. if err != nil {
  2708. return 0, err
  2709. }
  2710. i += n23
  2711. }
  2712. if m.Healthcheck != nil {
  2713. dAtA[i] = 0x82
  2714. i++
  2715. dAtA[i] = 0x1
  2716. i++
  2717. i = encodeVarintSpecs(dAtA, i, uint64(m.Healthcheck.Size()))
  2718. n24, err := m.Healthcheck.MarshalTo(dAtA[i:])
  2719. if err != nil {
  2720. return 0, err
  2721. }
  2722. i += n24
  2723. }
  2724. if len(m.Hosts) > 0 {
  2725. for _, s := range m.Hosts {
  2726. dAtA[i] = 0x8a
  2727. i++
  2728. dAtA[i] = 0x1
  2729. i++
  2730. l = len(s)
  2731. for l >= 1<<7 {
  2732. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2733. l >>= 7
  2734. i++
  2735. }
  2736. dAtA[i] = uint8(l)
  2737. i++
  2738. i += copy(dAtA[i:], s)
  2739. }
  2740. }
  2741. if m.OpenStdin {
  2742. dAtA[i] = 0x90
  2743. i++
  2744. dAtA[i] = 0x1
  2745. i++
  2746. if m.OpenStdin {
  2747. dAtA[i] = 1
  2748. } else {
  2749. dAtA[i] = 0
  2750. }
  2751. i++
  2752. }
  2753. if m.ReadOnly {
  2754. dAtA[i] = 0x98
  2755. i++
  2756. dAtA[i] = 0x1
  2757. i++
  2758. if m.ReadOnly {
  2759. dAtA[i] = 1
  2760. } else {
  2761. dAtA[i] = 0
  2762. }
  2763. i++
  2764. }
  2765. if len(m.StopSignal) > 0 {
  2766. dAtA[i] = 0xa2
  2767. i++
  2768. dAtA[i] = 0x1
  2769. i++
  2770. i = encodeVarintSpecs(dAtA, i, uint64(len(m.StopSignal)))
  2771. i += copy(dAtA[i:], m.StopSignal)
  2772. }
  2773. if len(m.Configs) > 0 {
  2774. for _, msg := range m.Configs {
  2775. dAtA[i] = 0xaa
  2776. i++
  2777. dAtA[i] = 0x1
  2778. i++
  2779. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  2780. n, err := msg.MarshalTo(dAtA[i:])
  2781. if err != nil {
  2782. return 0, err
  2783. }
  2784. i += n
  2785. }
  2786. }
  2787. if m.Privileges != nil {
  2788. dAtA[i] = 0xb2
  2789. i++
  2790. dAtA[i] = 0x1
  2791. i++
  2792. i = encodeVarintSpecs(dAtA, i, uint64(m.Privileges.Size()))
  2793. n25, err := m.Privileges.MarshalTo(dAtA[i:])
  2794. if err != nil {
  2795. return 0, err
  2796. }
  2797. i += n25
  2798. }
  2799. if m.Init != nil {
  2800. dAtA[i] = 0xba
  2801. i++
  2802. dAtA[i] = 0x1
  2803. i++
  2804. i = encodeVarintSpecs(dAtA, i, uint64(m.Init.Size()))
  2805. n26, err := m.Init.MarshalTo(dAtA[i:])
  2806. if err != nil {
  2807. return 0, err
  2808. }
  2809. i += n26
  2810. }
  2811. if m.Isolation != 0 {
  2812. dAtA[i] = 0xc0
  2813. i++
  2814. dAtA[i] = 0x1
  2815. i++
  2816. i = encodeVarintSpecs(dAtA, i, uint64(m.Isolation))
  2817. }
  2818. if m.PidsLimit != 0 {
  2819. dAtA[i] = 0xc8
  2820. i++
  2821. dAtA[i] = 0x1
  2822. i++
  2823. i = encodeVarintSpecs(dAtA, i, uint64(m.PidsLimit))
  2824. }
  2825. if len(m.Sysctls) > 0 {
  2826. for k, _ := range m.Sysctls {
  2827. dAtA[i] = 0xd2
  2828. i++
  2829. dAtA[i] = 0x1
  2830. i++
  2831. v := m.Sysctls[k]
  2832. mapSize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  2833. i = encodeVarintSpecs(dAtA, i, uint64(mapSize))
  2834. dAtA[i] = 0xa
  2835. i++
  2836. i = encodeVarintSpecs(dAtA, i, uint64(len(k)))
  2837. i += copy(dAtA[i:], k)
  2838. dAtA[i] = 0x12
  2839. i++
  2840. i = encodeVarintSpecs(dAtA, i, uint64(len(v)))
  2841. i += copy(dAtA[i:], v)
  2842. }
  2843. }
  2844. if len(m.CapabilityAdd) > 0 {
  2845. for _, s := range m.CapabilityAdd {
  2846. dAtA[i] = 0xda
  2847. i++
  2848. dAtA[i] = 0x1
  2849. i++
  2850. l = len(s)
  2851. for l >= 1<<7 {
  2852. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2853. l >>= 7
  2854. i++
  2855. }
  2856. dAtA[i] = uint8(l)
  2857. i++
  2858. i += copy(dAtA[i:], s)
  2859. }
  2860. }
  2861. if len(m.CapabilityDrop) > 0 {
  2862. for _, s := range m.CapabilityDrop {
  2863. dAtA[i] = 0xe2
  2864. i++
  2865. dAtA[i] = 0x1
  2866. i++
  2867. l = len(s)
  2868. for l >= 1<<7 {
  2869. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2870. l >>= 7
  2871. i++
  2872. }
  2873. dAtA[i] = uint8(l)
  2874. i++
  2875. i += copy(dAtA[i:], s)
  2876. }
  2877. }
  2878. if len(m.Ulimits) > 0 {
  2879. for _, msg := range m.Ulimits {
  2880. dAtA[i] = 0xea
  2881. i++
  2882. dAtA[i] = 0x1
  2883. i++
  2884. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  2885. n, err := msg.MarshalTo(dAtA[i:])
  2886. if err != nil {
  2887. return 0, err
  2888. }
  2889. i += n
  2890. }
  2891. }
  2892. return i, nil
  2893. }
  2894. func (m *ContainerSpec_PullOptions) Marshal() (dAtA []byte, err error) {
  2895. size := m.Size()
  2896. dAtA = make([]byte, size)
  2897. n, err := m.MarshalTo(dAtA)
  2898. if err != nil {
  2899. return nil, err
  2900. }
  2901. return dAtA[:n], nil
  2902. }
  2903. func (m *ContainerSpec_PullOptions) MarshalTo(dAtA []byte) (int, error) {
  2904. var i int
  2905. _ = i
  2906. var l int
  2907. _ = l
  2908. if len(m.RegistryAuth) > 0 {
  2909. dAtA[i] = 0x82
  2910. i++
  2911. dAtA[i] = 0x4
  2912. i++
  2913. i = encodeVarintSpecs(dAtA, i, uint64(len(m.RegistryAuth)))
  2914. i += copy(dAtA[i:], m.RegistryAuth)
  2915. }
  2916. return i, nil
  2917. }
  2918. func (m *ContainerSpec_DNSConfig) Marshal() (dAtA []byte, err error) {
  2919. size := m.Size()
  2920. dAtA = make([]byte, size)
  2921. n, err := m.MarshalTo(dAtA)
  2922. if err != nil {
  2923. return nil, err
  2924. }
  2925. return dAtA[:n], nil
  2926. }
  2927. func (m *ContainerSpec_DNSConfig) MarshalTo(dAtA []byte) (int, error) {
  2928. var i int
  2929. _ = i
  2930. var l int
  2931. _ = l
  2932. if len(m.Nameservers) > 0 {
  2933. for _, s := range m.Nameservers {
  2934. dAtA[i] = 0xa
  2935. i++
  2936. l = len(s)
  2937. for l >= 1<<7 {
  2938. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2939. l >>= 7
  2940. i++
  2941. }
  2942. dAtA[i] = uint8(l)
  2943. i++
  2944. i += copy(dAtA[i:], s)
  2945. }
  2946. }
  2947. if len(m.Search) > 0 {
  2948. for _, s := range m.Search {
  2949. dAtA[i] = 0x12
  2950. i++
  2951. l = len(s)
  2952. for l >= 1<<7 {
  2953. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2954. l >>= 7
  2955. i++
  2956. }
  2957. dAtA[i] = uint8(l)
  2958. i++
  2959. i += copy(dAtA[i:], s)
  2960. }
  2961. }
  2962. if len(m.Options) > 0 {
  2963. for _, s := range m.Options {
  2964. dAtA[i] = 0x1a
  2965. i++
  2966. l = len(s)
  2967. for l >= 1<<7 {
  2968. dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
  2969. l >>= 7
  2970. i++
  2971. }
  2972. dAtA[i] = uint8(l)
  2973. i++
  2974. i += copy(dAtA[i:], s)
  2975. }
  2976. }
  2977. return i, nil
  2978. }
  2979. func (m *ContainerSpec_Ulimit) Marshal() (dAtA []byte, err error) {
  2980. size := m.Size()
  2981. dAtA = make([]byte, size)
  2982. n, err := m.MarshalTo(dAtA)
  2983. if err != nil {
  2984. return nil, err
  2985. }
  2986. return dAtA[:n], nil
  2987. }
  2988. func (m *ContainerSpec_Ulimit) MarshalTo(dAtA []byte) (int, error) {
  2989. var i int
  2990. _ = i
  2991. var l int
  2992. _ = l
  2993. if len(m.Name) > 0 {
  2994. dAtA[i] = 0xa
  2995. i++
  2996. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Name)))
  2997. i += copy(dAtA[i:], m.Name)
  2998. }
  2999. if m.Soft != 0 {
  3000. dAtA[i] = 0x10
  3001. i++
  3002. i = encodeVarintSpecs(dAtA, i, uint64(m.Soft))
  3003. }
  3004. if m.Hard != 0 {
  3005. dAtA[i] = 0x18
  3006. i++
  3007. i = encodeVarintSpecs(dAtA, i, uint64(m.Hard))
  3008. }
  3009. return i, nil
  3010. }
  3011. func (m *EndpointSpec) Marshal() (dAtA []byte, err error) {
  3012. size := m.Size()
  3013. dAtA = make([]byte, size)
  3014. n, err := m.MarshalTo(dAtA)
  3015. if err != nil {
  3016. return nil, err
  3017. }
  3018. return dAtA[:n], nil
  3019. }
  3020. func (m *EndpointSpec) MarshalTo(dAtA []byte) (int, error) {
  3021. var i int
  3022. _ = i
  3023. var l int
  3024. _ = l
  3025. if m.Mode != 0 {
  3026. dAtA[i] = 0x8
  3027. i++
  3028. i = encodeVarintSpecs(dAtA, i, uint64(m.Mode))
  3029. }
  3030. if len(m.Ports) > 0 {
  3031. for _, msg := range m.Ports {
  3032. dAtA[i] = 0x12
  3033. i++
  3034. i = encodeVarintSpecs(dAtA, i, uint64(msg.Size()))
  3035. n, err := msg.MarshalTo(dAtA[i:])
  3036. if err != nil {
  3037. return 0, err
  3038. }
  3039. i += n
  3040. }
  3041. }
  3042. return i, nil
  3043. }
  3044. func (m *NetworkSpec) Marshal() (dAtA []byte, err error) {
  3045. size := m.Size()
  3046. dAtA = make([]byte, size)
  3047. n, err := m.MarshalTo(dAtA)
  3048. if err != nil {
  3049. return nil, err
  3050. }
  3051. return dAtA[:n], nil
  3052. }
  3053. func (m *NetworkSpec) MarshalTo(dAtA []byte) (int, error) {
  3054. var i int
  3055. _ = i
  3056. var l int
  3057. _ = l
  3058. dAtA[i] = 0xa
  3059. i++
  3060. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  3061. n27, err := m.Annotations.MarshalTo(dAtA[i:])
  3062. if err != nil {
  3063. return 0, err
  3064. }
  3065. i += n27
  3066. if m.DriverConfig != nil {
  3067. dAtA[i] = 0x12
  3068. i++
  3069. i = encodeVarintSpecs(dAtA, i, uint64(m.DriverConfig.Size()))
  3070. n28, err := m.DriverConfig.MarshalTo(dAtA[i:])
  3071. if err != nil {
  3072. return 0, err
  3073. }
  3074. i += n28
  3075. }
  3076. if m.Ipv6Enabled {
  3077. dAtA[i] = 0x18
  3078. i++
  3079. if m.Ipv6Enabled {
  3080. dAtA[i] = 1
  3081. } else {
  3082. dAtA[i] = 0
  3083. }
  3084. i++
  3085. }
  3086. if m.Internal {
  3087. dAtA[i] = 0x20
  3088. i++
  3089. if m.Internal {
  3090. dAtA[i] = 1
  3091. } else {
  3092. dAtA[i] = 0
  3093. }
  3094. i++
  3095. }
  3096. if m.IPAM != nil {
  3097. dAtA[i] = 0x2a
  3098. i++
  3099. i = encodeVarintSpecs(dAtA, i, uint64(m.IPAM.Size()))
  3100. n29, err := m.IPAM.MarshalTo(dAtA[i:])
  3101. if err != nil {
  3102. return 0, err
  3103. }
  3104. i += n29
  3105. }
  3106. if m.Attachable {
  3107. dAtA[i] = 0x30
  3108. i++
  3109. if m.Attachable {
  3110. dAtA[i] = 1
  3111. } else {
  3112. dAtA[i] = 0
  3113. }
  3114. i++
  3115. }
  3116. if m.Ingress {
  3117. dAtA[i] = 0x38
  3118. i++
  3119. if m.Ingress {
  3120. dAtA[i] = 1
  3121. } else {
  3122. dAtA[i] = 0
  3123. }
  3124. i++
  3125. }
  3126. if m.ConfigFrom != nil {
  3127. nn30, err := m.ConfigFrom.MarshalTo(dAtA[i:])
  3128. if err != nil {
  3129. return 0, err
  3130. }
  3131. i += nn30
  3132. }
  3133. return i, nil
  3134. }
  3135. func (m *NetworkSpec_Network) MarshalTo(dAtA []byte) (int, error) {
  3136. i := 0
  3137. dAtA[i] = 0x42
  3138. i++
  3139. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Network)))
  3140. i += copy(dAtA[i:], m.Network)
  3141. return i, nil
  3142. }
  3143. func (m *ClusterSpec) Marshal() (dAtA []byte, err error) {
  3144. size := m.Size()
  3145. dAtA = make([]byte, size)
  3146. n, err := m.MarshalTo(dAtA)
  3147. if err != nil {
  3148. return nil, err
  3149. }
  3150. return dAtA[:n], nil
  3151. }
  3152. func (m *ClusterSpec) MarshalTo(dAtA []byte) (int, error) {
  3153. var i int
  3154. _ = i
  3155. var l int
  3156. _ = l
  3157. dAtA[i] = 0xa
  3158. i++
  3159. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  3160. n31, err := m.Annotations.MarshalTo(dAtA[i:])
  3161. if err != nil {
  3162. return 0, err
  3163. }
  3164. i += n31
  3165. dAtA[i] = 0x12
  3166. i++
  3167. i = encodeVarintSpecs(dAtA, i, uint64(m.AcceptancePolicy.Size()))
  3168. n32, err := m.AcceptancePolicy.MarshalTo(dAtA[i:])
  3169. if err != nil {
  3170. return 0, err
  3171. }
  3172. i += n32
  3173. dAtA[i] = 0x1a
  3174. i++
  3175. i = encodeVarintSpecs(dAtA, i, uint64(m.Orchestration.Size()))
  3176. n33, err := m.Orchestration.MarshalTo(dAtA[i:])
  3177. if err != nil {
  3178. return 0, err
  3179. }
  3180. i += n33
  3181. dAtA[i] = 0x22
  3182. i++
  3183. i = encodeVarintSpecs(dAtA, i, uint64(m.Raft.Size()))
  3184. n34, err := m.Raft.MarshalTo(dAtA[i:])
  3185. if err != nil {
  3186. return 0, err
  3187. }
  3188. i += n34
  3189. dAtA[i] = 0x2a
  3190. i++
  3191. i = encodeVarintSpecs(dAtA, i, uint64(m.Dispatcher.Size()))
  3192. n35, err := m.Dispatcher.MarshalTo(dAtA[i:])
  3193. if err != nil {
  3194. return 0, err
  3195. }
  3196. i += n35
  3197. dAtA[i] = 0x32
  3198. i++
  3199. i = encodeVarintSpecs(dAtA, i, uint64(m.CAConfig.Size()))
  3200. n36, err := m.CAConfig.MarshalTo(dAtA[i:])
  3201. if err != nil {
  3202. return 0, err
  3203. }
  3204. i += n36
  3205. dAtA[i] = 0x3a
  3206. i++
  3207. i = encodeVarintSpecs(dAtA, i, uint64(m.TaskDefaults.Size()))
  3208. n37, err := m.TaskDefaults.MarshalTo(dAtA[i:])
  3209. if err != nil {
  3210. return 0, err
  3211. }
  3212. i += n37
  3213. dAtA[i] = 0x42
  3214. i++
  3215. i = encodeVarintSpecs(dAtA, i, uint64(m.EncryptionConfig.Size()))
  3216. n38, err := m.EncryptionConfig.MarshalTo(dAtA[i:])
  3217. if err != nil {
  3218. return 0, err
  3219. }
  3220. i += n38
  3221. return i, nil
  3222. }
  3223. func (m *SecretSpec) Marshal() (dAtA []byte, err error) {
  3224. size := m.Size()
  3225. dAtA = make([]byte, size)
  3226. n, err := m.MarshalTo(dAtA)
  3227. if err != nil {
  3228. return nil, err
  3229. }
  3230. return dAtA[:n], nil
  3231. }
  3232. func (m *SecretSpec) MarshalTo(dAtA []byte) (int, error) {
  3233. var i int
  3234. _ = i
  3235. var l int
  3236. _ = l
  3237. dAtA[i] = 0xa
  3238. i++
  3239. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  3240. n39, err := m.Annotations.MarshalTo(dAtA[i:])
  3241. if err != nil {
  3242. return 0, err
  3243. }
  3244. i += n39
  3245. if len(m.Data) > 0 {
  3246. dAtA[i] = 0x12
  3247. i++
  3248. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Data)))
  3249. i += copy(dAtA[i:], m.Data)
  3250. }
  3251. if m.Templating != nil {
  3252. dAtA[i] = 0x1a
  3253. i++
  3254. i = encodeVarintSpecs(dAtA, i, uint64(m.Templating.Size()))
  3255. n40, err := m.Templating.MarshalTo(dAtA[i:])
  3256. if err != nil {
  3257. return 0, err
  3258. }
  3259. i += n40
  3260. }
  3261. if m.Driver != nil {
  3262. dAtA[i] = 0x22
  3263. i++
  3264. i = encodeVarintSpecs(dAtA, i, uint64(m.Driver.Size()))
  3265. n41, err := m.Driver.MarshalTo(dAtA[i:])
  3266. if err != nil {
  3267. return 0, err
  3268. }
  3269. i += n41
  3270. }
  3271. return i, nil
  3272. }
  3273. func (m *ConfigSpec) Marshal() (dAtA []byte, err error) {
  3274. size := m.Size()
  3275. dAtA = make([]byte, size)
  3276. n, err := m.MarshalTo(dAtA)
  3277. if err != nil {
  3278. return nil, err
  3279. }
  3280. return dAtA[:n], nil
  3281. }
  3282. func (m *ConfigSpec) MarshalTo(dAtA []byte) (int, error) {
  3283. var i int
  3284. _ = i
  3285. var l int
  3286. _ = l
  3287. dAtA[i] = 0xa
  3288. i++
  3289. i = encodeVarintSpecs(dAtA, i, uint64(m.Annotations.Size()))
  3290. n42, err := m.Annotations.MarshalTo(dAtA[i:])
  3291. if err != nil {
  3292. return 0, err
  3293. }
  3294. i += n42
  3295. if len(m.Data) > 0 {
  3296. dAtA[i] = 0x12
  3297. i++
  3298. i = encodeVarintSpecs(dAtA, i, uint64(len(m.Data)))
  3299. i += copy(dAtA[i:], m.Data)
  3300. }
  3301. if m.Templating != nil {
  3302. dAtA[i] = 0x1a
  3303. i++
  3304. i = encodeVarintSpecs(dAtA, i, uint64(m.Templating.Size()))
  3305. n43, err := m.Templating.MarshalTo(dAtA[i:])
  3306. if err != nil {
  3307. return 0, err
  3308. }
  3309. i += n43
  3310. }
  3311. return i, nil
  3312. }
  3313. func encodeVarintSpecs(dAtA []byte, offset int, v uint64) int {
  3314. for v >= 1<<7 {
  3315. dAtA[offset] = uint8(v&0x7f | 0x80)
  3316. v >>= 7
  3317. offset++
  3318. }
  3319. dAtA[offset] = uint8(v)
  3320. return offset + 1
  3321. }
  3322. func (m *NodeSpec) Size() (n int) {
  3323. if m == nil {
  3324. return 0
  3325. }
  3326. var l int
  3327. _ = l
  3328. l = m.Annotations.Size()
  3329. n += 1 + l + sovSpecs(uint64(l))
  3330. if m.DesiredRole != 0 {
  3331. n += 1 + sovSpecs(uint64(m.DesiredRole))
  3332. }
  3333. if m.Membership != 0 {
  3334. n += 1 + sovSpecs(uint64(m.Membership))
  3335. }
  3336. if m.Availability != 0 {
  3337. n += 1 + sovSpecs(uint64(m.Availability))
  3338. }
  3339. return n
  3340. }
  3341. func (m *ServiceSpec) Size() (n int) {
  3342. if m == nil {
  3343. return 0
  3344. }
  3345. var l int
  3346. _ = l
  3347. l = m.Annotations.Size()
  3348. n += 1 + l + sovSpecs(uint64(l))
  3349. l = m.Task.Size()
  3350. n += 1 + l + sovSpecs(uint64(l))
  3351. if m.Mode != nil {
  3352. n += m.Mode.Size()
  3353. }
  3354. if m.Update != nil {
  3355. l = m.Update.Size()
  3356. n += 1 + l + sovSpecs(uint64(l))
  3357. }
  3358. if len(m.Networks) > 0 {
  3359. for _, e := range m.Networks {
  3360. l = e.Size()
  3361. n += 1 + l + sovSpecs(uint64(l))
  3362. }
  3363. }
  3364. if m.Endpoint != nil {
  3365. l = m.Endpoint.Size()
  3366. n += 1 + l + sovSpecs(uint64(l))
  3367. }
  3368. if m.Rollback != nil {
  3369. l = m.Rollback.Size()
  3370. n += 1 + l + sovSpecs(uint64(l))
  3371. }
  3372. return n
  3373. }
  3374. func (m *ServiceSpec_Replicated) Size() (n int) {
  3375. if m == nil {
  3376. return 0
  3377. }
  3378. var l int
  3379. _ = l
  3380. if m.Replicated != nil {
  3381. l = m.Replicated.Size()
  3382. n += 1 + l + sovSpecs(uint64(l))
  3383. }
  3384. return n
  3385. }
  3386. func (m *ServiceSpec_Global) Size() (n int) {
  3387. if m == nil {
  3388. return 0
  3389. }
  3390. var l int
  3391. _ = l
  3392. if m.Global != nil {
  3393. l = m.Global.Size()
  3394. n += 1 + l + sovSpecs(uint64(l))
  3395. }
  3396. return n
  3397. }
  3398. func (m *ServiceSpec_ReplicatedJob) Size() (n int) {
  3399. if m == nil {
  3400. return 0
  3401. }
  3402. var l int
  3403. _ = l
  3404. if m.ReplicatedJob != nil {
  3405. l = m.ReplicatedJob.Size()
  3406. n += 1 + l + sovSpecs(uint64(l))
  3407. }
  3408. return n
  3409. }
  3410. func (m *ServiceSpec_GlobalJob) Size() (n int) {
  3411. if m == nil {
  3412. return 0
  3413. }
  3414. var l int
  3415. _ = l
  3416. if m.GlobalJob != nil {
  3417. l = m.GlobalJob.Size()
  3418. n += 1 + l + sovSpecs(uint64(l))
  3419. }
  3420. return n
  3421. }
  3422. func (m *ReplicatedService) Size() (n int) {
  3423. if m == nil {
  3424. return 0
  3425. }
  3426. var l int
  3427. _ = l
  3428. if m.Replicas != 0 {
  3429. n += 1 + sovSpecs(uint64(m.Replicas))
  3430. }
  3431. return n
  3432. }
  3433. func (m *GlobalService) Size() (n int) {
  3434. if m == nil {
  3435. return 0
  3436. }
  3437. var l int
  3438. _ = l
  3439. return n
  3440. }
  3441. func (m *ReplicatedJob) Size() (n int) {
  3442. if m == nil {
  3443. return 0
  3444. }
  3445. var l int
  3446. _ = l
  3447. if m.MaxConcurrent != 0 {
  3448. n += 1 + sovSpecs(uint64(m.MaxConcurrent))
  3449. }
  3450. if m.TotalCompletions != 0 {
  3451. n += 1 + sovSpecs(uint64(m.TotalCompletions))
  3452. }
  3453. return n
  3454. }
  3455. func (m *GlobalJob) Size() (n int) {
  3456. if m == nil {
  3457. return 0
  3458. }
  3459. var l int
  3460. _ = l
  3461. return n
  3462. }
  3463. func (m *TaskSpec) Size() (n int) {
  3464. if m == nil {
  3465. return 0
  3466. }
  3467. var l int
  3468. _ = l
  3469. if m.Runtime != nil {
  3470. n += m.Runtime.Size()
  3471. }
  3472. if m.Resources != nil {
  3473. l = m.Resources.Size()
  3474. n += 1 + l + sovSpecs(uint64(l))
  3475. }
  3476. if m.Restart != nil {
  3477. l = m.Restart.Size()
  3478. n += 1 + l + sovSpecs(uint64(l))
  3479. }
  3480. if m.Placement != nil {
  3481. l = m.Placement.Size()
  3482. n += 1 + l + sovSpecs(uint64(l))
  3483. }
  3484. if m.LogDriver != nil {
  3485. l = m.LogDriver.Size()
  3486. n += 1 + l + sovSpecs(uint64(l))
  3487. }
  3488. if len(m.Networks) > 0 {
  3489. for _, e := range m.Networks {
  3490. l = e.Size()
  3491. n += 1 + l + sovSpecs(uint64(l))
  3492. }
  3493. }
  3494. if m.ForceUpdate != 0 {
  3495. n += 1 + sovSpecs(uint64(m.ForceUpdate))
  3496. }
  3497. if len(m.ResourceReferences) > 0 {
  3498. for _, e := range m.ResourceReferences {
  3499. l = e.Size()
  3500. n += 1 + l + sovSpecs(uint64(l))
  3501. }
  3502. }
  3503. return n
  3504. }
  3505. func (m *TaskSpec_Container) Size() (n int) {
  3506. if m == nil {
  3507. return 0
  3508. }
  3509. var l int
  3510. _ = l
  3511. if m.Container != nil {
  3512. l = m.Container.Size()
  3513. n += 1 + l + sovSpecs(uint64(l))
  3514. }
  3515. return n
  3516. }
  3517. func (m *TaskSpec_Attachment) Size() (n int) {
  3518. if m == nil {
  3519. return 0
  3520. }
  3521. var l int
  3522. _ = l
  3523. if m.Attachment != nil {
  3524. l = m.Attachment.Size()
  3525. n += 1 + l + sovSpecs(uint64(l))
  3526. }
  3527. return n
  3528. }
  3529. func (m *TaskSpec_Generic) Size() (n int) {
  3530. if m == nil {
  3531. return 0
  3532. }
  3533. var l int
  3534. _ = l
  3535. if m.Generic != nil {
  3536. l = m.Generic.Size()
  3537. n += 1 + l + sovSpecs(uint64(l))
  3538. }
  3539. return n
  3540. }
  3541. func (m *ResourceReference) Size() (n int) {
  3542. if m == nil {
  3543. return 0
  3544. }
  3545. var l int
  3546. _ = l
  3547. l = len(m.ResourceID)
  3548. if l > 0 {
  3549. n += 1 + l + sovSpecs(uint64(l))
  3550. }
  3551. if m.ResourceType != 0 {
  3552. n += 1 + sovSpecs(uint64(m.ResourceType))
  3553. }
  3554. return n
  3555. }
  3556. func (m *GenericRuntimeSpec) Size() (n int) {
  3557. if m == nil {
  3558. return 0
  3559. }
  3560. var l int
  3561. _ = l
  3562. l = len(m.Kind)
  3563. if l > 0 {
  3564. n += 1 + l + sovSpecs(uint64(l))
  3565. }
  3566. if m.Payload != nil {
  3567. l = m.Payload.Size()
  3568. n += 1 + l + sovSpecs(uint64(l))
  3569. }
  3570. return n
  3571. }
  3572. func (m *NetworkAttachmentSpec) Size() (n int) {
  3573. if m == nil {
  3574. return 0
  3575. }
  3576. var l int
  3577. _ = l
  3578. l = len(m.ContainerID)
  3579. if l > 0 {
  3580. n += 1 + l + sovSpecs(uint64(l))
  3581. }
  3582. return n
  3583. }
  3584. func (m *ContainerSpec) Size() (n int) {
  3585. if m == nil {
  3586. return 0
  3587. }
  3588. var l int
  3589. _ = l
  3590. l = len(m.Image)
  3591. if l > 0 {
  3592. n += 1 + l + sovSpecs(uint64(l))
  3593. }
  3594. if len(m.Labels) > 0 {
  3595. for k, v := range m.Labels {
  3596. _ = k
  3597. _ = v
  3598. mapEntrySize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  3599. n += mapEntrySize + 1 + sovSpecs(uint64(mapEntrySize))
  3600. }
  3601. }
  3602. if len(m.Command) > 0 {
  3603. for _, s := range m.Command {
  3604. l = len(s)
  3605. n += 1 + l + sovSpecs(uint64(l))
  3606. }
  3607. }
  3608. if len(m.Args) > 0 {
  3609. for _, s := range m.Args {
  3610. l = len(s)
  3611. n += 1 + l + sovSpecs(uint64(l))
  3612. }
  3613. }
  3614. if len(m.Env) > 0 {
  3615. for _, s := range m.Env {
  3616. l = len(s)
  3617. n += 1 + l + sovSpecs(uint64(l))
  3618. }
  3619. }
  3620. l = len(m.Dir)
  3621. if l > 0 {
  3622. n += 1 + l + sovSpecs(uint64(l))
  3623. }
  3624. l = len(m.User)
  3625. if l > 0 {
  3626. n += 1 + l + sovSpecs(uint64(l))
  3627. }
  3628. if len(m.Mounts) > 0 {
  3629. for _, e := range m.Mounts {
  3630. l = e.Size()
  3631. n += 1 + l + sovSpecs(uint64(l))
  3632. }
  3633. }
  3634. if m.StopGracePeriod != nil {
  3635. l = m.StopGracePeriod.Size()
  3636. n += 1 + l + sovSpecs(uint64(l))
  3637. }
  3638. if m.PullOptions != nil {
  3639. l = m.PullOptions.Size()
  3640. n += 1 + l + sovSpecs(uint64(l))
  3641. }
  3642. if len(m.Groups) > 0 {
  3643. for _, s := range m.Groups {
  3644. l = len(s)
  3645. n += 1 + l + sovSpecs(uint64(l))
  3646. }
  3647. }
  3648. if len(m.Secrets) > 0 {
  3649. for _, e := range m.Secrets {
  3650. l = e.Size()
  3651. n += 1 + l + sovSpecs(uint64(l))
  3652. }
  3653. }
  3654. if m.TTY {
  3655. n += 2
  3656. }
  3657. l = len(m.Hostname)
  3658. if l > 0 {
  3659. n += 1 + l + sovSpecs(uint64(l))
  3660. }
  3661. if m.DNSConfig != nil {
  3662. l = m.DNSConfig.Size()
  3663. n += 1 + l + sovSpecs(uint64(l))
  3664. }
  3665. if m.Healthcheck != nil {
  3666. l = m.Healthcheck.Size()
  3667. n += 2 + l + sovSpecs(uint64(l))
  3668. }
  3669. if len(m.Hosts) > 0 {
  3670. for _, s := range m.Hosts {
  3671. l = len(s)
  3672. n += 2 + l + sovSpecs(uint64(l))
  3673. }
  3674. }
  3675. if m.OpenStdin {
  3676. n += 3
  3677. }
  3678. if m.ReadOnly {
  3679. n += 3
  3680. }
  3681. l = len(m.StopSignal)
  3682. if l > 0 {
  3683. n += 2 + l + sovSpecs(uint64(l))
  3684. }
  3685. if len(m.Configs) > 0 {
  3686. for _, e := range m.Configs {
  3687. l = e.Size()
  3688. n += 2 + l + sovSpecs(uint64(l))
  3689. }
  3690. }
  3691. if m.Privileges != nil {
  3692. l = m.Privileges.Size()
  3693. n += 2 + l + sovSpecs(uint64(l))
  3694. }
  3695. if m.Init != nil {
  3696. l = m.Init.Size()
  3697. n += 2 + l + sovSpecs(uint64(l))
  3698. }
  3699. if m.Isolation != 0 {
  3700. n += 2 + sovSpecs(uint64(m.Isolation))
  3701. }
  3702. if m.PidsLimit != 0 {
  3703. n += 2 + sovSpecs(uint64(m.PidsLimit))
  3704. }
  3705. if len(m.Sysctls) > 0 {
  3706. for k, v := range m.Sysctls {
  3707. _ = k
  3708. _ = v
  3709. mapEntrySize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  3710. n += mapEntrySize + 2 + sovSpecs(uint64(mapEntrySize))
  3711. }
  3712. }
  3713. if len(m.CapabilityAdd) > 0 {
  3714. for _, s := range m.CapabilityAdd {
  3715. l = len(s)
  3716. n += 2 + l + sovSpecs(uint64(l))
  3717. }
  3718. }
  3719. if len(m.CapabilityDrop) > 0 {
  3720. for _, s := range m.CapabilityDrop {
  3721. l = len(s)
  3722. n += 2 + l + sovSpecs(uint64(l))
  3723. }
  3724. }
  3725. if len(m.Ulimits) > 0 {
  3726. for _, e := range m.Ulimits {
  3727. l = e.Size()
  3728. n += 2 + l + sovSpecs(uint64(l))
  3729. }
  3730. }
  3731. return n
  3732. }
  3733. func (m *ContainerSpec_PullOptions) Size() (n int) {
  3734. if m == nil {
  3735. return 0
  3736. }
  3737. var l int
  3738. _ = l
  3739. l = len(m.RegistryAuth)
  3740. if l > 0 {
  3741. n += 2 + l + sovSpecs(uint64(l))
  3742. }
  3743. return n
  3744. }
  3745. func (m *ContainerSpec_DNSConfig) Size() (n int) {
  3746. if m == nil {
  3747. return 0
  3748. }
  3749. var l int
  3750. _ = l
  3751. if len(m.Nameservers) > 0 {
  3752. for _, s := range m.Nameservers {
  3753. l = len(s)
  3754. n += 1 + l + sovSpecs(uint64(l))
  3755. }
  3756. }
  3757. if len(m.Search) > 0 {
  3758. for _, s := range m.Search {
  3759. l = len(s)
  3760. n += 1 + l + sovSpecs(uint64(l))
  3761. }
  3762. }
  3763. if len(m.Options) > 0 {
  3764. for _, s := range m.Options {
  3765. l = len(s)
  3766. n += 1 + l + sovSpecs(uint64(l))
  3767. }
  3768. }
  3769. return n
  3770. }
  3771. func (m *ContainerSpec_Ulimit) Size() (n int) {
  3772. if m == nil {
  3773. return 0
  3774. }
  3775. var l int
  3776. _ = l
  3777. l = len(m.Name)
  3778. if l > 0 {
  3779. n += 1 + l + sovSpecs(uint64(l))
  3780. }
  3781. if m.Soft != 0 {
  3782. n += 1 + sovSpecs(uint64(m.Soft))
  3783. }
  3784. if m.Hard != 0 {
  3785. n += 1 + sovSpecs(uint64(m.Hard))
  3786. }
  3787. return n
  3788. }
  3789. func (m *EndpointSpec) Size() (n int) {
  3790. if m == nil {
  3791. return 0
  3792. }
  3793. var l int
  3794. _ = l
  3795. if m.Mode != 0 {
  3796. n += 1 + sovSpecs(uint64(m.Mode))
  3797. }
  3798. if len(m.Ports) > 0 {
  3799. for _, e := range m.Ports {
  3800. l = e.Size()
  3801. n += 1 + l + sovSpecs(uint64(l))
  3802. }
  3803. }
  3804. return n
  3805. }
  3806. func (m *NetworkSpec) Size() (n int) {
  3807. if m == nil {
  3808. return 0
  3809. }
  3810. var l int
  3811. _ = l
  3812. l = m.Annotations.Size()
  3813. n += 1 + l + sovSpecs(uint64(l))
  3814. if m.DriverConfig != nil {
  3815. l = m.DriverConfig.Size()
  3816. n += 1 + l + sovSpecs(uint64(l))
  3817. }
  3818. if m.Ipv6Enabled {
  3819. n += 2
  3820. }
  3821. if m.Internal {
  3822. n += 2
  3823. }
  3824. if m.IPAM != nil {
  3825. l = m.IPAM.Size()
  3826. n += 1 + l + sovSpecs(uint64(l))
  3827. }
  3828. if m.Attachable {
  3829. n += 2
  3830. }
  3831. if m.Ingress {
  3832. n += 2
  3833. }
  3834. if m.ConfigFrom != nil {
  3835. n += m.ConfigFrom.Size()
  3836. }
  3837. return n
  3838. }
  3839. func (m *NetworkSpec_Network) Size() (n int) {
  3840. if m == nil {
  3841. return 0
  3842. }
  3843. var l int
  3844. _ = l
  3845. l = len(m.Network)
  3846. n += 1 + l + sovSpecs(uint64(l))
  3847. return n
  3848. }
  3849. func (m *ClusterSpec) Size() (n int) {
  3850. if m == nil {
  3851. return 0
  3852. }
  3853. var l int
  3854. _ = l
  3855. l = m.Annotations.Size()
  3856. n += 1 + l + sovSpecs(uint64(l))
  3857. l = m.AcceptancePolicy.Size()
  3858. n += 1 + l + sovSpecs(uint64(l))
  3859. l = m.Orchestration.Size()
  3860. n += 1 + l + sovSpecs(uint64(l))
  3861. l = m.Raft.Size()
  3862. n += 1 + l + sovSpecs(uint64(l))
  3863. l = m.Dispatcher.Size()
  3864. n += 1 + l + sovSpecs(uint64(l))
  3865. l = m.CAConfig.Size()
  3866. n += 1 + l + sovSpecs(uint64(l))
  3867. l = m.TaskDefaults.Size()
  3868. n += 1 + l + sovSpecs(uint64(l))
  3869. l = m.EncryptionConfig.Size()
  3870. n += 1 + l + sovSpecs(uint64(l))
  3871. return n
  3872. }
  3873. func (m *SecretSpec) Size() (n int) {
  3874. if m == nil {
  3875. return 0
  3876. }
  3877. var l int
  3878. _ = l
  3879. l = m.Annotations.Size()
  3880. n += 1 + l + sovSpecs(uint64(l))
  3881. l = len(m.Data)
  3882. if l > 0 {
  3883. n += 1 + l + sovSpecs(uint64(l))
  3884. }
  3885. if m.Templating != nil {
  3886. l = m.Templating.Size()
  3887. n += 1 + l + sovSpecs(uint64(l))
  3888. }
  3889. if m.Driver != nil {
  3890. l = m.Driver.Size()
  3891. n += 1 + l + sovSpecs(uint64(l))
  3892. }
  3893. return n
  3894. }
  3895. func (m *ConfigSpec) Size() (n int) {
  3896. if m == nil {
  3897. return 0
  3898. }
  3899. var l int
  3900. _ = l
  3901. l = m.Annotations.Size()
  3902. n += 1 + l + sovSpecs(uint64(l))
  3903. l = len(m.Data)
  3904. if l > 0 {
  3905. n += 1 + l + sovSpecs(uint64(l))
  3906. }
  3907. if m.Templating != nil {
  3908. l = m.Templating.Size()
  3909. n += 1 + l + sovSpecs(uint64(l))
  3910. }
  3911. return n
  3912. }
  3913. func sovSpecs(x uint64) (n int) {
  3914. for {
  3915. n++
  3916. x >>= 7
  3917. if x == 0 {
  3918. break
  3919. }
  3920. }
  3921. return n
  3922. }
  3923. func sozSpecs(x uint64) (n int) {
  3924. return sovSpecs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  3925. }
  3926. func (this *NodeSpec) String() string {
  3927. if this == nil {
  3928. return "nil"
  3929. }
  3930. s := strings.Join([]string{`&NodeSpec{`,
  3931. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  3932. `DesiredRole:` + fmt.Sprintf("%v", this.DesiredRole) + `,`,
  3933. `Membership:` + fmt.Sprintf("%v", this.Membership) + `,`,
  3934. `Availability:` + fmt.Sprintf("%v", this.Availability) + `,`,
  3935. `}`,
  3936. }, "")
  3937. return s
  3938. }
  3939. func (this *ServiceSpec) String() string {
  3940. if this == nil {
  3941. return "nil"
  3942. }
  3943. s := strings.Join([]string{`&ServiceSpec{`,
  3944. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  3945. `Task:` + strings.Replace(strings.Replace(this.Task.String(), "TaskSpec", "TaskSpec", 1), `&`, ``, 1) + `,`,
  3946. `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
  3947. `Update:` + strings.Replace(fmt.Sprintf("%v", this.Update), "UpdateConfig", "UpdateConfig", 1) + `,`,
  3948. `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachmentConfig", "NetworkAttachmentConfig", 1) + `,`,
  3949. `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "EndpointSpec", "EndpointSpec", 1) + `,`,
  3950. `Rollback:` + strings.Replace(fmt.Sprintf("%v", this.Rollback), "UpdateConfig", "UpdateConfig", 1) + `,`,
  3951. `}`,
  3952. }, "")
  3953. return s
  3954. }
  3955. func (this *ServiceSpec_Replicated) String() string {
  3956. if this == nil {
  3957. return "nil"
  3958. }
  3959. s := strings.Join([]string{`&ServiceSpec_Replicated{`,
  3960. `Replicated:` + strings.Replace(fmt.Sprintf("%v", this.Replicated), "ReplicatedService", "ReplicatedService", 1) + `,`,
  3961. `}`,
  3962. }, "")
  3963. return s
  3964. }
  3965. func (this *ServiceSpec_Global) String() string {
  3966. if this == nil {
  3967. return "nil"
  3968. }
  3969. s := strings.Join([]string{`&ServiceSpec_Global{`,
  3970. `Global:` + strings.Replace(fmt.Sprintf("%v", this.Global), "GlobalService", "GlobalService", 1) + `,`,
  3971. `}`,
  3972. }, "")
  3973. return s
  3974. }
  3975. func (this *ServiceSpec_ReplicatedJob) String() string {
  3976. if this == nil {
  3977. return "nil"
  3978. }
  3979. s := strings.Join([]string{`&ServiceSpec_ReplicatedJob{`,
  3980. `ReplicatedJob:` + strings.Replace(fmt.Sprintf("%v", this.ReplicatedJob), "ReplicatedJob", "ReplicatedJob", 1) + `,`,
  3981. `}`,
  3982. }, "")
  3983. return s
  3984. }
  3985. func (this *ServiceSpec_GlobalJob) String() string {
  3986. if this == nil {
  3987. return "nil"
  3988. }
  3989. s := strings.Join([]string{`&ServiceSpec_GlobalJob{`,
  3990. `GlobalJob:` + strings.Replace(fmt.Sprintf("%v", this.GlobalJob), "GlobalJob", "GlobalJob", 1) + `,`,
  3991. `}`,
  3992. }, "")
  3993. return s
  3994. }
  3995. func (this *ReplicatedService) String() string {
  3996. if this == nil {
  3997. return "nil"
  3998. }
  3999. s := strings.Join([]string{`&ReplicatedService{`,
  4000. `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
  4001. `}`,
  4002. }, "")
  4003. return s
  4004. }
  4005. func (this *GlobalService) String() string {
  4006. if this == nil {
  4007. return "nil"
  4008. }
  4009. s := strings.Join([]string{`&GlobalService{`,
  4010. `}`,
  4011. }, "")
  4012. return s
  4013. }
  4014. func (this *ReplicatedJob) String() string {
  4015. if this == nil {
  4016. return "nil"
  4017. }
  4018. s := strings.Join([]string{`&ReplicatedJob{`,
  4019. `MaxConcurrent:` + fmt.Sprintf("%v", this.MaxConcurrent) + `,`,
  4020. `TotalCompletions:` + fmt.Sprintf("%v", this.TotalCompletions) + `,`,
  4021. `}`,
  4022. }, "")
  4023. return s
  4024. }
  4025. func (this *GlobalJob) String() string {
  4026. if this == nil {
  4027. return "nil"
  4028. }
  4029. s := strings.Join([]string{`&GlobalJob{`,
  4030. `}`,
  4031. }, "")
  4032. return s
  4033. }
  4034. func (this *TaskSpec) String() string {
  4035. if this == nil {
  4036. return "nil"
  4037. }
  4038. s := strings.Join([]string{`&TaskSpec{`,
  4039. `Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`,
  4040. `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "ResourceRequirements", "ResourceRequirements", 1) + `,`,
  4041. `Restart:` + strings.Replace(fmt.Sprintf("%v", this.Restart), "RestartPolicy", "RestartPolicy", 1) + `,`,
  4042. `Placement:` + strings.Replace(fmt.Sprintf("%v", this.Placement), "Placement", "Placement", 1) + `,`,
  4043. `LogDriver:` + strings.Replace(fmt.Sprintf("%v", this.LogDriver), "Driver", "Driver", 1) + `,`,
  4044. `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachmentConfig", "NetworkAttachmentConfig", 1) + `,`,
  4045. `ForceUpdate:` + fmt.Sprintf("%v", this.ForceUpdate) + `,`,
  4046. `ResourceReferences:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResourceReferences), "ResourceReference", "ResourceReference", 1), `&`, ``, 1) + `,`,
  4047. `}`,
  4048. }, "")
  4049. return s
  4050. }
  4051. func (this *TaskSpec_Container) String() string {
  4052. if this == nil {
  4053. return "nil"
  4054. }
  4055. s := strings.Join([]string{`&TaskSpec_Container{`,
  4056. `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerSpec", "ContainerSpec", 1) + `,`,
  4057. `}`,
  4058. }, "")
  4059. return s
  4060. }
  4061. func (this *TaskSpec_Attachment) String() string {
  4062. if this == nil {
  4063. return "nil"
  4064. }
  4065. s := strings.Join([]string{`&TaskSpec_Attachment{`,
  4066. `Attachment:` + strings.Replace(fmt.Sprintf("%v", this.Attachment), "NetworkAttachmentSpec", "NetworkAttachmentSpec", 1) + `,`,
  4067. `}`,
  4068. }, "")
  4069. return s
  4070. }
  4071. func (this *TaskSpec_Generic) String() string {
  4072. if this == nil {
  4073. return "nil"
  4074. }
  4075. s := strings.Join([]string{`&TaskSpec_Generic{`,
  4076. `Generic:` + strings.Replace(fmt.Sprintf("%v", this.Generic), "GenericRuntimeSpec", "GenericRuntimeSpec", 1) + `,`,
  4077. `}`,
  4078. }, "")
  4079. return s
  4080. }
  4081. func (this *ResourceReference) String() string {
  4082. if this == nil {
  4083. return "nil"
  4084. }
  4085. s := strings.Join([]string{`&ResourceReference{`,
  4086. `ResourceID:` + fmt.Sprintf("%v", this.ResourceID) + `,`,
  4087. `ResourceType:` + fmt.Sprintf("%v", this.ResourceType) + `,`,
  4088. `}`,
  4089. }, "")
  4090. return s
  4091. }
  4092. func (this *GenericRuntimeSpec) String() string {
  4093. if this == nil {
  4094. return "nil"
  4095. }
  4096. s := strings.Join([]string{`&GenericRuntimeSpec{`,
  4097. `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`,
  4098. `Payload:` + strings.Replace(fmt.Sprintf("%v", this.Payload), "Any", "types.Any", 1) + `,`,
  4099. `}`,
  4100. }, "")
  4101. return s
  4102. }
  4103. func (this *NetworkAttachmentSpec) String() string {
  4104. if this == nil {
  4105. return "nil"
  4106. }
  4107. s := strings.Join([]string{`&NetworkAttachmentSpec{`,
  4108. `ContainerID:` + fmt.Sprintf("%v", this.ContainerID) + `,`,
  4109. `}`,
  4110. }, "")
  4111. return s
  4112. }
  4113. func (this *ContainerSpec) String() string {
  4114. if this == nil {
  4115. return "nil"
  4116. }
  4117. keysForLabels := make([]string, 0, len(this.Labels))
  4118. for k, _ := range this.Labels {
  4119. keysForLabels = append(keysForLabels, k)
  4120. }
  4121. github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
  4122. mapStringForLabels := "map[string]string{"
  4123. for _, k := range keysForLabels {
  4124. mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
  4125. }
  4126. mapStringForLabels += "}"
  4127. keysForSysctls := make([]string, 0, len(this.Sysctls))
  4128. for k, _ := range this.Sysctls {
  4129. keysForSysctls = append(keysForSysctls, k)
  4130. }
  4131. github_com_gogo_protobuf_sortkeys.Strings(keysForSysctls)
  4132. mapStringForSysctls := "map[string]string{"
  4133. for _, k := range keysForSysctls {
  4134. mapStringForSysctls += fmt.Sprintf("%v: %v,", k, this.Sysctls[k])
  4135. }
  4136. mapStringForSysctls += "}"
  4137. s := strings.Join([]string{`&ContainerSpec{`,
  4138. `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
  4139. `Labels:` + mapStringForLabels + `,`,
  4140. `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
  4141. `Args:` + fmt.Sprintf("%v", this.Args) + `,`,
  4142. `Env:` + fmt.Sprintf("%v", this.Env) + `,`,
  4143. `Dir:` + fmt.Sprintf("%v", this.Dir) + `,`,
  4144. `User:` + fmt.Sprintf("%v", this.User) + `,`,
  4145. `Mounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1), `&`, ``, 1) + `,`,
  4146. `StopGracePeriod:` + strings.Replace(fmt.Sprintf("%v", this.StopGracePeriod), "Duration", "types.Duration", 1) + `,`,
  4147. `PullOptions:` + strings.Replace(fmt.Sprintf("%v", this.PullOptions), "ContainerSpec_PullOptions", "ContainerSpec_PullOptions", 1) + `,`,
  4148. `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`,
  4149. `Secrets:` + strings.Replace(fmt.Sprintf("%v", this.Secrets), "SecretReference", "SecretReference", 1) + `,`,
  4150. `TTY:` + fmt.Sprintf("%v", this.TTY) + `,`,
  4151. `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`,
  4152. `DNSConfig:` + strings.Replace(fmt.Sprintf("%v", this.DNSConfig), "ContainerSpec_DNSConfig", "ContainerSpec_DNSConfig", 1) + `,`,
  4153. `Healthcheck:` + strings.Replace(fmt.Sprintf("%v", this.Healthcheck), "HealthConfig", "HealthConfig", 1) + `,`,
  4154. `Hosts:` + fmt.Sprintf("%v", this.Hosts) + `,`,
  4155. `OpenStdin:` + fmt.Sprintf("%v", this.OpenStdin) + `,`,
  4156. `ReadOnly:` + fmt.Sprintf("%v", this.ReadOnly) + `,`,
  4157. `StopSignal:` + fmt.Sprintf("%v", this.StopSignal) + `,`,
  4158. `Configs:` + strings.Replace(fmt.Sprintf("%v", this.Configs), "ConfigReference", "ConfigReference", 1) + `,`,
  4159. `Privileges:` + strings.Replace(fmt.Sprintf("%v", this.Privileges), "Privileges", "Privileges", 1) + `,`,
  4160. `Init:` + strings.Replace(fmt.Sprintf("%v", this.Init), "BoolValue", "types.BoolValue", 1) + `,`,
  4161. `Isolation:` + fmt.Sprintf("%v", this.Isolation) + `,`,
  4162. `PidsLimit:` + fmt.Sprintf("%v", this.PidsLimit) + `,`,
  4163. `Sysctls:` + mapStringForSysctls + `,`,
  4164. `CapabilityAdd:` + fmt.Sprintf("%v", this.CapabilityAdd) + `,`,
  4165. `CapabilityDrop:` + fmt.Sprintf("%v", this.CapabilityDrop) + `,`,
  4166. `Ulimits:` + strings.Replace(fmt.Sprintf("%v", this.Ulimits), "ContainerSpec_Ulimit", "ContainerSpec_Ulimit", 1) + `,`,
  4167. `}`,
  4168. }, "")
  4169. return s
  4170. }
  4171. func (this *ContainerSpec_PullOptions) String() string {
  4172. if this == nil {
  4173. return "nil"
  4174. }
  4175. s := strings.Join([]string{`&ContainerSpec_PullOptions{`,
  4176. `RegistryAuth:` + fmt.Sprintf("%v", this.RegistryAuth) + `,`,
  4177. `}`,
  4178. }, "")
  4179. return s
  4180. }
  4181. func (this *ContainerSpec_DNSConfig) String() string {
  4182. if this == nil {
  4183. return "nil"
  4184. }
  4185. s := strings.Join([]string{`&ContainerSpec_DNSConfig{`,
  4186. `Nameservers:` + fmt.Sprintf("%v", this.Nameservers) + `,`,
  4187. `Search:` + fmt.Sprintf("%v", this.Search) + `,`,
  4188. `Options:` + fmt.Sprintf("%v", this.Options) + `,`,
  4189. `}`,
  4190. }, "")
  4191. return s
  4192. }
  4193. func (this *ContainerSpec_Ulimit) String() string {
  4194. if this == nil {
  4195. return "nil"
  4196. }
  4197. s := strings.Join([]string{`&ContainerSpec_Ulimit{`,
  4198. `Name:` + fmt.Sprintf("%v", this.Name) + `,`,
  4199. `Soft:` + fmt.Sprintf("%v", this.Soft) + `,`,
  4200. `Hard:` + fmt.Sprintf("%v", this.Hard) + `,`,
  4201. `}`,
  4202. }, "")
  4203. return s
  4204. }
  4205. func (this *EndpointSpec) String() string {
  4206. if this == nil {
  4207. return "nil"
  4208. }
  4209. s := strings.Join([]string{`&EndpointSpec{`,
  4210. `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
  4211. `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "PortConfig", "PortConfig", 1) + `,`,
  4212. `}`,
  4213. }, "")
  4214. return s
  4215. }
  4216. func (this *NetworkSpec) String() string {
  4217. if this == nil {
  4218. return "nil"
  4219. }
  4220. s := strings.Join([]string{`&NetworkSpec{`,
  4221. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  4222. `DriverConfig:` + strings.Replace(fmt.Sprintf("%v", this.DriverConfig), "Driver", "Driver", 1) + `,`,
  4223. `Ipv6Enabled:` + fmt.Sprintf("%v", this.Ipv6Enabled) + `,`,
  4224. `Internal:` + fmt.Sprintf("%v", this.Internal) + `,`,
  4225. `IPAM:` + strings.Replace(fmt.Sprintf("%v", this.IPAM), "IPAMOptions", "IPAMOptions", 1) + `,`,
  4226. `Attachable:` + fmt.Sprintf("%v", this.Attachable) + `,`,
  4227. `Ingress:` + fmt.Sprintf("%v", this.Ingress) + `,`,
  4228. `ConfigFrom:` + fmt.Sprintf("%v", this.ConfigFrom) + `,`,
  4229. `}`,
  4230. }, "")
  4231. return s
  4232. }
  4233. func (this *NetworkSpec_Network) String() string {
  4234. if this == nil {
  4235. return "nil"
  4236. }
  4237. s := strings.Join([]string{`&NetworkSpec_Network{`,
  4238. `Network:` + fmt.Sprintf("%v", this.Network) + `,`,
  4239. `}`,
  4240. }, "")
  4241. return s
  4242. }
  4243. func (this *ClusterSpec) String() string {
  4244. if this == nil {
  4245. return "nil"
  4246. }
  4247. s := strings.Join([]string{`&ClusterSpec{`,
  4248. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  4249. `AcceptancePolicy:` + strings.Replace(strings.Replace(this.AcceptancePolicy.String(), "AcceptancePolicy", "AcceptancePolicy", 1), `&`, ``, 1) + `,`,
  4250. `Orchestration:` + strings.Replace(strings.Replace(this.Orchestration.String(), "OrchestrationConfig", "OrchestrationConfig", 1), `&`, ``, 1) + `,`,
  4251. `Raft:` + strings.Replace(strings.Replace(this.Raft.String(), "RaftConfig", "RaftConfig", 1), `&`, ``, 1) + `,`,
  4252. `Dispatcher:` + strings.Replace(strings.Replace(this.Dispatcher.String(), "DispatcherConfig", "DispatcherConfig", 1), `&`, ``, 1) + `,`,
  4253. `CAConfig:` + strings.Replace(strings.Replace(this.CAConfig.String(), "CAConfig", "CAConfig", 1), `&`, ``, 1) + `,`,
  4254. `TaskDefaults:` + strings.Replace(strings.Replace(this.TaskDefaults.String(), "TaskDefaults", "TaskDefaults", 1), `&`, ``, 1) + `,`,
  4255. `EncryptionConfig:` + strings.Replace(strings.Replace(this.EncryptionConfig.String(), "EncryptionConfig", "EncryptionConfig", 1), `&`, ``, 1) + `,`,
  4256. `}`,
  4257. }, "")
  4258. return s
  4259. }
  4260. func (this *SecretSpec) String() string {
  4261. if this == nil {
  4262. return "nil"
  4263. }
  4264. s := strings.Join([]string{`&SecretSpec{`,
  4265. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  4266. `Data:` + fmt.Sprintf("%v", this.Data) + `,`,
  4267. `Templating:` + strings.Replace(fmt.Sprintf("%v", this.Templating), "Driver", "Driver", 1) + `,`,
  4268. `Driver:` + strings.Replace(fmt.Sprintf("%v", this.Driver), "Driver", "Driver", 1) + `,`,
  4269. `}`,
  4270. }, "")
  4271. return s
  4272. }
  4273. func (this *ConfigSpec) String() string {
  4274. if this == nil {
  4275. return "nil"
  4276. }
  4277. s := strings.Join([]string{`&ConfigSpec{`,
  4278. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  4279. `Data:` + fmt.Sprintf("%v", this.Data) + `,`,
  4280. `Templating:` + strings.Replace(fmt.Sprintf("%v", this.Templating), "Driver", "Driver", 1) + `,`,
  4281. `}`,
  4282. }, "")
  4283. return s
  4284. }
  4285. func valueToStringSpecs(v interface{}) string {
  4286. rv := reflect.ValueOf(v)
  4287. if rv.IsNil() {
  4288. return "nil"
  4289. }
  4290. pv := reflect.Indirect(rv).Interface()
  4291. return fmt.Sprintf("*%v", pv)
  4292. }
  4293. func (m *NodeSpec) Unmarshal(dAtA []byte) error {
  4294. l := len(dAtA)
  4295. iNdEx := 0
  4296. for iNdEx < l {
  4297. preIndex := iNdEx
  4298. var wire uint64
  4299. for shift := uint(0); ; shift += 7 {
  4300. if shift >= 64 {
  4301. return ErrIntOverflowSpecs
  4302. }
  4303. if iNdEx >= l {
  4304. return io.ErrUnexpectedEOF
  4305. }
  4306. b := dAtA[iNdEx]
  4307. iNdEx++
  4308. wire |= uint64(b&0x7F) << shift
  4309. if b < 0x80 {
  4310. break
  4311. }
  4312. }
  4313. fieldNum := int32(wire >> 3)
  4314. wireType := int(wire & 0x7)
  4315. if wireType == 4 {
  4316. return fmt.Errorf("proto: NodeSpec: wiretype end group for non-group")
  4317. }
  4318. if fieldNum <= 0 {
  4319. return fmt.Errorf("proto: NodeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  4320. }
  4321. switch fieldNum {
  4322. case 1:
  4323. if wireType != 2 {
  4324. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  4325. }
  4326. var msglen int
  4327. for shift := uint(0); ; shift += 7 {
  4328. if shift >= 64 {
  4329. return ErrIntOverflowSpecs
  4330. }
  4331. if iNdEx >= l {
  4332. return io.ErrUnexpectedEOF
  4333. }
  4334. b := dAtA[iNdEx]
  4335. iNdEx++
  4336. msglen |= int(b&0x7F) << shift
  4337. if b < 0x80 {
  4338. break
  4339. }
  4340. }
  4341. if msglen < 0 {
  4342. return ErrInvalidLengthSpecs
  4343. }
  4344. postIndex := iNdEx + msglen
  4345. if postIndex < 0 {
  4346. return ErrInvalidLengthSpecs
  4347. }
  4348. if postIndex > l {
  4349. return io.ErrUnexpectedEOF
  4350. }
  4351. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4352. return err
  4353. }
  4354. iNdEx = postIndex
  4355. case 2:
  4356. if wireType != 0 {
  4357. return fmt.Errorf("proto: wrong wireType = %d for field DesiredRole", wireType)
  4358. }
  4359. m.DesiredRole = 0
  4360. for shift := uint(0); ; shift += 7 {
  4361. if shift >= 64 {
  4362. return ErrIntOverflowSpecs
  4363. }
  4364. if iNdEx >= l {
  4365. return io.ErrUnexpectedEOF
  4366. }
  4367. b := dAtA[iNdEx]
  4368. iNdEx++
  4369. m.DesiredRole |= NodeRole(b&0x7F) << shift
  4370. if b < 0x80 {
  4371. break
  4372. }
  4373. }
  4374. case 3:
  4375. if wireType != 0 {
  4376. return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
  4377. }
  4378. m.Membership = 0
  4379. for shift := uint(0); ; shift += 7 {
  4380. if shift >= 64 {
  4381. return ErrIntOverflowSpecs
  4382. }
  4383. if iNdEx >= l {
  4384. return io.ErrUnexpectedEOF
  4385. }
  4386. b := dAtA[iNdEx]
  4387. iNdEx++
  4388. m.Membership |= NodeSpec_Membership(b&0x7F) << shift
  4389. if b < 0x80 {
  4390. break
  4391. }
  4392. }
  4393. case 4:
  4394. if wireType != 0 {
  4395. return fmt.Errorf("proto: wrong wireType = %d for field Availability", wireType)
  4396. }
  4397. m.Availability = 0
  4398. for shift := uint(0); ; shift += 7 {
  4399. if shift >= 64 {
  4400. return ErrIntOverflowSpecs
  4401. }
  4402. if iNdEx >= l {
  4403. return io.ErrUnexpectedEOF
  4404. }
  4405. b := dAtA[iNdEx]
  4406. iNdEx++
  4407. m.Availability |= NodeSpec_Availability(b&0x7F) << shift
  4408. if b < 0x80 {
  4409. break
  4410. }
  4411. }
  4412. default:
  4413. iNdEx = preIndex
  4414. skippy, err := skipSpecs(dAtA[iNdEx:])
  4415. if err != nil {
  4416. return err
  4417. }
  4418. if skippy < 0 {
  4419. return ErrInvalidLengthSpecs
  4420. }
  4421. if (iNdEx + skippy) < 0 {
  4422. return ErrInvalidLengthSpecs
  4423. }
  4424. if (iNdEx + skippy) > l {
  4425. return io.ErrUnexpectedEOF
  4426. }
  4427. iNdEx += skippy
  4428. }
  4429. }
  4430. if iNdEx > l {
  4431. return io.ErrUnexpectedEOF
  4432. }
  4433. return nil
  4434. }
  4435. func (m *ServiceSpec) Unmarshal(dAtA []byte) error {
  4436. l := len(dAtA)
  4437. iNdEx := 0
  4438. for iNdEx < l {
  4439. preIndex := iNdEx
  4440. var wire uint64
  4441. for shift := uint(0); ; shift += 7 {
  4442. if shift >= 64 {
  4443. return ErrIntOverflowSpecs
  4444. }
  4445. if iNdEx >= l {
  4446. return io.ErrUnexpectedEOF
  4447. }
  4448. b := dAtA[iNdEx]
  4449. iNdEx++
  4450. wire |= uint64(b&0x7F) << shift
  4451. if b < 0x80 {
  4452. break
  4453. }
  4454. }
  4455. fieldNum := int32(wire >> 3)
  4456. wireType := int(wire & 0x7)
  4457. if wireType == 4 {
  4458. return fmt.Errorf("proto: ServiceSpec: wiretype end group for non-group")
  4459. }
  4460. if fieldNum <= 0 {
  4461. return fmt.Errorf("proto: ServiceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  4462. }
  4463. switch fieldNum {
  4464. case 1:
  4465. if wireType != 2 {
  4466. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  4467. }
  4468. var msglen int
  4469. for shift := uint(0); ; shift += 7 {
  4470. if shift >= 64 {
  4471. return ErrIntOverflowSpecs
  4472. }
  4473. if iNdEx >= l {
  4474. return io.ErrUnexpectedEOF
  4475. }
  4476. b := dAtA[iNdEx]
  4477. iNdEx++
  4478. msglen |= int(b&0x7F) << shift
  4479. if b < 0x80 {
  4480. break
  4481. }
  4482. }
  4483. if msglen < 0 {
  4484. return ErrInvalidLengthSpecs
  4485. }
  4486. postIndex := iNdEx + msglen
  4487. if postIndex < 0 {
  4488. return ErrInvalidLengthSpecs
  4489. }
  4490. if postIndex > l {
  4491. return io.ErrUnexpectedEOF
  4492. }
  4493. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4494. return err
  4495. }
  4496. iNdEx = postIndex
  4497. case 2:
  4498. if wireType != 2 {
  4499. return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
  4500. }
  4501. var msglen int
  4502. for shift := uint(0); ; shift += 7 {
  4503. if shift >= 64 {
  4504. return ErrIntOverflowSpecs
  4505. }
  4506. if iNdEx >= l {
  4507. return io.ErrUnexpectedEOF
  4508. }
  4509. b := dAtA[iNdEx]
  4510. iNdEx++
  4511. msglen |= int(b&0x7F) << shift
  4512. if b < 0x80 {
  4513. break
  4514. }
  4515. }
  4516. if msglen < 0 {
  4517. return ErrInvalidLengthSpecs
  4518. }
  4519. postIndex := iNdEx + msglen
  4520. if postIndex < 0 {
  4521. return ErrInvalidLengthSpecs
  4522. }
  4523. if postIndex > l {
  4524. return io.ErrUnexpectedEOF
  4525. }
  4526. if err := m.Task.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4527. return err
  4528. }
  4529. iNdEx = postIndex
  4530. case 3:
  4531. if wireType != 2 {
  4532. return fmt.Errorf("proto: wrong wireType = %d for field Replicated", wireType)
  4533. }
  4534. var msglen int
  4535. for shift := uint(0); ; shift += 7 {
  4536. if shift >= 64 {
  4537. return ErrIntOverflowSpecs
  4538. }
  4539. if iNdEx >= l {
  4540. return io.ErrUnexpectedEOF
  4541. }
  4542. b := dAtA[iNdEx]
  4543. iNdEx++
  4544. msglen |= int(b&0x7F) << shift
  4545. if b < 0x80 {
  4546. break
  4547. }
  4548. }
  4549. if msglen < 0 {
  4550. return ErrInvalidLengthSpecs
  4551. }
  4552. postIndex := iNdEx + msglen
  4553. if postIndex < 0 {
  4554. return ErrInvalidLengthSpecs
  4555. }
  4556. if postIndex > l {
  4557. return io.ErrUnexpectedEOF
  4558. }
  4559. v := &ReplicatedService{}
  4560. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4561. return err
  4562. }
  4563. m.Mode = &ServiceSpec_Replicated{v}
  4564. iNdEx = postIndex
  4565. case 4:
  4566. if wireType != 2 {
  4567. return fmt.Errorf("proto: wrong wireType = %d for field Global", wireType)
  4568. }
  4569. var msglen int
  4570. for shift := uint(0); ; shift += 7 {
  4571. if shift >= 64 {
  4572. return ErrIntOverflowSpecs
  4573. }
  4574. if iNdEx >= l {
  4575. return io.ErrUnexpectedEOF
  4576. }
  4577. b := dAtA[iNdEx]
  4578. iNdEx++
  4579. msglen |= int(b&0x7F) << shift
  4580. if b < 0x80 {
  4581. break
  4582. }
  4583. }
  4584. if msglen < 0 {
  4585. return ErrInvalidLengthSpecs
  4586. }
  4587. postIndex := iNdEx + msglen
  4588. if postIndex < 0 {
  4589. return ErrInvalidLengthSpecs
  4590. }
  4591. if postIndex > l {
  4592. return io.ErrUnexpectedEOF
  4593. }
  4594. v := &GlobalService{}
  4595. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4596. return err
  4597. }
  4598. m.Mode = &ServiceSpec_Global{v}
  4599. iNdEx = postIndex
  4600. case 6:
  4601. if wireType != 2 {
  4602. return fmt.Errorf("proto: wrong wireType = %d for field Update", wireType)
  4603. }
  4604. var msglen int
  4605. for shift := uint(0); ; shift += 7 {
  4606. if shift >= 64 {
  4607. return ErrIntOverflowSpecs
  4608. }
  4609. if iNdEx >= l {
  4610. return io.ErrUnexpectedEOF
  4611. }
  4612. b := dAtA[iNdEx]
  4613. iNdEx++
  4614. msglen |= int(b&0x7F) << shift
  4615. if b < 0x80 {
  4616. break
  4617. }
  4618. }
  4619. if msglen < 0 {
  4620. return ErrInvalidLengthSpecs
  4621. }
  4622. postIndex := iNdEx + msglen
  4623. if postIndex < 0 {
  4624. return ErrInvalidLengthSpecs
  4625. }
  4626. if postIndex > l {
  4627. return io.ErrUnexpectedEOF
  4628. }
  4629. if m.Update == nil {
  4630. m.Update = &UpdateConfig{}
  4631. }
  4632. if err := m.Update.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4633. return err
  4634. }
  4635. iNdEx = postIndex
  4636. case 7:
  4637. if wireType != 2 {
  4638. return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
  4639. }
  4640. var msglen int
  4641. for shift := uint(0); ; shift += 7 {
  4642. if shift >= 64 {
  4643. return ErrIntOverflowSpecs
  4644. }
  4645. if iNdEx >= l {
  4646. return io.ErrUnexpectedEOF
  4647. }
  4648. b := dAtA[iNdEx]
  4649. iNdEx++
  4650. msglen |= int(b&0x7F) << shift
  4651. if b < 0x80 {
  4652. break
  4653. }
  4654. }
  4655. if msglen < 0 {
  4656. return ErrInvalidLengthSpecs
  4657. }
  4658. postIndex := iNdEx + msglen
  4659. if postIndex < 0 {
  4660. return ErrInvalidLengthSpecs
  4661. }
  4662. if postIndex > l {
  4663. return io.ErrUnexpectedEOF
  4664. }
  4665. m.Networks = append(m.Networks, &NetworkAttachmentConfig{})
  4666. if err := m.Networks[len(m.Networks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4667. return err
  4668. }
  4669. iNdEx = postIndex
  4670. case 8:
  4671. if wireType != 2 {
  4672. return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
  4673. }
  4674. var msglen int
  4675. for shift := uint(0); ; shift += 7 {
  4676. if shift >= 64 {
  4677. return ErrIntOverflowSpecs
  4678. }
  4679. if iNdEx >= l {
  4680. return io.ErrUnexpectedEOF
  4681. }
  4682. b := dAtA[iNdEx]
  4683. iNdEx++
  4684. msglen |= int(b&0x7F) << shift
  4685. if b < 0x80 {
  4686. break
  4687. }
  4688. }
  4689. if msglen < 0 {
  4690. return ErrInvalidLengthSpecs
  4691. }
  4692. postIndex := iNdEx + msglen
  4693. if postIndex < 0 {
  4694. return ErrInvalidLengthSpecs
  4695. }
  4696. if postIndex > l {
  4697. return io.ErrUnexpectedEOF
  4698. }
  4699. if m.Endpoint == nil {
  4700. m.Endpoint = &EndpointSpec{}
  4701. }
  4702. if err := m.Endpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4703. return err
  4704. }
  4705. iNdEx = postIndex
  4706. case 9:
  4707. if wireType != 2 {
  4708. return fmt.Errorf("proto: wrong wireType = %d for field Rollback", wireType)
  4709. }
  4710. var msglen int
  4711. for shift := uint(0); ; shift += 7 {
  4712. if shift >= 64 {
  4713. return ErrIntOverflowSpecs
  4714. }
  4715. if iNdEx >= l {
  4716. return io.ErrUnexpectedEOF
  4717. }
  4718. b := dAtA[iNdEx]
  4719. iNdEx++
  4720. msglen |= int(b&0x7F) << shift
  4721. if b < 0x80 {
  4722. break
  4723. }
  4724. }
  4725. if msglen < 0 {
  4726. return ErrInvalidLengthSpecs
  4727. }
  4728. postIndex := iNdEx + msglen
  4729. if postIndex < 0 {
  4730. return ErrInvalidLengthSpecs
  4731. }
  4732. if postIndex > l {
  4733. return io.ErrUnexpectedEOF
  4734. }
  4735. if m.Rollback == nil {
  4736. m.Rollback = &UpdateConfig{}
  4737. }
  4738. if err := m.Rollback.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4739. return err
  4740. }
  4741. iNdEx = postIndex
  4742. case 10:
  4743. if wireType != 2 {
  4744. return fmt.Errorf("proto: wrong wireType = %d for field ReplicatedJob", wireType)
  4745. }
  4746. var msglen int
  4747. for shift := uint(0); ; shift += 7 {
  4748. if shift >= 64 {
  4749. return ErrIntOverflowSpecs
  4750. }
  4751. if iNdEx >= l {
  4752. return io.ErrUnexpectedEOF
  4753. }
  4754. b := dAtA[iNdEx]
  4755. iNdEx++
  4756. msglen |= int(b&0x7F) << shift
  4757. if b < 0x80 {
  4758. break
  4759. }
  4760. }
  4761. if msglen < 0 {
  4762. return ErrInvalidLengthSpecs
  4763. }
  4764. postIndex := iNdEx + msglen
  4765. if postIndex < 0 {
  4766. return ErrInvalidLengthSpecs
  4767. }
  4768. if postIndex > l {
  4769. return io.ErrUnexpectedEOF
  4770. }
  4771. v := &ReplicatedJob{}
  4772. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4773. return err
  4774. }
  4775. m.Mode = &ServiceSpec_ReplicatedJob{v}
  4776. iNdEx = postIndex
  4777. case 11:
  4778. if wireType != 2 {
  4779. return fmt.Errorf("proto: wrong wireType = %d for field GlobalJob", wireType)
  4780. }
  4781. var msglen int
  4782. for shift := uint(0); ; shift += 7 {
  4783. if shift >= 64 {
  4784. return ErrIntOverflowSpecs
  4785. }
  4786. if iNdEx >= l {
  4787. return io.ErrUnexpectedEOF
  4788. }
  4789. b := dAtA[iNdEx]
  4790. iNdEx++
  4791. msglen |= int(b&0x7F) << shift
  4792. if b < 0x80 {
  4793. break
  4794. }
  4795. }
  4796. if msglen < 0 {
  4797. return ErrInvalidLengthSpecs
  4798. }
  4799. postIndex := iNdEx + msglen
  4800. if postIndex < 0 {
  4801. return ErrInvalidLengthSpecs
  4802. }
  4803. if postIndex > l {
  4804. return io.ErrUnexpectedEOF
  4805. }
  4806. v := &GlobalJob{}
  4807. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  4808. return err
  4809. }
  4810. m.Mode = &ServiceSpec_GlobalJob{v}
  4811. iNdEx = postIndex
  4812. default:
  4813. iNdEx = preIndex
  4814. skippy, err := skipSpecs(dAtA[iNdEx:])
  4815. if err != nil {
  4816. return err
  4817. }
  4818. if skippy < 0 {
  4819. return ErrInvalidLengthSpecs
  4820. }
  4821. if (iNdEx + skippy) < 0 {
  4822. return ErrInvalidLengthSpecs
  4823. }
  4824. if (iNdEx + skippy) > l {
  4825. return io.ErrUnexpectedEOF
  4826. }
  4827. iNdEx += skippy
  4828. }
  4829. }
  4830. if iNdEx > l {
  4831. return io.ErrUnexpectedEOF
  4832. }
  4833. return nil
  4834. }
  4835. func (m *ReplicatedService) Unmarshal(dAtA []byte) error {
  4836. l := len(dAtA)
  4837. iNdEx := 0
  4838. for iNdEx < l {
  4839. preIndex := iNdEx
  4840. var wire uint64
  4841. for shift := uint(0); ; shift += 7 {
  4842. if shift >= 64 {
  4843. return ErrIntOverflowSpecs
  4844. }
  4845. if iNdEx >= l {
  4846. return io.ErrUnexpectedEOF
  4847. }
  4848. b := dAtA[iNdEx]
  4849. iNdEx++
  4850. wire |= uint64(b&0x7F) << shift
  4851. if b < 0x80 {
  4852. break
  4853. }
  4854. }
  4855. fieldNum := int32(wire >> 3)
  4856. wireType := int(wire & 0x7)
  4857. if wireType == 4 {
  4858. return fmt.Errorf("proto: ReplicatedService: wiretype end group for non-group")
  4859. }
  4860. if fieldNum <= 0 {
  4861. return fmt.Errorf("proto: ReplicatedService: illegal tag %d (wire type %d)", fieldNum, wire)
  4862. }
  4863. switch fieldNum {
  4864. case 1:
  4865. if wireType != 0 {
  4866. return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
  4867. }
  4868. m.Replicas = 0
  4869. for shift := uint(0); ; shift += 7 {
  4870. if shift >= 64 {
  4871. return ErrIntOverflowSpecs
  4872. }
  4873. if iNdEx >= l {
  4874. return io.ErrUnexpectedEOF
  4875. }
  4876. b := dAtA[iNdEx]
  4877. iNdEx++
  4878. m.Replicas |= uint64(b&0x7F) << shift
  4879. if b < 0x80 {
  4880. break
  4881. }
  4882. }
  4883. default:
  4884. iNdEx = preIndex
  4885. skippy, err := skipSpecs(dAtA[iNdEx:])
  4886. if err != nil {
  4887. return err
  4888. }
  4889. if skippy < 0 {
  4890. return ErrInvalidLengthSpecs
  4891. }
  4892. if (iNdEx + skippy) < 0 {
  4893. return ErrInvalidLengthSpecs
  4894. }
  4895. if (iNdEx + skippy) > l {
  4896. return io.ErrUnexpectedEOF
  4897. }
  4898. iNdEx += skippy
  4899. }
  4900. }
  4901. if iNdEx > l {
  4902. return io.ErrUnexpectedEOF
  4903. }
  4904. return nil
  4905. }
  4906. func (m *GlobalService) Unmarshal(dAtA []byte) error {
  4907. l := len(dAtA)
  4908. iNdEx := 0
  4909. for iNdEx < l {
  4910. preIndex := iNdEx
  4911. var wire uint64
  4912. for shift := uint(0); ; shift += 7 {
  4913. if shift >= 64 {
  4914. return ErrIntOverflowSpecs
  4915. }
  4916. if iNdEx >= l {
  4917. return io.ErrUnexpectedEOF
  4918. }
  4919. b := dAtA[iNdEx]
  4920. iNdEx++
  4921. wire |= uint64(b&0x7F) << shift
  4922. if b < 0x80 {
  4923. break
  4924. }
  4925. }
  4926. fieldNum := int32(wire >> 3)
  4927. wireType := int(wire & 0x7)
  4928. if wireType == 4 {
  4929. return fmt.Errorf("proto: GlobalService: wiretype end group for non-group")
  4930. }
  4931. if fieldNum <= 0 {
  4932. return fmt.Errorf("proto: GlobalService: illegal tag %d (wire type %d)", fieldNum, wire)
  4933. }
  4934. switch fieldNum {
  4935. default:
  4936. iNdEx = preIndex
  4937. skippy, err := skipSpecs(dAtA[iNdEx:])
  4938. if err != nil {
  4939. return err
  4940. }
  4941. if skippy < 0 {
  4942. return ErrInvalidLengthSpecs
  4943. }
  4944. if (iNdEx + skippy) < 0 {
  4945. return ErrInvalidLengthSpecs
  4946. }
  4947. if (iNdEx + skippy) > l {
  4948. return io.ErrUnexpectedEOF
  4949. }
  4950. iNdEx += skippy
  4951. }
  4952. }
  4953. if iNdEx > l {
  4954. return io.ErrUnexpectedEOF
  4955. }
  4956. return nil
  4957. }
  4958. func (m *ReplicatedJob) Unmarshal(dAtA []byte) error {
  4959. l := len(dAtA)
  4960. iNdEx := 0
  4961. for iNdEx < l {
  4962. preIndex := iNdEx
  4963. var wire uint64
  4964. for shift := uint(0); ; shift += 7 {
  4965. if shift >= 64 {
  4966. return ErrIntOverflowSpecs
  4967. }
  4968. if iNdEx >= l {
  4969. return io.ErrUnexpectedEOF
  4970. }
  4971. b := dAtA[iNdEx]
  4972. iNdEx++
  4973. wire |= uint64(b&0x7F) << shift
  4974. if b < 0x80 {
  4975. break
  4976. }
  4977. }
  4978. fieldNum := int32(wire >> 3)
  4979. wireType := int(wire & 0x7)
  4980. if wireType == 4 {
  4981. return fmt.Errorf("proto: ReplicatedJob: wiretype end group for non-group")
  4982. }
  4983. if fieldNum <= 0 {
  4984. return fmt.Errorf("proto: ReplicatedJob: illegal tag %d (wire type %d)", fieldNum, wire)
  4985. }
  4986. switch fieldNum {
  4987. case 1:
  4988. if wireType != 0 {
  4989. return fmt.Errorf("proto: wrong wireType = %d for field MaxConcurrent", wireType)
  4990. }
  4991. m.MaxConcurrent = 0
  4992. for shift := uint(0); ; shift += 7 {
  4993. if shift >= 64 {
  4994. return ErrIntOverflowSpecs
  4995. }
  4996. if iNdEx >= l {
  4997. return io.ErrUnexpectedEOF
  4998. }
  4999. b := dAtA[iNdEx]
  5000. iNdEx++
  5001. m.MaxConcurrent |= uint64(b&0x7F) << shift
  5002. if b < 0x80 {
  5003. break
  5004. }
  5005. }
  5006. case 2:
  5007. if wireType != 0 {
  5008. return fmt.Errorf("proto: wrong wireType = %d for field TotalCompletions", wireType)
  5009. }
  5010. m.TotalCompletions = 0
  5011. for shift := uint(0); ; shift += 7 {
  5012. if shift >= 64 {
  5013. return ErrIntOverflowSpecs
  5014. }
  5015. if iNdEx >= l {
  5016. return io.ErrUnexpectedEOF
  5017. }
  5018. b := dAtA[iNdEx]
  5019. iNdEx++
  5020. m.TotalCompletions |= uint64(b&0x7F) << shift
  5021. if b < 0x80 {
  5022. break
  5023. }
  5024. }
  5025. default:
  5026. iNdEx = preIndex
  5027. skippy, err := skipSpecs(dAtA[iNdEx:])
  5028. if err != nil {
  5029. return err
  5030. }
  5031. if skippy < 0 {
  5032. return ErrInvalidLengthSpecs
  5033. }
  5034. if (iNdEx + skippy) < 0 {
  5035. return ErrInvalidLengthSpecs
  5036. }
  5037. if (iNdEx + skippy) > l {
  5038. return io.ErrUnexpectedEOF
  5039. }
  5040. iNdEx += skippy
  5041. }
  5042. }
  5043. if iNdEx > l {
  5044. return io.ErrUnexpectedEOF
  5045. }
  5046. return nil
  5047. }
  5048. func (m *GlobalJob) Unmarshal(dAtA []byte) error {
  5049. l := len(dAtA)
  5050. iNdEx := 0
  5051. for iNdEx < l {
  5052. preIndex := iNdEx
  5053. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  5064. if b < 0x80 {
  5065. break
  5066. }
  5067. }
  5068. fieldNum := int32(wire >> 3)
  5069. wireType := int(wire & 0x7)
  5070. if wireType == 4 {
  5071. return fmt.Errorf("proto: GlobalJob: wiretype end group for non-group")
  5072. }
  5073. if fieldNum <= 0 {
  5074. return fmt.Errorf("proto: GlobalJob: illegal tag %d (wire type %d)", fieldNum, wire)
  5075. }
  5076. switch fieldNum {
  5077. default:
  5078. iNdEx = preIndex
  5079. skippy, err := skipSpecs(dAtA[iNdEx:])
  5080. if err != nil {
  5081. return err
  5082. }
  5083. if skippy < 0 {
  5084. return ErrInvalidLengthSpecs
  5085. }
  5086. if (iNdEx + skippy) < 0 {
  5087. return ErrInvalidLengthSpecs
  5088. }
  5089. if (iNdEx + skippy) > l {
  5090. return io.ErrUnexpectedEOF
  5091. }
  5092. iNdEx += skippy
  5093. }
  5094. }
  5095. if iNdEx > l {
  5096. return io.ErrUnexpectedEOF
  5097. }
  5098. return nil
  5099. }
  5100. func (m *TaskSpec) Unmarshal(dAtA []byte) error {
  5101. l := len(dAtA)
  5102. iNdEx := 0
  5103. for iNdEx < l {
  5104. preIndex := iNdEx
  5105. var wire uint64
  5106. for shift := uint(0); ; shift += 7 {
  5107. if shift >= 64 {
  5108. return ErrIntOverflowSpecs
  5109. }
  5110. if iNdEx >= l {
  5111. return io.ErrUnexpectedEOF
  5112. }
  5113. b := dAtA[iNdEx]
  5114. iNdEx++
  5115. wire |= uint64(b&0x7F) << shift
  5116. if b < 0x80 {
  5117. break
  5118. }
  5119. }
  5120. fieldNum := int32(wire >> 3)
  5121. wireType := int(wire & 0x7)
  5122. if wireType == 4 {
  5123. return fmt.Errorf("proto: TaskSpec: wiretype end group for non-group")
  5124. }
  5125. if fieldNum <= 0 {
  5126. return fmt.Errorf("proto: TaskSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5127. }
  5128. switch fieldNum {
  5129. case 1:
  5130. if wireType != 2 {
  5131. return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
  5132. }
  5133. var msglen int
  5134. for shift := uint(0); ; shift += 7 {
  5135. if shift >= 64 {
  5136. return ErrIntOverflowSpecs
  5137. }
  5138. if iNdEx >= l {
  5139. return io.ErrUnexpectedEOF
  5140. }
  5141. b := dAtA[iNdEx]
  5142. iNdEx++
  5143. msglen |= int(b&0x7F) << shift
  5144. if b < 0x80 {
  5145. break
  5146. }
  5147. }
  5148. if msglen < 0 {
  5149. return ErrInvalidLengthSpecs
  5150. }
  5151. postIndex := iNdEx + msglen
  5152. if postIndex < 0 {
  5153. return ErrInvalidLengthSpecs
  5154. }
  5155. if postIndex > l {
  5156. return io.ErrUnexpectedEOF
  5157. }
  5158. v := &ContainerSpec{}
  5159. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5160. return err
  5161. }
  5162. m.Runtime = &TaskSpec_Container{v}
  5163. iNdEx = postIndex
  5164. case 2:
  5165. if wireType != 2 {
  5166. return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
  5167. }
  5168. var msglen int
  5169. for shift := uint(0); ; shift += 7 {
  5170. if shift >= 64 {
  5171. return ErrIntOverflowSpecs
  5172. }
  5173. if iNdEx >= l {
  5174. return io.ErrUnexpectedEOF
  5175. }
  5176. b := dAtA[iNdEx]
  5177. iNdEx++
  5178. msglen |= int(b&0x7F) << shift
  5179. if b < 0x80 {
  5180. break
  5181. }
  5182. }
  5183. if msglen < 0 {
  5184. return ErrInvalidLengthSpecs
  5185. }
  5186. postIndex := iNdEx + msglen
  5187. if postIndex < 0 {
  5188. return ErrInvalidLengthSpecs
  5189. }
  5190. if postIndex > l {
  5191. return io.ErrUnexpectedEOF
  5192. }
  5193. if m.Resources == nil {
  5194. m.Resources = &ResourceRequirements{}
  5195. }
  5196. if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5197. return err
  5198. }
  5199. iNdEx = postIndex
  5200. case 4:
  5201. if wireType != 2 {
  5202. return fmt.Errorf("proto: wrong wireType = %d for field Restart", wireType)
  5203. }
  5204. var msglen int
  5205. for shift := uint(0); ; shift += 7 {
  5206. if shift >= 64 {
  5207. return ErrIntOverflowSpecs
  5208. }
  5209. if iNdEx >= l {
  5210. return io.ErrUnexpectedEOF
  5211. }
  5212. b := dAtA[iNdEx]
  5213. iNdEx++
  5214. msglen |= int(b&0x7F) << shift
  5215. if b < 0x80 {
  5216. break
  5217. }
  5218. }
  5219. if msglen < 0 {
  5220. return ErrInvalidLengthSpecs
  5221. }
  5222. postIndex := iNdEx + msglen
  5223. if postIndex < 0 {
  5224. return ErrInvalidLengthSpecs
  5225. }
  5226. if postIndex > l {
  5227. return io.ErrUnexpectedEOF
  5228. }
  5229. if m.Restart == nil {
  5230. m.Restart = &RestartPolicy{}
  5231. }
  5232. if err := m.Restart.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5233. return err
  5234. }
  5235. iNdEx = postIndex
  5236. case 5:
  5237. if wireType != 2 {
  5238. return fmt.Errorf("proto: wrong wireType = %d for field Placement", wireType)
  5239. }
  5240. var msglen int
  5241. for shift := uint(0); ; shift += 7 {
  5242. if shift >= 64 {
  5243. return ErrIntOverflowSpecs
  5244. }
  5245. if iNdEx >= l {
  5246. return io.ErrUnexpectedEOF
  5247. }
  5248. b := dAtA[iNdEx]
  5249. iNdEx++
  5250. msglen |= int(b&0x7F) << shift
  5251. if b < 0x80 {
  5252. break
  5253. }
  5254. }
  5255. if msglen < 0 {
  5256. return ErrInvalidLengthSpecs
  5257. }
  5258. postIndex := iNdEx + msglen
  5259. if postIndex < 0 {
  5260. return ErrInvalidLengthSpecs
  5261. }
  5262. if postIndex > l {
  5263. return io.ErrUnexpectedEOF
  5264. }
  5265. if m.Placement == nil {
  5266. m.Placement = &Placement{}
  5267. }
  5268. if err := m.Placement.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5269. return err
  5270. }
  5271. iNdEx = postIndex
  5272. case 6:
  5273. if wireType != 2 {
  5274. return fmt.Errorf("proto: wrong wireType = %d for field LogDriver", wireType)
  5275. }
  5276. var msglen int
  5277. for shift := uint(0); ; shift += 7 {
  5278. if shift >= 64 {
  5279. return ErrIntOverflowSpecs
  5280. }
  5281. if iNdEx >= l {
  5282. return io.ErrUnexpectedEOF
  5283. }
  5284. b := dAtA[iNdEx]
  5285. iNdEx++
  5286. msglen |= int(b&0x7F) << shift
  5287. if b < 0x80 {
  5288. break
  5289. }
  5290. }
  5291. if msglen < 0 {
  5292. return ErrInvalidLengthSpecs
  5293. }
  5294. postIndex := iNdEx + msglen
  5295. if postIndex < 0 {
  5296. return ErrInvalidLengthSpecs
  5297. }
  5298. if postIndex > l {
  5299. return io.ErrUnexpectedEOF
  5300. }
  5301. if m.LogDriver == nil {
  5302. m.LogDriver = &Driver{}
  5303. }
  5304. if err := m.LogDriver.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5305. return err
  5306. }
  5307. iNdEx = postIndex
  5308. case 7:
  5309. if wireType != 2 {
  5310. return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
  5311. }
  5312. var msglen int
  5313. for shift := uint(0); ; shift += 7 {
  5314. if shift >= 64 {
  5315. return ErrIntOverflowSpecs
  5316. }
  5317. if iNdEx >= l {
  5318. return io.ErrUnexpectedEOF
  5319. }
  5320. b := dAtA[iNdEx]
  5321. iNdEx++
  5322. msglen |= int(b&0x7F) << shift
  5323. if b < 0x80 {
  5324. break
  5325. }
  5326. }
  5327. if msglen < 0 {
  5328. return ErrInvalidLengthSpecs
  5329. }
  5330. postIndex := iNdEx + msglen
  5331. if postIndex < 0 {
  5332. return ErrInvalidLengthSpecs
  5333. }
  5334. if postIndex > l {
  5335. return io.ErrUnexpectedEOF
  5336. }
  5337. m.Networks = append(m.Networks, &NetworkAttachmentConfig{})
  5338. if err := m.Networks[len(m.Networks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5339. return err
  5340. }
  5341. iNdEx = postIndex
  5342. case 8:
  5343. if wireType != 2 {
  5344. return fmt.Errorf("proto: wrong wireType = %d for field Attachment", wireType)
  5345. }
  5346. var msglen int
  5347. for shift := uint(0); ; shift += 7 {
  5348. if shift >= 64 {
  5349. return ErrIntOverflowSpecs
  5350. }
  5351. if iNdEx >= l {
  5352. return io.ErrUnexpectedEOF
  5353. }
  5354. b := dAtA[iNdEx]
  5355. iNdEx++
  5356. msglen |= int(b&0x7F) << shift
  5357. if b < 0x80 {
  5358. break
  5359. }
  5360. }
  5361. if msglen < 0 {
  5362. return ErrInvalidLengthSpecs
  5363. }
  5364. postIndex := iNdEx + msglen
  5365. if postIndex < 0 {
  5366. return ErrInvalidLengthSpecs
  5367. }
  5368. if postIndex > l {
  5369. return io.ErrUnexpectedEOF
  5370. }
  5371. v := &NetworkAttachmentSpec{}
  5372. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5373. return err
  5374. }
  5375. m.Runtime = &TaskSpec_Attachment{v}
  5376. iNdEx = postIndex
  5377. case 9:
  5378. if wireType != 0 {
  5379. return fmt.Errorf("proto: wrong wireType = %d for field ForceUpdate", wireType)
  5380. }
  5381. m.ForceUpdate = 0
  5382. for shift := uint(0); ; shift += 7 {
  5383. if shift >= 64 {
  5384. return ErrIntOverflowSpecs
  5385. }
  5386. if iNdEx >= l {
  5387. return io.ErrUnexpectedEOF
  5388. }
  5389. b := dAtA[iNdEx]
  5390. iNdEx++
  5391. m.ForceUpdate |= uint64(b&0x7F) << shift
  5392. if b < 0x80 {
  5393. break
  5394. }
  5395. }
  5396. case 10:
  5397. if wireType != 2 {
  5398. return fmt.Errorf("proto: wrong wireType = %d for field Generic", wireType)
  5399. }
  5400. var msglen int
  5401. for shift := uint(0); ; shift += 7 {
  5402. if shift >= 64 {
  5403. return ErrIntOverflowSpecs
  5404. }
  5405. if iNdEx >= l {
  5406. return io.ErrUnexpectedEOF
  5407. }
  5408. b := dAtA[iNdEx]
  5409. iNdEx++
  5410. msglen |= int(b&0x7F) << shift
  5411. if b < 0x80 {
  5412. break
  5413. }
  5414. }
  5415. if msglen < 0 {
  5416. return ErrInvalidLengthSpecs
  5417. }
  5418. postIndex := iNdEx + msglen
  5419. if postIndex < 0 {
  5420. return ErrInvalidLengthSpecs
  5421. }
  5422. if postIndex > l {
  5423. return io.ErrUnexpectedEOF
  5424. }
  5425. v := &GenericRuntimeSpec{}
  5426. if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5427. return err
  5428. }
  5429. m.Runtime = &TaskSpec_Generic{v}
  5430. iNdEx = postIndex
  5431. case 11:
  5432. if wireType != 2 {
  5433. return fmt.Errorf("proto: wrong wireType = %d for field ResourceReferences", wireType)
  5434. }
  5435. var msglen int
  5436. for shift := uint(0); ; shift += 7 {
  5437. if shift >= 64 {
  5438. return ErrIntOverflowSpecs
  5439. }
  5440. if iNdEx >= l {
  5441. return io.ErrUnexpectedEOF
  5442. }
  5443. b := dAtA[iNdEx]
  5444. iNdEx++
  5445. msglen |= int(b&0x7F) << shift
  5446. if b < 0x80 {
  5447. break
  5448. }
  5449. }
  5450. if msglen < 0 {
  5451. return ErrInvalidLengthSpecs
  5452. }
  5453. postIndex := iNdEx + msglen
  5454. if postIndex < 0 {
  5455. return ErrInvalidLengthSpecs
  5456. }
  5457. if postIndex > l {
  5458. return io.ErrUnexpectedEOF
  5459. }
  5460. m.ResourceReferences = append(m.ResourceReferences, ResourceReference{})
  5461. if err := m.ResourceReferences[len(m.ResourceReferences)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5462. return err
  5463. }
  5464. iNdEx = postIndex
  5465. default:
  5466. iNdEx = preIndex
  5467. skippy, err := skipSpecs(dAtA[iNdEx:])
  5468. if err != nil {
  5469. return err
  5470. }
  5471. if skippy < 0 {
  5472. return ErrInvalidLengthSpecs
  5473. }
  5474. if (iNdEx + skippy) < 0 {
  5475. return ErrInvalidLengthSpecs
  5476. }
  5477. if (iNdEx + skippy) > l {
  5478. return io.ErrUnexpectedEOF
  5479. }
  5480. iNdEx += skippy
  5481. }
  5482. }
  5483. if iNdEx > l {
  5484. return io.ErrUnexpectedEOF
  5485. }
  5486. return nil
  5487. }
  5488. func (m *ResourceReference) Unmarshal(dAtA []byte) error {
  5489. l := len(dAtA)
  5490. iNdEx := 0
  5491. for iNdEx < l {
  5492. preIndex := iNdEx
  5493. var wire uint64
  5494. for shift := uint(0); ; shift += 7 {
  5495. if shift >= 64 {
  5496. return ErrIntOverflowSpecs
  5497. }
  5498. if iNdEx >= l {
  5499. return io.ErrUnexpectedEOF
  5500. }
  5501. b := dAtA[iNdEx]
  5502. iNdEx++
  5503. wire |= uint64(b&0x7F) << shift
  5504. if b < 0x80 {
  5505. break
  5506. }
  5507. }
  5508. fieldNum := int32(wire >> 3)
  5509. wireType := int(wire & 0x7)
  5510. if wireType == 4 {
  5511. return fmt.Errorf("proto: ResourceReference: wiretype end group for non-group")
  5512. }
  5513. if fieldNum <= 0 {
  5514. return fmt.Errorf("proto: ResourceReference: illegal tag %d (wire type %d)", fieldNum, wire)
  5515. }
  5516. switch fieldNum {
  5517. case 1:
  5518. if wireType != 2 {
  5519. return fmt.Errorf("proto: wrong wireType = %d for field ResourceID", wireType)
  5520. }
  5521. var stringLen uint64
  5522. for shift := uint(0); ; shift += 7 {
  5523. if shift >= 64 {
  5524. return ErrIntOverflowSpecs
  5525. }
  5526. if iNdEx >= l {
  5527. return io.ErrUnexpectedEOF
  5528. }
  5529. b := dAtA[iNdEx]
  5530. iNdEx++
  5531. stringLen |= uint64(b&0x7F) << shift
  5532. if b < 0x80 {
  5533. break
  5534. }
  5535. }
  5536. intStringLen := int(stringLen)
  5537. if intStringLen < 0 {
  5538. return ErrInvalidLengthSpecs
  5539. }
  5540. postIndex := iNdEx + intStringLen
  5541. if postIndex < 0 {
  5542. return ErrInvalidLengthSpecs
  5543. }
  5544. if postIndex > l {
  5545. return io.ErrUnexpectedEOF
  5546. }
  5547. m.ResourceID = string(dAtA[iNdEx:postIndex])
  5548. iNdEx = postIndex
  5549. case 2:
  5550. if wireType != 0 {
  5551. return fmt.Errorf("proto: wrong wireType = %d for field ResourceType", wireType)
  5552. }
  5553. m.ResourceType = 0
  5554. for shift := uint(0); ; shift += 7 {
  5555. if shift >= 64 {
  5556. return ErrIntOverflowSpecs
  5557. }
  5558. if iNdEx >= l {
  5559. return io.ErrUnexpectedEOF
  5560. }
  5561. b := dAtA[iNdEx]
  5562. iNdEx++
  5563. m.ResourceType |= ResourceType(b&0x7F) << shift
  5564. if b < 0x80 {
  5565. break
  5566. }
  5567. }
  5568. default:
  5569. iNdEx = preIndex
  5570. skippy, err := skipSpecs(dAtA[iNdEx:])
  5571. if err != nil {
  5572. return err
  5573. }
  5574. if skippy < 0 {
  5575. return ErrInvalidLengthSpecs
  5576. }
  5577. if (iNdEx + skippy) < 0 {
  5578. return ErrInvalidLengthSpecs
  5579. }
  5580. if (iNdEx + skippy) > l {
  5581. return io.ErrUnexpectedEOF
  5582. }
  5583. iNdEx += skippy
  5584. }
  5585. }
  5586. if iNdEx > l {
  5587. return io.ErrUnexpectedEOF
  5588. }
  5589. return nil
  5590. }
  5591. func (m *GenericRuntimeSpec) Unmarshal(dAtA []byte) error {
  5592. l := len(dAtA)
  5593. iNdEx := 0
  5594. for iNdEx < l {
  5595. preIndex := iNdEx
  5596. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  5607. if b < 0x80 {
  5608. break
  5609. }
  5610. }
  5611. fieldNum := int32(wire >> 3)
  5612. wireType := int(wire & 0x7)
  5613. if wireType == 4 {
  5614. return fmt.Errorf("proto: GenericRuntimeSpec: wiretype end group for non-group")
  5615. }
  5616. if fieldNum <= 0 {
  5617. return fmt.Errorf("proto: GenericRuntimeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5618. }
  5619. switch fieldNum {
  5620. case 1:
  5621. if wireType != 2 {
  5622. return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
  5623. }
  5624. var stringLen uint64
  5625. for shift := uint(0); ; shift += 7 {
  5626. if shift >= 64 {
  5627. return ErrIntOverflowSpecs
  5628. }
  5629. if iNdEx >= l {
  5630. return io.ErrUnexpectedEOF
  5631. }
  5632. b := dAtA[iNdEx]
  5633. iNdEx++
  5634. stringLen |= uint64(b&0x7F) << shift
  5635. if b < 0x80 {
  5636. break
  5637. }
  5638. }
  5639. intStringLen := int(stringLen)
  5640. if intStringLen < 0 {
  5641. return ErrInvalidLengthSpecs
  5642. }
  5643. postIndex := iNdEx + intStringLen
  5644. if postIndex < 0 {
  5645. return ErrInvalidLengthSpecs
  5646. }
  5647. if postIndex > l {
  5648. return io.ErrUnexpectedEOF
  5649. }
  5650. m.Kind = string(dAtA[iNdEx:postIndex])
  5651. iNdEx = postIndex
  5652. case 2:
  5653. if wireType != 2 {
  5654. return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType)
  5655. }
  5656. var msglen int
  5657. for shift := uint(0); ; shift += 7 {
  5658. if shift >= 64 {
  5659. return ErrIntOverflowSpecs
  5660. }
  5661. if iNdEx >= l {
  5662. return io.ErrUnexpectedEOF
  5663. }
  5664. b := dAtA[iNdEx]
  5665. iNdEx++
  5666. msglen |= int(b&0x7F) << shift
  5667. if b < 0x80 {
  5668. break
  5669. }
  5670. }
  5671. if msglen < 0 {
  5672. return ErrInvalidLengthSpecs
  5673. }
  5674. postIndex := iNdEx + msglen
  5675. if postIndex < 0 {
  5676. return ErrInvalidLengthSpecs
  5677. }
  5678. if postIndex > l {
  5679. return io.ErrUnexpectedEOF
  5680. }
  5681. if m.Payload == nil {
  5682. m.Payload = &types.Any{}
  5683. }
  5684. if err := m.Payload.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  5685. return err
  5686. }
  5687. iNdEx = postIndex
  5688. default:
  5689. iNdEx = preIndex
  5690. skippy, err := skipSpecs(dAtA[iNdEx:])
  5691. if err != nil {
  5692. return err
  5693. }
  5694. if skippy < 0 {
  5695. return ErrInvalidLengthSpecs
  5696. }
  5697. if (iNdEx + skippy) < 0 {
  5698. return ErrInvalidLengthSpecs
  5699. }
  5700. if (iNdEx + skippy) > l {
  5701. return io.ErrUnexpectedEOF
  5702. }
  5703. iNdEx += skippy
  5704. }
  5705. }
  5706. if iNdEx > l {
  5707. return io.ErrUnexpectedEOF
  5708. }
  5709. return nil
  5710. }
  5711. func (m *NetworkAttachmentSpec) Unmarshal(dAtA []byte) error {
  5712. l := len(dAtA)
  5713. iNdEx := 0
  5714. for iNdEx < l {
  5715. preIndex := iNdEx
  5716. var wire uint64
  5717. for shift := uint(0); ; shift += 7 {
  5718. if shift >= 64 {
  5719. return ErrIntOverflowSpecs
  5720. }
  5721. if iNdEx >= l {
  5722. return io.ErrUnexpectedEOF
  5723. }
  5724. b := dAtA[iNdEx]
  5725. iNdEx++
  5726. wire |= uint64(b&0x7F) << shift
  5727. if b < 0x80 {
  5728. break
  5729. }
  5730. }
  5731. fieldNum := int32(wire >> 3)
  5732. wireType := int(wire & 0x7)
  5733. if wireType == 4 {
  5734. return fmt.Errorf("proto: NetworkAttachmentSpec: wiretype end group for non-group")
  5735. }
  5736. if fieldNum <= 0 {
  5737. return fmt.Errorf("proto: NetworkAttachmentSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5738. }
  5739. switch fieldNum {
  5740. case 1:
  5741. if wireType != 2 {
  5742. return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType)
  5743. }
  5744. var stringLen uint64
  5745. for shift := uint(0); ; shift += 7 {
  5746. if shift >= 64 {
  5747. return ErrIntOverflowSpecs
  5748. }
  5749. if iNdEx >= l {
  5750. return io.ErrUnexpectedEOF
  5751. }
  5752. b := dAtA[iNdEx]
  5753. iNdEx++
  5754. stringLen |= uint64(b&0x7F) << shift
  5755. if b < 0x80 {
  5756. break
  5757. }
  5758. }
  5759. intStringLen := int(stringLen)
  5760. if intStringLen < 0 {
  5761. return ErrInvalidLengthSpecs
  5762. }
  5763. postIndex := iNdEx + intStringLen
  5764. if postIndex < 0 {
  5765. return ErrInvalidLengthSpecs
  5766. }
  5767. if postIndex > l {
  5768. return io.ErrUnexpectedEOF
  5769. }
  5770. m.ContainerID = string(dAtA[iNdEx:postIndex])
  5771. iNdEx = postIndex
  5772. default:
  5773. iNdEx = preIndex
  5774. skippy, err := skipSpecs(dAtA[iNdEx:])
  5775. if err != nil {
  5776. return err
  5777. }
  5778. if skippy < 0 {
  5779. return ErrInvalidLengthSpecs
  5780. }
  5781. if (iNdEx + skippy) < 0 {
  5782. return ErrInvalidLengthSpecs
  5783. }
  5784. if (iNdEx + skippy) > l {
  5785. return io.ErrUnexpectedEOF
  5786. }
  5787. iNdEx += skippy
  5788. }
  5789. }
  5790. if iNdEx > l {
  5791. return io.ErrUnexpectedEOF
  5792. }
  5793. return nil
  5794. }
  5795. func (m *ContainerSpec) Unmarshal(dAtA []byte) error {
  5796. l := len(dAtA)
  5797. iNdEx := 0
  5798. for iNdEx < l {
  5799. preIndex := iNdEx
  5800. var wire uint64
  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. wire |= uint64(b&0x7F) << shift
  5811. if b < 0x80 {
  5812. break
  5813. }
  5814. }
  5815. fieldNum := int32(wire >> 3)
  5816. wireType := int(wire & 0x7)
  5817. if wireType == 4 {
  5818. return fmt.Errorf("proto: ContainerSpec: wiretype end group for non-group")
  5819. }
  5820. if fieldNum <= 0 {
  5821. return fmt.Errorf("proto: ContainerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  5822. }
  5823. switch fieldNum {
  5824. case 1:
  5825. if wireType != 2 {
  5826. return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
  5827. }
  5828. var stringLen uint64
  5829. for shift := uint(0); ; shift += 7 {
  5830. if shift >= 64 {
  5831. return ErrIntOverflowSpecs
  5832. }
  5833. if iNdEx >= l {
  5834. return io.ErrUnexpectedEOF
  5835. }
  5836. b := dAtA[iNdEx]
  5837. iNdEx++
  5838. stringLen |= uint64(b&0x7F) << shift
  5839. if b < 0x80 {
  5840. break
  5841. }
  5842. }
  5843. intStringLen := int(stringLen)
  5844. if intStringLen < 0 {
  5845. return ErrInvalidLengthSpecs
  5846. }
  5847. postIndex := iNdEx + intStringLen
  5848. if postIndex < 0 {
  5849. return ErrInvalidLengthSpecs
  5850. }
  5851. if postIndex > l {
  5852. return io.ErrUnexpectedEOF
  5853. }
  5854. m.Image = string(dAtA[iNdEx:postIndex])
  5855. iNdEx = postIndex
  5856. case 2:
  5857. if wireType != 2 {
  5858. return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
  5859. }
  5860. var msglen int
  5861. for shift := uint(0); ; shift += 7 {
  5862. if shift >= 64 {
  5863. return ErrIntOverflowSpecs
  5864. }
  5865. if iNdEx >= l {
  5866. return io.ErrUnexpectedEOF
  5867. }
  5868. b := dAtA[iNdEx]
  5869. iNdEx++
  5870. msglen |= int(b&0x7F) << shift
  5871. if b < 0x80 {
  5872. break
  5873. }
  5874. }
  5875. if msglen < 0 {
  5876. return ErrInvalidLengthSpecs
  5877. }
  5878. postIndex := iNdEx + msglen
  5879. if postIndex < 0 {
  5880. return ErrInvalidLengthSpecs
  5881. }
  5882. if postIndex > l {
  5883. return io.ErrUnexpectedEOF
  5884. }
  5885. if m.Labels == nil {
  5886. m.Labels = make(map[string]string)
  5887. }
  5888. var mapkey string
  5889. var mapvalue string
  5890. for iNdEx < postIndex {
  5891. entryPreIndex := iNdEx
  5892. var wire uint64
  5893. for shift := uint(0); ; shift += 7 {
  5894. if shift >= 64 {
  5895. return ErrIntOverflowSpecs
  5896. }
  5897. if iNdEx >= l {
  5898. return io.ErrUnexpectedEOF
  5899. }
  5900. b := dAtA[iNdEx]
  5901. iNdEx++
  5902. wire |= uint64(b&0x7F) << shift
  5903. if b < 0x80 {
  5904. break
  5905. }
  5906. }
  5907. fieldNum := int32(wire >> 3)
  5908. if fieldNum == 1 {
  5909. var stringLenmapkey uint64
  5910. for shift := uint(0); ; shift += 7 {
  5911. if shift >= 64 {
  5912. return ErrIntOverflowSpecs
  5913. }
  5914. if iNdEx >= l {
  5915. return io.ErrUnexpectedEOF
  5916. }
  5917. b := dAtA[iNdEx]
  5918. iNdEx++
  5919. stringLenmapkey |= uint64(b&0x7F) << shift
  5920. if b < 0x80 {
  5921. break
  5922. }
  5923. }
  5924. intStringLenmapkey := int(stringLenmapkey)
  5925. if intStringLenmapkey < 0 {
  5926. return ErrInvalidLengthSpecs
  5927. }
  5928. postStringIndexmapkey := iNdEx + intStringLenmapkey
  5929. if postStringIndexmapkey < 0 {
  5930. return ErrInvalidLengthSpecs
  5931. }
  5932. if postStringIndexmapkey > l {
  5933. return io.ErrUnexpectedEOF
  5934. }
  5935. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  5936. iNdEx = postStringIndexmapkey
  5937. } else if fieldNum == 2 {
  5938. var stringLenmapvalue uint64
  5939. for shift := uint(0); ; shift += 7 {
  5940. if shift >= 64 {
  5941. return ErrIntOverflowSpecs
  5942. }
  5943. if iNdEx >= l {
  5944. return io.ErrUnexpectedEOF
  5945. }
  5946. b := dAtA[iNdEx]
  5947. iNdEx++
  5948. stringLenmapvalue |= uint64(b&0x7F) << shift
  5949. if b < 0x80 {
  5950. break
  5951. }
  5952. }
  5953. intStringLenmapvalue := int(stringLenmapvalue)
  5954. if intStringLenmapvalue < 0 {
  5955. return ErrInvalidLengthSpecs
  5956. }
  5957. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  5958. if postStringIndexmapvalue < 0 {
  5959. return ErrInvalidLengthSpecs
  5960. }
  5961. if postStringIndexmapvalue > l {
  5962. return io.ErrUnexpectedEOF
  5963. }
  5964. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  5965. iNdEx = postStringIndexmapvalue
  5966. } else {
  5967. iNdEx = entryPreIndex
  5968. skippy, err := skipSpecs(dAtA[iNdEx:])
  5969. if err != nil {
  5970. return err
  5971. }
  5972. if skippy < 0 {
  5973. return ErrInvalidLengthSpecs
  5974. }
  5975. if (iNdEx + skippy) > postIndex {
  5976. return io.ErrUnexpectedEOF
  5977. }
  5978. iNdEx += skippy
  5979. }
  5980. }
  5981. m.Labels[mapkey] = mapvalue
  5982. iNdEx = postIndex
  5983. case 3:
  5984. if wireType != 2 {
  5985. return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
  5986. }
  5987. var stringLen uint64
  5988. for shift := uint(0); ; shift += 7 {
  5989. if shift >= 64 {
  5990. return ErrIntOverflowSpecs
  5991. }
  5992. if iNdEx >= l {
  5993. return io.ErrUnexpectedEOF
  5994. }
  5995. b := dAtA[iNdEx]
  5996. iNdEx++
  5997. stringLen |= uint64(b&0x7F) << shift
  5998. if b < 0x80 {
  5999. break
  6000. }
  6001. }
  6002. intStringLen := int(stringLen)
  6003. if intStringLen < 0 {
  6004. return ErrInvalidLengthSpecs
  6005. }
  6006. postIndex := iNdEx + intStringLen
  6007. if postIndex < 0 {
  6008. return ErrInvalidLengthSpecs
  6009. }
  6010. if postIndex > l {
  6011. return io.ErrUnexpectedEOF
  6012. }
  6013. m.Command = append(m.Command, string(dAtA[iNdEx:postIndex]))
  6014. iNdEx = postIndex
  6015. case 4:
  6016. if wireType != 2 {
  6017. return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
  6018. }
  6019. var stringLen uint64
  6020. for shift := uint(0); ; shift += 7 {
  6021. if shift >= 64 {
  6022. return ErrIntOverflowSpecs
  6023. }
  6024. if iNdEx >= l {
  6025. return io.ErrUnexpectedEOF
  6026. }
  6027. b := dAtA[iNdEx]
  6028. iNdEx++
  6029. stringLen |= uint64(b&0x7F) << shift
  6030. if b < 0x80 {
  6031. break
  6032. }
  6033. }
  6034. intStringLen := int(stringLen)
  6035. if intStringLen < 0 {
  6036. return ErrInvalidLengthSpecs
  6037. }
  6038. postIndex := iNdEx + intStringLen
  6039. if postIndex < 0 {
  6040. return ErrInvalidLengthSpecs
  6041. }
  6042. if postIndex > l {
  6043. return io.ErrUnexpectedEOF
  6044. }
  6045. m.Args = append(m.Args, string(dAtA[iNdEx:postIndex]))
  6046. iNdEx = postIndex
  6047. case 5:
  6048. if wireType != 2 {
  6049. return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
  6050. }
  6051. var stringLen uint64
  6052. for shift := uint(0); ; shift += 7 {
  6053. if shift >= 64 {
  6054. return ErrIntOverflowSpecs
  6055. }
  6056. if iNdEx >= l {
  6057. return io.ErrUnexpectedEOF
  6058. }
  6059. b := dAtA[iNdEx]
  6060. iNdEx++
  6061. stringLen |= uint64(b&0x7F) << shift
  6062. if b < 0x80 {
  6063. break
  6064. }
  6065. }
  6066. intStringLen := int(stringLen)
  6067. if intStringLen < 0 {
  6068. return ErrInvalidLengthSpecs
  6069. }
  6070. postIndex := iNdEx + intStringLen
  6071. if postIndex < 0 {
  6072. return ErrInvalidLengthSpecs
  6073. }
  6074. if postIndex > l {
  6075. return io.ErrUnexpectedEOF
  6076. }
  6077. m.Env = append(m.Env, string(dAtA[iNdEx:postIndex]))
  6078. iNdEx = postIndex
  6079. case 6:
  6080. if wireType != 2 {
  6081. return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType)
  6082. }
  6083. var stringLen uint64
  6084. for shift := uint(0); ; shift += 7 {
  6085. if shift >= 64 {
  6086. return ErrIntOverflowSpecs
  6087. }
  6088. if iNdEx >= l {
  6089. return io.ErrUnexpectedEOF
  6090. }
  6091. b := dAtA[iNdEx]
  6092. iNdEx++
  6093. stringLen |= uint64(b&0x7F) << shift
  6094. if b < 0x80 {
  6095. break
  6096. }
  6097. }
  6098. intStringLen := int(stringLen)
  6099. if intStringLen < 0 {
  6100. return ErrInvalidLengthSpecs
  6101. }
  6102. postIndex := iNdEx + intStringLen
  6103. if postIndex < 0 {
  6104. return ErrInvalidLengthSpecs
  6105. }
  6106. if postIndex > l {
  6107. return io.ErrUnexpectedEOF
  6108. }
  6109. m.Dir = string(dAtA[iNdEx:postIndex])
  6110. iNdEx = postIndex
  6111. case 7:
  6112. if wireType != 2 {
  6113. return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
  6114. }
  6115. var stringLen uint64
  6116. for shift := uint(0); ; shift += 7 {
  6117. if shift >= 64 {
  6118. return ErrIntOverflowSpecs
  6119. }
  6120. if iNdEx >= l {
  6121. return io.ErrUnexpectedEOF
  6122. }
  6123. b := dAtA[iNdEx]
  6124. iNdEx++
  6125. stringLen |= uint64(b&0x7F) << shift
  6126. if b < 0x80 {
  6127. break
  6128. }
  6129. }
  6130. intStringLen := int(stringLen)
  6131. if intStringLen < 0 {
  6132. return ErrInvalidLengthSpecs
  6133. }
  6134. postIndex := iNdEx + intStringLen
  6135. if postIndex < 0 {
  6136. return ErrInvalidLengthSpecs
  6137. }
  6138. if postIndex > l {
  6139. return io.ErrUnexpectedEOF
  6140. }
  6141. m.User = string(dAtA[iNdEx:postIndex])
  6142. iNdEx = postIndex
  6143. case 8:
  6144. if wireType != 2 {
  6145. return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
  6146. }
  6147. var msglen int
  6148. for shift := uint(0); ; shift += 7 {
  6149. if shift >= 64 {
  6150. return ErrIntOverflowSpecs
  6151. }
  6152. if iNdEx >= l {
  6153. return io.ErrUnexpectedEOF
  6154. }
  6155. b := dAtA[iNdEx]
  6156. iNdEx++
  6157. msglen |= int(b&0x7F) << shift
  6158. if b < 0x80 {
  6159. break
  6160. }
  6161. }
  6162. if msglen < 0 {
  6163. return ErrInvalidLengthSpecs
  6164. }
  6165. postIndex := iNdEx + msglen
  6166. if postIndex < 0 {
  6167. return ErrInvalidLengthSpecs
  6168. }
  6169. if postIndex > l {
  6170. return io.ErrUnexpectedEOF
  6171. }
  6172. m.Mounts = append(m.Mounts, Mount{})
  6173. if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6174. return err
  6175. }
  6176. iNdEx = postIndex
  6177. case 9:
  6178. if wireType != 2 {
  6179. return fmt.Errorf("proto: wrong wireType = %d for field StopGracePeriod", wireType)
  6180. }
  6181. var msglen int
  6182. for shift := uint(0); ; shift += 7 {
  6183. if shift >= 64 {
  6184. return ErrIntOverflowSpecs
  6185. }
  6186. if iNdEx >= l {
  6187. return io.ErrUnexpectedEOF
  6188. }
  6189. b := dAtA[iNdEx]
  6190. iNdEx++
  6191. msglen |= int(b&0x7F) << shift
  6192. if b < 0x80 {
  6193. break
  6194. }
  6195. }
  6196. if msglen < 0 {
  6197. return ErrInvalidLengthSpecs
  6198. }
  6199. postIndex := iNdEx + msglen
  6200. if postIndex < 0 {
  6201. return ErrInvalidLengthSpecs
  6202. }
  6203. if postIndex > l {
  6204. return io.ErrUnexpectedEOF
  6205. }
  6206. if m.StopGracePeriod == nil {
  6207. m.StopGracePeriod = &types.Duration{}
  6208. }
  6209. if err := m.StopGracePeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6210. return err
  6211. }
  6212. iNdEx = postIndex
  6213. case 10:
  6214. if wireType != 2 {
  6215. return fmt.Errorf("proto: wrong wireType = %d for field PullOptions", wireType)
  6216. }
  6217. var msglen int
  6218. for shift := uint(0); ; shift += 7 {
  6219. if shift >= 64 {
  6220. return ErrIntOverflowSpecs
  6221. }
  6222. if iNdEx >= l {
  6223. return io.ErrUnexpectedEOF
  6224. }
  6225. b := dAtA[iNdEx]
  6226. iNdEx++
  6227. msglen |= int(b&0x7F) << shift
  6228. if b < 0x80 {
  6229. break
  6230. }
  6231. }
  6232. if msglen < 0 {
  6233. return ErrInvalidLengthSpecs
  6234. }
  6235. postIndex := iNdEx + msglen
  6236. if postIndex < 0 {
  6237. return ErrInvalidLengthSpecs
  6238. }
  6239. if postIndex > l {
  6240. return io.ErrUnexpectedEOF
  6241. }
  6242. if m.PullOptions == nil {
  6243. m.PullOptions = &ContainerSpec_PullOptions{}
  6244. }
  6245. if err := m.PullOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6246. return err
  6247. }
  6248. iNdEx = postIndex
  6249. case 11:
  6250. if wireType != 2 {
  6251. return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType)
  6252. }
  6253. var stringLen uint64
  6254. for shift := uint(0); ; shift += 7 {
  6255. if shift >= 64 {
  6256. return ErrIntOverflowSpecs
  6257. }
  6258. if iNdEx >= l {
  6259. return io.ErrUnexpectedEOF
  6260. }
  6261. b := dAtA[iNdEx]
  6262. iNdEx++
  6263. stringLen |= uint64(b&0x7F) << shift
  6264. if b < 0x80 {
  6265. break
  6266. }
  6267. }
  6268. intStringLen := int(stringLen)
  6269. if intStringLen < 0 {
  6270. return ErrInvalidLengthSpecs
  6271. }
  6272. postIndex := iNdEx + intStringLen
  6273. if postIndex < 0 {
  6274. return ErrInvalidLengthSpecs
  6275. }
  6276. if postIndex > l {
  6277. return io.ErrUnexpectedEOF
  6278. }
  6279. m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex]))
  6280. iNdEx = postIndex
  6281. case 12:
  6282. if wireType != 2 {
  6283. return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType)
  6284. }
  6285. var msglen int
  6286. for shift := uint(0); ; shift += 7 {
  6287. if shift >= 64 {
  6288. return ErrIntOverflowSpecs
  6289. }
  6290. if iNdEx >= l {
  6291. return io.ErrUnexpectedEOF
  6292. }
  6293. b := dAtA[iNdEx]
  6294. iNdEx++
  6295. msglen |= int(b&0x7F) << shift
  6296. if b < 0x80 {
  6297. break
  6298. }
  6299. }
  6300. if msglen < 0 {
  6301. return ErrInvalidLengthSpecs
  6302. }
  6303. postIndex := iNdEx + msglen
  6304. if postIndex < 0 {
  6305. return ErrInvalidLengthSpecs
  6306. }
  6307. if postIndex > l {
  6308. return io.ErrUnexpectedEOF
  6309. }
  6310. m.Secrets = append(m.Secrets, &SecretReference{})
  6311. if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6312. return err
  6313. }
  6314. iNdEx = postIndex
  6315. case 13:
  6316. if wireType != 0 {
  6317. return fmt.Errorf("proto: wrong wireType = %d for field TTY", wireType)
  6318. }
  6319. var v int
  6320. for shift := uint(0); ; shift += 7 {
  6321. if shift >= 64 {
  6322. return ErrIntOverflowSpecs
  6323. }
  6324. if iNdEx >= l {
  6325. return io.ErrUnexpectedEOF
  6326. }
  6327. b := dAtA[iNdEx]
  6328. iNdEx++
  6329. v |= int(b&0x7F) << shift
  6330. if b < 0x80 {
  6331. break
  6332. }
  6333. }
  6334. m.TTY = bool(v != 0)
  6335. case 14:
  6336. if wireType != 2 {
  6337. return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType)
  6338. }
  6339. var stringLen uint64
  6340. for shift := uint(0); ; shift += 7 {
  6341. if shift >= 64 {
  6342. return ErrIntOverflowSpecs
  6343. }
  6344. if iNdEx >= l {
  6345. return io.ErrUnexpectedEOF
  6346. }
  6347. b := dAtA[iNdEx]
  6348. iNdEx++
  6349. stringLen |= uint64(b&0x7F) << shift
  6350. if b < 0x80 {
  6351. break
  6352. }
  6353. }
  6354. intStringLen := int(stringLen)
  6355. if intStringLen < 0 {
  6356. return ErrInvalidLengthSpecs
  6357. }
  6358. postIndex := iNdEx + intStringLen
  6359. if postIndex < 0 {
  6360. return ErrInvalidLengthSpecs
  6361. }
  6362. if postIndex > l {
  6363. return io.ErrUnexpectedEOF
  6364. }
  6365. m.Hostname = string(dAtA[iNdEx:postIndex])
  6366. iNdEx = postIndex
  6367. case 15:
  6368. if wireType != 2 {
  6369. return fmt.Errorf("proto: wrong wireType = %d for field DNSConfig", wireType)
  6370. }
  6371. var msglen int
  6372. for shift := uint(0); ; shift += 7 {
  6373. if shift >= 64 {
  6374. return ErrIntOverflowSpecs
  6375. }
  6376. if iNdEx >= l {
  6377. return io.ErrUnexpectedEOF
  6378. }
  6379. b := dAtA[iNdEx]
  6380. iNdEx++
  6381. msglen |= int(b&0x7F) << shift
  6382. if b < 0x80 {
  6383. break
  6384. }
  6385. }
  6386. if msglen < 0 {
  6387. return ErrInvalidLengthSpecs
  6388. }
  6389. postIndex := iNdEx + msglen
  6390. if postIndex < 0 {
  6391. return ErrInvalidLengthSpecs
  6392. }
  6393. if postIndex > l {
  6394. return io.ErrUnexpectedEOF
  6395. }
  6396. if m.DNSConfig == nil {
  6397. m.DNSConfig = &ContainerSpec_DNSConfig{}
  6398. }
  6399. if err := m.DNSConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6400. return err
  6401. }
  6402. iNdEx = postIndex
  6403. case 16:
  6404. if wireType != 2 {
  6405. return fmt.Errorf("proto: wrong wireType = %d for field Healthcheck", wireType)
  6406. }
  6407. var msglen int
  6408. for shift := uint(0); ; shift += 7 {
  6409. if shift >= 64 {
  6410. return ErrIntOverflowSpecs
  6411. }
  6412. if iNdEx >= l {
  6413. return io.ErrUnexpectedEOF
  6414. }
  6415. b := dAtA[iNdEx]
  6416. iNdEx++
  6417. msglen |= int(b&0x7F) << shift
  6418. if b < 0x80 {
  6419. break
  6420. }
  6421. }
  6422. if msglen < 0 {
  6423. return ErrInvalidLengthSpecs
  6424. }
  6425. postIndex := iNdEx + msglen
  6426. if postIndex < 0 {
  6427. return ErrInvalidLengthSpecs
  6428. }
  6429. if postIndex > l {
  6430. return io.ErrUnexpectedEOF
  6431. }
  6432. if m.Healthcheck == nil {
  6433. m.Healthcheck = &HealthConfig{}
  6434. }
  6435. if err := m.Healthcheck.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6436. return err
  6437. }
  6438. iNdEx = postIndex
  6439. case 17:
  6440. if wireType != 2 {
  6441. return fmt.Errorf("proto: wrong wireType = %d for field Hosts", wireType)
  6442. }
  6443. var stringLen uint64
  6444. for shift := uint(0); ; shift += 7 {
  6445. if shift >= 64 {
  6446. return ErrIntOverflowSpecs
  6447. }
  6448. if iNdEx >= l {
  6449. return io.ErrUnexpectedEOF
  6450. }
  6451. b := dAtA[iNdEx]
  6452. iNdEx++
  6453. stringLen |= uint64(b&0x7F) << shift
  6454. if b < 0x80 {
  6455. break
  6456. }
  6457. }
  6458. intStringLen := int(stringLen)
  6459. if intStringLen < 0 {
  6460. return ErrInvalidLengthSpecs
  6461. }
  6462. postIndex := iNdEx + intStringLen
  6463. if postIndex < 0 {
  6464. return ErrInvalidLengthSpecs
  6465. }
  6466. if postIndex > l {
  6467. return io.ErrUnexpectedEOF
  6468. }
  6469. m.Hosts = append(m.Hosts, string(dAtA[iNdEx:postIndex]))
  6470. iNdEx = postIndex
  6471. case 18:
  6472. if wireType != 0 {
  6473. return fmt.Errorf("proto: wrong wireType = %d for field OpenStdin", wireType)
  6474. }
  6475. var v int
  6476. for shift := uint(0); ; shift += 7 {
  6477. if shift >= 64 {
  6478. return ErrIntOverflowSpecs
  6479. }
  6480. if iNdEx >= l {
  6481. return io.ErrUnexpectedEOF
  6482. }
  6483. b := dAtA[iNdEx]
  6484. iNdEx++
  6485. v |= int(b&0x7F) << shift
  6486. if b < 0x80 {
  6487. break
  6488. }
  6489. }
  6490. m.OpenStdin = bool(v != 0)
  6491. case 19:
  6492. if wireType != 0 {
  6493. return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType)
  6494. }
  6495. var v int
  6496. for shift := uint(0); ; shift += 7 {
  6497. if shift >= 64 {
  6498. return ErrIntOverflowSpecs
  6499. }
  6500. if iNdEx >= l {
  6501. return io.ErrUnexpectedEOF
  6502. }
  6503. b := dAtA[iNdEx]
  6504. iNdEx++
  6505. v |= int(b&0x7F) << shift
  6506. if b < 0x80 {
  6507. break
  6508. }
  6509. }
  6510. m.ReadOnly = bool(v != 0)
  6511. case 20:
  6512. if wireType != 2 {
  6513. return fmt.Errorf("proto: wrong wireType = %d for field StopSignal", wireType)
  6514. }
  6515. var stringLen uint64
  6516. for shift := uint(0); ; shift += 7 {
  6517. if shift >= 64 {
  6518. return ErrIntOverflowSpecs
  6519. }
  6520. if iNdEx >= l {
  6521. return io.ErrUnexpectedEOF
  6522. }
  6523. b := dAtA[iNdEx]
  6524. iNdEx++
  6525. stringLen |= uint64(b&0x7F) << shift
  6526. if b < 0x80 {
  6527. break
  6528. }
  6529. }
  6530. intStringLen := int(stringLen)
  6531. if intStringLen < 0 {
  6532. return ErrInvalidLengthSpecs
  6533. }
  6534. postIndex := iNdEx + intStringLen
  6535. if postIndex < 0 {
  6536. return ErrInvalidLengthSpecs
  6537. }
  6538. if postIndex > l {
  6539. return io.ErrUnexpectedEOF
  6540. }
  6541. m.StopSignal = string(dAtA[iNdEx:postIndex])
  6542. iNdEx = postIndex
  6543. case 21:
  6544. if wireType != 2 {
  6545. return fmt.Errorf("proto: wrong wireType = %d for field Configs", wireType)
  6546. }
  6547. var msglen int
  6548. for shift := uint(0); ; shift += 7 {
  6549. if shift >= 64 {
  6550. return ErrIntOverflowSpecs
  6551. }
  6552. if iNdEx >= l {
  6553. return io.ErrUnexpectedEOF
  6554. }
  6555. b := dAtA[iNdEx]
  6556. iNdEx++
  6557. msglen |= int(b&0x7F) << shift
  6558. if b < 0x80 {
  6559. break
  6560. }
  6561. }
  6562. if msglen < 0 {
  6563. return ErrInvalidLengthSpecs
  6564. }
  6565. postIndex := iNdEx + msglen
  6566. if postIndex < 0 {
  6567. return ErrInvalidLengthSpecs
  6568. }
  6569. if postIndex > l {
  6570. return io.ErrUnexpectedEOF
  6571. }
  6572. m.Configs = append(m.Configs, &ConfigReference{})
  6573. if err := m.Configs[len(m.Configs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6574. return err
  6575. }
  6576. iNdEx = postIndex
  6577. case 22:
  6578. if wireType != 2 {
  6579. return fmt.Errorf("proto: wrong wireType = %d for field Privileges", wireType)
  6580. }
  6581. var msglen int
  6582. for shift := uint(0); ; shift += 7 {
  6583. if shift >= 64 {
  6584. return ErrIntOverflowSpecs
  6585. }
  6586. if iNdEx >= l {
  6587. return io.ErrUnexpectedEOF
  6588. }
  6589. b := dAtA[iNdEx]
  6590. iNdEx++
  6591. msglen |= int(b&0x7F) << shift
  6592. if b < 0x80 {
  6593. break
  6594. }
  6595. }
  6596. if msglen < 0 {
  6597. return ErrInvalidLengthSpecs
  6598. }
  6599. postIndex := iNdEx + msglen
  6600. if postIndex < 0 {
  6601. return ErrInvalidLengthSpecs
  6602. }
  6603. if postIndex > l {
  6604. return io.ErrUnexpectedEOF
  6605. }
  6606. if m.Privileges == nil {
  6607. m.Privileges = &Privileges{}
  6608. }
  6609. if err := m.Privileges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6610. return err
  6611. }
  6612. iNdEx = postIndex
  6613. case 23:
  6614. if wireType != 2 {
  6615. return fmt.Errorf("proto: wrong wireType = %d for field Init", wireType)
  6616. }
  6617. var msglen int
  6618. for shift := uint(0); ; shift += 7 {
  6619. if shift >= 64 {
  6620. return ErrIntOverflowSpecs
  6621. }
  6622. if iNdEx >= l {
  6623. return io.ErrUnexpectedEOF
  6624. }
  6625. b := dAtA[iNdEx]
  6626. iNdEx++
  6627. msglen |= int(b&0x7F) << shift
  6628. if b < 0x80 {
  6629. break
  6630. }
  6631. }
  6632. if msglen < 0 {
  6633. return ErrInvalidLengthSpecs
  6634. }
  6635. postIndex := iNdEx + msglen
  6636. if postIndex < 0 {
  6637. return ErrInvalidLengthSpecs
  6638. }
  6639. if postIndex > l {
  6640. return io.ErrUnexpectedEOF
  6641. }
  6642. if m.Init == nil {
  6643. m.Init = &types.BoolValue{}
  6644. }
  6645. if err := m.Init.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6646. return err
  6647. }
  6648. iNdEx = postIndex
  6649. case 24:
  6650. if wireType != 0 {
  6651. return fmt.Errorf("proto: wrong wireType = %d for field Isolation", wireType)
  6652. }
  6653. m.Isolation = 0
  6654. for shift := uint(0); ; shift += 7 {
  6655. if shift >= 64 {
  6656. return ErrIntOverflowSpecs
  6657. }
  6658. if iNdEx >= l {
  6659. return io.ErrUnexpectedEOF
  6660. }
  6661. b := dAtA[iNdEx]
  6662. iNdEx++
  6663. m.Isolation |= ContainerSpec_Isolation(b&0x7F) << shift
  6664. if b < 0x80 {
  6665. break
  6666. }
  6667. }
  6668. case 25:
  6669. if wireType != 0 {
  6670. return fmt.Errorf("proto: wrong wireType = %d for field PidsLimit", wireType)
  6671. }
  6672. m.PidsLimit = 0
  6673. for shift := uint(0); ; shift += 7 {
  6674. if shift >= 64 {
  6675. return ErrIntOverflowSpecs
  6676. }
  6677. if iNdEx >= l {
  6678. return io.ErrUnexpectedEOF
  6679. }
  6680. b := dAtA[iNdEx]
  6681. iNdEx++
  6682. m.PidsLimit |= int64(b&0x7F) << shift
  6683. if b < 0x80 {
  6684. break
  6685. }
  6686. }
  6687. case 26:
  6688. if wireType != 2 {
  6689. return fmt.Errorf("proto: wrong wireType = %d for field Sysctls", wireType)
  6690. }
  6691. var msglen int
  6692. for shift := uint(0); ; shift += 7 {
  6693. if shift >= 64 {
  6694. return ErrIntOverflowSpecs
  6695. }
  6696. if iNdEx >= l {
  6697. return io.ErrUnexpectedEOF
  6698. }
  6699. b := dAtA[iNdEx]
  6700. iNdEx++
  6701. msglen |= int(b&0x7F) << shift
  6702. if b < 0x80 {
  6703. break
  6704. }
  6705. }
  6706. if msglen < 0 {
  6707. return ErrInvalidLengthSpecs
  6708. }
  6709. postIndex := iNdEx + msglen
  6710. if postIndex < 0 {
  6711. return ErrInvalidLengthSpecs
  6712. }
  6713. if postIndex > l {
  6714. return io.ErrUnexpectedEOF
  6715. }
  6716. if m.Sysctls == nil {
  6717. m.Sysctls = make(map[string]string)
  6718. }
  6719. var mapkey string
  6720. var mapvalue string
  6721. for iNdEx < postIndex {
  6722. entryPreIndex := iNdEx
  6723. var wire uint64
  6724. for shift := uint(0); ; shift += 7 {
  6725. if shift >= 64 {
  6726. return ErrIntOverflowSpecs
  6727. }
  6728. if iNdEx >= l {
  6729. return io.ErrUnexpectedEOF
  6730. }
  6731. b := dAtA[iNdEx]
  6732. iNdEx++
  6733. wire |= uint64(b&0x7F) << shift
  6734. if b < 0x80 {
  6735. break
  6736. }
  6737. }
  6738. fieldNum := int32(wire >> 3)
  6739. if fieldNum == 1 {
  6740. var stringLenmapkey uint64
  6741. for shift := uint(0); ; shift += 7 {
  6742. if shift >= 64 {
  6743. return ErrIntOverflowSpecs
  6744. }
  6745. if iNdEx >= l {
  6746. return io.ErrUnexpectedEOF
  6747. }
  6748. b := dAtA[iNdEx]
  6749. iNdEx++
  6750. stringLenmapkey |= uint64(b&0x7F) << shift
  6751. if b < 0x80 {
  6752. break
  6753. }
  6754. }
  6755. intStringLenmapkey := int(stringLenmapkey)
  6756. if intStringLenmapkey < 0 {
  6757. return ErrInvalidLengthSpecs
  6758. }
  6759. postStringIndexmapkey := iNdEx + intStringLenmapkey
  6760. if postStringIndexmapkey < 0 {
  6761. return ErrInvalidLengthSpecs
  6762. }
  6763. if postStringIndexmapkey > l {
  6764. return io.ErrUnexpectedEOF
  6765. }
  6766. mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
  6767. iNdEx = postStringIndexmapkey
  6768. } else if fieldNum == 2 {
  6769. var stringLenmapvalue uint64
  6770. for shift := uint(0); ; shift += 7 {
  6771. if shift >= 64 {
  6772. return ErrIntOverflowSpecs
  6773. }
  6774. if iNdEx >= l {
  6775. return io.ErrUnexpectedEOF
  6776. }
  6777. b := dAtA[iNdEx]
  6778. iNdEx++
  6779. stringLenmapvalue |= uint64(b&0x7F) << shift
  6780. if b < 0x80 {
  6781. break
  6782. }
  6783. }
  6784. intStringLenmapvalue := int(stringLenmapvalue)
  6785. if intStringLenmapvalue < 0 {
  6786. return ErrInvalidLengthSpecs
  6787. }
  6788. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  6789. if postStringIndexmapvalue < 0 {
  6790. return ErrInvalidLengthSpecs
  6791. }
  6792. if postStringIndexmapvalue > l {
  6793. return io.ErrUnexpectedEOF
  6794. }
  6795. mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
  6796. iNdEx = postStringIndexmapvalue
  6797. } else {
  6798. iNdEx = entryPreIndex
  6799. skippy, err := skipSpecs(dAtA[iNdEx:])
  6800. if err != nil {
  6801. return err
  6802. }
  6803. if skippy < 0 {
  6804. return ErrInvalidLengthSpecs
  6805. }
  6806. if (iNdEx + skippy) > postIndex {
  6807. return io.ErrUnexpectedEOF
  6808. }
  6809. iNdEx += skippy
  6810. }
  6811. }
  6812. m.Sysctls[mapkey] = mapvalue
  6813. iNdEx = postIndex
  6814. case 27:
  6815. if wireType != 2 {
  6816. return fmt.Errorf("proto: wrong wireType = %d for field CapabilityAdd", wireType)
  6817. }
  6818. var stringLen uint64
  6819. for shift := uint(0); ; shift += 7 {
  6820. if shift >= 64 {
  6821. return ErrIntOverflowSpecs
  6822. }
  6823. if iNdEx >= l {
  6824. return io.ErrUnexpectedEOF
  6825. }
  6826. b := dAtA[iNdEx]
  6827. iNdEx++
  6828. stringLen |= uint64(b&0x7F) << shift
  6829. if b < 0x80 {
  6830. break
  6831. }
  6832. }
  6833. intStringLen := int(stringLen)
  6834. if intStringLen < 0 {
  6835. return ErrInvalidLengthSpecs
  6836. }
  6837. postIndex := iNdEx + intStringLen
  6838. if postIndex < 0 {
  6839. return ErrInvalidLengthSpecs
  6840. }
  6841. if postIndex > l {
  6842. return io.ErrUnexpectedEOF
  6843. }
  6844. m.CapabilityAdd = append(m.CapabilityAdd, string(dAtA[iNdEx:postIndex]))
  6845. iNdEx = postIndex
  6846. case 28:
  6847. if wireType != 2 {
  6848. return fmt.Errorf("proto: wrong wireType = %d for field CapabilityDrop", wireType)
  6849. }
  6850. var stringLen uint64
  6851. for shift := uint(0); ; shift += 7 {
  6852. if shift >= 64 {
  6853. return ErrIntOverflowSpecs
  6854. }
  6855. if iNdEx >= l {
  6856. return io.ErrUnexpectedEOF
  6857. }
  6858. b := dAtA[iNdEx]
  6859. iNdEx++
  6860. stringLen |= uint64(b&0x7F) << shift
  6861. if b < 0x80 {
  6862. break
  6863. }
  6864. }
  6865. intStringLen := int(stringLen)
  6866. if intStringLen < 0 {
  6867. return ErrInvalidLengthSpecs
  6868. }
  6869. postIndex := iNdEx + intStringLen
  6870. if postIndex < 0 {
  6871. return ErrInvalidLengthSpecs
  6872. }
  6873. if postIndex > l {
  6874. return io.ErrUnexpectedEOF
  6875. }
  6876. m.CapabilityDrop = append(m.CapabilityDrop, string(dAtA[iNdEx:postIndex]))
  6877. iNdEx = postIndex
  6878. case 29:
  6879. if wireType != 2 {
  6880. return fmt.Errorf("proto: wrong wireType = %d for field Ulimits", wireType)
  6881. }
  6882. var msglen int
  6883. for shift := uint(0); ; shift += 7 {
  6884. if shift >= 64 {
  6885. return ErrIntOverflowSpecs
  6886. }
  6887. if iNdEx >= l {
  6888. return io.ErrUnexpectedEOF
  6889. }
  6890. b := dAtA[iNdEx]
  6891. iNdEx++
  6892. msglen |= int(b&0x7F) << shift
  6893. if b < 0x80 {
  6894. break
  6895. }
  6896. }
  6897. if msglen < 0 {
  6898. return ErrInvalidLengthSpecs
  6899. }
  6900. postIndex := iNdEx + msglen
  6901. if postIndex < 0 {
  6902. return ErrInvalidLengthSpecs
  6903. }
  6904. if postIndex > l {
  6905. return io.ErrUnexpectedEOF
  6906. }
  6907. m.Ulimits = append(m.Ulimits, &ContainerSpec_Ulimit{})
  6908. if err := m.Ulimits[len(m.Ulimits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  6909. return err
  6910. }
  6911. iNdEx = postIndex
  6912. default:
  6913. iNdEx = preIndex
  6914. skippy, err := skipSpecs(dAtA[iNdEx:])
  6915. if err != nil {
  6916. return err
  6917. }
  6918. if skippy < 0 {
  6919. return ErrInvalidLengthSpecs
  6920. }
  6921. if (iNdEx + skippy) < 0 {
  6922. return ErrInvalidLengthSpecs
  6923. }
  6924. if (iNdEx + skippy) > l {
  6925. return io.ErrUnexpectedEOF
  6926. }
  6927. iNdEx += skippy
  6928. }
  6929. }
  6930. if iNdEx > l {
  6931. return io.ErrUnexpectedEOF
  6932. }
  6933. return nil
  6934. }
  6935. func (m *ContainerSpec_PullOptions) Unmarshal(dAtA []byte) error {
  6936. l := len(dAtA)
  6937. iNdEx := 0
  6938. for iNdEx < l {
  6939. preIndex := iNdEx
  6940. var wire uint64
  6941. for shift := uint(0); ; shift += 7 {
  6942. if shift >= 64 {
  6943. return ErrIntOverflowSpecs
  6944. }
  6945. if iNdEx >= l {
  6946. return io.ErrUnexpectedEOF
  6947. }
  6948. b := dAtA[iNdEx]
  6949. iNdEx++
  6950. wire |= uint64(b&0x7F) << shift
  6951. if b < 0x80 {
  6952. break
  6953. }
  6954. }
  6955. fieldNum := int32(wire >> 3)
  6956. wireType := int(wire & 0x7)
  6957. if wireType == 4 {
  6958. return fmt.Errorf("proto: PullOptions: wiretype end group for non-group")
  6959. }
  6960. if fieldNum <= 0 {
  6961. return fmt.Errorf("proto: PullOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  6962. }
  6963. switch fieldNum {
  6964. case 64:
  6965. if wireType != 2 {
  6966. return fmt.Errorf("proto: wrong wireType = %d for field RegistryAuth", wireType)
  6967. }
  6968. var stringLen uint64
  6969. for shift := uint(0); ; shift += 7 {
  6970. if shift >= 64 {
  6971. return ErrIntOverflowSpecs
  6972. }
  6973. if iNdEx >= l {
  6974. return io.ErrUnexpectedEOF
  6975. }
  6976. b := dAtA[iNdEx]
  6977. iNdEx++
  6978. stringLen |= uint64(b&0x7F) << shift
  6979. if b < 0x80 {
  6980. break
  6981. }
  6982. }
  6983. intStringLen := int(stringLen)
  6984. if intStringLen < 0 {
  6985. return ErrInvalidLengthSpecs
  6986. }
  6987. postIndex := iNdEx + intStringLen
  6988. if postIndex < 0 {
  6989. return ErrInvalidLengthSpecs
  6990. }
  6991. if postIndex > l {
  6992. return io.ErrUnexpectedEOF
  6993. }
  6994. m.RegistryAuth = string(dAtA[iNdEx:postIndex])
  6995. iNdEx = postIndex
  6996. default:
  6997. iNdEx = preIndex
  6998. skippy, err := skipSpecs(dAtA[iNdEx:])
  6999. if err != nil {
  7000. return err
  7001. }
  7002. if skippy < 0 {
  7003. return ErrInvalidLengthSpecs
  7004. }
  7005. if (iNdEx + skippy) < 0 {
  7006. return ErrInvalidLengthSpecs
  7007. }
  7008. if (iNdEx + skippy) > l {
  7009. return io.ErrUnexpectedEOF
  7010. }
  7011. iNdEx += skippy
  7012. }
  7013. }
  7014. if iNdEx > l {
  7015. return io.ErrUnexpectedEOF
  7016. }
  7017. return nil
  7018. }
  7019. func (m *ContainerSpec_DNSConfig) Unmarshal(dAtA []byte) error {
  7020. l := len(dAtA)
  7021. iNdEx := 0
  7022. for iNdEx < l {
  7023. preIndex := iNdEx
  7024. var wire uint64
  7025. for shift := uint(0); ; shift += 7 {
  7026. if shift >= 64 {
  7027. return ErrIntOverflowSpecs
  7028. }
  7029. if iNdEx >= l {
  7030. return io.ErrUnexpectedEOF
  7031. }
  7032. b := dAtA[iNdEx]
  7033. iNdEx++
  7034. wire |= uint64(b&0x7F) << shift
  7035. if b < 0x80 {
  7036. break
  7037. }
  7038. }
  7039. fieldNum := int32(wire >> 3)
  7040. wireType := int(wire & 0x7)
  7041. if wireType == 4 {
  7042. return fmt.Errorf("proto: DNSConfig: wiretype end group for non-group")
  7043. }
  7044. if fieldNum <= 0 {
  7045. return fmt.Errorf("proto: DNSConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  7046. }
  7047. switch fieldNum {
  7048. case 1:
  7049. if wireType != 2 {
  7050. return fmt.Errorf("proto: wrong wireType = %d for field Nameservers", wireType)
  7051. }
  7052. var stringLen uint64
  7053. for shift := uint(0); ; shift += 7 {
  7054. if shift >= 64 {
  7055. return ErrIntOverflowSpecs
  7056. }
  7057. if iNdEx >= l {
  7058. return io.ErrUnexpectedEOF
  7059. }
  7060. b := dAtA[iNdEx]
  7061. iNdEx++
  7062. stringLen |= uint64(b&0x7F) << shift
  7063. if b < 0x80 {
  7064. break
  7065. }
  7066. }
  7067. intStringLen := int(stringLen)
  7068. if intStringLen < 0 {
  7069. return ErrInvalidLengthSpecs
  7070. }
  7071. postIndex := iNdEx + intStringLen
  7072. if postIndex < 0 {
  7073. return ErrInvalidLengthSpecs
  7074. }
  7075. if postIndex > l {
  7076. return io.ErrUnexpectedEOF
  7077. }
  7078. m.Nameservers = append(m.Nameservers, string(dAtA[iNdEx:postIndex]))
  7079. iNdEx = postIndex
  7080. case 2:
  7081. if wireType != 2 {
  7082. return fmt.Errorf("proto: wrong wireType = %d for field Search", wireType)
  7083. }
  7084. var stringLen uint64
  7085. for shift := uint(0); ; shift += 7 {
  7086. if shift >= 64 {
  7087. return ErrIntOverflowSpecs
  7088. }
  7089. if iNdEx >= l {
  7090. return io.ErrUnexpectedEOF
  7091. }
  7092. b := dAtA[iNdEx]
  7093. iNdEx++
  7094. stringLen |= uint64(b&0x7F) << shift
  7095. if b < 0x80 {
  7096. break
  7097. }
  7098. }
  7099. intStringLen := int(stringLen)
  7100. if intStringLen < 0 {
  7101. return ErrInvalidLengthSpecs
  7102. }
  7103. postIndex := iNdEx + intStringLen
  7104. if postIndex < 0 {
  7105. return ErrInvalidLengthSpecs
  7106. }
  7107. if postIndex > l {
  7108. return io.ErrUnexpectedEOF
  7109. }
  7110. m.Search = append(m.Search, string(dAtA[iNdEx:postIndex]))
  7111. iNdEx = postIndex
  7112. case 3:
  7113. if wireType != 2 {
  7114. return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
  7115. }
  7116. var stringLen uint64
  7117. for shift := uint(0); ; shift += 7 {
  7118. if shift >= 64 {
  7119. return ErrIntOverflowSpecs
  7120. }
  7121. if iNdEx >= l {
  7122. return io.ErrUnexpectedEOF
  7123. }
  7124. b := dAtA[iNdEx]
  7125. iNdEx++
  7126. stringLen |= uint64(b&0x7F) << shift
  7127. if b < 0x80 {
  7128. break
  7129. }
  7130. }
  7131. intStringLen := int(stringLen)
  7132. if intStringLen < 0 {
  7133. return ErrInvalidLengthSpecs
  7134. }
  7135. postIndex := iNdEx + intStringLen
  7136. if postIndex < 0 {
  7137. return ErrInvalidLengthSpecs
  7138. }
  7139. if postIndex > l {
  7140. return io.ErrUnexpectedEOF
  7141. }
  7142. m.Options = append(m.Options, string(dAtA[iNdEx:postIndex]))
  7143. iNdEx = postIndex
  7144. default:
  7145. iNdEx = preIndex
  7146. skippy, err := skipSpecs(dAtA[iNdEx:])
  7147. if err != nil {
  7148. return err
  7149. }
  7150. if skippy < 0 {
  7151. return ErrInvalidLengthSpecs
  7152. }
  7153. if (iNdEx + skippy) < 0 {
  7154. return ErrInvalidLengthSpecs
  7155. }
  7156. if (iNdEx + skippy) > l {
  7157. return io.ErrUnexpectedEOF
  7158. }
  7159. iNdEx += skippy
  7160. }
  7161. }
  7162. if iNdEx > l {
  7163. return io.ErrUnexpectedEOF
  7164. }
  7165. return nil
  7166. }
  7167. func (m *ContainerSpec_Ulimit) Unmarshal(dAtA []byte) error {
  7168. l := len(dAtA)
  7169. iNdEx := 0
  7170. for iNdEx < l {
  7171. preIndex := iNdEx
  7172. var wire uint64
  7173. for shift := uint(0); ; shift += 7 {
  7174. if shift >= 64 {
  7175. return ErrIntOverflowSpecs
  7176. }
  7177. if iNdEx >= l {
  7178. return io.ErrUnexpectedEOF
  7179. }
  7180. b := dAtA[iNdEx]
  7181. iNdEx++
  7182. wire |= uint64(b&0x7F) << shift
  7183. if b < 0x80 {
  7184. break
  7185. }
  7186. }
  7187. fieldNum := int32(wire >> 3)
  7188. wireType := int(wire & 0x7)
  7189. if wireType == 4 {
  7190. return fmt.Errorf("proto: Ulimit: wiretype end group for non-group")
  7191. }
  7192. if fieldNum <= 0 {
  7193. return fmt.Errorf("proto: Ulimit: illegal tag %d (wire type %d)", fieldNum, wire)
  7194. }
  7195. switch fieldNum {
  7196. case 1:
  7197. if wireType != 2 {
  7198. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  7199. }
  7200. var stringLen uint64
  7201. for shift := uint(0); ; shift += 7 {
  7202. if shift >= 64 {
  7203. return ErrIntOverflowSpecs
  7204. }
  7205. if iNdEx >= l {
  7206. return io.ErrUnexpectedEOF
  7207. }
  7208. b := dAtA[iNdEx]
  7209. iNdEx++
  7210. stringLen |= uint64(b&0x7F) << shift
  7211. if b < 0x80 {
  7212. break
  7213. }
  7214. }
  7215. intStringLen := int(stringLen)
  7216. if intStringLen < 0 {
  7217. return ErrInvalidLengthSpecs
  7218. }
  7219. postIndex := iNdEx + intStringLen
  7220. if postIndex < 0 {
  7221. return ErrInvalidLengthSpecs
  7222. }
  7223. if postIndex > l {
  7224. return io.ErrUnexpectedEOF
  7225. }
  7226. m.Name = string(dAtA[iNdEx:postIndex])
  7227. iNdEx = postIndex
  7228. case 2:
  7229. if wireType != 0 {
  7230. return fmt.Errorf("proto: wrong wireType = %d for field Soft", wireType)
  7231. }
  7232. m.Soft = 0
  7233. for shift := uint(0); ; shift += 7 {
  7234. if shift >= 64 {
  7235. return ErrIntOverflowSpecs
  7236. }
  7237. if iNdEx >= l {
  7238. return io.ErrUnexpectedEOF
  7239. }
  7240. b := dAtA[iNdEx]
  7241. iNdEx++
  7242. m.Soft |= int64(b&0x7F) << shift
  7243. if b < 0x80 {
  7244. break
  7245. }
  7246. }
  7247. case 3:
  7248. if wireType != 0 {
  7249. return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType)
  7250. }
  7251. m.Hard = 0
  7252. for shift := uint(0); ; shift += 7 {
  7253. if shift >= 64 {
  7254. return ErrIntOverflowSpecs
  7255. }
  7256. if iNdEx >= l {
  7257. return io.ErrUnexpectedEOF
  7258. }
  7259. b := dAtA[iNdEx]
  7260. iNdEx++
  7261. m.Hard |= int64(b&0x7F) << shift
  7262. if b < 0x80 {
  7263. break
  7264. }
  7265. }
  7266. default:
  7267. iNdEx = preIndex
  7268. skippy, err := skipSpecs(dAtA[iNdEx:])
  7269. if err != nil {
  7270. return err
  7271. }
  7272. if skippy < 0 {
  7273. return ErrInvalidLengthSpecs
  7274. }
  7275. if (iNdEx + skippy) < 0 {
  7276. return ErrInvalidLengthSpecs
  7277. }
  7278. if (iNdEx + skippy) > l {
  7279. return io.ErrUnexpectedEOF
  7280. }
  7281. iNdEx += skippy
  7282. }
  7283. }
  7284. if iNdEx > l {
  7285. return io.ErrUnexpectedEOF
  7286. }
  7287. return nil
  7288. }
  7289. func (m *EndpointSpec) Unmarshal(dAtA []byte) error {
  7290. l := len(dAtA)
  7291. iNdEx := 0
  7292. for iNdEx < l {
  7293. preIndex := iNdEx
  7294. var wire uint64
  7295. for shift := uint(0); ; shift += 7 {
  7296. if shift >= 64 {
  7297. return ErrIntOverflowSpecs
  7298. }
  7299. if iNdEx >= l {
  7300. return io.ErrUnexpectedEOF
  7301. }
  7302. b := dAtA[iNdEx]
  7303. iNdEx++
  7304. wire |= uint64(b&0x7F) << shift
  7305. if b < 0x80 {
  7306. break
  7307. }
  7308. }
  7309. fieldNum := int32(wire >> 3)
  7310. wireType := int(wire & 0x7)
  7311. if wireType == 4 {
  7312. return fmt.Errorf("proto: EndpointSpec: wiretype end group for non-group")
  7313. }
  7314. if fieldNum <= 0 {
  7315. return fmt.Errorf("proto: EndpointSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  7316. }
  7317. switch fieldNum {
  7318. case 1:
  7319. if wireType != 0 {
  7320. return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
  7321. }
  7322. m.Mode = 0
  7323. for shift := uint(0); ; shift += 7 {
  7324. if shift >= 64 {
  7325. return ErrIntOverflowSpecs
  7326. }
  7327. if iNdEx >= l {
  7328. return io.ErrUnexpectedEOF
  7329. }
  7330. b := dAtA[iNdEx]
  7331. iNdEx++
  7332. m.Mode |= EndpointSpec_ResolutionMode(b&0x7F) << shift
  7333. if b < 0x80 {
  7334. break
  7335. }
  7336. }
  7337. case 2:
  7338. if wireType != 2 {
  7339. return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
  7340. }
  7341. var msglen int
  7342. for shift := uint(0); ; shift += 7 {
  7343. if shift >= 64 {
  7344. return ErrIntOverflowSpecs
  7345. }
  7346. if iNdEx >= l {
  7347. return io.ErrUnexpectedEOF
  7348. }
  7349. b := dAtA[iNdEx]
  7350. iNdEx++
  7351. msglen |= int(b&0x7F) << shift
  7352. if b < 0x80 {
  7353. break
  7354. }
  7355. }
  7356. if msglen < 0 {
  7357. return ErrInvalidLengthSpecs
  7358. }
  7359. postIndex := iNdEx + msglen
  7360. if postIndex < 0 {
  7361. return ErrInvalidLengthSpecs
  7362. }
  7363. if postIndex > l {
  7364. return io.ErrUnexpectedEOF
  7365. }
  7366. m.Ports = append(m.Ports, &PortConfig{})
  7367. if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7368. return err
  7369. }
  7370. iNdEx = postIndex
  7371. default:
  7372. iNdEx = preIndex
  7373. skippy, err := skipSpecs(dAtA[iNdEx:])
  7374. if err != nil {
  7375. return err
  7376. }
  7377. if skippy < 0 {
  7378. return ErrInvalidLengthSpecs
  7379. }
  7380. if (iNdEx + skippy) < 0 {
  7381. return ErrInvalidLengthSpecs
  7382. }
  7383. if (iNdEx + skippy) > l {
  7384. return io.ErrUnexpectedEOF
  7385. }
  7386. iNdEx += skippy
  7387. }
  7388. }
  7389. if iNdEx > l {
  7390. return io.ErrUnexpectedEOF
  7391. }
  7392. return nil
  7393. }
  7394. func (m *NetworkSpec) Unmarshal(dAtA []byte) error {
  7395. l := len(dAtA)
  7396. iNdEx := 0
  7397. for iNdEx < l {
  7398. preIndex := iNdEx
  7399. var wire uint64
  7400. for shift := uint(0); ; shift += 7 {
  7401. if shift >= 64 {
  7402. return ErrIntOverflowSpecs
  7403. }
  7404. if iNdEx >= l {
  7405. return io.ErrUnexpectedEOF
  7406. }
  7407. b := dAtA[iNdEx]
  7408. iNdEx++
  7409. wire |= uint64(b&0x7F) << shift
  7410. if b < 0x80 {
  7411. break
  7412. }
  7413. }
  7414. fieldNum := int32(wire >> 3)
  7415. wireType := int(wire & 0x7)
  7416. if wireType == 4 {
  7417. return fmt.Errorf("proto: NetworkSpec: wiretype end group for non-group")
  7418. }
  7419. if fieldNum <= 0 {
  7420. return fmt.Errorf("proto: NetworkSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  7421. }
  7422. switch fieldNum {
  7423. case 1:
  7424. if wireType != 2 {
  7425. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  7426. }
  7427. var msglen int
  7428. for shift := uint(0); ; shift += 7 {
  7429. if shift >= 64 {
  7430. return ErrIntOverflowSpecs
  7431. }
  7432. if iNdEx >= l {
  7433. return io.ErrUnexpectedEOF
  7434. }
  7435. b := dAtA[iNdEx]
  7436. iNdEx++
  7437. msglen |= int(b&0x7F) << shift
  7438. if b < 0x80 {
  7439. break
  7440. }
  7441. }
  7442. if msglen < 0 {
  7443. return ErrInvalidLengthSpecs
  7444. }
  7445. postIndex := iNdEx + msglen
  7446. if postIndex < 0 {
  7447. return ErrInvalidLengthSpecs
  7448. }
  7449. if postIndex > l {
  7450. return io.ErrUnexpectedEOF
  7451. }
  7452. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7453. return err
  7454. }
  7455. iNdEx = postIndex
  7456. case 2:
  7457. if wireType != 2 {
  7458. return fmt.Errorf("proto: wrong wireType = %d for field DriverConfig", wireType)
  7459. }
  7460. var msglen int
  7461. for shift := uint(0); ; shift += 7 {
  7462. if shift >= 64 {
  7463. return ErrIntOverflowSpecs
  7464. }
  7465. if iNdEx >= l {
  7466. return io.ErrUnexpectedEOF
  7467. }
  7468. b := dAtA[iNdEx]
  7469. iNdEx++
  7470. msglen |= int(b&0x7F) << shift
  7471. if b < 0x80 {
  7472. break
  7473. }
  7474. }
  7475. if msglen < 0 {
  7476. return ErrInvalidLengthSpecs
  7477. }
  7478. postIndex := iNdEx + msglen
  7479. if postIndex < 0 {
  7480. return ErrInvalidLengthSpecs
  7481. }
  7482. if postIndex > l {
  7483. return io.ErrUnexpectedEOF
  7484. }
  7485. if m.DriverConfig == nil {
  7486. m.DriverConfig = &Driver{}
  7487. }
  7488. if err := m.DriverConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7489. return err
  7490. }
  7491. iNdEx = postIndex
  7492. case 3:
  7493. if wireType != 0 {
  7494. return fmt.Errorf("proto: wrong wireType = %d for field Ipv6Enabled", wireType)
  7495. }
  7496. var v int
  7497. for shift := uint(0); ; shift += 7 {
  7498. if shift >= 64 {
  7499. return ErrIntOverflowSpecs
  7500. }
  7501. if iNdEx >= l {
  7502. return io.ErrUnexpectedEOF
  7503. }
  7504. b := dAtA[iNdEx]
  7505. iNdEx++
  7506. v |= int(b&0x7F) << shift
  7507. if b < 0x80 {
  7508. break
  7509. }
  7510. }
  7511. m.Ipv6Enabled = bool(v != 0)
  7512. case 4:
  7513. if wireType != 0 {
  7514. return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
  7515. }
  7516. var v int
  7517. for shift := uint(0); ; shift += 7 {
  7518. if shift >= 64 {
  7519. return ErrIntOverflowSpecs
  7520. }
  7521. if iNdEx >= l {
  7522. return io.ErrUnexpectedEOF
  7523. }
  7524. b := dAtA[iNdEx]
  7525. iNdEx++
  7526. v |= int(b&0x7F) << shift
  7527. if b < 0x80 {
  7528. break
  7529. }
  7530. }
  7531. m.Internal = bool(v != 0)
  7532. case 5:
  7533. if wireType != 2 {
  7534. return fmt.Errorf("proto: wrong wireType = %d for field IPAM", wireType)
  7535. }
  7536. var msglen int
  7537. for shift := uint(0); ; shift += 7 {
  7538. if shift >= 64 {
  7539. return ErrIntOverflowSpecs
  7540. }
  7541. if iNdEx >= l {
  7542. return io.ErrUnexpectedEOF
  7543. }
  7544. b := dAtA[iNdEx]
  7545. iNdEx++
  7546. msglen |= int(b&0x7F) << shift
  7547. if b < 0x80 {
  7548. break
  7549. }
  7550. }
  7551. if msglen < 0 {
  7552. return ErrInvalidLengthSpecs
  7553. }
  7554. postIndex := iNdEx + msglen
  7555. if postIndex < 0 {
  7556. return ErrInvalidLengthSpecs
  7557. }
  7558. if postIndex > l {
  7559. return io.ErrUnexpectedEOF
  7560. }
  7561. if m.IPAM == nil {
  7562. m.IPAM = &IPAMOptions{}
  7563. }
  7564. if err := m.IPAM.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7565. return err
  7566. }
  7567. iNdEx = postIndex
  7568. case 6:
  7569. if wireType != 0 {
  7570. return fmt.Errorf("proto: wrong wireType = %d for field Attachable", wireType)
  7571. }
  7572. var v int
  7573. for shift := uint(0); ; shift += 7 {
  7574. if shift >= 64 {
  7575. return ErrIntOverflowSpecs
  7576. }
  7577. if iNdEx >= l {
  7578. return io.ErrUnexpectedEOF
  7579. }
  7580. b := dAtA[iNdEx]
  7581. iNdEx++
  7582. v |= int(b&0x7F) << shift
  7583. if b < 0x80 {
  7584. break
  7585. }
  7586. }
  7587. m.Attachable = bool(v != 0)
  7588. case 7:
  7589. if wireType != 0 {
  7590. return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType)
  7591. }
  7592. var v int
  7593. for shift := uint(0); ; shift += 7 {
  7594. if shift >= 64 {
  7595. return ErrIntOverflowSpecs
  7596. }
  7597. if iNdEx >= l {
  7598. return io.ErrUnexpectedEOF
  7599. }
  7600. b := dAtA[iNdEx]
  7601. iNdEx++
  7602. v |= int(b&0x7F) << shift
  7603. if b < 0x80 {
  7604. break
  7605. }
  7606. }
  7607. m.Ingress = bool(v != 0)
  7608. case 8:
  7609. if wireType != 2 {
  7610. return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
  7611. }
  7612. var stringLen uint64
  7613. for shift := uint(0); ; shift += 7 {
  7614. if shift >= 64 {
  7615. return ErrIntOverflowSpecs
  7616. }
  7617. if iNdEx >= l {
  7618. return io.ErrUnexpectedEOF
  7619. }
  7620. b := dAtA[iNdEx]
  7621. iNdEx++
  7622. stringLen |= uint64(b&0x7F) << shift
  7623. if b < 0x80 {
  7624. break
  7625. }
  7626. }
  7627. intStringLen := int(stringLen)
  7628. if intStringLen < 0 {
  7629. return ErrInvalidLengthSpecs
  7630. }
  7631. postIndex := iNdEx + intStringLen
  7632. if postIndex < 0 {
  7633. return ErrInvalidLengthSpecs
  7634. }
  7635. if postIndex > l {
  7636. return io.ErrUnexpectedEOF
  7637. }
  7638. m.ConfigFrom = &NetworkSpec_Network{string(dAtA[iNdEx:postIndex])}
  7639. iNdEx = postIndex
  7640. default:
  7641. iNdEx = preIndex
  7642. skippy, err := skipSpecs(dAtA[iNdEx:])
  7643. if err != nil {
  7644. return err
  7645. }
  7646. if skippy < 0 {
  7647. return ErrInvalidLengthSpecs
  7648. }
  7649. if (iNdEx + skippy) < 0 {
  7650. return ErrInvalidLengthSpecs
  7651. }
  7652. if (iNdEx + skippy) > l {
  7653. return io.ErrUnexpectedEOF
  7654. }
  7655. iNdEx += skippy
  7656. }
  7657. }
  7658. if iNdEx > l {
  7659. return io.ErrUnexpectedEOF
  7660. }
  7661. return nil
  7662. }
  7663. func (m *ClusterSpec) Unmarshal(dAtA []byte) error {
  7664. l := len(dAtA)
  7665. iNdEx := 0
  7666. for iNdEx < l {
  7667. preIndex := iNdEx
  7668. var wire uint64
  7669. for shift := uint(0); ; shift += 7 {
  7670. if shift >= 64 {
  7671. return ErrIntOverflowSpecs
  7672. }
  7673. if iNdEx >= l {
  7674. return io.ErrUnexpectedEOF
  7675. }
  7676. b := dAtA[iNdEx]
  7677. iNdEx++
  7678. wire |= uint64(b&0x7F) << shift
  7679. if b < 0x80 {
  7680. break
  7681. }
  7682. }
  7683. fieldNum := int32(wire >> 3)
  7684. wireType := int(wire & 0x7)
  7685. if wireType == 4 {
  7686. return fmt.Errorf("proto: ClusterSpec: wiretype end group for non-group")
  7687. }
  7688. if fieldNum <= 0 {
  7689. return fmt.Errorf("proto: ClusterSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  7690. }
  7691. switch fieldNum {
  7692. case 1:
  7693. if wireType != 2 {
  7694. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  7695. }
  7696. var msglen int
  7697. for shift := uint(0); ; shift += 7 {
  7698. if shift >= 64 {
  7699. return ErrIntOverflowSpecs
  7700. }
  7701. if iNdEx >= l {
  7702. return io.ErrUnexpectedEOF
  7703. }
  7704. b := dAtA[iNdEx]
  7705. iNdEx++
  7706. msglen |= int(b&0x7F) << shift
  7707. if b < 0x80 {
  7708. break
  7709. }
  7710. }
  7711. if msglen < 0 {
  7712. return ErrInvalidLengthSpecs
  7713. }
  7714. postIndex := iNdEx + msglen
  7715. if postIndex < 0 {
  7716. return ErrInvalidLengthSpecs
  7717. }
  7718. if postIndex > l {
  7719. return io.ErrUnexpectedEOF
  7720. }
  7721. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7722. return err
  7723. }
  7724. iNdEx = postIndex
  7725. case 2:
  7726. if wireType != 2 {
  7727. return fmt.Errorf("proto: wrong wireType = %d for field AcceptancePolicy", wireType)
  7728. }
  7729. var msglen int
  7730. for shift := uint(0); ; shift += 7 {
  7731. if shift >= 64 {
  7732. return ErrIntOverflowSpecs
  7733. }
  7734. if iNdEx >= l {
  7735. return io.ErrUnexpectedEOF
  7736. }
  7737. b := dAtA[iNdEx]
  7738. iNdEx++
  7739. msglen |= int(b&0x7F) << shift
  7740. if b < 0x80 {
  7741. break
  7742. }
  7743. }
  7744. if msglen < 0 {
  7745. return ErrInvalidLengthSpecs
  7746. }
  7747. postIndex := iNdEx + msglen
  7748. if postIndex < 0 {
  7749. return ErrInvalidLengthSpecs
  7750. }
  7751. if postIndex > l {
  7752. return io.ErrUnexpectedEOF
  7753. }
  7754. if err := m.AcceptancePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7755. return err
  7756. }
  7757. iNdEx = postIndex
  7758. case 3:
  7759. if wireType != 2 {
  7760. return fmt.Errorf("proto: wrong wireType = %d for field Orchestration", wireType)
  7761. }
  7762. var msglen int
  7763. for shift := uint(0); ; shift += 7 {
  7764. if shift >= 64 {
  7765. return ErrIntOverflowSpecs
  7766. }
  7767. if iNdEx >= l {
  7768. return io.ErrUnexpectedEOF
  7769. }
  7770. b := dAtA[iNdEx]
  7771. iNdEx++
  7772. msglen |= int(b&0x7F) << shift
  7773. if b < 0x80 {
  7774. break
  7775. }
  7776. }
  7777. if msglen < 0 {
  7778. return ErrInvalidLengthSpecs
  7779. }
  7780. postIndex := iNdEx + msglen
  7781. if postIndex < 0 {
  7782. return ErrInvalidLengthSpecs
  7783. }
  7784. if postIndex > l {
  7785. return io.ErrUnexpectedEOF
  7786. }
  7787. if err := m.Orchestration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7788. return err
  7789. }
  7790. iNdEx = postIndex
  7791. case 4:
  7792. if wireType != 2 {
  7793. return fmt.Errorf("proto: wrong wireType = %d for field Raft", wireType)
  7794. }
  7795. var msglen int
  7796. for shift := uint(0); ; shift += 7 {
  7797. if shift >= 64 {
  7798. return ErrIntOverflowSpecs
  7799. }
  7800. if iNdEx >= l {
  7801. return io.ErrUnexpectedEOF
  7802. }
  7803. b := dAtA[iNdEx]
  7804. iNdEx++
  7805. msglen |= int(b&0x7F) << shift
  7806. if b < 0x80 {
  7807. break
  7808. }
  7809. }
  7810. if msglen < 0 {
  7811. return ErrInvalidLengthSpecs
  7812. }
  7813. postIndex := iNdEx + msglen
  7814. if postIndex < 0 {
  7815. return ErrInvalidLengthSpecs
  7816. }
  7817. if postIndex > l {
  7818. return io.ErrUnexpectedEOF
  7819. }
  7820. if err := m.Raft.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7821. return err
  7822. }
  7823. iNdEx = postIndex
  7824. case 5:
  7825. if wireType != 2 {
  7826. return fmt.Errorf("proto: wrong wireType = %d for field Dispatcher", wireType)
  7827. }
  7828. var msglen int
  7829. for shift := uint(0); ; shift += 7 {
  7830. if shift >= 64 {
  7831. return ErrIntOverflowSpecs
  7832. }
  7833. if iNdEx >= l {
  7834. return io.ErrUnexpectedEOF
  7835. }
  7836. b := dAtA[iNdEx]
  7837. iNdEx++
  7838. msglen |= int(b&0x7F) << shift
  7839. if b < 0x80 {
  7840. break
  7841. }
  7842. }
  7843. if msglen < 0 {
  7844. return ErrInvalidLengthSpecs
  7845. }
  7846. postIndex := iNdEx + msglen
  7847. if postIndex < 0 {
  7848. return ErrInvalidLengthSpecs
  7849. }
  7850. if postIndex > l {
  7851. return io.ErrUnexpectedEOF
  7852. }
  7853. if err := m.Dispatcher.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7854. return err
  7855. }
  7856. iNdEx = postIndex
  7857. case 6:
  7858. if wireType != 2 {
  7859. return fmt.Errorf("proto: wrong wireType = %d for field CAConfig", wireType)
  7860. }
  7861. var msglen int
  7862. for shift := uint(0); ; shift += 7 {
  7863. if shift >= 64 {
  7864. return ErrIntOverflowSpecs
  7865. }
  7866. if iNdEx >= l {
  7867. return io.ErrUnexpectedEOF
  7868. }
  7869. b := dAtA[iNdEx]
  7870. iNdEx++
  7871. msglen |= int(b&0x7F) << shift
  7872. if b < 0x80 {
  7873. break
  7874. }
  7875. }
  7876. if msglen < 0 {
  7877. return ErrInvalidLengthSpecs
  7878. }
  7879. postIndex := iNdEx + msglen
  7880. if postIndex < 0 {
  7881. return ErrInvalidLengthSpecs
  7882. }
  7883. if postIndex > l {
  7884. return io.ErrUnexpectedEOF
  7885. }
  7886. if err := m.CAConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7887. return err
  7888. }
  7889. iNdEx = postIndex
  7890. case 7:
  7891. if wireType != 2 {
  7892. return fmt.Errorf("proto: wrong wireType = %d for field TaskDefaults", wireType)
  7893. }
  7894. var msglen int
  7895. for shift := uint(0); ; shift += 7 {
  7896. if shift >= 64 {
  7897. return ErrIntOverflowSpecs
  7898. }
  7899. if iNdEx >= l {
  7900. return io.ErrUnexpectedEOF
  7901. }
  7902. b := dAtA[iNdEx]
  7903. iNdEx++
  7904. msglen |= int(b&0x7F) << shift
  7905. if b < 0x80 {
  7906. break
  7907. }
  7908. }
  7909. if msglen < 0 {
  7910. return ErrInvalidLengthSpecs
  7911. }
  7912. postIndex := iNdEx + msglen
  7913. if postIndex < 0 {
  7914. return ErrInvalidLengthSpecs
  7915. }
  7916. if postIndex > l {
  7917. return io.ErrUnexpectedEOF
  7918. }
  7919. if err := m.TaskDefaults.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7920. return err
  7921. }
  7922. iNdEx = postIndex
  7923. case 8:
  7924. if wireType != 2 {
  7925. return fmt.Errorf("proto: wrong wireType = %d for field EncryptionConfig", wireType)
  7926. }
  7927. var msglen int
  7928. for shift := uint(0); ; shift += 7 {
  7929. if shift >= 64 {
  7930. return ErrIntOverflowSpecs
  7931. }
  7932. if iNdEx >= l {
  7933. return io.ErrUnexpectedEOF
  7934. }
  7935. b := dAtA[iNdEx]
  7936. iNdEx++
  7937. msglen |= int(b&0x7F) << shift
  7938. if b < 0x80 {
  7939. break
  7940. }
  7941. }
  7942. if msglen < 0 {
  7943. return ErrInvalidLengthSpecs
  7944. }
  7945. postIndex := iNdEx + msglen
  7946. if postIndex < 0 {
  7947. return ErrInvalidLengthSpecs
  7948. }
  7949. if postIndex > l {
  7950. return io.ErrUnexpectedEOF
  7951. }
  7952. if err := m.EncryptionConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  7953. return err
  7954. }
  7955. iNdEx = postIndex
  7956. default:
  7957. iNdEx = preIndex
  7958. skippy, err := skipSpecs(dAtA[iNdEx:])
  7959. if err != nil {
  7960. return err
  7961. }
  7962. if skippy < 0 {
  7963. return ErrInvalidLengthSpecs
  7964. }
  7965. if (iNdEx + skippy) < 0 {
  7966. return ErrInvalidLengthSpecs
  7967. }
  7968. if (iNdEx + skippy) > l {
  7969. return io.ErrUnexpectedEOF
  7970. }
  7971. iNdEx += skippy
  7972. }
  7973. }
  7974. if iNdEx > l {
  7975. return io.ErrUnexpectedEOF
  7976. }
  7977. return nil
  7978. }
  7979. func (m *SecretSpec) Unmarshal(dAtA []byte) error {
  7980. l := len(dAtA)
  7981. iNdEx := 0
  7982. for iNdEx < l {
  7983. preIndex := iNdEx
  7984. var wire uint64
  7985. for shift := uint(0); ; shift += 7 {
  7986. if shift >= 64 {
  7987. return ErrIntOverflowSpecs
  7988. }
  7989. if iNdEx >= l {
  7990. return io.ErrUnexpectedEOF
  7991. }
  7992. b := dAtA[iNdEx]
  7993. iNdEx++
  7994. wire |= uint64(b&0x7F) << shift
  7995. if b < 0x80 {
  7996. break
  7997. }
  7998. }
  7999. fieldNum := int32(wire >> 3)
  8000. wireType := int(wire & 0x7)
  8001. if wireType == 4 {
  8002. return fmt.Errorf("proto: SecretSpec: wiretype end group for non-group")
  8003. }
  8004. if fieldNum <= 0 {
  8005. return fmt.Errorf("proto: SecretSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  8006. }
  8007. switch fieldNum {
  8008. case 1:
  8009. if wireType != 2 {
  8010. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  8011. }
  8012. var msglen int
  8013. for shift := uint(0); ; shift += 7 {
  8014. if shift >= 64 {
  8015. return ErrIntOverflowSpecs
  8016. }
  8017. if iNdEx >= l {
  8018. return io.ErrUnexpectedEOF
  8019. }
  8020. b := dAtA[iNdEx]
  8021. iNdEx++
  8022. msglen |= int(b&0x7F) << shift
  8023. if b < 0x80 {
  8024. break
  8025. }
  8026. }
  8027. if msglen < 0 {
  8028. return ErrInvalidLengthSpecs
  8029. }
  8030. postIndex := iNdEx + msglen
  8031. if postIndex < 0 {
  8032. return ErrInvalidLengthSpecs
  8033. }
  8034. if postIndex > l {
  8035. return io.ErrUnexpectedEOF
  8036. }
  8037. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8038. return err
  8039. }
  8040. iNdEx = postIndex
  8041. case 2:
  8042. if wireType != 2 {
  8043. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  8044. }
  8045. var byteLen int
  8046. for shift := uint(0); ; shift += 7 {
  8047. if shift >= 64 {
  8048. return ErrIntOverflowSpecs
  8049. }
  8050. if iNdEx >= l {
  8051. return io.ErrUnexpectedEOF
  8052. }
  8053. b := dAtA[iNdEx]
  8054. iNdEx++
  8055. byteLen |= int(b&0x7F) << shift
  8056. if b < 0x80 {
  8057. break
  8058. }
  8059. }
  8060. if byteLen < 0 {
  8061. return ErrInvalidLengthSpecs
  8062. }
  8063. postIndex := iNdEx + byteLen
  8064. if postIndex < 0 {
  8065. return ErrInvalidLengthSpecs
  8066. }
  8067. if postIndex > l {
  8068. return io.ErrUnexpectedEOF
  8069. }
  8070. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  8071. if m.Data == nil {
  8072. m.Data = []byte{}
  8073. }
  8074. iNdEx = postIndex
  8075. case 3:
  8076. if wireType != 2 {
  8077. return fmt.Errorf("proto: wrong wireType = %d for field Templating", wireType)
  8078. }
  8079. var msglen int
  8080. for shift := uint(0); ; shift += 7 {
  8081. if shift >= 64 {
  8082. return ErrIntOverflowSpecs
  8083. }
  8084. if iNdEx >= l {
  8085. return io.ErrUnexpectedEOF
  8086. }
  8087. b := dAtA[iNdEx]
  8088. iNdEx++
  8089. msglen |= int(b&0x7F) << shift
  8090. if b < 0x80 {
  8091. break
  8092. }
  8093. }
  8094. if msglen < 0 {
  8095. return ErrInvalidLengthSpecs
  8096. }
  8097. postIndex := iNdEx + msglen
  8098. if postIndex < 0 {
  8099. return ErrInvalidLengthSpecs
  8100. }
  8101. if postIndex > l {
  8102. return io.ErrUnexpectedEOF
  8103. }
  8104. if m.Templating == nil {
  8105. m.Templating = &Driver{}
  8106. }
  8107. if err := m.Templating.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8108. return err
  8109. }
  8110. iNdEx = postIndex
  8111. case 4:
  8112. if wireType != 2 {
  8113. return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType)
  8114. }
  8115. var msglen int
  8116. for shift := uint(0); ; shift += 7 {
  8117. if shift >= 64 {
  8118. return ErrIntOverflowSpecs
  8119. }
  8120. if iNdEx >= l {
  8121. return io.ErrUnexpectedEOF
  8122. }
  8123. b := dAtA[iNdEx]
  8124. iNdEx++
  8125. msglen |= int(b&0x7F) << shift
  8126. if b < 0x80 {
  8127. break
  8128. }
  8129. }
  8130. if msglen < 0 {
  8131. return ErrInvalidLengthSpecs
  8132. }
  8133. postIndex := iNdEx + msglen
  8134. if postIndex < 0 {
  8135. return ErrInvalidLengthSpecs
  8136. }
  8137. if postIndex > l {
  8138. return io.ErrUnexpectedEOF
  8139. }
  8140. if m.Driver == nil {
  8141. m.Driver = &Driver{}
  8142. }
  8143. if err := m.Driver.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8144. return err
  8145. }
  8146. iNdEx = postIndex
  8147. default:
  8148. iNdEx = preIndex
  8149. skippy, err := skipSpecs(dAtA[iNdEx:])
  8150. if err != nil {
  8151. return err
  8152. }
  8153. if skippy < 0 {
  8154. return ErrInvalidLengthSpecs
  8155. }
  8156. if (iNdEx + skippy) < 0 {
  8157. return ErrInvalidLengthSpecs
  8158. }
  8159. if (iNdEx + skippy) > l {
  8160. return io.ErrUnexpectedEOF
  8161. }
  8162. iNdEx += skippy
  8163. }
  8164. }
  8165. if iNdEx > l {
  8166. return io.ErrUnexpectedEOF
  8167. }
  8168. return nil
  8169. }
  8170. func (m *ConfigSpec) Unmarshal(dAtA []byte) error {
  8171. l := len(dAtA)
  8172. iNdEx := 0
  8173. for iNdEx < l {
  8174. preIndex := iNdEx
  8175. var wire uint64
  8176. for shift := uint(0); ; shift += 7 {
  8177. if shift >= 64 {
  8178. return ErrIntOverflowSpecs
  8179. }
  8180. if iNdEx >= l {
  8181. return io.ErrUnexpectedEOF
  8182. }
  8183. b := dAtA[iNdEx]
  8184. iNdEx++
  8185. wire |= uint64(b&0x7F) << shift
  8186. if b < 0x80 {
  8187. break
  8188. }
  8189. }
  8190. fieldNum := int32(wire >> 3)
  8191. wireType := int(wire & 0x7)
  8192. if wireType == 4 {
  8193. return fmt.Errorf("proto: ConfigSpec: wiretype end group for non-group")
  8194. }
  8195. if fieldNum <= 0 {
  8196. return fmt.Errorf("proto: ConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  8197. }
  8198. switch fieldNum {
  8199. case 1:
  8200. if wireType != 2 {
  8201. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  8202. }
  8203. var msglen int
  8204. for shift := uint(0); ; shift += 7 {
  8205. if shift >= 64 {
  8206. return ErrIntOverflowSpecs
  8207. }
  8208. if iNdEx >= l {
  8209. return io.ErrUnexpectedEOF
  8210. }
  8211. b := dAtA[iNdEx]
  8212. iNdEx++
  8213. msglen |= int(b&0x7F) << shift
  8214. if b < 0x80 {
  8215. break
  8216. }
  8217. }
  8218. if msglen < 0 {
  8219. return ErrInvalidLengthSpecs
  8220. }
  8221. postIndex := iNdEx + msglen
  8222. if postIndex < 0 {
  8223. return ErrInvalidLengthSpecs
  8224. }
  8225. if postIndex > l {
  8226. return io.ErrUnexpectedEOF
  8227. }
  8228. if err := m.Annotations.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8229. return err
  8230. }
  8231. iNdEx = postIndex
  8232. case 2:
  8233. if wireType != 2 {
  8234. return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType)
  8235. }
  8236. var byteLen int
  8237. for shift := uint(0); ; shift += 7 {
  8238. if shift >= 64 {
  8239. return ErrIntOverflowSpecs
  8240. }
  8241. if iNdEx >= l {
  8242. return io.ErrUnexpectedEOF
  8243. }
  8244. b := dAtA[iNdEx]
  8245. iNdEx++
  8246. byteLen |= int(b&0x7F) << shift
  8247. if b < 0x80 {
  8248. break
  8249. }
  8250. }
  8251. if byteLen < 0 {
  8252. return ErrInvalidLengthSpecs
  8253. }
  8254. postIndex := iNdEx + byteLen
  8255. if postIndex < 0 {
  8256. return ErrInvalidLengthSpecs
  8257. }
  8258. if postIndex > l {
  8259. return io.ErrUnexpectedEOF
  8260. }
  8261. m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...)
  8262. if m.Data == nil {
  8263. m.Data = []byte{}
  8264. }
  8265. iNdEx = postIndex
  8266. case 3:
  8267. if wireType != 2 {
  8268. return fmt.Errorf("proto: wrong wireType = %d for field Templating", wireType)
  8269. }
  8270. var msglen int
  8271. for shift := uint(0); ; shift += 7 {
  8272. if shift >= 64 {
  8273. return ErrIntOverflowSpecs
  8274. }
  8275. if iNdEx >= l {
  8276. return io.ErrUnexpectedEOF
  8277. }
  8278. b := dAtA[iNdEx]
  8279. iNdEx++
  8280. msglen |= int(b&0x7F) << shift
  8281. if b < 0x80 {
  8282. break
  8283. }
  8284. }
  8285. if msglen < 0 {
  8286. return ErrInvalidLengthSpecs
  8287. }
  8288. postIndex := iNdEx + msglen
  8289. if postIndex < 0 {
  8290. return ErrInvalidLengthSpecs
  8291. }
  8292. if postIndex > l {
  8293. return io.ErrUnexpectedEOF
  8294. }
  8295. if m.Templating == nil {
  8296. m.Templating = &Driver{}
  8297. }
  8298. if err := m.Templating.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  8299. return err
  8300. }
  8301. iNdEx = postIndex
  8302. default:
  8303. iNdEx = preIndex
  8304. skippy, err := skipSpecs(dAtA[iNdEx:])
  8305. if err != nil {
  8306. return err
  8307. }
  8308. if skippy < 0 {
  8309. return ErrInvalidLengthSpecs
  8310. }
  8311. if (iNdEx + skippy) < 0 {
  8312. return ErrInvalidLengthSpecs
  8313. }
  8314. if (iNdEx + skippy) > l {
  8315. return io.ErrUnexpectedEOF
  8316. }
  8317. iNdEx += skippy
  8318. }
  8319. }
  8320. if iNdEx > l {
  8321. return io.ErrUnexpectedEOF
  8322. }
  8323. return nil
  8324. }
  8325. func skipSpecs(dAtA []byte) (n int, err error) {
  8326. l := len(dAtA)
  8327. iNdEx := 0
  8328. for iNdEx < l {
  8329. var wire uint64
  8330. for shift := uint(0); ; shift += 7 {
  8331. if shift >= 64 {
  8332. return 0, ErrIntOverflowSpecs
  8333. }
  8334. if iNdEx >= l {
  8335. return 0, io.ErrUnexpectedEOF
  8336. }
  8337. b := dAtA[iNdEx]
  8338. iNdEx++
  8339. wire |= (uint64(b) & 0x7F) << shift
  8340. if b < 0x80 {
  8341. break
  8342. }
  8343. }
  8344. wireType := int(wire & 0x7)
  8345. switch wireType {
  8346. case 0:
  8347. for shift := uint(0); ; shift += 7 {
  8348. if shift >= 64 {
  8349. return 0, ErrIntOverflowSpecs
  8350. }
  8351. if iNdEx >= l {
  8352. return 0, io.ErrUnexpectedEOF
  8353. }
  8354. iNdEx++
  8355. if dAtA[iNdEx-1] < 0x80 {
  8356. break
  8357. }
  8358. }
  8359. return iNdEx, nil
  8360. case 1:
  8361. iNdEx += 8
  8362. return iNdEx, nil
  8363. case 2:
  8364. var length int
  8365. for shift := uint(0); ; shift += 7 {
  8366. if shift >= 64 {
  8367. return 0, ErrIntOverflowSpecs
  8368. }
  8369. if iNdEx >= l {
  8370. return 0, io.ErrUnexpectedEOF
  8371. }
  8372. b := dAtA[iNdEx]
  8373. iNdEx++
  8374. length |= (int(b) & 0x7F) << shift
  8375. if b < 0x80 {
  8376. break
  8377. }
  8378. }
  8379. if length < 0 {
  8380. return 0, ErrInvalidLengthSpecs
  8381. }
  8382. iNdEx += length
  8383. if iNdEx < 0 {
  8384. return 0, ErrInvalidLengthSpecs
  8385. }
  8386. return iNdEx, nil
  8387. case 3:
  8388. for {
  8389. var innerWire uint64
  8390. var start int = iNdEx
  8391. for shift := uint(0); ; shift += 7 {
  8392. if shift >= 64 {
  8393. return 0, ErrIntOverflowSpecs
  8394. }
  8395. if iNdEx >= l {
  8396. return 0, io.ErrUnexpectedEOF
  8397. }
  8398. b := dAtA[iNdEx]
  8399. iNdEx++
  8400. innerWire |= (uint64(b) & 0x7F) << shift
  8401. if b < 0x80 {
  8402. break
  8403. }
  8404. }
  8405. innerWireType := int(innerWire & 0x7)
  8406. if innerWireType == 4 {
  8407. break
  8408. }
  8409. next, err := skipSpecs(dAtA[start:])
  8410. if err != nil {
  8411. return 0, err
  8412. }
  8413. iNdEx = start + next
  8414. if iNdEx < 0 {
  8415. return 0, ErrInvalidLengthSpecs
  8416. }
  8417. }
  8418. return iNdEx, nil
  8419. case 4:
  8420. return iNdEx, nil
  8421. case 5:
  8422. iNdEx += 4
  8423. return iNdEx, nil
  8424. default:
  8425. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  8426. }
  8427. }
  8428. panic("unreachable")
  8429. }
  8430. var (
  8431. ErrInvalidLengthSpecs = fmt.Errorf("proto: negative length found during unmarshaling")
  8432. ErrIntOverflowSpecs = fmt.Errorf("proto: integer overflow")
  8433. )