specs.pb.go 173 KB

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