specs.pb.go 176 KB

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