specs.pb.go 136 KB

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