specs.pb.go 133 KB

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