specs.pb.go 104 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102
  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{6, 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 []*ServiceSpec_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. // NetworkAttachmentConfig specifies how a service should be attached to a particular network.
  234. //
  235. // For now, this is a simple struct, but this can include future information
  236. // instructing Swarm on how this service should work on the particular
  237. // network.
  238. type ServiceSpec_NetworkAttachmentConfig struct {
  239. // Target specifies the target network for attachement. This value may be a
  240. // network name or identifier. Only identifiers are supported at this time.
  241. Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
  242. // Aliases specifies a list of discoverable alternate names for the service on this Target.
  243. Aliases []string `protobuf:"bytes,2,rep,name=aliases" json:"aliases,omitempty"`
  244. }
  245. func (m *ServiceSpec_NetworkAttachmentConfig) Reset() { *m = ServiceSpec_NetworkAttachmentConfig{} }
  246. func (*ServiceSpec_NetworkAttachmentConfig) ProtoMessage() {}
  247. func (*ServiceSpec_NetworkAttachmentConfig) Descriptor() ([]byte, []int) {
  248. return fileDescriptorSpecs, []int{1, 0}
  249. }
  250. // ReplicatedService set the reconcilation target to certain number of replicas.
  251. type ReplicatedService struct {
  252. Replicas uint64 `protobuf:"varint,1,opt,name=replicas,proto3" json:"replicas,omitempty"`
  253. }
  254. func (m *ReplicatedService) Reset() { *m = ReplicatedService{} }
  255. func (*ReplicatedService) ProtoMessage() {}
  256. func (*ReplicatedService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{2} }
  257. // GlobalService represent global service.
  258. type GlobalService struct {
  259. }
  260. func (m *GlobalService) Reset() { *m = GlobalService{} }
  261. func (*GlobalService) ProtoMessage() {}
  262. func (*GlobalService) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{3} }
  263. type TaskSpec struct {
  264. // Types that are valid to be assigned to Runtime:
  265. // *TaskSpec_Container
  266. Runtime isTaskSpec_Runtime `protobuf_oneof:"runtime"`
  267. // Resource requirements for the container.
  268. Resources *ResourceRequirements `protobuf:"bytes,2,opt,name=resources" json:"resources,omitempty"`
  269. // RestartPolicy specifies what to do when a task fails or finishes.
  270. Restart *RestartPolicy `protobuf:"bytes,4,opt,name=restart" json:"restart,omitempty"`
  271. // Placement specifies node selection constraints
  272. Placement *Placement `protobuf:"bytes,5,opt,name=placement" json:"placement,omitempty"`
  273. }
  274. func (m *TaskSpec) Reset() { *m = TaskSpec{} }
  275. func (*TaskSpec) ProtoMessage() {}
  276. func (*TaskSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{4} }
  277. type isTaskSpec_Runtime interface {
  278. isTaskSpec_Runtime()
  279. MarshalTo([]byte) (int, error)
  280. Size() int
  281. }
  282. type TaskSpec_Container struct {
  283. Container *ContainerSpec `protobuf:"bytes,1,opt,name=container,oneof"`
  284. }
  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) GetContainer() *ContainerSpec {
  293. if x, ok := m.GetRuntime().(*TaskSpec_Container); ok {
  294. return x.Container
  295. }
  296. return nil
  297. }
  298. // XXX_OneofFuncs is for the internal use of the proto package.
  299. 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{}) {
  300. return _TaskSpec_OneofMarshaler, _TaskSpec_OneofUnmarshaler, _TaskSpec_OneofSizer, []interface{}{
  301. (*TaskSpec_Container)(nil),
  302. }
  303. }
  304. func _TaskSpec_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
  305. m := msg.(*TaskSpec)
  306. // runtime
  307. switch x := m.Runtime.(type) {
  308. case *TaskSpec_Container:
  309. _ = b.EncodeVarint(1<<3 | proto.WireBytes)
  310. if err := b.EncodeMessage(x.Container); err != nil {
  311. return err
  312. }
  313. case nil:
  314. default:
  315. return fmt.Errorf("TaskSpec.Runtime has unexpected type %T", x)
  316. }
  317. return nil
  318. }
  319. func _TaskSpec_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
  320. m := msg.(*TaskSpec)
  321. switch tag {
  322. case 1: // runtime.container
  323. if wire != proto.WireBytes {
  324. return true, proto.ErrInternalBadWireType
  325. }
  326. msg := new(ContainerSpec)
  327. err := b.DecodeMessage(msg)
  328. m.Runtime = &TaskSpec_Container{msg}
  329. return true, err
  330. default:
  331. return false, nil
  332. }
  333. }
  334. func _TaskSpec_OneofSizer(msg proto.Message) (n int) {
  335. m := msg.(*TaskSpec)
  336. // runtime
  337. switch x := m.Runtime.(type) {
  338. case *TaskSpec_Container:
  339. s := proto.Size(x.Container)
  340. n += proto.SizeVarint(1<<3 | proto.WireBytes)
  341. n += proto.SizeVarint(uint64(s))
  342. n += s
  343. case nil:
  344. default:
  345. panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
  346. }
  347. return n
  348. }
  349. // Container specifies runtime parameters for a container.
  350. type ContainerSpec struct {
  351. // image defines the image reference, as specified in the
  352. // distribution/reference package. This may include a registry host, name,
  353. // tag or digest.
  354. //
  355. // The field will be directly passed to the engine pulling. Well-behaved
  356. // service definitions will used immutable references, either through tags
  357. // that don't change or verifiable digests.
  358. Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
  359. // Labels defines labels to be added to the container at creation time. If
  360. // collisions with system labels occur, these labels will be overridden.
  361. //
  362. // This field *must* remain compatible with the Labels field of
  363. // Annotations.
  364. 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"`
  365. // Command to run the the container. The first element is a path to the
  366. // executable and the following elements are treated as arguments.
  367. //
  368. // If command is empty, execution will fall back to the image's entrypoint.
  369. Command []string `protobuf:"bytes,3,rep,name=command" json:"command,omitempty"`
  370. // Args specifies arguments provided to the image's entrypoint.
  371. // Ignored if command is specified.
  372. Args []string `protobuf:"bytes,4,rep,name=args" json:"args,omitempty"`
  373. // Env specifies the environment variables for the container in NAME=VALUE
  374. // format. These must be compliant with [IEEE Std
  375. // 1003.1-2001](http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html).
  376. Env []string `protobuf:"bytes,5,rep,name=env" json:"env,omitempty"`
  377. // Dir defines the working directory to set for the container process.
  378. Dir string `protobuf:"bytes,6,opt,name=dir,proto3" json:"dir,omitempty"`
  379. // User specifies the user that should be employed to run the container.
  380. User string `protobuf:"bytes,7,opt,name=user,proto3" json:"user,omitempty"`
  381. Mounts []Mount `protobuf:"bytes,8,rep,name=mounts" json:"mounts"`
  382. // StopGracePeriod the grace period for stopping the container before
  383. // forcefully killing the container.
  384. StopGracePeriod *docker_swarmkit_v11.Duration `protobuf:"bytes,9,opt,name=stop_grace_period,json=stopGracePeriod" json:"stop_grace_period,omitempty"`
  385. // PullOptions parameterize the behavior of image pulls.
  386. PullOptions *ContainerSpec_PullOptions `protobuf:"bytes,10,opt,name=pull_options,json=pullOptions" json:"pull_options,omitempty"`
  387. }
  388. func (m *ContainerSpec) Reset() { *m = ContainerSpec{} }
  389. func (*ContainerSpec) ProtoMessage() {}
  390. func (*ContainerSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{5} }
  391. // PullOptions allows one to parameterize an image pull.
  392. type ContainerSpec_PullOptions struct {
  393. // RegistryAuth is the registry auth token obtained from the client, required
  394. // to pull private images. This is the unmodified JSON used as part of
  395. // the `X-Registry-Auth` header.
  396. // TODO(nishanttotla): This field will later be deprecated
  397. RegistryAuth string `protobuf:"bytes,64,opt,name=registry_auth,json=registryAuth,proto3" json:"registry_auth,omitempty"`
  398. }
  399. func (m *ContainerSpec_PullOptions) Reset() { *m = ContainerSpec_PullOptions{} }
  400. func (*ContainerSpec_PullOptions) ProtoMessage() {}
  401. func (*ContainerSpec_PullOptions) Descriptor() ([]byte, []int) {
  402. return fileDescriptorSpecs, []int{5, 1}
  403. }
  404. // EndpointSpec defines the properties that can be configured to
  405. // access and loadbalance the service.
  406. type EndpointSpec struct {
  407. Mode EndpointSpec_ResolutionMode `protobuf:"varint,1,opt,name=mode,proto3,enum=docker.swarmkit.v1.EndpointSpec_ResolutionMode" json:"mode,omitempty"`
  408. // List of exposed ports that this service is accessible from
  409. // external to the cluster.
  410. Ports []*PortConfig `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty"`
  411. }
  412. func (m *EndpointSpec) Reset() { *m = EndpointSpec{} }
  413. func (*EndpointSpec) ProtoMessage() {}
  414. func (*EndpointSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{6} }
  415. // NetworkSpec specifies user defined network parameters.
  416. type NetworkSpec struct {
  417. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  418. // DriverConfig specific configuration consumed by the network driver.
  419. DriverConfig *Driver `protobuf:"bytes,2,opt,name=driver_config,json=driverConfig" json:"driver_config,omitempty"`
  420. // IPv6Enabled enables support for IPv6 on the network.
  421. Ipv6Enabled bool `protobuf:"varint,3,opt,name=ipv6_enabled,json=ipv6Enabled,proto3" json:"ipv6_enabled,omitempty"`
  422. // internal restricts external access to the network. This may be
  423. // accomplished by disabling the default gateway or through other means.
  424. Internal bool `protobuf:"varint,4,opt,name=internal,proto3" json:"internal,omitempty"`
  425. IPAM *IPAMOptions `protobuf:"bytes,5,opt,name=ipam" json:"ipam,omitempty"`
  426. }
  427. func (m *NetworkSpec) Reset() { *m = NetworkSpec{} }
  428. func (*NetworkSpec) ProtoMessage() {}
  429. func (*NetworkSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{7} }
  430. // ClusterSpec specifies global cluster settings.
  431. type ClusterSpec struct {
  432. Annotations Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations"`
  433. // AcceptancePolicy defines the certificate issuance policy.
  434. AcceptancePolicy AcceptancePolicy `protobuf:"bytes,2,opt,name=acceptance_policy,json=acceptancePolicy" json:"acceptance_policy"`
  435. // Orchestration defines cluster-level orchestration settings.
  436. Orchestration OrchestrationConfig `protobuf:"bytes,3,opt,name=orchestration" json:"orchestration"`
  437. // Raft defines the cluster's raft settings.
  438. Raft RaftConfig `protobuf:"bytes,4,opt,name=raft" json:"raft"`
  439. // Dispatcher defines cluster-level dispatcher settings.
  440. Dispatcher DispatcherConfig `protobuf:"bytes,5,opt,name=dispatcher" json:"dispatcher"`
  441. // CAConfig defines cluster-level certificate authority settings.
  442. CAConfig CAConfig `protobuf:"bytes,6,opt,name=ca_config,json=caConfig" json:"ca_config"`
  443. }
  444. func (m *ClusterSpec) Reset() { *m = ClusterSpec{} }
  445. func (*ClusterSpec) ProtoMessage() {}
  446. func (*ClusterSpec) Descriptor() ([]byte, []int) { return fileDescriptorSpecs, []int{8} }
  447. func init() {
  448. proto.RegisterType((*NodeSpec)(nil), "docker.swarmkit.v1.NodeSpec")
  449. proto.RegisterType((*ServiceSpec)(nil), "docker.swarmkit.v1.ServiceSpec")
  450. proto.RegisterType((*ServiceSpec_NetworkAttachmentConfig)(nil), "docker.swarmkit.v1.ServiceSpec.NetworkAttachmentConfig")
  451. proto.RegisterType((*ReplicatedService)(nil), "docker.swarmkit.v1.ReplicatedService")
  452. proto.RegisterType((*GlobalService)(nil), "docker.swarmkit.v1.GlobalService")
  453. proto.RegisterType((*TaskSpec)(nil), "docker.swarmkit.v1.TaskSpec")
  454. proto.RegisterType((*ContainerSpec)(nil), "docker.swarmkit.v1.ContainerSpec")
  455. proto.RegisterType((*ContainerSpec_PullOptions)(nil), "docker.swarmkit.v1.ContainerSpec.PullOptions")
  456. proto.RegisterType((*EndpointSpec)(nil), "docker.swarmkit.v1.EndpointSpec")
  457. proto.RegisterType((*NetworkSpec)(nil), "docker.swarmkit.v1.NetworkSpec")
  458. proto.RegisterType((*ClusterSpec)(nil), "docker.swarmkit.v1.ClusterSpec")
  459. proto.RegisterEnum("docker.swarmkit.v1.NodeSpec_Membership", NodeSpec_Membership_name, NodeSpec_Membership_value)
  460. proto.RegisterEnum("docker.swarmkit.v1.NodeSpec_Availability", NodeSpec_Availability_name, NodeSpec_Availability_value)
  461. proto.RegisterEnum("docker.swarmkit.v1.EndpointSpec_ResolutionMode", EndpointSpec_ResolutionMode_name, EndpointSpec_ResolutionMode_value)
  462. }
  463. func (m *NodeSpec) Copy() *NodeSpec {
  464. if m == nil {
  465. return nil
  466. }
  467. o := &NodeSpec{
  468. Annotations: *m.Annotations.Copy(),
  469. Role: m.Role,
  470. Membership: m.Membership,
  471. Availability: m.Availability,
  472. }
  473. return o
  474. }
  475. func (m *ServiceSpec) Copy() *ServiceSpec {
  476. if m == nil {
  477. return nil
  478. }
  479. o := &ServiceSpec{
  480. Annotations: *m.Annotations.Copy(),
  481. Task: *m.Task.Copy(),
  482. Update: m.Update.Copy(),
  483. Endpoint: m.Endpoint.Copy(),
  484. }
  485. if m.Networks != nil {
  486. o.Networks = make([]*ServiceSpec_NetworkAttachmentConfig, 0, len(m.Networks))
  487. for _, v := range m.Networks {
  488. o.Networks = append(o.Networks, v.Copy())
  489. }
  490. }
  491. switch m.Mode.(type) {
  492. case *ServiceSpec_Replicated:
  493. i := &ServiceSpec_Replicated{
  494. Replicated: m.GetReplicated().Copy(),
  495. }
  496. o.Mode = i
  497. case *ServiceSpec_Global:
  498. i := &ServiceSpec_Global{
  499. Global: m.GetGlobal().Copy(),
  500. }
  501. o.Mode = i
  502. }
  503. return o
  504. }
  505. func (m *ServiceSpec_NetworkAttachmentConfig) Copy() *ServiceSpec_NetworkAttachmentConfig {
  506. if m == nil {
  507. return nil
  508. }
  509. o := &ServiceSpec_NetworkAttachmentConfig{
  510. Target: m.Target,
  511. }
  512. if m.Aliases != nil {
  513. o.Aliases = make([]string, 0, len(m.Aliases))
  514. for _, v := range m.Aliases {
  515. o.Aliases = append(o.Aliases, v)
  516. }
  517. }
  518. return o
  519. }
  520. func (m *ReplicatedService) Copy() *ReplicatedService {
  521. if m == nil {
  522. return nil
  523. }
  524. o := &ReplicatedService{
  525. Replicas: m.Replicas,
  526. }
  527. return o
  528. }
  529. func (m *GlobalService) Copy() *GlobalService {
  530. if m == nil {
  531. return nil
  532. }
  533. o := &GlobalService{}
  534. return o
  535. }
  536. func (m *TaskSpec) Copy() *TaskSpec {
  537. if m == nil {
  538. return nil
  539. }
  540. o := &TaskSpec{
  541. Resources: m.Resources.Copy(),
  542. Restart: m.Restart.Copy(),
  543. Placement: m.Placement.Copy(),
  544. }
  545. switch m.Runtime.(type) {
  546. case *TaskSpec_Container:
  547. i := &TaskSpec_Container{
  548. Container: m.GetContainer().Copy(),
  549. }
  550. o.Runtime = i
  551. }
  552. return o
  553. }
  554. func (m *ContainerSpec) Copy() *ContainerSpec {
  555. if m == nil {
  556. return nil
  557. }
  558. o := &ContainerSpec{
  559. Image: m.Image,
  560. Dir: m.Dir,
  561. User: m.User,
  562. StopGracePeriod: m.StopGracePeriod.Copy(),
  563. PullOptions: m.PullOptions.Copy(),
  564. }
  565. if m.Labels != nil {
  566. o.Labels = make(map[string]string)
  567. for k, v := range m.Labels {
  568. o.Labels[k] = v
  569. }
  570. }
  571. if m.Command != nil {
  572. o.Command = make([]string, 0, len(m.Command))
  573. for _, v := range m.Command {
  574. o.Command = append(o.Command, v)
  575. }
  576. }
  577. if m.Args != nil {
  578. o.Args = make([]string, 0, len(m.Args))
  579. for _, v := range m.Args {
  580. o.Args = append(o.Args, v)
  581. }
  582. }
  583. if m.Env != nil {
  584. o.Env = make([]string, 0, len(m.Env))
  585. for _, v := range m.Env {
  586. o.Env = append(o.Env, v)
  587. }
  588. }
  589. if m.Mounts != nil {
  590. o.Mounts = make([]Mount, 0, len(m.Mounts))
  591. for _, v := range m.Mounts {
  592. o.Mounts = append(o.Mounts, *v.Copy())
  593. }
  594. }
  595. return o
  596. }
  597. func (m *ContainerSpec_PullOptions) Copy() *ContainerSpec_PullOptions {
  598. if m == nil {
  599. return nil
  600. }
  601. o := &ContainerSpec_PullOptions{
  602. RegistryAuth: m.RegistryAuth,
  603. }
  604. return o
  605. }
  606. func (m *EndpointSpec) Copy() *EndpointSpec {
  607. if m == nil {
  608. return nil
  609. }
  610. o := &EndpointSpec{
  611. Mode: m.Mode,
  612. }
  613. if m.Ports != nil {
  614. o.Ports = make([]*PortConfig, 0, len(m.Ports))
  615. for _, v := range m.Ports {
  616. o.Ports = append(o.Ports, v.Copy())
  617. }
  618. }
  619. return o
  620. }
  621. func (m *NetworkSpec) Copy() *NetworkSpec {
  622. if m == nil {
  623. return nil
  624. }
  625. o := &NetworkSpec{
  626. Annotations: *m.Annotations.Copy(),
  627. DriverConfig: m.DriverConfig.Copy(),
  628. Ipv6Enabled: m.Ipv6Enabled,
  629. Internal: m.Internal,
  630. IPAM: m.IPAM.Copy(),
  631. }
  632. return o
  633. }
  634. func (m *ClusterSpec) Copy() *ClusterSpec {
  635. if m == nil {
  636. return nil
  637. }
  638. o := &ClusterSpec{
  639. Annotations: *m.Annotations.Copy(),
  640. AcceptancePolicy: *m.AcceptancePolicy.Copy(),
  641. Orchestration: *m.Orchestration.Copy(),
  642. Raft: *m.Raft.Copy(),
  643. Dispatcher: *m.Dispatcher.Copy(),
  644. CAConfig: *m.CAConfig.Copy(),
  645. }
  646. return o
  647. }
  648. func (this *NodeSpec) GoString() string {
  649. if this == nil {
  650. return "nil"
  651. }
  652. s := make([]string, 0, 8)
  653. s = append(s, "&api.NodeSpec{")
  654. s = append(s, "Annotations: "+strings.Replace(this.Annotations.GoString(), `&`, ``, 1)+",\n")
  655. s = append(s, "Role: "+fmt.Sprintf("%#v", this.Role)+",\n")
  656. s = append(s, "Membership: "+fmt.Sprintf("%#v", this.Membership)+",\n")
  657. s = append(s, "Availability: "+fmt.Sprintf("%#v", this.Availability)+",\n")
  658. s = append(s, "}")
  659. return strings.Join(s, "")
  660. }
  661. func (this *ServiceSpec) GoString() string {
  662. if this == nil {
  663. return "nil"
  664. }
  665. s := make([]string, 0, 11)
  666. s = append(s, "&api.ServiceSpec{")
  667. s = append(s, "Annotations: "+strings.Replace(this.Annotations.GoString(), `&`, ``, 1)+",\n")
  668. s = append(s, "Task: "+strings.Replace(this.Task.GoString(), `&`, ``, 1)+",\n")
  669. if this.Mode != nil {
  670. s = append(s, "Mode: "+fmt.Sprintf("%#v", this.Mode)+",\n")
  671. }
  672. if this.Update != nil {
  673. s = append(s, "Update: "+fmt.Sprintf("%#v", this.Update)+",\n")
  674. }
  675. if this.Networks != nil {
  676. s = append(s, "Networks: "+fmt.Sprintf("%#v", this.Networks)+",\n")
  677. }
  678. if this.Endpoint != nil {
  679. s = append(s, "Endpoint: "+fmt.Sprintf("%#v", this.Endpoint)+",\n")
  680. }
  681. s = append(s, "}")
  682. return strings.Join(s, "")
  683. }
  684. func (this *ServiceSpec_Replicated) GoString() string {
  685. if this == nil {
  686. return "nil"
  687. }
  688. s := strings.Join([]string{`&api.ServiceSpec_Replicated{` +
  689. `Replicated:` + fmt.Sprintf("%#v", this.Replicated) + `}`}, ", ")
  690. return s
  691. }
  692. func (this *ServiceSpec_Global) GoString() string {
  693. if this == nil {
  694. return "nil"
  695. }
  696. s := strings.Join([]string{`&api.ServiceSpec_Global{` +
  697. `Global:` + fmt.Sprintf("%#v", this.Global) + `}`}, ", ")
  698. return s
  699. }
  700. func (this *ServiceSpec_NetworkAttachmentConfig) GoString() string {
  701. if this == nil {
  702. return "nil"
  703. }
  704. s := make([]string, 0, 6)
  705. s = append(s, "&api.ServiceSpec_NetworkAttachmentConfig{")
  706. s = append(s, "Target: "+fmt.Sprintf("%#v", this.Target)+",\n")
  707. s = append(s, "Aliases: "+fmt.Sprintf("%#v", this.Aliases)+",\n")
  708. s = append(s, "}")
  709. return strings.Join(s, "")
  710. }
  711. func (this *ReplicatedService) GoString() string {
  712. if this == nil {
  713. return "nil"
  714. }
  715. s := make([]string, 0, 5)
  716. s = append(s, "&api.ReplicatedService{")
  717. s = append(s, "Replicas: "+fmt.Sprintf("%#v", this.Replicas)+",\n")
  718. s = append(s, "}")
  719. return strings.Join(s, "")
  720. }
  721. func (this *GlobalService) GoString() string {
  722. if this == nil {
  723. return "nil"
  724. }
  725. s := make([]string, 0, 4)
  726. s = append(s, "&api.GlobalService{")
  727. s = append(s, "}")
  728. return strings.Join(s, "")
  729. }
  730. func (this *TaskSpec) GoString() string {
  731. if this == nil {
  732. return "nil"
  733. }
  734. s := make([]string, 0, 8)
  735. s = append(s, "&api.TaskSpec{")
  736. if this.Runtime != nil {
  737. s = append(s, "Runtime: "+fmt.Sprintf("%#v", this.Runtime)+",\n")
  738. }
  739. if this.Resources != nil {
  740. s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n")
  741. }
  742. if this.Restart != nil {
  743. s = append(s, "Restart: "+fmt.Sprintf("%#v", this.Restart)+",\n")
  744. }
  745. if this.Placement != nil {
  746. s = append(s, "Placement: "+fmt.Sprintf("%#v", this.Placement)+",\n")
  747. }
  748. s = append(s, "}")
  749. return strings.Join(s, "")
  750. }
  751. func (this *TaskSpec_Container) GoString() string {
  752. if this == nil {
  753. return "nil"
  754. }
  755. s := strings.Join([]string{`&api.TaskSpec_Container{` +
  756. `Container:` + fmt.Sprintf("%#v", this.Container) + `}`}, ", ")
  757. return s
  758. }
  759. func (this *ContainerSpec) GoString() string {
  760. if this == nil {
  761. return "nil"
  762. }
  763. s := make([]string, 0, 14)
  764. s = append(s, "&api.ContainerSpec{")
  765. s = append(s, "Image: "+fmt.Sprintf("%#v", this.Image)+",\n")
  766. keysForLabels := make([]string, 0, len(this.Labels))
  767. for k, _ := range this.Labels {
  768. keysForLabels = append(keysForLabels, k)
  769. }
  770. github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
  771. mapStringForLabels := "map[string]string{"
  772. for _, k := range keysForLabels {
  773. mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k])
  774. }
  775. mapStringForLabels += "}"
  776. if this.Labels != nil {
  777. s = append(s, "Labels: "+mapStringForLabels+",\n")
  778. }
  779. s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n")
  780. s = append(s, "Args: "+fmt.Sprintf("%#v", this.Args)+",\n")
  781. s = append(s, "Env: "+fmt.Sprintf("%#v", this.Env)+",\n")
  782. s = append(s, "Dir: "+fmt.Sprintf("%#v", this.Dir)+",\n")
  783. s = append(s, "User: "+fmt.Sprintf("%#v", this.User)+",\n")
  784. if this.Mounts != nil {
  785. s = append(s, "Mounts: "+fmt.Sprintf("%#v", this.Mounts)+",\n")
  786. }
  787. if this.StopGracePeriod != nil {
  788. s = append(s, "StopGracePeriod: "+fmt.Sprintf("%#v", this.StopGracePeriod)+",\n")
  789. }
  790. if this.PullOptions != nil {
  791. s = append(s, "PullOptions: "+fmt.Sprintf("%#v", this.PullOptions)+",\n")
  792. }
  793. s = append(s, "}")
  794. return strings.Join(s, "")
  795. }
  796. func (this *ContainerSpec_PullOptions) GoString() string {
  797. if this == nil {
  798. return "nil"
  799. }
  800. s := make([]string, 0, 5)
  801. s = append(s, "&api.ContainerSpec_PullOptions{")
  802. s = append(s, "RegistryAuth: "+fmt.Sprintf("%#v", this.RegistryAuth)+",\n")
  803. s = append(s, "}")
  804. return strings.Join(s, "")
  805. }
  806. func (this *EndpointSpec) GoString() string {
  807. if this == nil {
  808. return "nil"
  809. }
  810. s := make([]string, 0, 6)
  811. s = append(s, "&api.EndpointSpec{")
  812. s = append(s, "Mode: "+fmt.Sprintf("%#v", this.Mode)+",\n")
  813. if this.Ports != nil {
  814. s = append(s, "Ports: "+fmt.Sprintf("%#v", this.Ports)+",\n")
  815. }
  816. s = append(s, "}")
  817. return strings.Join(s, "")
  818. }
  819. func (this *NetworkSpec) GoString() string {
  820. if this == nil {
  821. return "nil"
  822. }
  823. s := make([]string, 0, 9)
  824. s = append(s, "&api.NetworkSpec{")
  825. s = append(s, "Annotations: "+strings.Replace(this.Annotations.GoString(), `&`, ``, 1)+",\n")
  826. if this.DriverConfig != nil {
  827. s = append(s, "DriverConfig: "+fmt.Sprintf("%#v", this.DriverConfig)+",\n")
  828. }
  829. s = append(s, "Ipv6Enabled: "+fmt.Sprintf("%#v", this.Ipv6Enabled)+",\n")
  830. s = append(s, "Internal: "+fmt.Sprintf("%#v", this.Internal)+",\n")
  831. if this.IPAM != nil {
  832. s = append(s, "IPAM: "+fmt.Sprintf("%#v", this.IPAM)+",\n")
  833. }
  834. s = append(s, "}")
  835. return strings.Join(s, "")
  836. }
  837. func (this *ClusterSpec) GoString() string {
  838. if this == nil {
  839. return "nil"
  840. }
  841. s := make([]string, 0, 10)
  842. s = append(s, "&api.ClusterSpec{")
  843. s = append(s, "Annotations: "+strings.Replace(this.Annotations.GoString(), `&`, ``, 1)+",\n")
  844. s = append(s, "AcceptancePolicy: "+strings.Replace(this.AcceptancePolicy.GoString(), `&`, ``, 1)+",\n")
  845. s = append(s, "Orchestration: "+strings.Replace(this.Orchestration.GoString(), `&`, ``, 1)+",\n")
  846. s = append(s, "Raft: "+strings.Replace(this.Raft.GoString(), `&`, ``, 1)+",\n")
  847. s = append(s, "Dispatcher: "+strings.Replace(this.Dispatcher.GoString(), `&`, ``, 1)+",\n")
  848. s = append(s, "CAConfig: "+strings.Replace(this.CAConfig.GoString(), `&`, ``, 1)+",\n")
  849. s = append(s, "}")
  850. return strings.Join(s, "")
  851. }
  852. func valueToGoStringSpecs(v interface{}, typ string) string {
  853. rv := reflect.ValueOf(v)
  854. if rv.IsNil() {
  855. return "nil"
  856. }
  857. pv := reflect.Indirect(rv).Interface()
  858. return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
  859. }
  860. func extensionToGoStringSpecs(e map[int32]github_com_gogo_protobuf_proto.Extension) string {
  861. if e == nil {
  862. return "nil"
  863. }
  864. s := "map[int32]proto.Extension{"
  865. keys := make([]int, 0, len(e))
  866. for k := range e {
  867. keys = append(keys, int(k))
  868. }
  869. sort.Ints(keys)
  870. ss := []string{}
  871. for _, k := range keys {
  872. ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
  873. }
  874. s += strings.Join(ss, ",") + "}"
  875. return s
  876. }
  877. func (m *NodeSpec) Marshal() (data []byte, err error) {
  878. size := m.Size()
  879. data = make([]byte, size)
  880. n, err := m.MarshalTo(data)
  881. if err != nil {
  882. return nil, err
  883. }
  884. return data[:n], nil
  885. }
  886. func (m *NodeSpec) MarshalTo(data []byte) (int, error) {
  887. var i int
  888. _ = i
  889. var l int
  890. _ = l
  891. data[i] = 0xa
  892. i++
  893. i = encodeVarintSpecs(data, i, uint64(m.Annotations.Size()))
  894. n1, err := m.Annotations.MarshalTo(data[i:])
  895. if err != nil {
  896. return 0, err
  897. }
  898. i += n1
  899. if m.Role != 0 {
  900. data[i] = 0x10
  901. i++
  902. i = encodeVarintSpecs(data, i, uint64(m.Role))
  903. }
  904. if m.Membership != 0 {
  905. data[i] = 0x18
  906. i++
  907. i = encodeVarintSpecs(data, i, uint64(m.Membership))
  908. }
  909. if m.Availability != 0 {
  910. data[i] = 0x20
  911. i++
  912. i = encodeVarintSpecs(data, i, uint64(m.Availability))
  913. }
  914. return i, nil
  915. }
  916. func (m *ServiceSpec) Marshal() (data []byte, err error) {
  917. size := m.Size()
  918. data = make([]byte, size)
  919. n, err := m.MarshalTo(data)
  920. if err != nil {
  921. return nil, err
  922. }
  923. return data[:n], nil
  924. }
  925. func (m *ServiceSpec) MarshalTo(data []byte) (int, error) {
  926. var i int
  927. _ = i
  928. var l int
  929. _ = l
  930. data[i] = 0xa
  931. i++
  932. i = encodeVarintSpecs(data, i, uint64(m.Annotations.Size()))
  933. n2, err := m.Annotations.MarshalTo(data[i:])
  934. if err != nil {
  935. return 0, err
  936. }
  937. i += n2
  938. data[i] = 0x12
  939. i++
  940. i = encodeVarintSpecs(data, i, uint64(m.Task.Size()))
  941. n3, err := m.Task.MarshalTo(data[i:])
  942. if err != nil {
  943. return 0, err
  944. }
  945. i += n3
  946. if m.Mode != nil {
  947. nn4, err := m.Mode.MarshalTo(data[i:])
  948. if err != nil {
  949. return 0, err
  950. }
  951. i += nn4
  952. }
  953. if m.Update != nil {
  954. data[i] = 0x32
  955. i++
  956. i = encodeVarintSpecs(data, i, uint64(m.Update.Size()))
  957. n5, err := m.Update.MarshalTo(data[i:])
  958. if err != nil {
  959. return 0, err
  960. }
  961. i += n5
  962. }
  963. if len(m.Networks) > 0 {
  964. for _, msg := range m.Networks {
  965. data[i] = 0x3a
  966. i++
  967. i = encodeVarintSpecs(data, i, uint64(msg.Size()))
  968. n, err := msg.MarshalTo(data[i:])
  969. if err != nil {
  970. return 0, err
  971. }
  972. i += n
  973. }
  974. }
  975. if m.Endpoint != nil {
  976. data[i] = 0x42
  977. i++
  978. i = encodeVarintSpecs(data, i, uint64(m.Endpoint.Size()))
  979. n6, err := m.Endpoint.MarshalTo(data[i:])
  980. if err != nil {
  981. return 0, err
  982. }
  983. i += n6
  984. }
  985. return i, nil
  986. }
  987. func (m *ServiceSpec_Replicated) MarshalTo(data []byte) (int, error) {
  988. i := 0
  989. if m.Replicated != nil {
  990. data[i] = 0x1a
  991. i++
  992. i = encodeVarintSpecs(data, i, uint64(m.Replicated.Size()))
  993. n7, err := m.Replicated.MarshalTo(data[i:])
  994. if err != nil {
  995. return 0, err
  996. }
  997. i += n7
  998. }
  999. return i, nil
  1000. }
  1001. func (m *ServiceSpec_Global) MarshalTo(data []byte) (int, error) {
  1002. i := 0
  1003. if m.Global != nil {
  1004. data[i] = 0x22
  1005. i++
  1006. i = encodeVarintSpecs(data, i, uint64(m.Global.Size()))
  1007. n8, err := m.Global.MarshalTo(data[i:])
  1008. if err != nil {
  1009. return 0, err
  1010. }
  1011. i += n8
  1012. }
  1013. return i, nil
  1014. }
  1015. func (m *ServiceSpec_NetworkAttachmentConfig) Marshal() (data []byte, err error) {
  1016. size := m.Size()
  1017. data = make([]byte, size)
  1018. n, err := m.MarshalTo(data)
  1019. if err != nil {
  1020. return nil, err
  1021. }
  1022. return data[:n], nil
  1023. }
  1024. func (m *ServiceSpec_NetworkAttachmentConfig) MarshalTo(data []byte) (int, error) {
  1025. var i int
  1026. _ = i
  1027. var l int
  1028. _ = l
  1029. if len(m.Target) > 0 {
  1030. data[i] = 0xa
  1031. i++
  1032. i = encodeVarintSpecs(data, i, uint64(len(m.Target)))
  1033. i += copy(data[i:], m.Target)
  1034. }
  1035. if len(m.Aliases) > 0 {
  1036. for _, s := range m.Aliases {
  1037. data[i] = 0x12
  1038. i++
  1039. l = len(s)
  1040. for l >= 1<<7 {
  1041. data[i] = uint8(uint64(l)&0x7f | 0x80)
  1042. l >>= 7
  1043. i++
  1044. }
  1045. data[i] = uint8(l)
  1046. i++
  1047. i += copy(data[i:], s)
  1048. }
  1049. }
  1050. return i, nil
  1051. }
  1052. func (m *ReplicatedService) Marshal() (data []byte, err error) {
  1053. size := m.Size()
  1054. data = make([]byte, size)
  1055. n, err := m.MarshalTo(data)
  1056. if err != nil {
  1057. return nil, err
  1058. }
  1059. return data[:n], nil
  1060. }
  1061. func (m *ReplicatedService) MarshalTo(data []byte) (int, error) {
  1062. var i int
  1063. _ = i
  1064. var l int
  1065. _ = l
  1066. if m.Replicas != 0 {
  1067. data[i] = 0x8
  1068. i++
  1069. i = encodeVarintSpecs(data, i, uint64(m.Replicas))
  1070. }
  1071. return i, nil
  1072. }
  1073. func (m *GlobalService) Marshal() (data []byte, err error) {
  1074. size := m.Size()
  1075. data = make([]byte, size)
  1076. n, err := m.MarshalTo(data)
  1077. if err != nil {
  1078. return nil, err
  1079. }
  1080. return data[:n], nil
  1081. }
  1082. func (m *GlobalService) MarshalTo(data []byte) (int, error) {
  1083. var i int
  1084. _ = i
  1085. var l int
  1086. _ = l
  1087. return i, nil
  1088. }
  1089. func (m *TaskSpec) Marshal() (data []byte, err error) {
  1090. size := m.Size()
  1091. data = make([]byte, size)
  1092. n, err := m.MarshalTo(data)
  1093. if err != nil {
  1094. return nil, err
  1095. }
  1096. return data[:n], nil
  1097. }
  1098. func (m *TaskSpec) MarshalTo(data []byte) (int, error) {
  1099. var i int
  1100. _ = i
  1101. var l int
  1102. _ = l
  1103. if m.Runtime != nil {
  1104. nn9, err := m.Runtime.MarshalTo(data[i:])
  1105. if err != nil {
  1106. return 0, err
  1107. }
  1108. i += nn9
  1109. }
  1110. if m.Resources != nil {
  1111. data[i] = 0x12
  1112. i++
  1113. i = encodeVarintSpecs(data, i, uint64(m.Resources.Size()))
  1114. n10, err := m.Resources.MarshalTo(data[i:])
  1115. if err != nil {
  1116. return 0, err
  1117. }
  1118. i += n10
  1119. }
  1120. if m.Restart != nil {
  1121. data[i] = 0x22
  1122. i++
  1123. i = encodeVarintSpecs(data, i, uint64(m.Restart.Size()))
  1124. n11, err := m.Restart.MarshalTo(data[i:])
  1125. if err != nil {
  1126. return 0, err
  1127. }
  1128. i += n11
  1129. }
  1130. if m.Placement != nil {
  1131. data[i] = 0x2a
  1132. i++
  1133. i = encodeVarintSpecs(data, i, uint64(m.Placement.Size()))
  1134. n12, err := m.Placement.MarshalTo(data[i:])
  1135. if err != nil {
  1136. return 0, err
  1137. }
  1138. i += n12
  1139. }
  1140. return i, nil
  1141. }
  1142. func (m *TaskSpec_Container) MarshalTo(data []byte) (int, error) {
  1143. i := 0
  1144. if m.Container != nil {
  1145. data[i] = 0xa
  1146. i++
  1147. i = encodeVarintSpecs(data, i, uint64(m.Container.Size()))
  1148. n13, err := m.Container.MarshalTo(data[i:])
  1149. if err != nil {
  1150. return 0, err
  1151. }
  1152. i += n13
  1153. }
  1154. return i, nil
  1155. }
  1156. func (m *ContainerSpec) Marshal() (data []byte, err error) {
  1157. size := m.Size()
  1158. data = make([]byte, size)
  1159. n, err := m.MarshalTo(data)
  1160. if err != nil {
  1161. return nil, err
  1162. }
  1163. return data[:n], nil
  1164. }
  1165. func (m *ContainerSpec) MarshalTo(data []byte) (int, error) {
  1166. var i int
  1167. _ = i
  1168. var l int
  1169. _ = l
  1170. if len(m.Image) > 0 {
  1171. data[i] = 0xa
  1172. i++
  1173. i = encodeVarintSpecs(data, i, uint64(len(m.Image)))
  1174. i += copy(data[i:], m.Image)
  1175. }
  1176. if len(m.Labels) > 0 {
  1177. for k, _ := range m.Labels {
  1178. data[i] = 0x12
  1179. i++
  1180. v := m.Labels[k]
  1181. mapSize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  1182. i = encodeVarintSpecs(data, i, uint64(mapSize))
  1183. data[i] = 0xa
  1184. i++
  1185. i = encodeVarintSpecs(data, i, uint64(len(k)))
  1186. i += copy(data[i:], k)
  1187. data[i] = 0x12
  1188. i++
  1189. i = encodeVarintSpecs(data, i, uint64(len(v)))
  1190. i += copy(data[i:], v)
  1191. }
  1192. }
  1193. if len(m.Command) > 0 {
  1194. for _, s := range m.Command {
  1195. data[i] = 0x1a
  1196. i++
  1197. l = len(s)
  1198. for l >= 1<<7 {
  1199. data[i] = uint8(uint64(l)&0x7f | 0x80)
  1200. l >>= 7
  1201. i++
  1202. }
  1203. data[i] = uint8(l)
  1204. i++
  1205. i += copy(data[i:], s)
  1206. }
  1207. }
  1208. if len(m.Args) > 0 {
  1209. for _, s := range m.Args {
  1210. data[i] = 0x22
  1211. i++
  1212. l = len(s)
  1213. for l >= 1<<7 {
  1214. data[i] = uint8(uint64(l)&0x7f | 0x80)
  1215. l >>= 7
  1216. i++
  1217. }
  1218. data[i] = uint8(l)
  1219. i++
  1220. i += copy(data[i:], s)
  1221. }
  1222. }
  1223. if len(m.Env) > 0 {
  1224. for _, s := range m.Env {
  1225. data[i] = 0x2a
  1226. i++
  1227. l = len(s)
  1228. for l >= 1<<7 {
  1229. data[i] = uint8(uint64(l)&0x7f | 0x80)
  1230. l >>= 7
  1231. i++
  1232. }
  1233. data[i] = uint8(l)
  1234. i++
  1235. i += copy(data[i:], s)
  1236. }
  1237. }
  1238. if len(m.Dir) > 0 {
  1239. data[i] = 0x32
  1240. i++
  1241. i = encodeVarintSpecs(data, i, uint64(len(m.Dir)))
  1242. i += copy(data[i:], m.Dir)
  1243. }
  1244. if len(m.User) > 0 {
  1245. data[i] = 0x3a
  1246. i++
  1247. i = encodeVarintSpecs(data, i, uint64(len(m.User)))
  1248. i += copy(data[i:], m.User)
  1249. }
  1250. if len(m.Mounts) > 0 {
  1251. for _, msg := range m.Mounts {
  1252. data[i] = 0x42
  1253. i++
  1254. i = encodeVarintSpecs(data, i, uint64(msg.Size()))
  1255. n, err := msg.MarshalTo(data[i:])
  1256. if err != nil {
  1257. return 0, err
  1258. }
  1259. i += n
  1260. }
  1261. }
  1262. if m.StopGracePeriod != nil {
  1263. data[i] = 0x4a
  1264. i++
  1265. i = encodeVarintSpecs(data, i, uint64(m.StopGracePeriod.Size()))
  1266. n14, err := m.StopGracePeriod.MarshalTo(data[i:])
  1267. if err != nil {
  1268. return 0, err
  1269. }
  1270. i += n14
  1271. }
  1272. if m.PullOptions != nil {
  1273. data[i] = 0x52
  1274. i++
  1275. i = encodeVarintSpecs(data, i, uint64(m.PullOptions.Size()))
  1276. n15, err := m.PullOptions.MarshalTo(data[i:])
  1277. if err != nil {
  1278. return 0, err
  1279. }
  1280. i += n15
  1281. }
  1282. return i, nil
  1283. }
  1284. func (m *ContainerSpec_PullOptions) Marshal() (data []byte, err error) {
  1285. size := m.Size()
  1286. data = make([]byte, size)
  1287. n, err := m.MarshalTo(data)
  1288. if err != nil {
  1289. return nil, err
  1290. }
  1291. return data[:n], nil
  1292. }
  1293. func (m *ContainerSpec_PullOptions) MarshalTo(data []byte) (int, error) {
  1294. var i int
  1295. _ = i
  1296. var l int
  1297. _ = l
  1298. if len(m.RegistryAuth) > 0 {
  1299. data[i] = 0x82
  1300. i++
  1301. data[i] = 0x4
  1302. i++
  1303. i = encodeVarintSpecs(data, i, uint64(len(m.RegistryAuth)))
  1304. i += copy(data[i:], m.RegistryAuth)
  1305. }
  1306. return i, nil
  1307. }
  1308. func (m *EndpointSpec) Marshal() (data []byte, err error) {
  1309. size := m.Size()
  1310. data = make([]byte, size)
  1311. n, err := m.MarshalTo(data)
  1312. if err != nil {
  1313. return nil, err
  1314. }
  1315. return data[:n], nil
  1316. }
  1317. func (m *EndpointSpec) MarshalTo(data []byte) (int, error) {
  1318. var i int
  1319. _ = i
  1320. var l int
  1321. _ = l
  1322. if m.Mode != 0 {
  1323. data[i] = 0x8
  1324. i++
  1325. i = encodeVarintSpecs(data, i, uint64(m.Mode))
  1326. }
  1327. if len(m.Ports) > 0 {
  1328. for _, msg := range m.Ports {
  1329. data[i] = 0x12
  1330. i++
  1331. i = encodeVarintSpecs(data, i, uint64(msg.Size()))
  1332. n, err := msg.MarshalTo(data[i:])
  1333. if err != nil {
  1334. return 0, err
  1335. }
  1336. i += n
  1337. }
  1338. }
  1339. return i, nil
  1340. }
  1341. func (m *NetworkSpec) Marshal() (data []byte, err error) {
  1342. size := m.Size()
  1343. data = make([]byte, size)
  1344. n, err := m.MarshalTo(data)
  1345. if err != nil {
  1346. return nil, err
  1347. }
  1348. return data[:n], nil
  1349. }
  1350. func (m *NetworkSpec) MarshalTo(data []byte) (int, error) {
  1351. var i int
  1352. _ = i
  1353. var l int
  1354. _ = l
  1355. data[i] = 0xa
  1356. i++
  1357. i = encodeVarintSpecs(data, i, uint64(m.Annotations.Size()))
  1358. n16, err := m.Annotations.MarshalTo(data[i:])
  1359. if err != nil {
  1360. return 0, err
  1361. }
  1362. i += n16
  1363. if m.DriverConfig != nil {
  1364. data[i] = 0x12
  1365. i++
  1366. i = encodeVarintSpecs(data, i, uint64(m.DriverConfig.Size()))
  1367. n17, err := m.DriverConfig.MarshalTo(data[i:])
  1368. if err != nil {
  1369. return 0, err
  1370. }
  1371. i += n17
  1372. }
  1373. if m.Ipv6Enabled {
  1374. data[i] = 0x18
  1375. i++
  1376. if m.Ipv6Enabled {
  1377. data[i] = 1
  1378. } else {
  1379. data[i] = 0
  1380. }
  1381. i++
  1382. }
  1383. if m.Internal {
  1384. data[i] = 0x20
  1385. i++
  1386. if m.Internal {
  1387. data[i] = 1
  1388. } else {
  1389. data[i] = 0
  1390. }
  1391. i++
  1392. }
  1393. if m.IPAM != nil {
  1394. data[i] = 0x2a
  1395. i++
  1396. i = encodeVarintSpecs(data, i, uint64(m.IPAM.Size()))
  1397. n18, err := m.IPAM.MarshalTo(data[i:])
  1398. if err != nil {
  1399. return 0, err
  1400. }
  1401. i += n18
  1402. }
  1403. return i, nil
  1404. }
  1405. func (m *ClusterSpec) Marshal() (data []byte, err error) {
  1406. size := m.Size()
  1407. data = make([]byte, size)
  1408. n, err := m.MarshalTo(data)
  1409. if err != nil {
  1410. return nil, err
  1411. }
  1412. return data[:n], nil
  1413. }
  1414. func (m *ClusterSpec) MarshalTo(data []byte) (int, error) {
  1415. var i int
  1416. _ = i
  1417. var l int
  1418. _ = l
  1419. data[i] = 0xa
  1420. i++
  1421. i = encodeVarintSpecs(data, i, uint64(m.Annotations.Size()))
  1422. n19, err := m.Annotations.MarshalTo(data[i:])
  1423. if err != nil {
  1424. return 0, err
  1425. }
  1426. i += n19
  1427. data[i] = 0x12
  1428. i++
  1429. i = encodeVarintSpecs(data, i, uint64(m.AcceptancePolicy.Size()))
  1430. n20, err := m.AcceptancePolicy.MarshalTo(data[i:])
  1431. if err != nil {
  1432. return 0, err
  1433. }
  1434. i += n20
  1435. data[i] = 0x1a
  1436. i++
  1437. i = encodeVarintSpecs(data, i, uint64(m.Orchestration.Size()))
  1438. n21, err := m.Orchestration.MarshalTo(data[i:])
  1439. if err != nil {
  1440. return 0, err
  1441. }
  1442. i += n21
  1443. data[i] = 0x22
  1444. i++
  1445. i = encodeVarintSpecs(data, i, uint64(m.Raft.Size()))
  1446. n22, err := m.Raft.MarshalTo(data[i:])
  1447. if err != nil {
  1448. return 0, err
  1449. }
  1450. i += n22
  1451. data[i] = 0x2a
  1452. i++
  1453. i = encodeVarintSpecs(data, i, uint64(m.Dispatcher.Size()))
  1454. n23, err := m.Dispatcher.MarshalTo(data[i:])
  1455. if err != nil {
  1456. return 0, err
  1457. }
  1458. i += n23
  1459. data[i] = 0x32
  1460. i++
  1461. i = encodeVarintSpecs(data, i, uint64(m.CAConfig.Size()))
  1462. n24, err := m.CAConfig.MarshalTo(data[i:])
  1463. if err != nil {
  1464. return 0, err
  1465. }
  1466. i += n24
  1467. return i, nil
  1468. }
  1469. func encodeFixed64Specs(data []byte, offset int, v uint64) int {
  1470. data[offset] = uint8(v)
  1471. data[offset+1] = uint8(v >> 8)
  1472. data[offset+2] = uint8(v >> 16)
  1473. data[offset+3] = uint8(v >> 24)
  1474. data[offset+4] = uint8(v >> 32)
  1475. data[offset+5] = uint8(v >> 40)
  1476. data[offset+6] = uint8(v >> 48)
  1477. data[offset+7] = uint8(v >> 56)
  1478. return offset + 8
  1479. }
  1480. func encodeFixed32Specs(data []byte, offset int, v uint32) int {
  1481. data[offset] = uint8(v)
  1482. data[offset+1] = uint8(v >> 8)
  1483. data[offset+2] = uint8(v >> 16)
  1484. data[offset+3] = uint8(v >> 24)
  1485. return offset + 4
  1486. }
  1487. func encodeVarintSpecs(data []byte, offset int, v uint64) int {
  1488. for v >= 1<<7 {
  1489. data[offset] = uint8(v&0x7f | 0x80)
  1490. v >>= 7
  1491. offset++
  1492. }
  1493. data[offset] = uint8(v)
  1494. return offset + 1
  1495. }
  1496. func (m *NodeSpec) Size() (n int) {
  1497. var l int
  1498. _ = l
  1499. l = m.Annotations.Size()
  1500. n += 1 + l + sovSpecs(uint64(l))
  1501. if m.Role != 0 {
  1502. n += 1 + sovSpecs(uint64(m.Role))
  1503. }
  1504. if m.Membership != 0 {
  1505. n += 1 + sovSpecs(uint64(m.Membership))
  1506. }
  1507. if m.Availability != 0 {
  1508. n += 1 + sovSpecs(uint64(m.Availability))
  1509. }
  1510. return n
  1511. }
  1512. func (m *ServiceSpec) Size() (n int) {
  1513. var l int
  1514. _ = l
  1515. l = m.Annotations.Size()
  1516. n += 1 + l + sovSpecs(uint64(l))
  1517. l = m.Task.Size()
  1518. n += 1 + l + sovSpecs(uint64(l))
  1519. if m.Mode != nil {
  1520. n += m.Mode.Size()
  1521. }
  1522. if m.Update != nil {
  1523. l = m.Update.Size()
  1524. n += 1 + l + sovSpecs(uint64(l))
  1525. }
  1526. if len(m.Networks) > 0 {
  1527. for _, e := range m.Networks {
  1528. l = e.Size()
  1529. n += 1 + l + sovSpecs(uint64(l))
  1530. }
  1531. }
  1532. if m.Endpoint != nil {
  1533. l = m.Endpoint.Size()
  1534. n += 1 + l + sovSpecs(uint64(l))
  1535. }
  1536. return n
  1537. }
  1538. func (m *ServiceSpec_Replicated) Size() (n int) {
  1539. var l int
  1540. _ = l
  1541. if m.Replicated != nil {
  1542. l = m.Replicated.Size()
  1543. n += 1 + l + sovSpecs(uint64(l))
  1544. }
  1545. return n
  1546. }
  1547. func (m *ServiceSpec_Global) Size() (n int) {
  1548. var l int
  1549. _ = l
  1550. if m.Global != nil {
  1551. l = m.Global.Size()
  1552. n += 1 + l + sovSpecs(uint64(l))
  1553. }
  1554. return n
  1555. }
  1556. func (m *ServiceSpec_NetworkAttachmentConfig) Size() (n int) {
  1557. var l int
  1558. _ = l
  1559. l = len(m.Target)
  1560. if l > 0 {
  1561. n += 1 + l + sovSpecs(uint64(l))
  1562. }
  1563. if len(m.Aliases) > 0 {
  1564. for _, s := range m.Aliases {
  1565. l = len(s)
  1566. n += 1 + l + sovSpecs(uint64(l))
  1567. }
  1568. }
  1569. return n
  1570. }
  1571. func (m *ReplicatedService) Size() (n int) {
  1572. var l int
  1573. _ = l
  1574. if m.Replicas != 0 {
  1575. n += 1 + sovSpecs(uint64(m.Replicas))
  1576. }
  1577. return n
  1578. }
  1579. func (m *GlobalService) Size() (n int) {
  1580. var l int
  1581. _ = l
  1582. return n
  1583. }
  1584. func (m *TaskSpec) Size() (n int) {
  1585. var l int
  1586. _ = l
  1587. if m.Runtime != nil {
  1588. n += m.Runtime.Size()
  1589. }
  1590. if m.Resources != nil {
  1591. l = m.Resources.Size()
  1592. n += 1 + l + sovSpecs(uint64(l))
  1593. }
  1594. if m.Restart != nil {
  1595. l = m.Restart.Size()
  1596. n += 1 + l + sovSpecs(uint64(l))
  1597. }
  1598. if m.Placement != nil {
  1599. l = m.Placement.Size()
  1600. n += 1 + l + sovSpecs(uint64(l))
  1601. }
  1602. return n
  1603. }
  1604. func (m *TaskSpec_Container) Size() (n int) {
  1605. var l int
  1606. _ = l
  1607. if m.Container != nil {
  1608. l = m.Container.Size()
  1609. n += 1 + l + sovSpecs(uint64(l))
  1610. }
  1611. return n
  1612. }
  1613. func (m *ContainerSpec) Size() (n int) {
  1614. var l int
  1615. _ = l
  1616. l = len(m.Image)
  1617. if l > 0 {
  1618. n += 1 + l + sovSpecs(uint64(l))
  1619. }
  1620. if len(m.Labels) > 0 {
  1621. for k, v := range m.Labels {
  1622. _ = k
  1623. _ = v
  1624. mapEntrySize := 1 + len(k) + sovSpecs(uint64(len(k))) + 1 + len(v) + sovSpecs(uint64(len(v)))
  1625. n += mapEntrySize + 1 + sovSpecs(uint64(mapEntrySize))
  1626. }
  1627. }
  1628. if len(m.Command) > 0 {
  1629. for _, s := range m.Command {
  1630. l = len(s)
  1631. n += 1 + l + sovSpecs(uint64(l))
  1632. }
  1633. }
  1634. if len(m.Args) > 0 {
  1635. for _, s := range m.Args {
  1636. l = len(s)
  1637. n += 1 + l + sovSpecs(uint64(l))
  1638. }
  1639. }
  1640. if len(m.Env) > 0 {
  1641. for _, s := range m.Env {
  1642. l = len(s)
  1643. n += 1 + l + sovSpecs(uint64(l))
  1644. }
  1645. }
  1646. l = len(m.Dir)
  1647. if l > 0 {
  1648. n += 1 + l + sovSpecs(uint64(l))
  1649. }
  1650. l = len(m.User)
  1651. if l > 0 {
  1652. n += 1 + l + sovSpecs(uint64(l))
  1653. }
  1654. if len(m.Mounts) > 0 {
  1655. for _, e := range m.Mounts {
  1656. l = e.Size()
  1657. n += 1 + l + sovSpecs(uint64(l))
  1658. }
  1659. }
  1660. if m.StopGracePeriod != nil {
  1661. l = m.StopGracePeriod.Size()
  1662. n += 1 + l + sovSpecs(uint64(l))
  1663. }
  1664. if m.PullOptions != nil {
  1665. l = m.PullOptions.Size()
  1666. n += 1 + l + sovSpecs(uint64(l))
  1667. }
  1668. return n
  1669. }
  1670. func (m *ContainerSpec_PullOptions) Size() (n int) {
  1671. var l int
  1672. _ = l
  1673. l = len(m.RegistryAuth)
  1674. if l > 0 {
  1675. n += 2 + l + sovSpecs(uint64(l))
  1676. }
  1677. return n
  1678. }
  1679. func (m *EndpointSpec) Size() (n int) {
  1680. var l int
  1681. _ = l
  1682. if m.Mode != 0 {
  1683. n += 1 + sovSpecs(uint64(m.Mode))
  1684. }
  1685. if len(m.Ports) > 0 {
  1686. for _, e := range m.Ports {
  1687. l = e.Size()
  1688. n += 1 + l + sovSpecs(uint64(l))
  1689. }
  1690. }
  1691. return n
  1692. }
  1693. func (m *NetworkSpec) Size() (n int) {
  1694. var l int
  1695. _ = l
  1696. l = m.Annotations.Size()
  1697. n += 1 + l + sovSpecs(uint64(l))
  1698. if m.DriverConfig != nil {
  1699. l = m.DriverConfig.Size()
  1700. n += 1 + l + sovSpecs(uint64(l))
  1701. }
  1702. if m.Ipv6Enabled {
  1703. n += 2
  1704. }
  1705. if m.Internal {
  1706. n += 2
  1707. }
  1708. if m.IPAM != nil {
  1709. l = m.IPAM.Size()
  1710. n += 1 + l + sovSpecs(uint64(l))
  1711. }
  1712. return n
  1713. }
  1714. func (m *ClusterSpec) Size() (n int) {
  1715. var l int
  1716. _ = l
  1717. l = m.Annotations.Size()
  1718. n += 1 + l + sovSpecs(uint64(l))
  1719. l = m.AcceptancePolicy.Size()
  1720. n += 1 + l + sovSpecs(uint64(l))
  1721. l = m.Orchestration.Size()
  1722. n += 1 + l + sovSpecs(uint64(l))
  1723. l = m.Raft.Size()
  1724. n += 1 + l + sovSpecs(uint64(l))
  1725. l = m.Dispatcher.Size()
  1726. n += 1 + l + sovSpecs(uint64(l))
  1727. l = m.CAConfig.Size()
  1728. n += 1 + l + sovSpecs(uint64(l))
  1729. return n
  1730. }
  1731. func sovSpecs(x uint64) (n int) {
  1732. for {
  1733. n++
  1734. x >>= 7
  1735. if x == 0 {
  1736. break
  1737. }
  1738. }
  1739. return n
  1740. }
  1741. func sozSpecs(x uint64) (n int) {
  1742. return sovSpecs(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1743. }
  1744. func (this *NodeSpec) String() string {
  1745. if this == nil {
  1746. return "nil"
  1747. }
  1748. s := strings.Join([]string{`&NodeSpec{`,
  1749. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  1750. `Role:` + fmt.Sprintf("%v", this.Role) + `,`,
  1751. `Membership:` + fmt.Sprintf("%v", this.Membership) + `,`,
  1752. `Availability:` + fmt.Sprintf("%v", this.Availability) + `,`,
  1753. `}`,
  1754. }, "")
  1755. return s
  1756. }
  1757. func (this *ServiceSpec) String() string {
  1758. if this == nil {
  1759. return "nil"
  1760. }
  1761. s := strings.Join([]string{`&ServiceSpec{`,
  1762. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  1763. `Task:` + strings.Replace(strings.Replace(this.Task.String(), "TaskSpec", "TaskSpec", 1), `&`, ``, 1) + `,`,
  1764. `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
  1765. `Update:` + strings.Replace(fmt.Sprintf("%v", this.Update), "UpdateConfig", "UpdateConfig", 1) + `,`,
  1766. `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "ServiceSpec_NetworkAttachmentConfig", "ServiceSpec_NetworkAttachmentConfig", 1) + `,`,
  1767. `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "EndpointSpec", "EndpointSpec", 1) + `,`,
  1768. `}`,
  1769. }, "")
  1770. return s
  1771. }
  1772. func (this *ServiceSpec_Replicated) String() string {
  1773. if this == nil {
  1774. return "nil"
  1775. }
  1776. s := strings.Join([]string{`&ServiceSpec_Replicated{`,
  1777. `Replicated:` + strings.Replace(fmt.Sprintf("%v", this.Replicated), "ReplicatedService", "ReplicatedService", 1) + `,`,
  1778. `}`,
  1779. }, "")
  1780. return s
  1781. }
  1782. func (this *ServiceSpec_Global) String() string {
  1783. if this == nil {
  1784. return "nil"
  1785. }
  1786. s := strings.Join([]string{`&ServiceSpec_Global{`,
  1787. `Global:` + strings.Replace(fmt.Sprintf("%v", this.Global), "GlobalService", "GlobalService", 1) + `,`,
  1788. `}`,
  1789. }, "")
  1790. return s
  1791. }
  1792. func (this *ServiceSpec_NetworkAttachmentConfig) String() string {
  1793. if this == nil {
  1794. return "nil"
  1795. }
  1796. s := strings.Join([]string{`&ServiceSpec_NetworkAttachmentConfig{`,
  1797. `Target:` + fmt.Sprintf("%v", this.Target) + `,`,
  1798. `Aliases:` + fmt.Sprintf("%v", this.Aliases) + `,`,
  1799. `}`,
  1800. }, "")
  1801. return s
  1802. }
  1803. func (this *ReplicatedService) String() string {
  1804. if this == nil {
  1805. return "nil"
  1806. }
  1807. s := strings.Join([]string{`&ReplicatedService{`,
  1808. `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`,
  1809. `}`,
  1810. }, "")
  1811. return s
  1812. }
  1813. func (this *GlobalService) String() string {
  1814. if this == nil {
  1815. return "nil"
  1816. }
  1817. s := strings.Join([]string{`&GlobalService{`,
  1818. `}`,
  1819. }, "")
  1820. return s
  1821. }
  1822. func (this *TaskSpec) String() string {
  1823. if this == nil {
  1824. return "nil"
  1825. }
  1826. s := strings.Join([]string{`&TaskSpec{`,
  1827. `Runtime:` + fmt.Sprintf("%v", this.Runtime) + `,`,
  1828. `Resources:` + strings.Replace(fmt.Sprintf("%v", this.Resources), "ResourceRequirements", "ResourceRequirements", 1) + `,`,
  1829. `Restart:` + strings.Replace(fmt.Sprintf("%v", this.Restart), "RestartPolicy", "RestartPolicy", 1) + `,`,
  1830. `Placement:` + strings.Replace(fmt.Sprintf("%v", this.Placement), "Placement", "Placement", 1) + `,`,
  1831. `}`,
  1832. }, "")
  1833. return s
  1834. }
  1835. func (this *TaskSpec_Container) String() string {
  1836. if this == nil {
  1837. return "nil"
  1838. }
  1839. s := strings.Join([]string{`&TaskSpec_Container{`,
  1840. `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerSpec", "ContainerSpec", 1) + `,`,
  1841. `}`,
  1842. }, "")
  1843. return s
  1844. }
  1845. func (this *ContainerSpec) String() string {
  1846. if this == nil {
  1847. return "nil"
  1848. }
  1849. keysForLabels := make([]string, 0, len(this.Labels))
  1850. for k, _ := range this.Labels {
  1851. keysForLabels = append(keysForLabels, k)
  1852. }
  1853. github_com_gogo_protobuf_sortkeys.Strings(keysForLabels)
  1854. mapStringForLabels := "map[string]string{"
  1855. for _, k := range keysForLabels {
  1856. mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k])
  1857. }
  1858. mapStringForLabels += "}"
  1859. s := strings.Join([]string{`&ContainerSpec{`,
  1860. `Image:` + fmt.Sprintf("%v", this.Image) + `,`,
  1861. `Labels:` + mapStringForLabels + `,`,
  1862. `Command:` + fmt.Sprintf("%v", this.Command) + `,`,
  1863. `Args:` + fmt.Sprintf("%v", this.Args) + `,`,
  1864. `Env:` + fmt.Sprintf("%v", this.Env) + `,`,
  1865. `Dir:` + fmt.Sprintf("%v", this.Dir) + `,`,
  1866. `User:` + fmt.Sprintf("%v", this.User) + `,`,
  1867. `Mounts:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Mounts), "Mount", "Mount", 1), `&`, ``, 1) + `,`,
  1868. `StopGracePeriod:` + strings.Replace(fmt.Sprintf("%v", this.StopGracePeriod), "Duration", "docker_swarmkit_v11.Duration", 1) + `,`,
  1869. `PullOptions:` + strings.Replace(fmt.Sprintf("%v", this.PullOptions), "ContainerSpec_PullOptions", "ContainerSpec_PullOptions", 1) + `,`,
  1870. `}`,
  1871. }, "")
  1872. return s
  1873. }
  1874. func (this *ContainerSpec_PullOptions) String() string {
  1875. if this == nil {
  1876. return "nil"
  1877. }
  1878. s := strings.Join([]string{`&ContainerSpec_PullOptions{`,
  1879. `RegistryAuth:` + fmt.Sprintf("%v", this.RegistryAuth) + `,`,
  1880. `}`,
  1881. }, "")
  1882. return s
  1883. }
  1884. func (this *EndpointSpec) String() string {
  1885. if this == nil {
  1886. return "nil"
  1887. }
  1888. s := strings.Join([]string{`&EndpointSpec{`,
  1889. `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`,
  1890. `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "PortConfig", "PortConfig", 1) + `,`,
  1891. `}`,
  1892. }, "")
  1893. return s
  1894. }
  1895. func (this *NetworkSpec) String() string {
  1896. if this == nil {
  1897. return "nil"
  1898. }
  1899. s := strings.Join([]string{`&NetworkSpec{`,
  1900. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  1901. `DriverConfig:` + strings.Replace(fmt.Sprintf("%v", this.DriverConfig), "Driver", "Driver", 1) + `,`,
  1902. `Ipv6Enabled:` + fmt.Sprintf("%v", this.Ipv6Enabled) + `,`,
  1903. `Internal:` + fmt.Sprintf("%v", this.Internal) + `,`,
  1904. `IPAM:` + strings.Replace(fmt.Sprintf("%v", this.IPAM), "IPAMOptions", "IPAMOptions", 1) + `,`,
  1905. `}`,
  1906. }, "")
  1907. return s
  1908. }
  1909. func (this *ClusterSpec) String() string {
  1910. if this == nil {
  1911. return "nil"
  1912. }
  1913. s := strings.Join([]string{`&ClusterSpec{`,
  1914. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  1915. `AcceptancePolicy:` + strings.Replace(strings.Replace(this.AcceptancePolicy.String(), "AcceptancePolicy", "AcceptancePolicy", 1), `&`, ``, 1) + `,`,
  1916. `Orchestration:` + strings.Replace(strings.Replace(this.Orchestration.String(), "OrchestrationConfig", "OrchestrationConfig", 1), `&`, ``, 1) + `,`,
  1917. `Raft:` + strings.Replace(strings.Replace(this.Raft.String(), "RaftConfig", "RaftConfig", 1), `&`, ``, 1) + `,`,
  1918. `Dispatcher:` + strings.Replace(strings.Replace(this.Dispatcher.String(), "DispatcherConfig", "DispatcherConfig", 1), `&`, ``, 1) + `,`,
  1919. `CAConfig:` + strings.Replace(strings.Replace(this.CAConfig.String(), "CAConfig", "CAConfig", 1), `&`, ``, 1) + `,`,
  1920. `}`,
  1921. }, "")
  1922. return s
  1923. }
  1924. func valueToStringSpecs(v interface{}) string {
  1925. rv := reflect.ValueOf(v)
  1926. if rv.IsNil() {
  1927. return "nil"
  1928. }
  1929. pv := reflect.Indirect(rv).Interface()
  1930. return fmt.Sprintf("*%v", pv)
  1931. }
  1932. func (m *NodeSpec) Unmarshal(data []byte) error {
  1933. l := len(data)
  1934. iNdEx := 0
  1935. for iNdEx < l {
  1936. preIndex := iNdEx
  1937. var wire uint64
  1938. for shift := uint(0); ; shift += 7 {
  1939. if shift >= 64 {
  1940. return ErrIntOverflowSpecs
  1941. }
  1942. if iNdEx >= l {
  1943. return io.ErrUnexpectedEOF
  1944. }
  1945. b := data[iNdEx]
  1946. iNdEx++
  1947. wire |= (uint64(b) & 0x7F) << shift
  1948. if b < 0x80 {
  1949. break
  1950. }
  1951. }
  1952. fieldNum := int32(wire >> 3)
  1953. wireType := int(wire & 0x7)
  1954. if wireType == 4 {
  1955. return fmt.Errorf("proto: NodeSpec: wiretype end group for non-group")
  1956. }
  1957. if fieldNum <= 0 {
  1958. return fmt.Errorf("proto: NodeSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  1959. }
  1960. switch fieldNum {
  1961. case 1:
  1962. if wireType != 2 {
  1963. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  1964. }
  1965. var msglen int
  1966. for shift := uint(0); ; shift += 7 {
  1967. if shift >= 64 {
  1968. return ErrIntOverflowSpecs
  1969. }
  1970. if iNdEx >= l {
  1971. return io.ErrUnexpectedEOF
  1972. }
  1973. b := data[iNdEx]
  1974. iNdEx++
  1975. msglen |= (int(b) & 0x7F) << shift
  1976. if b < 0x80 {
  1977. break
  1978. }
  1979. }
  1980. if msglen < 0 {
  1981. return ErrInvalidLengthSpecs
  1982. }
  1983. postIndex := iNdEx + msglen
  1984. if postIndex > l {
  1985. return io.ErrUnexpectedEOF
  1986. }
  1987. if err := m.Annotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1988. return err
  1989. }
  1990. iNdEx = postIndex
  1991. case 2:
  1992. if wireType != 0 {
  1993. return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
  1994. }
  1995. m.Role = 0
  1996. for shift := uint(0); ; shift += 7 {
  1997. if shift >= 64 {
  1998. return ErrIntOverflowSpecs
  1999. }
  2000. if iNdEx >= l {
  2001. return io.ErrUnexpectedEOF
  2002. }
  2003. b := data[iNdEx]
  2004. iNdEx++
  2005. m.Role |= (NodeRole(b) & 0x7F) << shift
  2006. if b < 0x80 {
  2007. break
  2008. }
  2009. }
  2010. case 3:
  2011. if wireType != 0 {
  2012. return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType)
  2013. }
  2014. m.Membership = 0
  2015. for shift := uint(0); ; shift += 7 {
  2016. if shift >= 64 {
  2017. return ErrIntOverflowSpecs
  2018. }
  2019. if iNdEx >= l {
  2020. return io.ErrUnexpectedEOF
  2021. }
  2022. b := data[iNdEx]
  2023. iNdEx++
  2024. m.Membership |= (NodeSpec_Membership(b) & 0x7F) << shift
  2025. if b < 0x80 {
  2026. break
  2027. }
  2028. }
  2029. case 4:
  2030. if wireType != 0 {
  2031. return fmt.Errorf("proto: wrong wireType = %d for field Availability", wireType)
  2032. }
  2033. m.Availability = 0
  2034. for shift := uint(0); ; shift += 7 {
  2035. if shift >= 64 {
  2036. return ErrIntOverflowSpecs
  2037. }
  2038. if iNdEx >= l {
  2039. return io.ErrUnexpectedEOF
  2040. }
  2041. b := data[iNdEx]
  2042. iNdEx++
  2043. m.Availability |= (NodeSpec_Availability(b) & 0x7F) << shift
  2044. if b < 0x80 {
  2045. break
  2046. }
  2047. }
  2048. default:
  2049. iNdEx = preIndex
  2050. skippy, err := skipSpecs(data[iNdEx:])
  2051. if err != nil {
  2052. return err
  2053. }
  2054. if skippy < 0 {
  2055. return ErrInvalidLengthSpecs
  2056. }
  2057. if (iNdEx + skippy) > l {
  2058. return io.ErrUnexpectedEOF
  2059. }
  2060. iNdEx += skippy
  2061. }
  2062. }
  2063. if iNdEx > l {
  2064. return io.ErrUnexpectedEOF
  2065. }
  2066. return nil
  2067. }
  2068. func (m *ServiceSpec) Unmarshal(data []byte) error {
  2069. l := len(data)
  2070. iNdEx := 0
  2071. for iNdEx < l {
  2072. preIndex := iNdEx
  2073. var wire uint64
  2074. for shift := uint(0); ; shift += 7 {
  2075. if shift >= 64 {
  2076. return ErrIntOverflowSpecs
  2077. }
  2078. if iNdEx >= l {
  2079. return io.ErrUnexpectedEOF
  2080. }
  2081. b := data[iNdEx]
  2082. iNdEx++
  2083. wire |= (uint64(b) & 0x7F) << shift
  2084. if b < 0x80 {
  2085. break
  2086. }
  2087. }
  2088. fieldNum := int32(wire >> 3)
  2089. wireType := int(wire & 0x7)
  2090. if wireType == 4 {
  2091. return fmt.Errorf("proto: ServiceSpec: wiretype end group for non-group")
  2092. }
  2093. if fieldNum <= 0 {
  2094. return fmt.Errorf("proto: ServiceSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  2095. }
  2096. switch fieldNum {
  2097. case 1:
  2098. if wireType != 2 {
  2099. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  2100. }
  2101. var msglen int
  2102. for shift := uint(0); ; shift += 7 {
  2103. if shift >= 64 {
  2104. return ErrIntOverflowSpecs
  2105. }
  2106. if iNdEx >= l {
  2107. return io.ErrUnexpectedEOF
  2108. }
  2109. b := data[iNdEx]
  2110. iNdEx++
  2111. msglen |= (int(b) & 0x7F) << shift
  2112. if b < 0x80 {
  2113. break
  2114. }
  2115. }
  2116. if msglen < 0 {
  2117. return ErrInvalidLengthSpecs
  2118. }
  2119. postIndex := iNdEx + msglen
  2120. if postIndex > l {
  2121. return io.ErrUnexpectedEOF
  2122. }
  2123. if err := m.Annotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2124. return err
  2125. }
  2126. iNdEx = postIndex
  2127. case 2:
  2128. if wireType != 2 {
  2129. return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType)
  2130. }
  2131. var msglen int
  2132. for shift := uint(0); ; shift += 7 {
  2133. if shift >= 64 {
  2134. return ErrIntOverflowSpecs
  2135. }
  2136. if iNdEx >= l {
  2137. return io.ErrUnexpectedEOF
  2138. }
  2139. b := data[iNdEx]
  2140. iNdEx++
  2141. msglen |= (int(b) & 0x7F) << shift
  2142. if b < 0x80 {
  2143. break
  2144. }
  2145. }
  2146. if msglen < 0 {
  2147. return ErrInvalidLengthSpecs
  2148. }
  2149. postIndex := iNdEx + msglen
  2150. if postIndex > l {
  2151. return io.ErrUnexpectedEOF
  2152. }
  2153. if err := m.Task.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2154. return err
  2155. }
  2156. iNdEx = postIndex
  2157. case 3:
  2158. if wireType != 2 {
  2159. return fmt.Errorf("proto: wrong wireType = %d for field Replicated", wireType)
  2160. }
  2161. var msglen int
  2162. for shift := uint(0); ; shift += 7 {
  2163. if shift >= 64 {
  2164. return ErrIntOverflowSpecs
  2165. }
  2166. if iNdEx >= l {
  2167. return io.ErrUnexpectedEOF
  2168. }
  2169. b := data[iNdEx]
  2170. iNdEx++
  2171. msglen |= (int(b) & 0x7F) << shift
  2172. if b < 0x80 {
  2173. break
  2174. }
  2175. }
  2176. if msglen < 0 {
  2177. return ErrInvalidLengthSpecs
  2178. }
  2179. postIndex := iNdEx + msglen
  2180. if postIndex > l {
  2181. return io.ErrUnexpectedEOF
  2182. }
  2183. v := &ReplicatedService{}
  2184. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2185. return err
  2186. }
  2187. m.Mode = &ServiceSpec_Replicated{v}
  2188. iNdEx = postIndex
  2189. case 4:
  2190. if wireType != 2 {
  2191. return fmt.Errorf("proto: wrong wireType = %d for field Global", wireType)
  2192. }
  2193. var msglen int
  2194. for shift := uint(0); ; shift += 7 {
  2195. if shift >= 64 {
  2196. return ErrIntOverflowSpecs
  2197. }
  2198. if iNdEx >= l {
  2199. return io.ErrUnexpectedEOF
  2200. }
  2201. b := data[iNdEx]
  2202. iNdEx++
  2203. msglen |= (int(b) & 0x7F) << shift
  2204. if b < 0x80 {
  2205. break
  2206. }
  2207. }
  2208. if msglen < 0 {
  2209. return ErrInvalidLengthSpecs
  2210. }
  2211. postIndex := iNdEx + msglen
  2212. if postIndex > l {
  2213. return io.ErrUnexpectedEOF
  2214. }
  2215. v := &GlobalService{}
  2216. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2217. return err
  2218. }
  2219. m.Mode = &ServiceSpec_Global{v}
  2220. iNdEx = postIndex
  2221. case 6:
  2222. if wireType != 2 {
  2223. return fmt.Errorf("proto: wrong wireType = %d for field Update", wireType)
  2224. }
  2225. var msglen int
  2226. for shift := uint(0); ; shift += 7 {
  2227. if shift >= 64 {
  2228. return ErrIntOverflowSpecs
  2229. }
  2230. if iNdEx >= l {
  2231. return io.ErrUnexpectedEOF
  2232. }
  2233. b := data[iNdEx]
  2234. iNdEx++
  2235. msglen |= (int(b) & 0x7F) << shift
  2236. if b < 0x80 {
  2237. break
  2238. }
  2239. }
  2240. if msglen < 0 {
  2241. return ErrInvalidLengthSpecs
  2242. }
  2243. postIndex := iNdEx + msglen
  2244. if postIndex > l {
  2245. return io.ErrUnexpectedEOF
  2246. }
  2247. if m.Update == nil {
  2248. m.Update = &UpdateConfig{}
  2249. }
  2250. if err := m.Update.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2251. return err
  2252. }
  2253. iNdEx = postIndex
  2254. case 7:
  2255. if wireType != 2 {
  2256. return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
  2257. }
  2258. var msglen int
  2259. for shift := uint(0); ; shift += 7 {
  2260. if shift >= 64 {
  2261. return ErrIntOverflowSpecs
  2262. }
  2263. if iNdEx >= l {
  2264. return io.ErrUnexpectedEOF
  2265. }
  2266. b := data[iNdEx]
  2267. iNdEx++
  2268. msglen |= (int(b) & 0x7F) << shift
  2269. if b < 0x80 {
  2270. break
  2271. }
  2272. }
  2273. if msglen < 0 {
  2274. return ErrInvalidLengthSpecs
  2275. }
  2276. postIndex := iNdEx + msglen
  2277. if postIndex > l {
  2278. return io.ErrUnexpectedEOF
  2279. }
  2280. m.Networks = append(m.Networks, &ServiceSpec_NetworkAttachmentConfig{})
  2281. if err := m.Networks[len(m.Networks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2282. return err
  2283. }
  2284. iNdEx = postIndex
  2285. case 8:
  2286. if wireType != 2 {
  2287. return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
  2288. }
  2289. var msglen int
  2290. for shift := uint(0); ; shift += 7 {
  2291. if shift >= 64 {
  2292. return ErrIntOverflowSpecs
  2293. }
  2294. if iNdEx >= l {
  2295. return io.ErrUnexpectedEOF
  2296. }
  2297. b := data[iNdEx]
  2298. iNdEx++
  2299. msglen |= (int(b) & 0x7F) << shift
  2300. if b < 0x80 {
  2301. break
  2302. }
  2303. }
  2304. if msglen < 0 {
  2305. return ErrInvalidLengthSpecs
  2306. }
  2307. postIndex := iNdEx + msglen
  2308. if postIndex > l {
  2309. return io.ErrUnexpectedEOF
  2310. }
  2311. if m.Endpoint == nil {
  2312. m.Endpoint = &EndpointSpec{}
  2313. }
  2314. if err := m.Endpoint.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2315. return err
  2316. }
  2317. iNdEx = postIndex
  2318. default:
  2319. iNdEx = preIndex
  2320. skippy, err := skipSpecs(data[iNdEx:])
  2321. if err != nil {
  2322. return err
  2323. }
  2324. if skippy < 0 {
  2325. return ErrInvalidLengthSpecs
  2326. }
  2327. if (iNdEx + skippy) > l {
  2328. return io.ErrUnexpectedEOF
  2329. }
  2330. iNdEx += skippy
  2331. }
  2332. }
  2333. if iNdEx > l {
  2334. return io.ErrUnexpectedEOF
  2335. }
  2336. return nil
  2337. }
  2338. func (m *ServiceSpec_NetworkAttachmentConfig) Unmarshal(data []byte) error {
  2339. l := len(data)
  2340. iNdEx := 0
  2341. for iNdEx < l {
  2342. preIndex := iNdEx
  2343. var wire uint64
  2344. for shift := uint(0); ; shift += 7 {
  2345. if shift >= 64 {
  2346. return ErrIntOverflowSpecs
  2347. }
  2348. if iNdEx >= l {
  2349. return io.ErrUnexpectedEOF
  2350. }
  2351. b := data[iNdEx]
  2352. iNdEx++
  2353. wire |= (uint64(b) & 0x7F) << shift
  2354. if b < 0x80 {
  2355. break
  2356. }
  2357. }
  2358. fieldNum := int32(wire >> 3)
  2359. wireType := int(wire & 0x7)
  2360. if wireType == 4 {
  2361. return fmt.Errorf("proto: NetworkAttachmentConfig: wiretype end group for non-group")
  2362. }
  2363. if fieldNum <= 0 {
  2364. return fmt.Errorf("proto: NetworkAttachmentConfig: illegal tag %d (wire type %d)", fieldNum, wire)
  2365. }
  2366. switch fieldNum {
  2367. case 1:
  2368. if wireType != 2 {
  2369. return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType)
  2370. }
  2371. var stringLen uint64
  2372. for shift := uint(0); ; shift += 7 {
  2373. if shift >= 64 {
  2374. return ErrIntOverflowSpecs
  2375. }
  2376. if iNdEx >= l {
  2377. return io.ErrUnexpectedEOF
  2378. }
  2379. b := data[iNdEx]
  2380. iNdEx++
  2381. stringLen |= (uint64(b) & 0x7F) << shift
  2382. if b < 0x80 {
  2383. break
  2384. }
  2385. }
  2386. intStringLen := int(stringLen)
  2387. if intStringLen < 0 {
  2388. return ErrInvalidLengthSpecs
  2389. }
  2390. postIndex := iNdEx + intStringLen
  2391. if postIndex > l {
  2392. return io.ErrUnexpectedEOF
  2393. }
  2394. m.Target = string(data[iNdEx:postIndex])
  2395. iNdEx = postIndex
  2396. case 2:
  2397. if wireType != 2 {
  2398. return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType)
  2399. }
  2400. var stringLen uint64
  2401. for shift := uint(0); ; shift += 7 {
  2402. if shift >= 64 {
  2403. return ErrIntOverflowSpecs
  2404. }
  2405. if iNdEx >= l {
  2406. return io.ErrUnexpectedEOF
  2407. }
  2408. b := data[iNdEx]
  2409. iNdEx++
  2410. stringLen |= (uint64(b) & 0x7F) << shift
  2411. if b < 0x80 {
  2412. break
  2413. }
  2414. }
  2415. intStringLen := int(stringLen)
  2416. if intStringLen < 0 {
  2417. return ErrInvalidLengthSpecs
  2418. }
  2419. postIndex := iNdEx + intStringLen
  2420. if postIndex > l {
  2421. return io.ErrUnexpectedEOF
  2422. }
  2423. m.Aliases = append(m.Aliases, string(data[iNdEx:postIndex]))
  2424. iNdEx = postIndex
  2425. default:
  2426. iNdEx = preIndex
  2427. skippy, err := skipSpecs(data[iNdEx:])
  2428. if err != nil {
  2429. return err
  2430. }
  2431. if skippy < 0 {
  2432. return ErrInvalidLengthSpecs
  2433. }
  2434. if (iNdEx + skippy) > l {
  2435. return io.ErrUnexpectedEOF
  2436. }
  2437. iNdEx += skippy
  2438. }
  2439. }
  2440. if iNdEx > l {
  2441. return io.ErrUnexpectedEOF
  2442. }
  2443. return nil
  2444. }
  2445. func (m *ReplicatedService) Unmarshal(data []byte) error {
  2446. l := len(data)
  2447. iNdEx := 0
  2448. for iNdEx < l {
  2449. preIndex := iNdEx
  2450. var wire uint64
  2451. for shift := uint(0); ; shift += 7 {
  2452. if shift >= 64 {
  2453. return ErrIntOverflowSpecs
  2454. }
  2455. if iNdEx >= l {
  2456. return io.ErrUnexpectedEOF
  2457. }
  2458. b := data[iNdEx]
  2459. iNdEx++
  2460. wire |= (uint64(b) & 0x7F) << shift
  2461. if b < 0x80 {
  2462. break
  2463. }
  2464. }
  2465. fieldNum := int32(wire >> 3)
  2466. wireType := int(wire & 0x7)
  2467. if wireType == 4 {
  2468. return fmt.Errorf("proto: ReplicatedService: wiretype end group for non-group")
  2469. }
  2470. if fieldNum <= 0 {
  2471. return fmt.Errorf("proto: ReplicatedService: illegal tag %d (wire type %d)", fieldNum, wire)
  2472. }
  2473. switch fieldNum {
  2474. case 1:
  2475. if wireType != 0 {
  2476. return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType)
  2477. }
  2478. m.Replicas = 0
  2479. for shift := uint(0); ; shift += 7 {
  2480. if shift >= 64 {
  2481. return ErrIntOverflowSpecs
  2482. }
  2483. if iNdEx >= l {
  2484. return io.ErrUnexpectedEOF
  2485. }
  2486. b := data[iNdEx]
  2487. iNdEx++
  2488. m.Replicas |= (uint64(b) & 0x7F) << shift
  2489. if b < 0x80 {
  2490. break
  2491. }
  2492. }
  2493. default:
  2494. iNdEx = preIndex
  2495. skippy, err := skipSpecs(data[iNdEx:])
  2496. if err != nil {
  2497. return err
  2498. }
  2499. if skippy < 0 {
  2500. return ErrInvalidLengthSpecs
  2501. }
  2502. if (iNdEx + skippy) > l {
  2503. return io.ErrUnexpectedEOF
  2504. }
  2505. iNdEx += skippy
  2506. }
  2507. }
  2508. if iNdEx > l {
  2509. return io.ErrUnexpectedEOF
  2510. }
  2511. return nil
  2512. }
  2513. func (m *GlobalService) Unmarshal(data []byte) error {
  2514. l := len(data)
  2515. iNdEx := 0
  2516. for iNdEx < l {
  2517. preIndex := iNdEx
  2518. var wire uint64
  2519. for shift := uint(0); ; shift += 7 {
  2520. if shift >= 64 {
  2521. return ErrIntOverflowSpecs
  2522. }
  2523. if iNdEx >= l {
  2524. return io.ErrUnexpectedEOF
  2525. }
  2526. b := data[iNdEx]
  2527. iNdEx++
  2528. wire |= (uint64(b) & 0x7F) << shift
  2529. if b < 0x80 {
  2530. break
  2531. }
  2532. }
  2533. fieldNum := int32(wire >> 3)
  2534. wireType := int(wire & 0x7)
  2535. if wireType == 4 {
  2536. return fmt.Errorf("proto: GlobalService: wiretype end group for non-group")
  2537. }
  2538. if fieldNum <= 0 {
  2539. return fmt.Errorf("proto: GlobalService: illegal tag %d (wire type %d)", fieldNum, wire)
  2540. }
  2541. switch fieldNum {
  2542. default:
  2543. iNdEx = preIndex
  2544. skippy, err := skipSpecs(data[iNdEx:])
  2545. if err != nil {
  2546. return err
  2547. }
  2548. if skippy < 0 {
  2549. return ErrInvalidLengthSpecs
  2550. }
  2551. if (iNdEx + skippy) > l {
  2552. return io.ErrUnexpectedEOF
  2553. }
  2554. iNdEx += skippy
  2555. }
  2556. }
  2557. if iNdEx > l {
  2558. return io.ErrUnexpectedEOF
  2559. }
  2560. return nil
  2561. }
  2562. func (m *TaskSpec) Unmarshal(data []byte) error {
  2563. l := len(data)
  2564. iNdEx := 0
  2565. for iNdEx < l {
  2566. preIndex := iNdEx
  2567. var wire uint64
  2568. for shift := uint(0); ; shift += 7 {
  2569. if shift >= 64 {
  2570. return ErrIntOverflowSpecs
  2571. }
  2572. if iNdEx >= l {
  2573. return io.ErrUnexpectedEOF
  2574. }
  2575. b := data[iNdEx]
  2576. iNdEx++
  2577. wire |= (uint64(b) & 0x7F) << shift
  2578. if b < 0x80 {
  2579. break
  2580. }
  2581. }
  2582. fieldNum := int32(wire >> 3)
  2583. wireType := int(wire & 0x7)
  2584. if wireType == 4 {
  2585. return fmt.Errorf("proto: TaskSpec: wiretype end group for non-group")
  2586. }
  2587. if fieldNum <= 0 {
  2588. return fmt.Errorf("proto: TaskSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  2589. }
  2590. switch fieldNum {
  2591. case 1:
  2592. if wireType != 2 {
  2593. return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType)
  2594. }
  2595. var msglen int
  2596. for shift := uint(0); ; shift += 7 {
  2597. if shift >= 64 {
  2598. return ErrIntOverflowSpecs
  2599. }
  2600. if iNdEx >= l {
  2601. return io.ErrUnexpectedEOF
  2602. }
  2603. b := data[iNdEx]
  2604. iNdEx++
  2605. msglen |= (int(b) & 0x7F) << shift
  2606. if b < 0x80 {
  2607. break
  2608. }
  2609. }
  2610. if msglen < 0 {
  2611. return ErrInvalidLengthSpecs
  2612. }
  2613. postIndex := iNdEx + msglen
  2614. if postIndex > l {
  2615. return io.ErrUnexpectedEOF
  2616. }
  2617. v := &ContainerSpec{}
  2618. if err := v.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2619. return err
  2620. }
  2621. m.Runtime = &TaskSpec_Container{v}
  2622. iNdEx = postIndex
  2623. case 2:
  2624. if wireType != 2 {
  2625. return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType)
  2626. }
  2627. var msglen int
  2628. for shift := uint(0); ; shift += 7 {
  2629. if shift >= 64 {
  2630. return ErrIntOverflowSpecs
  2631. }
  2632. if iNdEx >= l {
  2633. return io.ErrUnexpectedEOF
  2634. }
  2635. b := data[iNdEx]
  2636. iNdEx++
  2637. msglen |= (int(b) & 0x7F) << shift
  2638. if b < 0x80 {
  2639. break
  2640. }
  2641. }
  2642. if msglen < 0 {
  2643. return ErrInvalidLengthSpecs
  2644. }
  2645. postIndex := iNdEx + msglen
  2646. if postIndex > l {
  2647. return io.ErrUnexpectedEOF
  2648. }
  2649. if m.Resources == nil {
  2650. m.Resources = &ResourceRequirements{}
  2651. }
  2652. if err := m.Resources.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2653. return err
  2654. }
  2655. iNdEx = postIndex
  2656. case 4:
  2657. if wireType != 2 {
  2658. return fmt.Errorf("proto: wrong wireType = %d for field Restart", wireType)
  2659. }
  2660. var msglen int
  2661. for shift := uint(0); ; shift += 7 {
  2662. if shift >= 64 {
  2663. return ErrIntOverflowSpecs
  2664. }
  2665. if iNdEx >= l {
  2666. return io.ErrUnexpectedEOF
  2667. }
  2668. b := data[iNdEx]
  2669. iNdEx++
  2670. msglen |= (int(b) & 0x7F) << shift
  2671. if b < 0x80 {
  2672. break
  2673. }
  2674. }
  2675. if msglen < 0 {
  2676. return ErrInvalidLengthSpecs
  2677. }
  2678. postIndex := iNdEx + msglen
  2679. if postIndex > l {
  2680. return io.ErrUnexpectedEOF
  2681. }
  2682. if m.Restart == nil {
  2683. m.Restart = &RestartPolicy{}
  2684. }
  2685. if err := m.Restart.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2686. return err
  2687. }
  2688. iNdEx = postIndex
  2689. case 5:
  2690. if wireType != 2 {
  2691. return fmt.Errorf("proto: wrong wireType = %d for field Placement", wireType)
  2692. }
  2693. var msglen int
  2694. for shift := uint(0); ; shift += 7 {
  2695. if shift >= 64 {
  2696. return ErrIntOverflowSpecs
  2697. }
  2698. if iNdEx >= l {
  2699. return io.ErrUnexpectedEOF
  2700. }
  2701. b := data[iNdEx]
  2702. iNdEx++
  2703. msglen |= (int(b) & 0x7F) << shift
  2704. if b < 0x80 {
  2705. break
  2706. }
  2707. }
  2708. if msglen < 0 {
  2709. return ErrInvalidLengthSpecs
  2710. }
  2711. postIndex := iNdEx + msglen
  2712. if postIndex > l {
  2713. return io.ErrUnexpectedEOF
  2714. }
  2715. if m.Placement == nil {
  2716. m.Placement = &Placement{}
  2717. }
  2718. if err := m.Placement.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2719. return err
  2720. }
  2721. iNdEx = postIndex
  2722. default:
  2723. iNdEx = preIndex
  2724. skippy, err := skipSpecs(data[iNdEx:])
  2725. if err != nil {
  2726. return err
  2727. }
  2728. if skippy < 0 {
  2729. return ErrInvalidLengthSpecs
  2730. }
  2731. if (iNdEx + skippy) > l {
  2732. return io.ErrUnexpectedEOF
  2733. }
  2734. iNdEx += skippy
  2735. }
  2736. }
  2737. if iNdEx > l {
  2738. return io.ErrUnexpectedEOF
  2739. }
  2740. return nil
  2741. }
  2742. func (m *ContainerSpec) Unmarshal(data []byte) error {
  2743. l := len(data)
  2744. iNdEx := 0
  2745. for iNdEx < l {
  2746. preIndex := iNdEx
  2747. var wire uint64
  2748. for shift := uint(0); ; shift += 7 {
  2749. if shift >= 64 {
  2750. return ErrIntOverflowSpecs
  2751. }
  2752. if iNdEx >= l {
  2753. return io.ErrUnexpectedEOF
  2754. }
  2755. b := data[iNdEx]
  2756. iNdEx++
  2757. wire |= (uint64(b) & 0x7F) << shift
  2758. if b < 0x80 {
  2759. break
  2760. }
  2761. }
  2762. fieldNum := int32(wire >> 3)
  2763. wireType := int(wire & 0x7)
  2764. if wireType == 4 {
  2765. return fmt.Errorf("proto: ContainerSpec: wiretype end group for non-group")
  2766. }
  2767. if fieldNum <= 0 {
  2768. return fmt.Errorf("proto: ContainerSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  2769. }
  2770. switch fieldNum {
  2771. case 1:
  2772. if wireType != 2 {
  2773. return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType)
  2774. }
  2775. var stringLen uint64
  2776. for shift := uint(0); ; shift += 7 {
  2777. if shift >= 64 {
  2778. return ErrIntOverflowSpecs
  2779. }
  2780. if iNdEx >= l {
  2781. return io.ErrUnexpectedEOF
  2782. }
  2783. b := data[iNdEx]
  2784. iNdEx++
  2785. stringLen |= (uint64(b) & 0x7F) << shift
  2786. if b < 0x80 {
  2787. break
  2788. }
  2789. }
  2790. intStringLen := int(stringLen)
  2791. if intStringLen < 0 {
  2792. return ErrInvalidLengthSpecs
  2793. }
  2794. postIndex := iNdEx + intStringLen
  2795. if postIndex > l {
  2796. return io.ErrUnexpectedEOF
  2797. }
  2798. m.Image = string(data[iNdEx:postIndex])
  2799. iNdEx = postIndex
  2800. case 2:
  2801. if wireType != 2 {
  2802. return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType)
  2803. }
  2804. var msglen int
  2805. for shift := uint(0); ; shift += 7 {
  2806. if shift >= 64 {
  2807. return ErrIntOverflowSpecs
  2808. }
  2809. if iNdEx >= l {
  2810. return io.ErrUnexpectedEOF
  2811. }
  2812. b := data[iNdEx]
  2813. iNdEx++
  2814. msglen |= (int(b) & 0x7F) << shift
  2815. if b < 0x80 {
  2816. break
  2817. }
  2818. }
  2819. if msglen < 0 {
  2820. return ErrInvalidLengthSpecs
  2821. }
  2822. postIndex := iNdEx + msglen
  2823. if postIndex > l {
  2824. return io.ErrUnexpectedEOF
  2825. }
  2826. var keykey uint64
  2827. for shift := uint(0); ; shift += 7 {
  2828. if shift >= 64 {
  2829. return ErrIntOverflowSpecs
  2830. }
  2831. if iNdEx >= l {
  2832. return io.ErrUnexpectedEOF
  2833. }
  2834. b := data[iNdEx]
  2835. iNdEx++
  2836. keykey |= (uint64(b) & 0x7F) << shift
  2837. if b < 0x80 {
  2838. break
  2839. }
  2840. }
  2841. var stringLenmapkey uint64
  2842. for shift := uint(0); ; shift += 7 {
  2843. if shift >= 64 {
  2844. return ErrIntOverflowSpecs
  2845. }
  2846. if iNdEx >= l {
  2847. return io.ErrUnexpectedEOF
  2848. }
  2849. b := data[iNdEx]
  2850. iNdEx++
  2851. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  2852. if b < 0x80 {
  2853. break
  2854. }
  2855. }
  2856. intStringLenmapkey := int(stringLenmapkey)
  2857. if intStringLenmapkey < 0 {
  2858. return ErrInvalidLengthSpecs
  2859. }
  2860. postStringIndexmapkey := iNdEx + intStringLenmapkey
  2861. if postStringIndexmapkey > l {
  2862. return io.ErrUnexpectedEOF
  2863. }
  2864. mapkey := string(data[iNdEx:postStringIndexmapkey])
  2865. iNdEx = postStringIndexmapkey
  2866. var valuekey uint64
  2867. for shift := uint(0); ; shift += 7 {
  2868. if shift >= 64 {
  2869. return ErrIntOverflowSpecs
  2870. }
  2871. if iNdEx >= l {
  2872. return io.ErrUnexpectedEOF
  2873. }
  2874. b := data[iNdEx]
  2875. iNdEx++
  2876. valuekey |= (uint64(b) & 0x7F) << shift
  2877. if b < 0x80 {
  2878. break
  2879. }
  2880. }
  2881. var stringLenmapvalue uint64
  2882. for shift := uint(0); ; shift += 7 {
  2883. if shift >= 64 {
  2884. return ErrIntOverflowSpecs
  2885. }
  2886. if iNdEx >= l {
  2887. return io.ErrUnexpectedEOF
  2888. }
  2889. b := data[iNdEx]
  2890. iNdEx++
  2891. stringLenmapvalue |= (uint64(b) & 0x7F) << shift
  2892. if b < 0x80 {
  2893. break
  2894. }
  2895. }
  2896. intStringLenmapvalue := int(stringLenmapvalue)
  2897. if intStringLenmapvalue < 0 {
  2898. return ErrInvalidLengthSpecs
  2899. }
  2900. postStringIndexmapvalue := iNdEx + intStringLenmapvalue
  2901. if postStringIndexmapvalue > l {
  2902. return io.ErrUnexpectedEOF
  2903. }
  2904. mapvalue := string(data[iNdEx:postStringIndexmapvalue])
  2905. iNdEx = postStringIndexmapvalue
  2906. if m.Labels == nil {
  2907. m.Labels = make(map[string]string)
  2908. }
  2909. m.Labels[mapkey] = mapvalue
  2910. iNdEx = postIndex
  2911. case 3:
  2912. if wireType != 2 {
  2913. return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType)
  2914. }
  2915. var stringLen uint64
  2916. for shift := uint(0); ; shift += 7 {
  2917. if shift >= 64 {
  2918. return ErrIntOverflowSpecs
  2919. }
  2920. if iNdEx >= l {
  2921. return io.ErrUnexpectedEOF
  2922. }
  2923. b := data[iNdEx]
  2924. iNdEx++
  2925. stringLen |= (uint64(b) & 0x7F) << shift
  2926. if b < 0x80 {
  2927. break
  2928. }
  2929. }
  2930. intStringLen := int(stringLen)
  2931. if intStringLen < 0 {
  2932. return ErrInvalidLengthSpecs
  2933. }
  2934. postIndex := iNdEx + intStringLen
  2935. if postIndex > l {
  2936. return io.ErrUnexpectedEOF
  2937. }
  2938. m.Command = append(m.Command, string(data[iNdEx:postIndex]))
  2939. iNdEx = postIndex
  2940. case 4:
  2941. if wireType != 2 {
  2942. return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType)
  2943. }
  2944. var stringLen uint64
  2945. for shift := uint(0); ; shift += 7 {
  2946. if shift >= 64 {
  2947. return ErrIntOverflowSpecs
  2948. }
  2949. if iNdEx >= l {
  2950. return io.ErrUnexpectedEOF
  2951. }
  2952. b := data[iNdEx]
  2953. iNdEx++
  2954. stringLen |= (uint64(b) & 0x7F) << shift
  2955. if b < 0x80 {
  2956. break
  2957. }
  2958. }
  2959. intStringLen := int(stringLen)
  2960. if intStringLen < 0 {
  2961. return ErrInvalidLengthSpecs
  2962. }
  2963. postIndex := iNdEx + intStringLen
  2964. if postIndex > l {
  2965. return io.ErrUnexpectedEOF
  2966. }
  2967. m.Args = append(m.Args, string(data[iNdEx:postIndex]))
  2968. iNdEx = postIndex
  2969. case 5:
  2970. if wireType != 2 {
  2971. return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType)
  2972. }
  2973. var stringLen uint64
  2974. for shift := uint(0); ; shift += 7 {
  2975. if shift >= 64 {
  2976. return ErrIntOverflowSpecs
  2977. }
  2978. if iNdEx >= l {
  2979. return io.ErrUnexpectedEOF
  2980. }
  2981. b := data[iNdEx]
  2982. iNdEx++
  2983. stringLen |= (uint64(b) & 0x7F) << shift
  2984. if b < 0x80 {
  2985. break
  2986. }
  2987. }
  2988. intStringLen := int(stringLen)
  2989. if intStringLen < 0 {
  2990. return ErrInvalidLengthSpecs
  2991. }
  2992. postIndex := iNdEx + intStringLen
  2993. if postIndex > l {
  2994. return io.ErrUnexpectedEOF
  2995. }
  2996. m.Env = append(m.Env, string(data[iNdEx:postIndex]))
  2997. iNdEx = postIndex
  2998. case 6:
  2999. if wireType != 2 {
  3000. return fmt.Errorf("proto: wrong wireType = %d for field Dir", wireType)
  3001. }
  3002. var stringLen uint64
  3003. for shift := uint(0); ; shift += 7 {
  3004. if shift >= 64 {
  3005. return ErrIntOverflowSpecs
  3006. }
  3007. if iNdEx >= l {
  3008. return io.ErrUnexpectedEOF
  3009. }
  3010. b := data[iNdEx]
  3011. iNdEx++
  3012. stringLen |= (uint64(b) & 0x7F) << shift
  3013. if b < 0x80 {
  3014. break
  3015. }
  3016. }
  3017. intStringLen := int(stringLen)
  3018. if intStringLen < 0 {
  3019. return ErrInvalidLengthSpecs
  3020. }
  3021. postIndex := iNdEx + intStringLen
  3022. if postIndex > l {
  3023. return io.ErrUnexpectedEOF
  3024. }
  3025. m.Dir = string(data[iNdEx:postIndex])
  3026. iNdEx = postIndex
  3027. case 7:
  3028. if wireType != 2 {
  3029. return fmt.Errorf("proto: wrong wireType = %d for field User", wireType)
  3030. }
  3031. var stringLen uint64
  3032. for shift := uint(0); ; shift += 7 {
  3033. if shift >= 64 {
  3034. return ErrIntOverflowSpecs
  3035. }
  3036. if iNdEx >= l {
  3037. return io.ErrUnexpectedEOF
  3038. }
  3039. b := data[iNdEx]
  3040. iNdEx++
  3041. stringLen |= (uint64(b) & 0x7F) << shift
  3042. if b < 0x80 {
  3043. break
  3044. }
  3045. }
  3046. intStringLen := int(stringLen)
  3047. if intStringLen < 0 {
  3048. return ErrInvalidLengthSpecs
  3049. }
  3050. postIndex := iNdEx + intStringLen
  3051. if postIndex > l {
  3052. return io.ErrUnexpectedEOF
  3053. }
  3054. m.User = string(data[iNdEx:postIndex])
  3055. iNdEx = postIndex
  3056. case 8:
  3057. if wireType != 2 {
  3058. return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType)
  3059. }
  3060. var msglen int
  3061. for shift := uint(0); ; shift += 7 {
  3062. if shift >= 64 {
  3063. return ErrIntOverflowSpecs
  3064. }
  3065. if iNdEx >= l {
  3066. return io.ErrUnexpectedEOF
  3067. }
  3068. b := data[iNdEx]
  3069. iNdEx++
  3070. msglen |= (int(b) & 0x7F) << shift
  3071. if b < 0x80 {
  3072. break
  3073. }
  3074. }
  3075. if msglen < 0 {
  3076. return ErrInvalidLengthSpecs
  3077. }
  3078. postIndex := iNdEx + msglen
  3079. if postIndex > l {
  3080. return io.ErrUnexpectedEOF
  3081. }
  3082. m.Mounts = append(m.Mounts, Mount{})
  3083. if err := m.Mounts[len(m.Mounts)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  3084. return err
  3085. }
  3086. iNdEx = postIndex
  3087. case 9:
  3088. if wireType != 2 {
  3089. return fmt.Errorf("proto: wrong wireType = %d for field StopGracePeriod", wireType)
  3090. }
  3091. var msglen int
  3092. for shift := uint(0); ; shift += 7 {
  3093. if shift >= 64 {
  3094. return ErrIntOverflowSpecs
  3095. }
  3096. if iNdEx >= l {
  3097. return io.ErrUnexpectedEOF
  3098. }
  3099. b := data[iNdEx]
  3100. iNdEx++
  3101. msglen |= (int(b) & 0x7F) << shift
  3102. if b < 0x80 {
  3103. break
  3104. }
  3105. }
  3106. if msglen < 0 {
  3107. return ErrInvalidLengthSpecs
  3108. }
  3109. postIndex := iNdEx + msglen
  3110. if postIndex > l {
  3111. return io.ErrUnexpectedEOF
  3112. }
  3113. if m.StopGracePeriod == nil {
  3114. m.StopGracePeriod = &docker_swarmkit_v11.Duration{}
  3115. }
  3116. if err := m.StopGracePeriod.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3117. return err
  3118. }
  3119. iNdEx = postIndex
  3120. case 10:
  3121. if wireType != 2 {
  3122. return fmt.Errorf("proto: wrong wireType = %d for field PullOptions", wireType)
  3123. }
  3124. var msglen int
  3125. for shift := uint(0); ; shift += 7 {
  3126. if shift >= 64 {
  3127. return ErrIntOverflowSpecs
  3128. }
  3129. if iNdEx >= l {
  3130. return io.ErrUnexpectedEOF
  3131. }
  3132. b := data[iNdEx]
  3133. iNdEx++
  3134. msglen |= (int(b) & 0x7F) << shift
  3135. if b < 0x80 {
  3136. break
  3137. }
  3138. }
  3139. if msglen < 0 {
  3140. return ErrInvalidLengthSpecs
  3141. }
  3142. postIndex := iNdEx + msglen
  3143. if postIndex > l {
  3144. return io.ErrUnexpectedEOF
  3145. }
  3146. if m.PullOptions == nil {
  3147. m.PullOptions = &ContainerSpec_PullOptions{}
  3148. }
  3149. if err := m.PullOptions.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3150. return err
  3151. }
  3152. iNdEx = postIndex
  3153. default:
  3154. iNdEx = preIndex
  3155. skippy, err := skipSpecs(data[iNdEx:])
  3156. if err != nil {
  3157. return err
  3158. }
  3159. if skippy < 0 {
  3160. return ErrInvalidLengthSpecs
  3161. }
  3162. if (iNdEx + skippy) > l {
  3163. return io.ErrUnexpectedEOF
  3164. }
  3165. iNdEx += skippy
  3166. }
  3167. }
  3168. if iNdEx > l {
  3169. return io.ErrUnexpectedEOF
  3170. }
  3171. return nil
  3172. }
  3173. func (m *ContainerSpec_PullOptions) Unmarshal(data []byte) error {
  3174. l := len(data)
  3175. iNdEx := 0
  3176. for iNdEx < l {
  3177. preIndex := iNdEx
  3178. var wire uint64
  3179. for shift := uint(0); ; shift += 7 {
  3180. if shift >= 64 {
  3181. return ErrIntOverflowSpecs
  3182. }
  3183. if iNdEx >= l {
  3184. return io.ErrUnexpectedEOF
  3185. }
  3186. b := data[iNdEx]
  3187. iNdEx++
  3188. wire |= (uint64(b) & 0x7F) << shift
  3189. if b < 0x80 {
  3190. break
  3191. }
  3192. }
  3193. fieldNum := int32(wire >> 3)
  3194. wireType := int(wire & 0x7)
  3195. if wireType == 4 {
  3196. return fmt.Errorf("proto: PullOptions: wiretype end group for non-group")
  3197. }
  3198. if fieldNum <= 0 {
  3199. return fmt.Errorf("proto: PullOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  3200. }
  3201. switch fieldNum {
  3202. case 64:
  3203. if wireType != 2 {
  3204. return fmt.Errorf("proto: wrong wireType = %d for field RegistryAuth", wireType)
  3205. }
  3206. var stringLen uint64
  3207. for shift := uint(0); ; shift += 7 {
  3208. if shift >= 64 {
  3209. return ErrIntOverflowSpecs
  3210. }
  3211. if iNdEx >= l {
  3212. return io.ErrUnexpectedEOF
  3213. }
  3214. b := data[iNdEx]
  3215. iNdEx++
  3216. stringLen |= (uint64(b) & 0x7F) << shift
  3217. if b < 0x80 {
  3218. break
  3219. }
  3220. }
  3221. intStringLen := int(stringLen)
  3222. if intStringLen < 0 {
  3223. return ErrInvalidLengthSpecs
  3224. }
  3225. postIndex := iNdEx + intStringLen
  3226. if postIndex > l {
  3227. return io.ErrUnexpectedEOF
  3228. }
  3229. m.RegistryAuth = string(data[iNdEx:postIndex])
  3230. iNdEx = postIndex
  3231. default:
  3232. iNdEx = preIndex
  3233. skippy, err := skipSpecs(data[iNdEx:])
  3234. if err != nil {
  3235. return err
  3236. }
  3237. if skippy < 0 {
  3238. return ErrInvalidLengthSpecs
  3239. }
  3240. if (iNdEx + skippy) > l {
  3241. return io.ErrUnexpectedEOF
  3242. }
  3243. iNdEx += skippy
  3244. }
  3245. }
  3246. if iNdEx > l {
  3247. return io.ErrUnexpectedEOF
  3248. }
  3249. return nil
  3250. }
  3251. func (m *EndpointSpec) Unmarshal(data []byte) error {
  3252. l := len(data)
  3253. iNdEx := 0
  3254. for iNdEx < l {
  3255. preIndex := iNdEx
  3256. var wire uint64
  3257. for shift := uint(0); ; shift += 7 {
  3258. if shift >= 64 {
  3259. return ErrIntOverflowSpecs
  3260. }
  3261. if iNdEx >= l {
  3262. return io.ErrUnexpectedEOF
  3263. }
  3264. b := data[iNdEx]
  3265. iNdEx++
  3266. wire |= (uint64(b) & 0x7F) << shift
  3267. if b < 0x80 {
  3268. break
  3269. }
  3270. }
  3271. fieldNum := int32(wire >> 3)
  3272. wireType := int(wire & 0x7)
  3273. if wireType == 4 {
  3274. return fmt.Errorf("proto: EndpointSpec: wiretype end group for non-group")
  3275. }
  3276. if fieldNum <= 0 {
  3277. return fmt.Errorf("proto: EndpointSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3278. }
  3279. switch fieldNum {
  3280. case 1:
  3281. if wireType != 0 {
  3282. return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType)
  3283. }
  3284. m.Mode = 0
  3285. for shift := uint(0); ; shift += 7 {
  3286. if shift >= 64 {
  3287. return ErrIntOverflowSpecs
  3288. }
  3289. if iNdEx >= l {
  3290. return io.ErrUnexpectedEOF
  3291. }
  3292. b := data[iNdEx]
  3293. iNdEx++
  3294. m.Mode |= (EndpointSpec_ResolutionMode(b) & 0x7F) << shift
  3295. if b < 0x80 {
  3296. break
  3297. }
  3298. }
  3299. case 2:
  3300. if wireType != 2 {
  3301. return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
  3302. }
  3303. var msglen int
  3304. for shift := uint(0); ; shift += 7 {
  3305. if shift >= 64 {
  3306. return ErrIntOverflowSpecs
  3307. }
  3308. if iNdEx >= l {
  3309. return io.ErrUnexpectedEOF
  3310. }
  3311. b := data[iNdEx]
  3312. iNdEx++
  3313. msglen |= (int(b) & 0x7F) << shift
  3314. if b < 0x80 {
  3315. break
  3316. }
  3317. }
  3318. if msglen < 0 {
  3319. return ErrInvalidLengthSpecs
  3320. }
  3321. postIndex := iNdEx + msglen
  3322. if postIndex > l {
  3323. return io.ErrUnexpectedEOF
  3324. }
  3325. m.Ports = append(m.Ports, &PortConfig{})
  3326. if err := m.Ports[len(m.Ports)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  3327. return err
  3328. }
  3329. iNdEx = postIndex
  3330. default:
  3331. iNdEx = preIndex
  3332. skippy, err := skipSpecs(data[iNdEx:])
  3333. if err != nil {
  3334. return err
  3335. }
  3336. if skippy < 0 {
  3337. return ErrInvalidLengthSpecs
  3338. }
  3339. if (iNdEx + skippy) > l {
  3340. return io.ErrUnexpectedEOF
  3341. }
  3342. iNdEx += skippy
  3343. }
  3344. }
  3345. if iNdEx > l {
  3346. return io.ErrUnexpectedEOF
  3347. }
  3348. return nil
  3349. }
  3350. func (m *NetworkSpec) Unmarshal(data []byte) error {
  3351. l := len(data)
  3352. iNdEx := 0
  3353. for iNdEx < l {
  3354. preIndex := iNdEx
  3355. var wire uint64
  3356. for shift := uint(0); ; shift += 7 {
  3357. if shift >= 64 {
  3358. return ErrIntOverflowSpecs
  3359. }
  3360. if iNdEx >= l {
  3361. return io.ErrUnexpectedEOF
  3362. }
  3363. b := data[iNdEx]
  3364. iNdEx++
  3365. wire |= (uint64(b) & 0x7F) << shift
  3366. if b < 0x80 {
  3367. break
  3368. }
  3369. }
  3370. fieldNum := int32(wire >> 3)
  3371. wireType := int(wire & 0x7)
  3372. if wireType == 4 {
  3373. return fmt.Errorf("proto: NetworkSpec: wiretype end group for non-group")
  3374. }
  3375. if fieldNum <= 0 {
  3376. return fmt.Errorf("proto: NetworkSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3377. }
  3378. switch fieldNum {
  3379. case 1:
  3380. if wireType != 2 {
  3381. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  3382. }
  3383. var msglen int
  3384. for shift := uint(0); ; shift += 7 {
  3385. if shift >= 64 {
  3386. return ErrIntOverflowSpecs
  3387. }
  3388. if iNdEx >= l {
  3389. return io.ErrUnexpectedEOF
  3390. }
  3391. b := data[iNdEx]
  3392. iNdEx++
  3393. msglen |= (int(b) & 0x7F) << shift
  3394. if b < 0x80 {
  3395. break
  3396. }
  3397. }
  3398. if msglen < 0 {
  3399. return ErrInvalidLengthSpecs
  3400. }
  3401. postIndex := iNdEx + msglen
  3402. if postIndex > l {
  3403. return io.ErrUnexpectedEOF
  3404. }
  3405. if err := m.Annotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3406. return err
  3407. }
  3408. iNdEx = postIndex
  3409. case 2:
  3410. if wireType != 2 {
  3411. return fmt.Errorf("proto: wrong wireType = %d for field DriverConfig", wireType)
  3412. }
  3413. var msglen int
  3414. for shift := uint(0); ; shift += 7 {
  3415. if shift >= 64 {
  3416. return ErrIntOverflowSpecs
  3417. }
  3418. if iNdEx >= l {
  3419. return io.ErrUnexpectedEOF
  3420. }
  3421. b := data[iNdEx]
  3422. iNdEx++
  3423. msglen |= (int(b) & 0x7F) << shift
  3424. if b < 0x80 {
  3425. break
  3426. }
  3427. }
  3428. if msglen < 0 {
  3429. return ErrInvalidLengthSpecs
  3430. }
  3431. postIndex := iNdEx + msglen
  3432. if postIndex > l {
  3433. return io.ErrUnexpectedEOF
  3434. }
  3435. if m.DriverConfig == nil {
  3436. m.DriverConfig = &Driver{}
  3437. }
  3438. if err := m.DriverConfig.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3439. return err
  3440. }
  3441. iNdEx = postIndex
  3442. case 3:
  3443. if wireType != 0 {
  3444. return fmt.Errorf("proto: wrong wireType = %d for field Ipv6Enabled", wireType)
  3445. }
  3446. var v int
  3447. for shift := uint(0); ; shift += 7 {
  3448. if shift >= 64 {
  3449. return ErrIntOverflowSpecs
  3450. }
  3451. if iNdEx >= l {
  3452. return io.ErrUnexpectedEOF
  3453. }
  3454. b := data[iNdEx]
  3455. iNdEx++
  3456. v |= (int(b) & 0x7F) << shift
  3457. if b < 0x80 {
  3458. break
  3459. }
  3460. }
  3461. m.Ipv6Enabled = bool(v != 0)
  3462. case 4:
  3463. if wireType != 0 {
  3464. return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
  3465. }
  3466. var v int
  3467. for shift := uint(0); ; shift += 7 {
  3468. if shift >= 64 {
  3469. return ErrIntOverflowSpecs
  3470. }
  3471. if iNdEx >= l {
  3472. return io.ErrUnexpectedEOF
  3473. }
  3474. b := data[iNdEx]
  3475. iNdEx++
  3476. v |= (int(b) & 0x7F) << shift
  3477. if b < 0x80 {
  3478. break
  3479. }
  3480. }
  3481. m.Internal = bool(v != 0)
  3482. case 5:
  3483. if wireType != 2 {
  3484. return fmt.Errorf("proto: wrong wireType = %d for field IPAM", 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. if m.IPAM == nil {
  3509. m.IPAM = &IPAMOptions{}
  3510. }
  3511. if err := m.IPAM.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3512. return err
  3513. }
  3514. iNdEx = postIndex
  3515. default:
  3516. iNdEx = preIndex
  3517. skippy, err := skipSpecs(data[iNdEx:])
  3518. if err != nil {
  3519. return err
  3520. }
  3521. if skippy < 0 {
  3522. return ErrInvalidLengthSpecs
  3523. }
  3524. if (iNdEx + skippy) > l {
  3525. return io.ErrUnexpectedEOF
  3526. }
  3527. iNdEx += skippy
  3528. }
  3529. }
  3530. if iNdEx > l {
  3531. return io.ErrUnexpectedEOF
  3532. }
  3533. return nil
  3534. }
  3535. func (m *ClusterSpec) Unmarshal(data []byte) error {
  3536. l := len(data)
  3537. iNdEx := 0
  3538. for iNdEx < l {
  3539. preIndex := iNdEx
  3540. var wire uint64
  3541. for shift := uint(0); ; shift += 7 {
  3542. if shift >= 64 {
  3543. return ErrIntOverflowSpecs
  3544. }
  3545. if iNdEx >= l {
  3546. return io.ErrUnexpectedEOF
  3547. }
  3548. b := data[iNdEx]
  3549. iNdEx++
  3550. wire |= (uint64(b) & 0x7F) << shift
  3551. if b < 0x80 {
  3552. break
  3553. }
  3554. }
  3555. fieldNum := int32(wire >> 3)
  3556. wireType := int(wire & 0x7)
  3557. if wireType == 4 {
  3558. return fmt.Errorf("proto: ClusterSpec: wiretype end group for non-group")
  3559. }
  3560. if fieldNum <= 0 {
  3561. return fmt.Errorf("proto: ClusterSpec: illegal tag %d (wire type %d)", fieldNum, wire)
  3562. }
  3563. switch fieldNum {
  3564. case 1:
  3565. if wireType != 2 {
  3566. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  3567. }
  3568. var msglen int
  3569. for shift := uint(0); ; shift += 7 {
  3570. if shift >= 64 {
  3571. return ErrIntOverflowSpecs
  3572. }
  3573. if iNdEx >= l {
  3574. return io.ErrUnexpectedEOF
  3575. }
  3576. b := data[iNdEx]
  3577. iNdEx++
  3578. msglen |= (int(b) & 0x7F) << shift
  3579. if b < 0x80 {
  3580. break
  3581. }
  3582. }
  3583. if msglen < 0 {
  3584. return ErrInvalidLengthSpecs
  3585. }
  3586. postIndex := iNdEx + msglen
  3587. if postIndex > l {
  3588. return io.ErrUnexpectedEOF
  3589. }
  3590. if err := m.Annotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3591. return err
  3592. }
  3593. iNdEx = postIndex
  3594. case 2:
  3595. if wireType != 2 {
  3596. return fmt.Errorf("proto: wrong wireType = %d for field AcceptancePolicy", wireType)
  3597. }
  3598. var msglen int
  3599. for shift := uint(0); ; shift += 7 {
  3600. if shift >= 64 {
  3601. return ErrIntOverflowSpecs
  3602. }
  3603. if iNdEx >= l {
  3604. return io.ErrUnexpectedEOF
  3605. }
  3606. b := data[iNdEx]
  3607. iNdEx++
  3608. msglen |= (int(b) & 0x7F) << shift
  3609. if b < 0x80 {
  3610. break
  3611. }
  3612. }
  3613. if msglen < 0 {
  3614. return ErrInvalidLengthSpecs
  3615. }
  3616. postIndex := iNdEx + msglen
  3617. if postIndex > l {
  3618. return io.ErrUnexpectedEOF
  3619. }
  3620. if err := m.AcceptancePolicy.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3621. return err
  3622. }
  3623. iNdEx = postIndex
  3624. case 3:
  3625. if wireType != 2 {
  3626. return fmt.Errorf("proto: wrong wireType = %d for field Orchestration", wireType)
  3627. }
  3628. var msglen int
  3629. for shift := uint(0); ; shift += 7 {
  3630. if shift >= 64 {
  3631. return ErrIntOverflowSpecs
  3632. }
  3633. if iNdEx >= l {
  3634. return io.ErrUnexpectedEOF
  3635. }
  3636. b := data[iNdEx]
  3637. iNdEx++
  3638. msglen |= (int(b) & 0x7F) << shift
  3639. if b < 0x80 {
  3640. break
  3641. }
  3642. }
  3643. if msglen < 0 {
  3644. return ErrInvalidLengthSpecs
  3645. }
  3646. postIndex := iNdEx + msglen
  3647. if postIndex > l {
  3648. return io.ErrUnexpectedEOF
  3649. }
  3650. if err := m.Orchestration.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3651. return err
  3652. }
  3653. iNdEx = postIndex
  3654. case 4:
  3655. if wireType != 2 {
  3656. return fmt.Errorf("proto: wrong wireType = %d for field Raft", wireType)
  3657. }
  3658. var msglen int
  3659. for shift := uint(0); ; shift += 7 {
  3660. if shift >= 64 {
  3661. return ErrIntOverflowSpecs
  3662. }
  3663. if iNdEx >= l {
  3664. return io.ErrUnexpectedEOF
  3665. }
  3666. b := data[iNdEx]
  3667. iNdEx++
  3668. msglen |= (int(b) & 0x7F) << shift
  3669. if b < 0x80 {
  3670. break
  3671. }
  3672. }
  3673. if msglen < 0 {
  3674. return ErrInvalidLengthSpecs
  3675. }
  3676. postIndex := iNdEx + msglen
  3677. if postIndex > l {
  3678. return io.ErrUnexpectedEOF
  3679. }
  3680. if err := m.Raft.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3681. return err
  3682. }
  3683. iNdEx = postIndex
  3684. case 5:
  3685. if wireType != 2 {
  3686. return fmt.Errorf("proto: wrong wireType = %d for field Dispatcher", wireType)
  3687. }
  3688. var msglen int
  3689. for shift := uint(0); ; shift += 7 {
  3690. if shift >= 64 {
  3691. return ErrIntOverflowSpecs
  3692. }
  3693. if iNdEx >= l {
  3694. return io.ErrUnexpectedEOF
  3695. }
  3696. b := data[iNdEx]
  3697. iNdEx++
  3698. msglen |= (int(b) & 0x7F) << shift
  3699. if b < 0x80 {
  3700. break
  3701. }
  3702. }
  3703. if msglen < 0 {
  3704. return ErrInvalidLengthSpecs
  3705. }
  3706. postIndex := iNdEx + msglen
  3707. if postIndex > l {
  3708. return io.ErrUnexpectedEOF
  3709. }
  3710. if err := m.Dispatcher.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3711. return err
  3712. }
  3713. iNdEx = postIndex
  3714. case 6:
  3715. if wireType != 2 {
  3716. return fmt.Errorf("proto: wrong wireType = %d for field CAConfig", wireType)
  3717. }
  3718. var msglen int
  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. msglen |= (int(b) & 0x7F) << shift
  3729. if b < 0x80 {
  3730. break
  3731. }
  3732. }
  3733. if msglen < 0 {
  3734. return ErrInvalidLengthSpecs
  3735. }
  3736. postIndex := iNdEx + msglen
  3737. if postIndex > l {
  3738. return io.ErrUnexpectedEOF
  3739. }
  3740. if err := m.CAConfig.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3741. return err
  3742. }
  3743. iNdEx = postIndex
  3744. default:
  3745. iNdEx = preIndex
  3746. skippy, err := skipSpecs(data[iNdEx:])
  3747. if err != nil {
  3748. return err
  3749. }
  3750. if skippy < 0 {
  3751. return ErrInvalidLengthSpecs
  3752. }
  3753. if (iNdEx + skippy) > l {
  3754. return io.ErrUnexpectedEOF
  3755. }
  3756. iNdEx += skippy
  3757. }
  3758. }
  3759. if iNdEx > l {
  3760. return io.ErrUnexpectedEOF
  3761. }
  3762. return nil
  3763. }
  3764. func skipSpecs(data []byte) (n int, err error) {
  3765. l := len(data)
  3766. iNdEx := 0
  3767. for iNdEx < l {
  3768. var wire uint64
  3769. for shift := uint(0); ; shift += 7 {
  3770. if shift >= 64 {
  3771. return 0, ErrIntOverflowSpecs
  3772. }
  3773. if iNdEx >= l {
  3774. return 0, io.ErrUnexpectedEOF
  3775. }
  3776. b := data[iNdEx]
  3777. iNdEx++
  3778. wire |= (uint64(b) & 0x7F) << shift
  3779. if b < 0x80 {
  3780. break
  3781. }
  3782. }
  3783. wireType := int(wire & 0x7)
  3784. switch wireType {
  3785. case 0:
  3786. for shift := uint(0); ; shift += 7 {
  3787. if shift >= 64 {
  3788. return 0, ErrIntOverflowSpecs
  3789. }
  3790. if iNdEx >= l {
  3791. return 0, io.ErrUnexpectedEOF
  3792. }
  3793. iNdEx++
  3794. if data[iNdEx-1] < 0x80 {
  3795. break
  3796. }
  3797. }
  3798. return iNdEx, nil
  3799. case 1:
  3800. iNdEx += 8
  3801. return iNdEx, nil
  3802. case 2:
  3803. var length int
  3804. for shift := uint(0); ; shift += 7 {
  3805. if shift >= 64 {
  3806. return 0, ErrIntOverflowSpecs
  3807. }
  3808. if iNdEx >= l {
  3809. return 0, io.ErrUnexpectedEOF
  3810. }
  3811. b := data[iNdEx]
  3812. iNdEx++
  3813. length |= (int(b) & 0x7F) << shift
  3814. if b < 0x80 {
  3815. break
  3816. }
  3817. }
  3818. iNdEx += length
  3819. if length < 0 {
  3820. return 0, ErrInvalidLengthSpecs
  3821. }
  3822. return iNdEx, nil
  3823. case 3:
  3824. for {
  3825. var innerWire uint64
  3826. var start int = iNdEx
  3827. for shift := uint(0); ; shift += 7 {
  3828. if shift >= 64 {
  3829. return 0, ErrIntOverflowSpecs
  3830. }
  3831. if iNdEx >= l {
  3832. return 0, io.ErrUnexpectedEOF
  3833. }
  3834. b := data[iNdEx]
  3835. iNdEx++
  3836. innerWire |= (uint64(b) & 0x7F) << shift
  3837. if b < 0x80 {
  3838. break
  3839. }
  3840. }
  3841. innerWireType := int(innerWire & 0x7)
  3842. if innerWireType == 4 {
  3843. break
  3844. }
  3845. next, err := skipSpecs(data[start:])
  3846. if err != nil {
  3847. return 0, err
  3848. }
  3849. iNdEx = start + next
  3850. }
  3851. return iNdEx, nil
  3852. case 4:
  3853. return iNdEx, nil
  3854. case 5:
  3855. iNdEx += 4
  3856. return iNdEx, nil
  3857. default:
  3858. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  3859. }
  3860. }
  3861. panic("unreachable")
  3862. }
  3863. var (
  3864. ErrInvalidLengthSpecs = fmt.Errorf("proto: negative length found during unmarshaling")
  3865. ErrIntOverflowSpecs = fmt.Errorf("proto: integer overflow")
  3866. )
  3867. var fileDescriptorSpecs = []byte{
  3868. // 1279 bytes of a gzipped FileDescriptorProto
  3869. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x72, 0x1b, 0xc5,
  3870. 0x13, 0xb6, 0xec, 0xb5, 0x2c, 0xf7, 0xda, 0x89, 0x33, 0x95, 0x5f, 0xa2, 0x28, 0xf9, 0xd9, 0x8e,
  3871. 0x08, 0x10, 0xa8, 0x42, 0x06, 0x41, 0x25, 0xe1, 0x5f, 0xc1, 0x5a, 0x16, 0x8e, 0x09, 0x76, 0xb6,
  3872. 0xc6, 0x49, 0x38, 0xba, 0x46, 0xab, 0x89, 0xbc, 0xe5, 0xd5, 0xce, 0x32, 0x3b, 0x52, 0xca, 0x37,
  3873. 0x8e, 0x29, 0x0e, 0xdc, 0xe0, 0x40, 0x15, 0x27, 0xde, 0x81, 0x67, 0xc8, 0x91, 0x1b, 0x9c, 0x52,
  3874. 0x24, 0x4f, 0x40, 0x15, 0x2f, 0x40, 0xcf, 0xec, 0x48, 0x5a, 0x91, 0x75, 0xc2, 0xc1, 0x87, 0xad,
  3875. 0x9a, 0x3f, 0xdf, 0xf7, 0xf5, 0x4c, 0x77, 0x4f, 0xf7, 0x82, 0x9b, 0x26, 0x3c, 0x48, 0x1b, 0x89,
  3876. 0x14, 0x4a, 0x10, 0xd2, 0x15, 0xc1, 0x11, 0x97, 0x8d, 0xf4, 0x11, 0x93, 0xfd, 0xa3, 0x50, 0x35,
  3877. 0x86, 0xef, 0xd5, 0x5c, 0x75, 0x9c, 0x70, 0x0b, 0xa8, 0x9d, 0xef, 0x89, 0x9e, 0x30, 0xc3, 0x0d,
  3878. 0x3d, 0xb2, 0xab, 0x17, 0xbb, 0x03, 0xc9, 0x54, 0x28, 0xe2, 0x8d, 0xd1, 0x20, 0xdb, 0xa8, 0x7f,
  3879. 0xef, 0x40, 0x65, 0x4f, 0x74, 0xf9, 0x3e, 0xda, 0x20, 0xdb, 0xe0, 0xb2, 0x38, 0x16, 0xca, 0x00,
  3880. 0xd2, 0x6a, 0x69, 0xbd, 0x74, 0xdd, 0x6d, 0xae, 0x35, 0x5e, 0x34, 0xd9, 0xf0, 0x26, 0xb0, 0x4d,
  3881. 0xe7, 0xc9, 0xd3, 0xb5, 0x19, 0x9a, 0x67, 0x92, 0x77, 0xc1, 0x91, 0x22, 0xe2, 0xd5, 0x59, 0x54,
  3882. 0x38, 0xd3, 0xbc, 0x52, 0xa4, 0xa0, 0x8d, 0x52, 0xc4, 0x50, 0x83, 0x44, 0xd3, 0xd0, 0xe7, 0xfd,
  3883. 0x0e, 0x97, 0xe9, 0x61, 0x98, 0x54, 0xe7, 0x0c, 0xef, 0xcd, 0x93, 0x78, 0xfa, 0xb0, 0x8d, 0xdd,
  3884. 0x31, 0x9c, 0xe6, 0xa8, 0x64, 0x17, 0x96, 0xd8, 0x90, 0x85, 0x11, 0xeb, 0x84, 0x51, 0xa8, 0x8e,
  3885. 0xab, 0x8e, 0x91, 0x7a, 0xeb, 0xa5, 0x52, 0x5e, 0x8e, 0x40, 0xa7, 0xe8, 0xf5, 0x2e, 0xc0, 0xc4,
  3886. 0x10, 0x79, 0x03, 0x16, 0xfc, 0xf6, 0xde, 0xd6, 0xce, 0xde, 0xf6, 0xca, 0x4c, 0xed, 0xd2, 0x77,
  3887. 0x3f, 0xaf, 0xff, 0x4f, 0x6b, 0x4c, 0x00, 0x3e, 0x8f, 0xbb, 0x61, 0xdc, 0x23, 0xd7, 0xa1, 0xe2,
  3888. 0xb5, 0x5a, 0x6d, 0xff, 0x5e, 0x7b, 0x6b, 0xa5, 0x54, 0xab, 0x21, 0xf0, 0xc2, 0x34, 0xd0, 0x0b,
  3889. 0x02, 0x9e, 0x28, 0xde, 0xad, 0x39, 0x8f, 0x7f, 0x59, 0x9d, 0xa9, 0x3f, 0x2e, 0xc1, 0x52, 0xfe,
  3890. 0x10, 0x68, 0xa8, 0xec, 0xb5, 0xee, 0xed, 0x3c, 0x68, 0xa3, 0x9d, 0x31, 0x3d, 0x8f, 0xf0, 0x02,
  3891. 0x15, 0x0e, 0x39, 0xb9, 0x06, 0xf3, 0xbe, 0x77, 0x7f, 0xbf, 0x8d, 0x56, 0xc6, 0xc7, 0xc9, 0xc3,
  3892. 0x7c, 0x36, 0x48, 0x0d, 0x6a, 0x8b, 0x7a, 0x3b, 0x7b, 0x2b, 0xb3, 0xc5, 0xa8, 0x2d, 0xc9, 0xc2,
  3893. 0xd8, 0x1e, 0xe5, 0x57, 0x07, 0xdc, 0x7d, 0x2e, 0x87, 0x61, 0x70, 0xca, 0x39, 0x71, 0x03, 0x1c,
  3894. 0xc5, 0xd2, 0x23, 0x93, 0x13, 0x6e, 0x71, 0x4e, 0xdc, 0xc3, 0x7d, 0x6d, 0xd4, 0xd2, 0x0d, 0x5e,
  3895. 0x67, 0x86, 0xe4, 0x49, 0x14, 0x06, 0x0c, 0xfd, 0x65, 0x32, 0xc3, 0x6d, 0xbe, 0x5e, 0xc4, 0xa6,
  3896. 0x63, 0x94, 0x3d, 0xff, 0xed, 0x19, 0x9a, 0xa3, 0x92, 0x8f, 0xa1, 0xdc, 0x8b, 0x44, 0x87, 0x45,
  3897. 0x26, 0x27, 0xdc, 0xe6, 0xd5, 0x22, 0x91, 0x6d, 0x83, 0x98, 0x08, 0x58, 0x0a, 0xb9, 0x05, 0xe5,
  3898. 0x41, 0xd2, 0x45, 0x9d, 0x6a, 0xd9, 0x90, 0xd7, 0x8b, 0xc8, 0xf7, 0x0d, 0xa2, 0x25, 0xe2, 0x87,
  3899. 0x61, 0x8f, 0x5a, 0x3c, 0xd9, 0x87, 0x4a, 0xcc, 0xd5, 0x23, 0x21, 0x8f, 0xd2, 0xea, 0xc2, 0xfa,
  3900. 0x1c, 0x72, 0x6f, 0x16, 0x71, 0x73, 0x3e, 0x6f, 0xec, 0x65, 0x78, 0x4f, 0x29, 0x16, 0x1c, 0xf6,
  3901. 0x79, 0xac, 0xac, 0xe4, 0x58, 0x88, 0x7c, 0x02, 0x15, 0x4c, 0xb5, 0x44, 0x84, 0xb1, 0xaa, 0x56,
  3902. 0x4e, 0x3e, 0x50, 0xdb, 0x62, 0xb4, 0x2a, 0x1d, 0x33, 0x6a, 0x77, 0xe0, 0xe2, 0x09, 0x26, 0xc8,
  3903. 0x05, 0x28, 0x2b, 0x26, 0x7b, 0x5c, 0x99, 0x48, 0x2f, 0x52, 0x3b, 0x23, 0x55, 0x58, 0x60, 0x51,
  3904. 0xc8, 0x52, 0x9e, 0x62, 0x00, 0xe7, 0x70, 0x63, 0x34, 0xdd, 0x2c, 0x83, 0xd3, 0xc7, 0x7c, 0xaa,
  3905. 0x6f, 0xc0, 0xb9, 0x17, 0x22, 0x40, 0x6a, 0x50, 0xb1, 0x11, 0xc8, 0x52, 0xc7, 0xa1, 0xe3, 0x79,
  3906. 0xfd, 0x2c, 0x2c, 0x4f, 0x79, 0xbb, 0xfe, 0xd3, 0x2c, 0x54, 0x46, 0x29, 0x40, 0x3c, 0x58, 0x0c,
  3907. 0x44, 0xac, 0x30, 0x31, 0xb9, 0xb4, 0x59, 0x57, 0x18, 0xb0, 0xd6, 0x08, 0xa4, 0x59, 0x18, 0xb0,
  3908. 0x09, 0x8b, 0x7c, 0x01, 0x8b, 0x92, 0xa7, 0x62, 0x20, 0x03, 0x73, 0x6a, 0x2d, 0x71, 0xbd, 0x38,
  3909. 0x71, 0x32, 0x10, 0xe5, 0xdf, 0x0c, 0x42, 0xc9, 0xb5, 0x37, 0x52, 0x3a, 0xa1, 0x62, 0xe2, 0x2c,
  3910. 0xe0, 0x04, 0x1d, 0xa1, 0x5e, 0x96, 0x39, 0x34, 0x83, 0xf8, 0x02, 0x6f, 0x77, 0x4c, 0x47, 0x0c,
  3911. 0x24, 0x2f, 0x26, 0x11, 0x0b, 0x8c, 0x6a, 0x75, 0xde, 0xd0, 0xff, 0x5f, 0x44, 0xf7, 0x47, 0x20,
  3912. 0x3a, 0xc1, 0x6f, 0x2e, 0xa2, 0xe5, 0x41, 0xac, 0xc2, 0x3e, 0xaf, 0xff, 0xe8, 0xc0, 0xf2, 0xd4,
  3913. 0x5d, 0xc9, 0x79, 0x98, 0x0f, 0xfb, 0xac, 0xc7, 0x6d, 0xa4, 0xb2, 0x09, 0x69, 0x43, 0x19, 0x9f,
  3914. 0x35, 0x8f, 0xb2, 0x38, 0xb9, 0xcd, 0x77, 0x5e, 0xe9, 0xb4, 0xc6, 0x57, 0x06, 0xdf, 0x8e, 0x95,
  3915. 0x3c, 0xa6, 0x96, 0xac, 0xe3, 0x1d, 0x88, 0x7e, 0x9f, 0xc5, 0xfa, 0xc9, 0x99, 0x78, 0xdb, 0x29,
  3916. 0x21, 0xe0, 0x60, 0x4a, 0xa4, 0xe8, 0x0a, 0xbd, 0x6c, 0xc6, 0x64, 0x05, 0xe6, 0x78, 0x3c, 0xc4,
  3917. 0xeb, 0xe9, 0x25, 0x3d, 0xd4, 0x2b, 0xdd, 0x50, 0x9a, 0xc7, 0x82, 0x2b, 0x38, 0xd4, 0x3c, 0xac,
  3918. 0x45, 0x12, 0xdf, 0x80, 0x5e, 0x32, 0x63, 0x72, 0x13, 0xca, 0x7d, 0x81, 0x17, 0x4c, 0x31, 0x89,
  3919. 0xf5, 0x61, 0x2f, 0x15, 0x1d, 0x76, 0x57, 0x23, 0x6c, 0x49, 0xb0, 0x70, 0x72, 0x1b, 0xce, 0xa5,
  3920. 0x4a, 0x24, 0x07, 0x3d, 0x89, 0xae, 0x3a, 0x48, 0xb8, 0x0c, 0x45, 0xb7, 0xba, 0x78, 0x72, 0x65,
  3921. 0xd9, 0xb2, 0x5d, 0x8f, 0x9e, 0xd5, 0xb4, 0x6d, 0xcd, 0xf2, 0x0d, 0x89, 0xf8, 0xb0, 0x94, 0x0c,
  3922. 0xa2, 0xe8, 0x40, 0x24, 0x59, 0x81, 0x03, 0x23, 0xf2, 0x1f, 0xbc, 0xe6, 0x23, 0xeb, 0x6e, 0x46,
  3923. 0xa2, 0x6e, 0x32, 0x99, 0xd4, 0x3e, 0x04, 0x37, 0xe7, 0x51, 0xed, 0x89, 0x23, 0x7e, 0x6c, 0x83,
  3924. 0xa4, 0x87, 0x3a, 0x70, 0x43, 0x16, 0x0d, 0xb2, 0xf6, 0x88, 0x81, 0x33, 0x93, 0x8f, 0x66, 0x6f,
  3925. 0x95, 0x6a, 0x4d, 0x70, 0x73, 0xb2, 0xe4, 0x35, 0x58, 0x96, 0xbc, 0x17, 0xa6, 0x28, 0x73, 0xc0,
  3926. 0x06, 0xea, 0xb0, 0xfa, 0xb9, 0x21, 0x2c, 0x8d, 0x16, 0x3d, 0x5c, 0xab, 0xff, 0x8d, 0xbd, 0x23,
  3927. 0xff, 0xce, 0x49, 0x2b, 0x7b, 0x90, 0xc6, 0xe2, 0x99, 0xe6, 0xc6, 0xab, 0xea, 0x82, 0x49, 0xff,
  3928. 0x68, 0xa0, 0x2d, 0xee, 0xea, 0x9e, 0x6c, 0xc8, 0xe4, 0x03, 0x98, 0x4f, 0x84, 0x54, 0xa3, 0x2c,
  3929. 0x5a, 0x2d, 0x4c, 0x59, 0x04, 0xd8, 0xca, 0x94, 0x81, 0xeb, 0x87, 0x70, 0x66, 0x5a, 0x0d, 0x5b,
  3930. 0xcf, 0xdc, 0x83, 0x1d, 0x1f, 0xbb, 0xd8, 0x65, 0x6c, 0x3c, 0x17, 0xa7, 0x37, 0x1f, 0x84, 0x52,
  3931. 0x0d, 0x58, 0xb4, 0xe3, 0x93, 0xb7, 0xb1, 0x41, 0xed, 0xed, 0x53, 0x8a, 0x6d, 0x6c, 0x0d, 0x71,
  3932. 0x97, 0xa7, 0x71, 0x7a, 0x0b, 0xc3, 0xde, 0xa5, 0xa2, 0x33, 0x6e, 0x53, 0x3f, 0xcc, 0x82, 0x6b,
  3933. 0x6b, 0xd8, 0xe9, 0xb6, 0xa9, 0xcf, 0x60, 0xb9, 0x2b, 0xb1, 0xb5, 0xca, 0x83, 0xc0, 0x5c, 0xcd,
  3934. 0x16, 0x8e, 0x5a, 0x61, 0x56, 0x19, 0x20, 0x5d, 0xca, 0x08, 0xb6, 0x82, 0x5e, 0x85, 0xa5, 0x30,
  3935. 0x19, 0xde, 0x38, 0xe0, 0x31, 0xeb, 0x44, 0xb6, 0x63, 0x55, 0xa8, 0xab, 0xd7, 0xda, 0xd9, 0x92,
  3936. 0xae, 0x8a, 0xe8, 0x7c, 0x2e, 0x63, 0xdb, 0x8b, 0x2a, 0x74, 0x3c, 0x27, 0x9f, 0x82, 0x13, 0x26,
  3937. 0xac, 0x6f, 0x4b, 0x45, 0xe1, 0x0d, 0x76, 0x7c, 0x6f, 0xd7, 0xa6, 0xc8, 0x66, 0xe5, 0xf9, 0xd3,
  3938. 0x35, 0x47, 0x2f, 0x50, 0x43, 0xab, 0xff, 0x3e, 0x07, 0x6e, 0x2b, 0x1a, 0xa4, 0xca, 0x16, 0x89,
  3939. 0x53, 0xf3, 0xcb, 0xd7, 0x70, 0x8e, 0x99, 0x9f, 0x16, 0x16, 0xeb, 0x17, 0x67, 0xaa, 0x9c, 0xf5,
  3940. 0xcd, 0xb5, 0x42, 0xb9, 0x31, 0x38, 0xab, 0x88, 0x56, 0x73, 0x85, 0xfd, 0x6b, 0x1d, 0xfb, 0xe3,
  3941. 0xb2, 0x90, 0xc1, 0x21, 0x96, 0xcb, 0xec, 0x89, 0xda, 0x16, 0x5f, 0xf8, 0xf3, 0x77, 0x37, 0x0f,
  3942. 0xcc, 0xfc, 0x6d, 0x75, 0xa7, 0x35, 0xb0, 0x5d, 0x3b, 0x92, 0x3d, 0x1c, 0xd5, 0xeb, 0xc2, 0xec,
  3943. 0xa5, 0xb8, 0x3f, 0x25, 0x61, 0x18, 0xe4, 0x4b, 0x80, 0x6e, 0x98, 0x26, 0x4c, 0xa1, 0x9c, 0xb4,
  3944. 0x51, 0x28, 0xbc, 0xe0, 0xd6, 0x18, 0x35, 0xa5, 0x92, 0x63, 0x93, 0x3b, 0xd8, 0xc3, 0xd8, 0x28,
  3945. 0x8f, 0xca, 0x27, 0x57, 0xa7, 0x96, 0x67, 0x25, 0x56, 0xb4, 0x04, 0x46, 0xb4, 0x32, 0x5a, 0xa1,
  3946. 0x95, 0x80, 0xd9, 0xbd, 0x2b, 0x4f, 0x9e, 0xad, 0xce, 0xfc, 0x81, 0xdf, 0x5f, 0xcf, 0x56, 0x4b,
  3947. 0xdf, 0x3e, 0x5f, 0x2d, 0x3d, 0xc1, 0xef, 0x37, 0xfc, 0xfe, 0xc4, 0xaf, 0x53, 0x36, 0xbf, 0xf3,
  3948. 0xef, 0xff, 0x13, 0x00, 0x00, 0xff, 0xff, 0x3b, 0x66, 0xa6, 0x7e, 0x2d, 0x0c, 0x00, 0x00,
  3949. }