specs.pb.go 152 KB

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