specs.pb.go 137 KB

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