specs.pb.go 212 KB

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