specs.pb.go 137 KB

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