specs.pb.go 138 KB

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