specs.pb.go 172 KB

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