objects.pb.go 110 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263
  1. // Code generated by protoc-gen-gogo.
  2. // source: objects.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 docker_swarmkit_v1 "github.com/docker/swarmkit/api/timestamp"
  9. import _ "github.com/gogo/protobuf/gogoproto"
  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. // Meta contains metadata about objects. Every object contains a meta field.
  22. type Meta struct {
  23. // Version tracks the current version of the object.
  24. Version Version `protobuf:"bytes,1,opt,name=version" json:"version"`
  25. // Object timestamps.
  26. CreatedAt *docker_swarmkit_v1.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt" json:"created_at,omitempty"`
  27. UpdatedAt *docker_swarmkit_v1.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt" json:"updated_at,omitempty"`
  28. }
  29. func (m *Meta) Reset() { *m = Meta{} }
  30. func (*Meta) ProtoMessage() {}
  31. func (*Meta) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{0} }
  32. // Node provides the internal node state as seen by the cluster.
  33. type Node struct {
  34. // ID specifies the identity of the node.
  35. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  36. Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
  37. // Spec defines the desired state of the node as specified by the user.
  38. // The system will honor this and will *never* modify it.
  39. Spec NodeSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
  40. // Description encapsulated the properties of the Node as reported by the
  41. // agent.
  42. Description *NodeDescription `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
  43. // Status provides the current status of the node, as seen by the manager.
  44. Status NodeStatus `protobuf:"bytes,5,opt,name=status" json:"status"`
  45. // ManagerStatus provides the current status of the node's manager
  46. // component, if the node is a manager.
  47. ManagerStatus *ManagerStatus `protobuf:"bytes,6,opt,name=manager_status,json=managerStatus" json:"manager_status,omitempty"`
  48. // The node attachment to the ingress network.
  49. Attachment *NetworkAttachment `protobuf:"bytes,7,opt,name=attachment" json:"attachment,omitempty"`
  50. // Certificate is the TLS certificate issued for the node, if any.
  51. Certificate Certificate `protobuf:"bytes,8,opt,name=certificate" json:"certificate"`
  52. }
  53. func (m *Node) Reset() { *m = Node{} }
  54. func (*Node) ProtoMessage() {}
  55. func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{1} }
  56. type Service struct {
  57. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  58. Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
  59. Spec ServiceSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
  60. // PreviousSpec is the previous service spec that was in place before
  61. // "Spec".
  62. PreviousSpec *ServiceSpec `protobuf:"bytes,6,opt,name=previous_spec,json=previousSpec" json:"previous_spec,omitempty"`
  63. // Runtime state of service endpoint. This may be different
  64. // from the spec version because the user may not have entered
  65. // the optional fields like node_port or virtual_ip and it
  66. // could be auto allocated by the system.
  67. Endpoint *Endpoint `protobuf:"bytes,4,opt,name=endpoint" json:"endpoint,omitempty"`
  68. // UpdateStatus contains the status of an update, if one is in
  69. // progress.
  70. UpdateStatus *UpdateStatus `protobuf:"bytes,5,opt,name=update_status,json=updateStatus" json:"update_status,omitempty"`
  71. }
  72. func (m *Service) Reset() { *m = Service{} }
  73. func (*Service) ProtoMessage() {}
  74. func (*Service) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{2} }
  75. // Endpoint specified all the network parameters required to
  76. // correctly discover and load balance a service
  77. type Endpoint struct {
  78. Spec *EndpointSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"`
  79. // Runtime state of the exposed ports which may carry
  80. // auto-allocated swarm ports in addition to the user
  81. // configured information.
  82. Ports []*PortConfig `protobuf:"bytes,2,rep,name=ports" json:"ports,omitempty"`
  83. // VirtualIPs specifies the IP addresses under which this endpoint will be
  84. // made available.
  85. VirtualIPs []*Endpoint_VirtualIP `protobuf:"bytes,3,rep,name=virtual_ips,json=virtualIps" json:"virtual_ips,omitempty"`
  86. }
  87. func (m *Endpoint) Reset() { *m = Endpoint{} }
  88. func (*Endpoint) ProtoMessage() {}
  89. func (*Endpoint) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{3} }
  90. // VirtualIP specifies a set of networks this endpoint will be attached to
  91. // and the IP addresses the target service will be made available under.
  92. type Endpoint_VirtualIP struct {
  93. // NetworkID for which this endpoint attachment was created.
  94. NetworkID string `protobuf:"bytes,1,opt,name=network_id,json=networkId,proto3" json:"network_id,omitempty"`
  95. // A virtual IP is used to address this service in IP
  96. // layer that the client can use to send requests to
  97. // this service. A DNS A/AAAA query on the service
  98. // name might return this IP to the client. This is
  99. // strictly a logical IP and there may not be any
  100. // interfaces assigned this IP address or any route
  101. // created for this address. More than one to
  102. // accommodate for both IPv4 and IPv6
  103. Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
  104. }
  105. func (m *Endpoint_VirtualIP) Reset() { *m = Endpoint_VirtualIP{} }
  106. func (*Endpoint_VirtualIP) ProtoMessage() {}
  107. func (*Endpoint_VirtualIP) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{3, 0} }
  108. // Task specifies the parameters for implementing a Spec. A task is effectively
  109. // immutable and idempotent. Once it is dispatched to a node, it will not be
  110. // dispatched to another node.
  111. type Task struct {
  112. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  113. Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
  114. // Spec defines the desired state of the task as specified by the user.
  115. // The system will honor this and will *never* modify it.
  116. Spec TaskSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
  117. // ServiceID indicates the service under which this task is orchestrated. This
  118. // should almost always be set.
  119. ServiceID string `protobuf:"bytes,4,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
  120. // Slot is the service slot number for a task.
  121. // For example, if a replicated service has replicas = 2, there will be a
  122. // task with slot = 1, and another with slot = 2.
  123. Slot uint64 `protobuf:"varint,5,opt,name=slot,proto3" json:"slot,omitempty"`
  124. // NodeID indicates the node to which the task is assigned. If this field
  125. // is empty or not set, the task is unassigned.
  126. NodeID string `protobuf:"bytes,6,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
  127. // Annotations defines the names and labels for the runtime, as set by
  128. // the cluster manager.
  129. //
  130. // As backup, if this field has an empty name, the runtime will
  131. // allocate a unique name for the actual container.
  132. //
  133. // NOTE(stevvooe): The preserves the ability for us to making naming
  134. // decisions for tasks in orchestrator, albeit, this is left empty for now.
  135. Annotations Annotations `protobuf:"bytes,7,opt,name=annotations" json:"annotations"`
  136. // ServiceAnnotations is a direct copy of the service name and labels when
  137. // this task is created.
  138. //
  139. // Labels set here will *not* be propagated to the runtime target, such as a
  140. // container. Use labels on the runtime target for that purpose.
  141. ServiceAnnotations Annotations `protobuf:"bytes,8,opt,name=service_annotations,json=serviceAnnotations" json:"service_annotations"`
  142. Status TaskStatus `protobuf:"bytes,9,opt,name=status" json:"status"`
  143. // DesiredState is the target state for the task. It is set to
  144. // TaskStateRunning when a task is first created, and changed to
  145. // TaskStateShutdown if the manager wants to terminate the task. This field
  146. // is only written by the manager.
  147. DesiredState TaskState `protobuf:"varint,10,opt,name=desired_state,json=desiredState,proto3,enum=docker.swarmkit.v1.TaskState" json:"desired_state,omitempty"`
  148. // List of network attachments by the task.
  149. Networks []*NetworkAttachment `protobuf:"bytes,11,rep,name=networks" json:"networks,omitempty"`
  150. // A copy of runtime state of service endpoint from Service
  151. // object to be distributed to agents as part of the task.
  152. Endpoint *Endpoint `protobuf:"bytes,12,opt,name=endpoint" json:"endpoint,omitempty"`
  153. // LogDriver specifies the selected log driver to use for the task. Agent
  154. // processes should always favor the value in this field.
  155. //
  156. // If present in the TaskSpec, this will be a copy of that value. The
  157. // orchestrator may choose to insert a value here, which should be honored,
  158. // such a cluster default or policy-based value.
  159. //
  160. // If not present, the daemon's default will be used.
  161. LogDriver *Driver `protobuf:"bytes,13,opt,name=log_driver,json=logDriver" json:"log_driver,omitempty"`
  162. }
  163. func (m *Task) Reset() { *m = Task{} }
  164. func (*Task) ProtoMessage() {}
  165. func (*Task) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{4} }
  166. // NetworkAttachment specifies the network parameters of attachment to
  167. // a single network by an object such as task or node.
  168. type NetworkAttachment struct {
  169. // Network state as a whole becomes part of the object so that
  170. // it always is available for use in agents so that agents
  171. // don't have any other dependency during execution.
  172. Network *Network `protobuf:"bytes,1,opt,name=network" json:"network,omitempty"`
  173. // List of IPv4/IPv6 addresses that are assigned to the object
  174. // as part of getting attached to this network.
  175. Addresses []string `protobuf:"bytes,2,rep,name=addresses" json:"addresses,omitempty"`
  176. // List of aliases by which a task is resolved in a network
  177. Aliases []string `protobuf:"bytes,3,rep,name=aliases" json:"aliases,omitempty"`
  178. }
  179. func (m *NetworkAttachment) Reset() { *m = NetworkAttachment{} }
  180. func (*NetworkAttachment) ProtoMessage() {}
  181. func (*NetworkAttachment) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{5} }
  182. type Network struct {
  183. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  184. Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
  185. Spec NetworkSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
  186. // Driver specific operational state provided by the network driver.
  187. DriverState *Driver `protobuf:"bytes,4,opt,name=driver_state,json=driverState" json:"driver_state,omitempty"`
  188. // Runtime state of IPAM options. This may not reflect the
  189. // ipam options from NetworkSpec.
  190. IPAM *IPAMOptions `protobuf:"bytes,5,opt,name=ipam" json:"ipam,omitempty"`
  191. }
  192. func (m *Network) Reset() { *m = Network{} }
  193. func (*Network) ProtoMessage() {}
  194. func (*Network) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{6} }
  195. // Cluster provides global cluster settings.
  196. type Cluster struct {
  197. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  198. Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
  199. Spec ClusterSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
  200. // RootCA contains key material for the root CA.
  201. RootCA RootCA `protobuf:"bytes,4,opt,name=root_ca,json=rootCa" json:"root_ca"`
  202. // Symmetric encryption key distributed by the lead manager. Used by agents
  203. // for securing network bootstrapping and communication.
  204. NetworkBootstrapKeys []*EncryptionKey `protobuf:"bytes,5,rep,name=network_bootstrap_keys,json=networkBootstrapKeys" json:"network_bootstrap_keys,omitempty"`
  205. // Logical clock used to timestamp every key. It allows other managers
  206. // and agents to unambiguously identify the older key to be deleted when
  207. // a new key is allocated on key rotation.
  208. EncryptionKeyLamportClock uint64 `protobuf:"varint,6,opt,name=encryption_key_lamport_clock,json=encryptionKeyLamportClock,proto3" json:"encryption_key_lamport_clock,omitempty"`
  209. // BlacklistedCertificates tracks certificates that should no longer
  210. // be honored. It's a mapping from CN -> BlacklistedCertificate.
  211. // swarm. Their certificates should effectively be blacklisted.
  212. BlacklistedCertificates map[string]*BlacklistedCertificate `protobuf:"bytes,8,rep,name=blacklisted_certificates,json=blacklistedCertificates" json:"blacklisted_certificates,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value"`
  213. // UnlockKeys defines the keys that lock node data at rest. For example,
  214. // this would contain the key encrypting key (KEK) that will encrypt the
  215. // manager TLS keys at rest and the raft encryption keys at rest.
  216. // If the key is empty, the node will be unlocked (will not require a key
  217. // to start up from a shut down state).
  218. UnlockKeys []*EncryptionKey `protobuf:"bytes,9,rep,name=unlock_keys,json=unlockKeys" json:"unlock_keys,omitempty"`
  219. }
  220. func (m *Cluster) Reset() { *m = Cluster{} }
  221. func (*Cluster) ProtoMessage() {}
  222. func (*Cluster) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{7} }
  223. // Secret represents a secret that should be passed to a container or a node,
  224. // and is immutable. It wraps the `spec` provided by the user with useful
  225. // information that is generated from the secret data in the `spec`, such as
  226. // the digest and size of the secret data.
  227. type Secret struct {
  228. ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  229. Meta Meta `protobuf:"bytes,2,opt,name=meta" json:"meta"`
  230. // Spec contains the actual secret data, as well as any context around the
  231. // secret data that the user provides.
  232. Spec SecretSpec `protobuf:"bytes,3,opt,name=spec" json:"spec"`
  233. // Whether the secret is an internal secret (not set by a user) or not.
  234. Internal bool `protobuf:"varint,4,opt,name=internal,proto3" json:"internal,omitempty"`
  235. }
  236. func (m *Secret) Reset() { *m = Secret{} }
  237. func (*Secret) ProtoMessage() {}
  238. func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorObjects, []int{8} }
  239. func init() {
  240. proto.RegisterType((*Meta)(nil), "docker.swarmkit.v1.Meta")
  241. proto.RegisterType((*Node)(nil), "docker.swarmkit.v1.Node")
  242. proto.RegisterType((*Service)(nil), "docker.swarmkit.v1.Service")
  243. proto.RegisterType((*Endpoint)(nil), "docker.swarmkit.v1.Endpoint")
  244. proto.RegisterType((*Endpoint_VirtualIP)(nil), "docker.swarmkit.v1.Endpoint.VirtualIP")
  245. proto.RegisterType((*Task)(nil), "docker.swarmkit.v1.Task")
  246. proto.RegisterType((*NetworkAttachment)(nil), "docker.swarmkit.v1.NetworkAttachment")
  247. proto.RegisterType((*Network)(nil), "docker.swarmkit.v1.Network")
  248. proto.RegisterType((*Cluster)(nil), "docker.swarmkit.v1.Cluster")
  249. proto.RegisterType((*Secret)(nil), "docker.swarmkit.v1.Secret")
  250. }
  251. func (m *Meta) Copy() *Meta {
  252. if m == nil {
  253. return nil
  254. }
  255. o := &Meta{
  256. Version: *m.Version.Copy(),
  257. CreatedAt: m.CreatedAt.Copy(),
  258. UpdatedAt: m.UpdatedAt.Copy(),
  259. }
  260. return o
  261. }
  262. func (m *Node) Copy() *Node {
  263. if m == nil {
  264. return nil
  265. }
  266. o := &Node{
  267. ID: m.ID,
  268. Meta: *m.Meta.Copy(),
  269. Spec: *m.Spec.Copy(),
  270. Description: m.Description.Copy(),
  271. Status: *m.Status.Copy(),
  272. ManagerStatus: m.ManagerStatus.Copy(),
  273. Attachment: m.Attachment.Copy(),
  274. Certificate: *m.Certificate.Copy(),
  275. }
  276. return o
  277. }
  278. func (m *Service) Copy() *Service {
  279. if m == nil {
  280. return nil
  281. }
  282. o := &Service{
  283. ID: m.ID,
  284. Meta: *m.Meta.Copy(),
  285. Spec: *m.Spec.Copy(),
  286. PreviousSpec: m.PreviousSpec.Copy(),
  287. Endpoint: m.Endpoint.Copy(),
  288. UpdateStatus: m.UpdateStatus.Copy(),
  289. }
  290. return o
  291. }
  292. func (m *Endpoint) Copy() *Endpoint {
  293. if m == nil {
  294. return nil
  295. }
  296. o := &Endpoint{
  297. Spec: m.Spec.Copy(),
  298. }
  299. if m.Ports != nil {
  300. o.Ports = make([]*PortConfig, 0, len(m.Ports))
  301. for _, v := range m.Ports {
  302. o.Ports = append(o.Ports, v.Copy())
  303. }
  304. }
  305. if m.VirtualIPs != nil {
  306. o.VirtualIPs = make([]*Endpoint_VirtualIP, 0, len(m.VirtualIPs))
  307. for _, v := range m.VirtualIPs {
  308. o.VirtualIPs = append(o.VirtualIPs, v.Copy())
  309. }
  310. }
  311. return o
  312. }
  313. func (m *Endpoint_VirtualIP) Copy() *Endpoint_VirtualIP {
  314. if m == nil {
  315. return nil
  316. }
  317. o := &Endpoint_VirtualIP{
  318. NetworkID: m.NetworkID,
  319. Addr: m.Addr,
  320. }
  321. return o
  322. }
  323. func (m *Task) Copy() *Task {
  324. if m == nil {
  325. return nil
  326. }
  327. o := &Task{
  328. ID: m.ID,
  329. Meta: *m.Meta.Copy(),
  330. Spec: *m.Spec.Copy(),
  331. ServiceID: m.ServiceID,
  332. Slot: m.Slot,
  333. NodeID: m.NodeID,
  334. Annotations: *m.Annotations.Copy(),
  335. ServiceAnnotations: *m.ServiceAnnotations.Copy(),
  336. Status: *m.Status.Copy(),
  337. DesiredState: m.DesiredState,
  338. Endpoint: m.Endpoint.Copy(),
  339. LogDriver: m.LogDriver.Copy(),
  340. }
  341. if m.Networks != nil {
  342. o.Networks = make([]*NetworkAttachment, 0, len(m.Networks))
  343. for _, v := range m.Networks {
  344. o.Networks = append(o.Networks, v.Copy())
  345. }
  346. }
  347. return o
  348. }
  349. func (m *NetworkAttachment) Copy() *NetworkAttachment {
  350. if m == nil {
  351. return nil
  352. }
  353. o := &NetworkAttachment{
  354. Network: m.Network.Copy(),
  355. }
  356. if m.Addresses != nil {
  357. o.Addresses = make([]string, 0, len(m.Addresses))
  358. o.Addresses = append(o.Addresses, m.Addresses...)
  359. }
  360. if m.Aliases != nil {
  361. o.Aliases = make([]string, 0, len(m.Aliases))
  362. o.Aliases = append(o.Aliases, m.Aliases...)
  363. }
  364. return o
  365. }
  366. func (m *Network) Copy() *Network {
  367. if m == nil {
  368. return nil
  369. }
  370. o := &Network{
  371. ID: m.ID,
  372. Meta: *m.Meta.Copy(),
  373. Spec: *m.Spec.Copy(),
  374. DriverState: m.DriverState.Copy(),
  375. IPAM: m.IPAM.Copy(),
  376. }
  377. return o
  378. }
  379. func (m *Cluster) Copy() *Cluster {
  380. if m == nil {
  381. return nil
  382. }
  383. o := &Cluster{
  384. ID: m.ID,
  385. Meta: *m.Meta.Copy(),
  386. Spec: *m.Spec.Copy(),
  387. RootCA: *m.RootCA.Copy(),
  388. EncryptionKeyLamportClock: m.EncryptionKeyLamportClock,
  389. }
  390. if m.NetworkBootstrapKeys != nil {
  391. o.NetworkBootstrapKeys = make([]*EncryptionKey, 0, len(m.NetworkBootstrapKeys))
  392. for _, v := range m.NetworkBootstrapKeys {
  393. o.NetworkBootstrapKeys = append(o.NetworkBootstrapKeys, v.Copy())
  394. }
  395. }
  396. if m.BlacklistedCertificates != nil {
  397. o.BlacklistedCertificates = make(map[string]*BlacklistedCertificate)
  398. for k, v := range m.BlacklistedCertificates {
  399. o.BlacklistedCertificates[k] = v.Copy()
  400. }
  401. }
  402. if m.UnlockKeys != nil {
  403. o.UnlockKeys = make([]*EncryptionKey, 0, len(m.UnlockKeys))
  404. for _, v := range m.UnlockKeys {
  405. o.UnlockKeys = append(o.UnlockKeys, v.Copy())
  406. }
  407. }
  408. return o
  409. }
  410. func (m *Secret) Copy() *Secret {
  411. if m == nil {
  412. return nil
  413. }
  414. o := &Secret{
  415. ID: m.ID,
  416. Meta: *m.Meta.Copy(),
  417. Spec: *m.Spec.Copy(),
  418. Internal: m.Internal,
  419. }
  420. return o
  421. }
  422. func (this *Meta) GoString() string {
  423. if this == nil {
  424. return "nil"
  425. }
  426. s := make([]string, 0, 7)
  427. s = append(s, "&api.Meta{")
  428. s = append(s, "Version: "+strings.Replace(this.Version.GoString(), `&`, ``, 1)+",\n")
  429. if this.CreatedAt != nil {
  430. s = append(s, "CreatedAt: "+fmt.Sprintf("%#v", this.CreatedAt)+",\n")
  431. }
  432. if this.UpdatedAt != nil {
  433. s = append(s, "UpdatedAt: "+fmt.Sprintf("%#v", this.UpdatedAt)+",\n")
  434. }
  435. s = append(s, "}")
  436. return strings.Join(s, "")
  437. }
  438. func (this *Node) GoString() string {
  439. if this == nil {
  440. return "nil"
  441. }
  442. s := make([]string, 0, 12)
  443. s = append(s, "&api.Node{")
  444. s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
  445. s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
  446. s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
  447. if this.Description != nil {
  448. s = append(s, "Description: "+fmt.Sprintf("%#v", this.Description)+",\n")
  449. }
  450. s = append(s, "Status: "+strings.Replace(this.Status.GoString(), `&`, ``, 1)+",\n")
  451. if this.ManagerStatus != nil {
  452. s = append(s, "ManagerStatus: "+fmt.Sprintf("%#v", this.ManagerStatus)+",\n")
  453. }
  454. if this.Attachment != nil {
  455. s = append(s, "Attachment: "+fmt.Sprintf("%#v", this.Attachment)+",\n")
  456. }
  457. s = append(s, "Certificate: "+strings.Replace(this.Certificate.GoString(), `&`, ``, 1)+",\n")
  458. s = append(s, "}")
  459. return strings.Join(s, "")
  460. }
  461. func (this *Service) GoString() string {
  462. if this == nil {
  463. return "nil"
  464. }
  465. s := make([]string, 0, 10)
  466. s = append(s, "&api.Service{")
  467. s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
  468. s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
  469. s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
  470. if this.PreviousSpec != nil {
  471. s = append(s, "PreviousSpec: "+fmt.Sprintf("%#v", this.PreviousSpec)+",\n")
  472. }
  473. if this.Endpoint != nil {
  474. s = append(s, "Endpoint: "+fmt.Sprintf("%#v", this.Endpoint)+",\n")
  475. }
  476. if this.UpdateStatus != nil {
  477. s = append(s, "UpdateStatus: "+fmt.Sprintf("%#v", this.UpdateStatus)+",\n")
  478. }
  479. s = append(s, "}")
  480. return strings.Join(s, "")
  481. }
  482. func (this *Endpoint) GoString() string {
  483. if this == nil {
  484. return "nil"
  485. }
  486. s := make([]string, 0, 7)
  487. s = append(s, "&api.Endpoint{")
  488. if this.Spec != nil {
  489. s = append(s, "Spec: "+fmt.Sprintf("%#v", this.Spec)+",\n")
  490. }
  491. if this.Ports != nil {
  492. s = append(s, "Ports: "+fmt.Sprintf("%#v", this.Ports)+",\n")
  493. }
  494. if this.VirtualIPs != nil {
  495. s = append(s, "VirtualIPs: "+fmt.Sprintf("%#v", this.VirtualIPs)+",\n")
  496. }
  497. s = append(s, "}")
  498. return strings.Join(s, "")
  499. }
  500. func (this *Endpoint_VirtualIP) GoString() string {
  501. if this == nil {
  502. return "nil"
  503. }
  504. s := make([]string, 0, 6)
  505. s = append(s, "&api.Endpoint_VirtualIP{")
  506. s = append(s, "NetworkID: "+fmt.Sprintf("%#v", this.NetworkID)+",\n")
  507. s = append(s, "Addr: "+fmt.Sprintf("%#v", this.Addr)+",\n")
  508. s = append(s, "}")
  509. return strings.Join(s, "")
  510. }
  511. func (this *Task) GoString() string {
  512. if this == nil {
  513. return "nil"
  514. }
  515. s := make([]string, 0, 17)
  516. s = append(s, "&api.Task{")
  517. s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
  518. s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
  519. s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
  520. s = append(s, "ServiceID: "+fmt.Sprintf("%#v", this.ServiceID)+",\n")
  521. s = append(s, "Slot: "+fmt.Sprintf("%#v", this.Slot)+",\n")
  522. s = append(s, "NodeID: "+fmt.Sprintf("%#v", this.NodeID)+",\n")
  523. s = append(s, "Annotations: "+strings.Replace(this.Annotations.GoString(), `&`, ``, 1)+",\n")
  524. s = append(s, "ServiceAnnotations: "+strings.Replace(this.ServiceAnnotations.GoString(), `&`, ``, 1)+",\n")
  525. s = append(s, "Status: "+strings.Replace(this.Status.GoString(), `&`, ``, 1)+",\n")
  526. s = append(s, "DesiredState: "+fmt.Sprintf("%#v", this.DesiredState)+",\n")
  527. if this.Networks != nil {
  528. s = append(s, "Networks: "+fmt.Sprintf("%#v", this.Networks)+",\n")
  529. }
  530. if this.Endpoint != nil {
  531. s = append(s, "Endpoint: "+fmt.Sprintf("%#v", this.Endpoint)+",\n")
  532. }
  533. if this.LogDriver != nil {
  534. s = append(s, "LogDriver: "+fmt.Sprintf("%#v", this.LogDriver)+",\n")
  535. }
  536. s = append(s, "}")
  537. return strings.Join(s, "")
  538. }
  539. func (this *NetworkAttachment) GoString() string {
  540. if this == nil {
  541. return "nil"
  542. }
  543. s := make([]string, 0, 7)
  544. s = append(s, "&api.NetworkAttachment{")
  545. if this.Network != nil {
  546. s = append(s, "Network: "+fmt.Sprintf("%#v", this.Network)+",\n")
  547. }
  548. s = append(s, "Addresses: "+fmt.Sprintf("%#v", this.Addresses)+",\n")
  549. s = append(s, "Aliases: "+fmt.Sprintf("%#v", this.Aliases)+",\n")
  550. s = append(s, "}")
  551. return strings.Join(s, "")
  552. }
  553. func (this *Network) GoString() string {
  554. if this == nil {
  555. return "nil"
  556. }
  557. s := make([]string, 0, 9)
  558. s = append(s, "&api.Network{")
  559. s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
  560. s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
  561. s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
  562. if this.DriverState != nil {
  563. s = append(s, "DriverState: "+fmt.Sprintf("%#v", this.DriverState)+",\n")
  564. }
  565. if this.IPAM != nil {
  566. s = append(s, "IPAM: "+fmt.Sprintf("%#v", this.IPAM)+",\n")
  567. }
  568. s = append(s, "}")
  569. return strings.Join(s, "")
  570. }
  571. func (this *Cluster) GoString() string {
  572. if this == nil {
  573. return "nil"
  574. }
  575. s := make([]string, 0, 12)
  576. s = append(s, "&api.Cluster{")
  577. s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
  578. s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
  579. s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
  580. s = append(s, "RootCA: "+strings.Replace(this.RootCA.GoString(), `&`, ``, 1)+",\n")
  581. if this.NetworkBootstrapKeys != nil {
  582. s = append(s, "NetworkBootstrapKeys: "+fmt.Sprintf("%#v", this.NetworkBootstrapKeys)+",\n")
  583. }
  584. s = append(s, "EncryptionKeyLamportClock: "+fmt.Sprintf("%#v", this.EncryptionKeyLamportClock)+",\n")
  585. keysForBlacklistedCertificates := make([]string, 0, len(this.BlacklistedCertificates))
  586. for k, _ := range this.BlacklistedCertificates {
  587. keysForBlacklistedCertificates = append(keysForBlacklistedCertificates, k)
  588. }
  589. github_com_gogo_protobuf_sortkeys.Strings(keysForBlacklistedCertificates)
  590. mapStringForBlacklistedCertificates := "map[string]*BlacklistedCertificate{"
  591. for _, k := range keysForBlacklistedCertificates {
  592. mapStringForBlacklistedCertificates += fmt.Sprintf("%#v: %#v,", k, this.BlacklistedCertificates[k])
  593. }
  594. mapStringForBlacklistedCertificates += "}"
  595. if this.BlacklistedCertificates != nil {
  596. s = append(s, "BlacklistedCertificates: "+mapStringForBlacklistedCertificates+",\n")
  597. }
  598. if this.UnlockKeys != nil {
  599. s = append(s, "UnlockKeys: "+fmt.Sprintf("%#v", this.UnlockKeys)+",\n")
  600. }
  601. s = append(s, "}")
  602. return strings.Join(s, "")
  603. }
  604. func (this *Secret) GoString() string {
  605. if this == nil {
  606. return "nil"
  607. }
  608. s := make([]string, 0, 8)
  609. s = append(s, "&api.Secret{")
  610. s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n")
  611. s = append(s, "Meta: "+strings.Replace(this.Meta.GoString(), `&`, ``, 1)+",\n")
  612. s = append(s, "Spec: "+strings.Replace(this.Spec.GoString(), `&`, ``, 1)+",\n")
  613. s = append(s, "Internal: "+fmt.Sprintf("%#v", this.Internal)+",\n")
  614. s = append(s, "}")
  615. return strings.Join(s, "")
  616. }
  617. func valueToGoStringObjects(v interface{}, typ string) string {
  618. rv := reflect.ValueOf(v)
  619. if rv.IsNil() {
  620. return "nil"
  621. }
  622. pv := reflect.Indirect(rv).Interface()
  623. return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv)
  624. }
  625. func extensionToGoStringObjects(m github_com_gogo_protobuf_proto.Message) string {
  626. e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m)
  627. if e == nil {
  628. return "nil"
  629. }
  630. s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{"
  631. keys := make([]int, 0, len(e))
  632. for k := range e {
  633. keys = append(keys, int(k))
  634. }
  635. sort.Ints(keys)
  636. ss := []string{}
  637. for _, k := range keys {
  638. ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString())
  639. }
  640. s += strings.Join(ss, ",") + "})"
  641. return s
  642. }
  643. func (m *Meta) Marshal() (data []byte, err error) {
  644. size := m.Size()
  645. data = make([]byte, size)
  646. n, err := m.MarshalTo(data)
  647. if err != nil {
  648. return nil, err
  649. }
  650. return data[:n], nil
  651. }
  652. func (m *Meta) MarshalTo(data []byte) (int, error) {
  653. var i int
  654. _ = i
  655. var l int
  656. _ = l
  657. data[i] = 0xa
  658. i++
  659. i = encodeVarintObjects(data, i, uint64(m.Version.Size()))
  660. n1, err := m.Version.MarshalTo(data[i:])
  661. if err != nil {
  662. return 0, err
  663. }
  664. i += n1
  665. if m.CreatedAt != nil {
  666. data[i] = 0x12
  667. i++
  668. i = encodeVarintObjects(data, i, uint64(m.CreatedAt.Size()))
  669. n2, err := m.CreatedAt.MarshalTo(data[i:])
  670. if err != nil {
  671. return 0, err
  672. }
  673. i += n2
  674. }
  675. if m.UpdatedAt != nil {
  676. data[i] = 0x1a
  677. i++
  678. i = encodeVarintObjects(data, i, uint64(m.UpdatedAt.Size()))
  679. n3, err := m.UpdatedAt.MarshalTo(data[i:])
  680. if err != nil {
  681. return 0, err
  682. }
  683. i += n3
  684. }
  685. return i, nil
  686. }
  687. func (m *Node) Marshal() (data []byte, err error) {
  688. size := m.Size()
  689. data = make([]byte, size)
  690. n, err := m.MarshalTo(data)
  691. if err != nil {
  692. return nil, err
  693. }
  694. return data[:n], nil
  695. }
  696. func (m *Node) MarshalTo(data []byte) (int, error) {
  697. var i int
  698. _ = i
  699. var l int
  700. _ = l
  701. if len(m.ID) > 0 {
  702. data[i] = 0xa
  703. i++
  704. i = encodeVarintObjects(data, i, uint64(len(m.ID)))
  705. i += copy(data[i:], m.ID)
  706. }
  707. data[i] = 0x12
  708. i++
  709. i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
  710. n4, err := m.Meta.MarshalTo(data[i:])
  711. if err != nil {
  712. return 0, err
  713. }
  714. i += n4
  715. data[i] = 0x1a
  716. i++
  717. i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
  718. n5, err := m.Spec.MarshalTo(data[i:])
  719. if err != nil {
  720. return 0, err
  721. }
  722. i += n5
  723. if m.Description != nil {
  724. data[i] = 0x22
  725. i++
  726. i = encodeVarintObjects(data, i, uint64(m.Description.Size()))
  727. n6, err := m.Description.MarshalTo(data[i:])
  728. if err != nil {
  729. return 0, err
  730. }
  731. i += n6
  732. }
  733. data[i] = 0x2a
  734. i++
  735. i = encodeVarintObjects(data, i, uint64(m.Status.Size()))
  736. n7, err := m.Status.MarshalTo(data[i:])
  737. if err != nil {
  738. return 0, err
  739. }
  740. i += n7
  741. if m.ManagerStatus != nil {
  742. data[i] = 0x32
  743. i++
  744. i = encodeVarintObjects(data, i, uint64(m.ManagerStatus.Size()))
  745. n8, err := m.ManagerStatus.MarshalTo(data[i:])
  746. if err != nil {
  747. return 0, err
  748. }
  749. i += n8
  750. }
  751. if m.Attachment != nil {
  752. data[i] = 0x3a
  753. i++
  754. i = encodeVarintObjects(data, i, uint64(m.Attachment.Size()))
  755. n9, err := m.Attachment.MarshalTo(data[i:])
  756. if err != nil {
  757. return 0, err
  758. }
  759. i += n9
  760. }
  761. data[i] = 0x42
  762. i++
  763. i = encodeVarintObjects(data, i, uint64(m.Certificate.Size()))
  764. n10, err := m.Certificate.MarshalTo(data[i:])
  765. if err != nil {
  766. return 0, err
  767. }
  768. i += n10
  769. return i, nil
  770. }
  771. func (m *Service) Marshal() (data []byte, err error) {
  772. size := m.Size()
  773. data = make([]byte, size)
  774. n, err := m.MarshalTo(data)
  775. if err != nil {
  776. return nil, err
  777. }
  778. return data[:n], nil
  779. }
  780. func (m *Service) MarshalTo(data []byte) (int, error) {
  781. var i int
  782. _ = i
  783. var l int
  784. _ = l
  785. if len(m.ID) > 0 {
  786. data[i] = 0xa
  787. i++
  788. i = encodeVarintObjects(data, i, uint64(len(m.ID)))
  789. i += copy(data[i:], m.ID)
  790. }
  791. data[i] = 0x12
  792. i++
  793. i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
  794. n11, err := m.Meta.MarshalTo(data[i:])
  795. if err != nil {
  796. return 0, err
  797. }
  798. i += n11
  799. data[i] = 0x1a
  800. i++
  801. i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
  802. n12, err := m.Spec.MarshalTo(data[i:])
  803. if err != nil {
  804. return 0, err
  805. }
  806. i += n12
  807. if m.Endpoint != nil {
  808. data[i] = 0x22
  809. i++
  810. i = encodeVarintObjects(data, i, uint64(m.Endpoint.Size()))
  811. n13, err := m.Endpoint.MarshalTo(data[i:])
  812. if err != nil {
  813. return 0, err
  814. }
  815. i += n13
  816. }
  817. if m.UpdateStatus != nil {
  818. data[i] = 0x2a
  819. i++
  820. i = encodeVarintObjects(data, i, uint64(m.UpdateStatus.Size()))
  821. n14, err := m.UpdateStatus.MarshalTo(data[i:])
  822. if err != nil {
  823. return 0, err
  824. }
  825. i += n14
  826. }
  827. if m.PreviousSpec != nil {
  828. data[i] = 0x32
  829. i++
  830. i = encodeVarintObjects(data, i, uint64(m.PreviousSpec.Size()))
  831. n15, err := m.PreviousSpec.MarshalTo(data[i:])
  832. if err != nil {
  833. return 0, err
  834. }
  835. i += n15
  836. }
  837. return i, nil
  838. }
  839. func (m *Endpoint) Marshal() (data []byte, err error) {
  840. size := m.Size()
  841. data = make([]byte, size)
  842. n, err := m.MarshalTo(data)
  843. if err != nil {
  844. return nil, err
  845. }
  846. return data[:n], nil
  847. }
  848. func (m *Endpoint) MarshalTo(data []byte) (int, error) {
  849. var i int
  850. _ = i
  851. var l int
  852. _ = l
  853. if m.Spec != nil {
  854. data[i] = 0xa
  855. i++
  856. i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
  857. n16, err := m.Spec.MarshalTo(data[i:])
  858. if err != nil {
  859. return 0, err
  860. }
  861. i += n16
  862. }
  863. if len(m.Ports) > 0 {
  864. for _, msg := range m.Ports {
  865. data[i] = 0x12
  866. i++
  867. i = encodeVarintObjects(data, i, uint64(msg.Size()))
  868. n, err := msg.MarshalTo(data[i:])
  869. if err != nil {
  870. return 0, err
  871. }
  872. i += n
  873. }
  874. }
  875. if len(m.VirtualIPs) > 0 {
  876. for _, msg := range m.VirtualIPs {
  877. data[i] = 0x1a
  878. i++
  879. i = encodeVarintObjects(data, i, uint64(msg.Size()))
  880. n, err := msg.MarshalTo(data[i:])
  881. if err != nil {
  882. return 0, err
  883. }
  884. i += n
  885. }
  886. }
  887. return i, nil
  888. }
  889. func (m *Endpoint_VirtualIP) Marshal() (data []byte, err error) {
  890. size := m.Size()
  891. data = make([]byte, size)
  892. n, err := m.MarshalTo(data)
  893. if err != nil {
  894. return nil, err
  895. }
  896. return data[:n], nil
  897. }
  898. func (m *Endpoint_VirtualIP) MarshalTo(data []byte) (int, error) {
  899. var i int
  900. _ = i
  901. var l int
  902. _ = l
  903. if len(m.NetworkID) > 0 {
  904. data[i] = 0xa
  905. i++
  906. i = encodeVarintObjects(data, i, uint64(len(m.NetworkID)))
  907. i += copy(data[i:], m.NetworkID)
  908. }
  909. if len(m.Addr) > 0 {
  910. data[i] = 0x12
  911. i++
  912. i = encodeVarintObjects(data, i, uint64(len(m.Addr)))
  913. i += copy(data[i:], m.Addr)
  914. }
  915. return i, nil
  916. }
  917. func (m *Task) Marshal() (data []byte, err error) {
  918. size := m.Size()
  919. data = make([]byte, size)
  920. n, err := m.MarshalTo(data)
  921. if err != nil {
  922. return nil, err
  923. }
  924. return data[:n], nil
  925. }
  926. func (m *Task) MarshalTo(data []byte) (int, error) {
  927. var i int
  928. _ = i
  929. var l int
  930. _ = l
  931. if len(m.ID) > 0 {
  932. data[i] = 0xa
  933. i++
  934. i = encodeVarintObjects(data, i, uint64(len(m.ID)))
  935. i += copy(data[i:], m.ID)
  936. }
  937. data[i] = 0x12
  938. i++
  939. i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
  940. n17, err := m.Meta.MarshalTo(data[i:])
  941. if err != nil {
  942. return 0, err
  943. }
  944. i += n17
  945. data[i] = 0x1a
  946. i++
  947. i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
  948. n18, err := m.Spec.MarshalTo(data[i:])
  949. if err != nil {
  950. return 0, err
  951. }
  952. i += n18
  953. if len(m.ServiceID) > 0 {
  954. data[i] = 0x22
  955. i++
  956. i = encodeVarintObjects(data, i, uint64(len(m.ServiceID)))
  957. i += copy(data[i:], m.ServiceID)
  958. }
  959. if m.Slot != 0 {
  960. data[i] = 0x28
  961. i++
  962. i = encodeVarintObjects(data, i, uint64(m.Slot))
  963. }
  964. if len(m.NodeID) > 0 {
  965. data[i] = 0x32
  966. i++
  967. i = encodeVarintObjects(data, i, uint64(len(m.NodeID)))
  968. i += copy(data[i:], m.NodeID)
  969. }
  970. data[i] = 0x3a
  971. i++
  972. i = encodeVarintObjects(data, i, uint64(m.Annotations.Size()))
  973. n19, err := m.Annotations.MarshalTo(data[i:])
  974. if err != nil {
  975. return 0, err
  976. }
  977. i += n19
  978. data[i] = 0x42
  979. i++
  980. i = encodeVarintObjects(data, i, uint64(m.ServiceAnnotations.Size()))
  981. n20, err := m.ServiceAnnotations.MarshalTo(data[i:])
  982. if err != nil {
  983. return 0, err
  984. }
  985. i += n20
  986. data[i] = 0x4a
  987. i++
  988. i = encodeVarintObjects(data, i, uint64(m.Status.Size()))
  989. n21, err := m.Status.MarshalTo(data[i:])
  990. if err != nil {
  991. return 0, err
  992. }
  993. i += n21
  994. if m.DesiredState != 0 {
  995. data[i] = 0x50
  996. i++
  997. i = encodeVarintObjects(data, i, uint64(m.DesiredState))
  998. }
  999. if len(m.Networks) > 0 {
  1000. for _, msg := range m.Networks {
  1001. data[i] = 0x5a
  1002. i++
  1003. i = encodeVarintObjects(data, i, uint64(msg.Size()))
  1004. n, err := msg.MarshalTo(data[i:])
  1005. if err != nil {
  1006. return 0, err
  1007. }
  1008. i += n
  1009. }
  1010. }
  1011. if m.Endpoint != nil {
  1012. data[i] = 0x62
  1013. i++
  1014. i = encodeVarintObjects(data, i, uint64(m.Endpoint.Size()))
  1015. n22, err := m.Endpoint.MarshalTo(data[i:])
  1016. if err != nil {
  1017. return 0, err
  1018. }
  1019. i += n22
  1020. }
  1021. if m.LogDriver != nil {
  1022. data[i] = 0x6a
  1023. i++
  1024. i = encodeVarintObjects(data, i, uint64(m.LogDriver.Size()))
  1025. n23, err := m.LogDriver.MarshalTo(data[i:])
  1026. if err != nil {
  1027. return 0, err
  1028. }
  1029. i += n23
  1030. }
  1031. return i, nil
  1032. }
  1033. func (m *NetworkAttachment) Marshal() (data []byte, err error) {
  1034. size := m.Size()
  1035. data = make([]byte, size)
  1036. n, err := m.MarshalTo(data)
  1037. if err != nil {
  1038. return nil, err
  1039. }
  1040. return data[:n], nil
  1041. }
  1042. func (m *NetworkAttachment) MarshalTo(data []byte) (int, error) {
  1043. var i int
  1044. _ = i
  1045. var l int
  1046. _ = l
  1047. if m.Network != nil {
  1048. data[i] = 0xa
  1049. i++
  1050. i = encodeVarintObjects(data, i, uint64(m.Network.Size()))
  1051. n24, err := m.Network.MarshalTo(data[i:])
  1052. if err != nil {
  1053. return 0, err
  1054. }
  1055. i += n24
  1056. }
  1057. if len(m.Addresses) > 0 {
  1058. for _, s := range m.Addresses {
  1059. data[i] = 0x12
  1060. i++
  1061. l = len(s)
  1062. for l >= 1<<7 {
  1063. data[i] = uint8(uint64(l)&0x7f | 0x80)
  1064. l >>= 7
  1065. i++
  1066. }
  1067. data[i] = uint8(l)
  1068. i++
  1069. i += copy(data[i:], s)
  1070. }
  1071. }
  1072. if len(m.Aliases) > 0 {
  1073. for _, s := range m.Aliases {
  1074. data[i] = 0x1a
  1075. i++
  1076. l = len(s)
  1077. for l >= 1<<7 {
  1078. data[i] = uint8(uint64(l)&0x7f | 0x80)
  1079. l >>= 7
  1080. i++
  1081. }
  1082. data[i] = uint8(l)
  1083. i++
  1084. i += copy(data[i:], s)
  1085. }
  1086. }
  1087. return i, nil
  1088. }
  1089. func (m *Network) 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 *Network) MarshalTo(data []byte) (int, error) {
  1099. var i int
  1100. _ = i
  1101. var l int
  1102. _ = l
  1103. if len(m.ID) > 0 {
  1104. data[i] = 0xa
  1105. i++
  1106. i = encodeVarintObjects(data, i, uint64(len(m.ID)))
  1107. i += copy(data[i:], m.ID)
  1108. }
  1109. data[i] = 0x12
  1110. i++
  1111. i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
  1112. n25, err := m.Meta.MarshalTo(data[i:])
  1113. if err != nil {
  1114. return 0, err
  1115. }
  1116. i += n25
  1117. data[i] = 0x1a
  1118. i++
  1119. i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
  1120. n26, err := m.Spec.MarshalTo(data[i:])
  1121. if err != nil {
  1122. return 0, err
  1123. }
  1124. i += n26
  1125. if m.DriverState != nil {
  1126. data[i] = 0x22
  1127. i++
  1128. i = encodeVarintObjects(data, i, uint64(m.DriverState.Size()))
  1129. n27, err := m.DriverState.MarshalTo(data[i:])
  1130. if err != nil {
  1131. return 0, err
  1132. }
  1133. i += n27
  1134. }
  1135. if m.IPAM != nil {
  1136. data[i] = 0x2a
  1137. i++
  1138. i = encodeVarintObjects(data, i, uint64(m.IPAM.Size()))
  1139. n28, err := m.IPAM.MarshalTo(data[i:])
  1140. if err != nil {
  1141. return 0, err
  1142. }
  1143. i += n28
  1144. }
  1145. return i, nil
  1146. }
  1147. func (m *Cluster) Marshal() (data []byte, err error) {
  1148. size := m.Size()
  1149. data = make([]byte, size)
  1150. n, err := m.MarshalTo(data)
  1151. if err != nil {
  1152. return nil, err
  1153. }
  1154. return data[:n], nil
  1155. }
  1156. func (m *Cluster) MarshalTo(data []byte) (int, error) {
  1157. var i int
  1158. _ = i
  1159. var l int
  1160. _ = l
  1161. if len(m.ID) > 0 {
  1162. data[i] = 0xa
  1163. i++
  1164. i = encodeVarintObjects(data, i, uint64(len(m.ID)))
  1165. i += copy(data[i:], m.ID)
  1166. }
  1167. data[i] = 0x12
  1168. i++
  1169. i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
  1170. n29, err := m.Meta.MarshalTo(data[i:])
  1171. if err != nil {
  1172. return 0, err
  1173. }
  1174. i += n29
  1175. data[i] = 0x1a
  1176. i++
  1177. i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
  1178. n30, err := m.Spec.MarshalTo(data[i:])
  1179. if err != nil {
  1180. return 0, err
  1181. }
  1182. i += n30
  1183. data[i] = 0x22
  1184. i++
  1185. i = encodeVarintObjects(data, i, uint64(m.RootCA.Size()))
  1186. n31, err := m.RootCA.MarshalTo(data[i:])
  1187. if err != nil {
  1188. return 0, err
  1189. }
  1190. i += n31
  1191. if len(m.NetworkBootstrapKeys) > 0 {
  1192. for _, msg := range m.NetworkBootstrapKeys {
  1193. data[i] = 0x2a
  1194. i++
  1195. i = encodeVarintObjects(data, i, uint64(msg.Size()))
  1196. n, err := msg.MarshalTo(data[i:])
  1197. if err != nil {
  1198. return 0, err
  1199. }
  1200. i += n
  1201. }
  1202. }
  1203. if m.EncryptionKeyLamportClock != 0 {
  1204. data[i] = 0x30
  1205. i++
  1206. i = encodeVarintObjects(data, i, uint64(m.EncryptionKeyLamportClock))
  1207. }
  1208. if len(m.BlacklistedCertificates) > 0 {
  1209. for k, _ := range m.BlacklistedCertificates {
  1210. data[i] = 0x42
  1211. i++
  1212. v := m.BlacklistedCertificates[k]
  1213. msgSize := 0
  1214. if v != nil {
  1215. msgSize = v.Size()
  1216. msgSize += 1 + sovObjects(uint64(msgSize))
  1217. }
  1218. mapSize := 1 + len(k) + sovObjects(uint64(len(k))) + msgSize
  1219. i = encodeVarintObjects(data, i, uint64(mapSize))
  1220. data[i] = 0xa
  1221. i++
  1222. i = encodeVarintObjects(data, i, uint64(len(k)))
  1223. i += copy(data[i:], k)
  1224. if v != nil {
  1225. data[i] = 0x12
  1226. i++
  1227. i = encodeVarintObjects(data, i, uint64(v.Size()))
  1228. n32, err := v.MarshalTo(data[i:])
  1229. if err != nil {
  1230. return 0, err
  1231. }
  1232. i += n32
  1233. }
  1234. }
  1235. }
  1236. if len(m.UnlockKeys) > 0 {
  1237. for _, msg := range m.UnlockKeys {
  1238. data[i] = 0x4a
  1239. i++
  1240. i = encodeVarintObjects(data, i, uint64(msg.Size()))
  1241. n, err := msg.MarshalTo(data[i:])
  1242. if err != nil {
  1243. return 0, err
  1244. }
  1245. i += n
  1246. }
  1247. }
  1248. return i, nil
  1249. }
  1250. func (m *Secret) Marshal() (data []byte, err error) {
  1251. size := m.Size()
  1252. data = make([]byte, size)
  1253. n, err := m.MarshalTo(data)
  1254. if err != nil {
  1255. return nil, err
  1256. }
  1257. return data[:n], nil
  1258. }
  1259. func (m *Secret) MarshalTo(data []byte) (int, error) {
  1260. var i int
  1261. _ = i
  1262. var l int
  1263. _ = l
  1264. if len(m.ID) > 0 {
  1265. data[i] = 0xa
  1266. i++
  1267. i = encodeVarintObjects(data, i, uint64(len(m.ID)))
  1268. i += copy(data[i:], m.ID)
  1269. }
  1270. data[i] = 0x12
  1271. i++
  1272. i = encodeVarintObjects(data, i, uint64(m.Meta.Size()))
  1273. n33, err := m.Meta.MarshalTo(data[i:])
  1274. if err != nil {
  1275. return 0, err
  1276. }
  1277. i += n33
  1278. data[i] = 0x1a
  1279. i++
  1280. i = encodeVarintObjects(data, i, uint64(m.Spec.Size()))
  1281. n34, err := m.Spec.MarshalTo(data[i:])
  1282. if err != nil {
  1283. return 0, err
  1284. }
  1285. i += n34
  1286. if m.Internal {
  1287. data[i] = 0x20
  1288. i++
  1289. if m.Internal {
  1290. data[i] = 1
  1291. } else {
  1292. data[i] = 0
  1293. }
  1294. i++
  1295. }
  1296. return i, nil
  1297. }
  1298. func encodeFixed64Objects(data []byte, offset int, v uint64) int {
  1299. data[offset] = uint8(v)
  1300. data[offset+1] = uint8(v >> 8)
  1301. data[offset+2] = uint8(v >> 16)
  1302. data[offset+3] = uint8(v >> 24)
  1303. data[offset+4] = uint8(v >> 32)
  1304. data[offset+5] = uint8(v >> 40)
  1305. data[offset+6] = uint8(v >> 48)
  1306. data[offset+7] = uint8(v >> 56)
  1307. return offset + 8
  1308. }
  1309. func encodeFixed32Objects(data []byte, offset int, v uint32) int {
  1310. data[offset] = uint8(v)
  1311. data[offset+1] = uint8(v >> 8)
  1312. data[offset+2] = uint8(v >> 16)
  1313. data[offset+3] = uint8(v >> 24)
  1314. return offset + 4
  1315. }
  1316. func encodeVarintObjects(data []byte, offset int, v uint64) int {
  1317. for v >= 1<<7 {
  1318. data[offset] = uint8(v&0x7f | 0x80)
  1319. v >>= 7
  1320. offset++
  1321. }
  1322. data[offset] = uint8(v)
  1323. return offset + 1
  1324. }
  1325. func (m *Meta) Size() (n int) {
  1326. var l int
  1327. _ = l
  1328. l = m.Version.Size()
  1329. n += 1 + l + sovObjects(uint64(l))
  1330. if m.CreatedAt != nil {
  1331. l = m.CreatedAt.Size()
  1332. n += 1 + l + sovObjects(uint64(l))
  1333. }
  1334. if m.UpdatedAt != nil {
  1335. l = m.UpdatedAt.Size()
  1336. n += 1 + l + sovObjects(uint64(l))
  1337. }
  1338. return n
  1339. }
  1340. func (m *Node) Size() (n int) {
  1341. var l int
  1342. _ = l
  1343. l = len(m.ID)
  1344. if l > 0 {
  1345. n += 1 + l + sovObjects(uint64(l))
  1346. }
  1347. l = m.Meta.Size()
  1348. n += 1 + l + sovObjects(uint64(l))
  1349. l = m.Spec.Size()
  1350. n += 1 + l + sovObjects(uint64(l))
  1351. if m.Description != nil {
  1352. l = m.Description.Size()
  1353. n += 1 + l + sovObjects(uint64(l))
  1354. }
  1355. l = m.Status.Size()
  1356. n += 1 + l + sovObjects(uint64(l))
  1357. if m.ManagerStatus != nil {
  1358. l = m.ManagerStatus.Size()
  1359. n += 1 + l + sovObjects(uint64(l))
  1360. }
  1361. if m.Attachment != nil {
  1362. l = m.Attachment.Size()
  1363. n += 1 + l + sovObjects(uint64(l))
  1364. }
  1365. l = m.Certificate.Size()
  1366. n += 1 + l + sovObjects(uint64(l))
  1367. return n
  1368. }
  1369. func (m *Service) Size() (n int) {
  1370. var l int
  1371. _ = l
  1372. l = len(m.ID)
  1373. if l > 0 {
  1374. n += 1 + l + sovObjects(uint64(l))
  1375. }
  1376. l = m.Meta.Size()
  1377. n += 1 + l + sovObjects(uint64(l))
  1378. l = m.Spec.Size()
  1379. n += 1 + l + sovObjects(uint64(l))
  1380. if m.Endpoint != nil {
  1381. l = m.Endpoint.Size()
  1382. n += 1 + l + sovObjects(uint64(l))
  1383. }
  1384. if m.UpdateStatus != nil {
  1385. l = m.UpdateStatus.Size()
  1386. n += 1 + l + sovObjects(uint64(l))
  1387. }
  1388. if m.PreviousSpec != nil {
  1389. l = m.PreviousSpec.Size()
  1390. n += 1 + l + sovObjects(uint64(l))
  1391. }
  1392. return n
  1393. }
  1394. func (m *Endpoint) Size() (n int) {
  1395. var l int
  1396. _ = l
  1397. if m.Spec != nil {
  1398. l = m.Spec.Size()
  1399. n += 1 + l + sovObjects(uint64(l))
  1400. }
  1401. if len(m.Ports) > 0 {
  1402. for _, e := range m.Ports {
  1403. l = e.Size()
  1404. n += 1 + l + sovObjects(uint64(l))
  1405. }
  1406. }
  1407. if len(m.VirtualIPs) > 0 {
  1408. for _, e := range m.VirtualIPs {
  1409. l = e.Size()
  1410. n += 1 + l + sovObjects(uint64(l))
  1411. }
  1412. }
  1413. return n
  1414. }
  1415. func (m *Endpoint_VirtualIP) Size() (n int) {
  1416. var l int
  1417. _ = l
  1418. l = len(m.NetworkID)
  1419. if l > 0 {
  1420. n += 1 + l + sovObjects(uint64(l))
  1421. }
  1422. l = len(m.Addr)
  1423. if l > 0 {
  1424. n += 1 + l + sovObjects(uint64(l))
  1425. }
  1426. return n
  1427. }
  1428. func (m *Task) Size() (n int) {
  1429. var l int
  1430. _ = l
  1431. l = len(m.ID)
  1432. if l > 0 {
  1433. n += 1 + l + sovObjects(uint64(l))
  1434. }
  1435. l = m.Meta.Size()
  1436. n += 1 + l + sovObjects(uint64(l))
  1437. l = m.Spec.Size()
  1438. n += 1 + l + sovObjects(uint64(l))
  1439. l = len(m.ServiceID)
  1440. if l > 0 {
  1441. n += 1 + l + sovObjects(uint64(l))
  1442. }
  1443. if m.Slot != 0 {
  1444. n += 1 + sovObjects(uint64(m.Slot))
  1445. }
  1446. l = len(m.NodeID)
  1447. if l > 0 {
  1448. n += 1 + l + sovObjects(uint64(l))
  1449. }
  1450. l = m.Annotations.Size()
  1451. n += 1 + l + sovObjects(uint64(l))
  1452. l = m.ServiceAnnotations.Size()
  1453. n += 1 + l + sovObjects(uint64(l))
  1454. l = m.Status.Size()
  1455. n += 1 + l + sovObjects(uint64(l))
  1456. if m.DesiredState != 0 {
  1457. n += 1 + sovObjects(uint64(m.DesiredState))
  1458. }
  1459. if len(m.Networks) > 0 {
  1460. for _, e := range m.Networks {
  1461. l = e.Size()
  1462. n += 1 + l + sovObjects(uint64(l))
  1463. }
  1464. }
  1465. if m.Endpoint != nil {
  1466. l = m.Endpoint.Size()
  1467. n += 1 + l + sovObjects(uint64(l))
  1468. }
  1469. if m.LogDriver != nil {
  1470. l = m.LogDriver.Size()
  1471. n += 1 + l + sovObjects(uint64(l))
  1472. }
  1473. return n
  1474. }
  1475. func (m *NetworkAttachment) Size() (n int) {
  1476. var l int
  1477. _ = l
  1478. if m.Network != nil {
  1479. l = m.Network.Size()
  1480. n += 1 + l + sovObjects(uint64(l))
  1481. }
  1482. if len(m.Addresses) > 0 {
  1483. for _, s := range m.Addresses {
  1484. l = len(s)
  1485. n += 1 + l + sovObjects(uint64(l))
  1486. }
  1487. }
  1488. if len(m.Aliases) > 0 {
  1489. for _, s := range m.Aliases {
  1490. l = len(s)
  1491. n += 1 + l + sovObjects(uint64(l))
  1492. }
  1493. }
  1494. return n
  1495. }
  1496. func (m *Network) Size() (n int) {
  1497. var l int
  1498. _ = l
  1499. l = len(m.ID)
  1500. if l > 0 {
  1501. n += 1 + l + sovObjects(uint64(l))
  1502. }
  1503. l = m.Meta.Size()
  1504. n += 1 + l + sovObjects(uint64(l))
  1505. l = m.Spec.Size()
  1506. n += 1 + l + sovObjects(uint64(l))
  1507. if m.DriverState != nil {
  1508. l = m.DriverState.Size()
  1509. n += 1 + l + sovObjects(uint64(l))
  1510. }
  1511. if m.IPAM != nil {
  1512. l = m.IPAM.Size()
  1513. n += 1 + l + sovObjects(uint64(l))
  1514. }
  1515. return n
  1516. }
  1517. func (m *Cluster) Size() (n int) {
  1518. var l int
  1519. _ = l
  1520. l = len(m.ID)
  1521. if l > 0 {
  1522. n += 1 + l + sovObjects(uint64(l))
  1523. }
  1524. l = m.Meta.Size()
  1525. n += 1 + l + sovObjects(uint64(l))
  1526. l = m.Spec.Size()
  1527. n += 1 + l + sovObjects(uint64(l))
  1528. l = m.RootCA.Size()
  1529. n += 1 + l + sovObjects(uint64(l))
  1530. if len(m.NetworkBootstrapKeys) > 0 {
  1531. for _, e := range m.NetworkBootstrapKeys {
  1532. l = e.Size()
  1533. n += 1 + l + sovObjects(uint64(l))
  1534. }
  1535. }
  1536. if m.EncryptionKeyLamportClock != 0 {
  1537. n += 1 + sovObjects(uint64(m.EncryptionKeyLamportClock))
  1538. }
  1539. if len(m.BlacklistedCertificates) > 0 {
  1540. for k, v := range m.BlacklistedCertificates {
  1541. _ = k
  1542. _ = v
  1543. l = 0
  1544. if v != nil {
  1545. l = v.Size()
  1546. l += 1 + sovObjects(uint64(l))
  1547. }
  1548. mapEntrySize := 1 + len(k) + sovObjects(uint64(len(k))) + l
  1549. n += mapEntrySize + 1 + sovObjects(uint64(mapEntrySize))
  1550. }
  1551. }
  1552. if len(m.UnlockKeys) > 0 {
  1553. for _, e := range m.UnlockKeys {
  1554. l = e.Size()
  1555. n += 1 + l + sovObjects(uint64(l))
  1556. }
  1557. }
  1558. return n
  1559. }
  1560. func (m *Secret) Size() (n int) {
  1561. var l int
  1562. _ = l
  1563. l = len(m.ID)
  1564. if l > 0 {
  1565. n += 1 + l + sovObjects(uint64(l))
  1566. }
  1567. l = m.Meta.Size()
  1568. n += 1 + l + sovObjects(uint64(l))
  1569. l = m.Spec.Size()
  1570. n += 1 + l + sovObjects(uint64(l))
  1571. if m.Internal {
  1572. n += 2
  1573. }
  1574. return n
  1575. }
  1576. func sovObjects(x uint64) (n int) {
  1577. for {
  1578. n++
  1579. x >>= 7
  1580. if x == 0 {
  1581. break
  1582. }
  1583. }
  1584. return n
  1585. }
  1586. func sozObjects(x uint64) (n int) {
  1587. return sovObjects(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1588. }
  1589. func (this *Meta) String() string {
  1590. if this == nil {
  1591. return "nil"
  1592. }
  1593. s := strings.Join([]string{`&Meta{`,
  1594. `Version:` + strings.Replace(strings.Replace(this.Version.String(), "Version", "Version", 1), `&`, ``, 1) + `,`,
  1595. `CreatedAt:` + strings.Replace(fmt.Sprintf("%v", this.CreatedAt), "Timestamp", "docker_swarmkit_v1.Timestamp", 1) + `,`,
  1596. `UpdatedAt:` + strings.Replace(fmt.Sprintf("%v", this.UpdatedAt), "Timestamp", "docker_swarmkit_v1.Timestamp", 1) + `,`,
  1597. `}`,
  1598. }, "")
  1599. return s
  1600. }
  1601. func (this *Node) String() string {
  1602. if this == nil {
  1603. return "nil"
  1604. }
  1605. s := strings.Join([]string{`&Node{`,
  1606. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  1607. `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
  1608. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NodeSpec", "NodeSpec", 1), `&`, ``, 1) + `,`,
  1609. `Description:` + strings.Replace(fmt.Sprintf("%v", this.Description), "NodeDescription", "NodeDescription", 1) + `,`,
  1610. `Status:` + strings.Replace(strings.Replace(this.Status.String(), "NodeStatus", "NodeStatus", 1), `&`, ``, 1) + `,`,
  1611. `ManagerStatus:` + strings.Replace(fmt.Sprintf("%v", this.ManagerStatus), "ManagerStatus", "ManagerStatus", 1) + `,`,
  1612. `Attachment:` + strings.Replace(fmt.Sprintf("%v", this.Attachment), "NetworkAttachment", "NetworkAttachment", 1) + `,`,
  1613. `Certificate:` + strings.Replace(strings.Replace(this.Certificate.String(), "Certificate", "Certificate", 1), `&`, ``, 1) + `,`,
  1614. `}`,
  1615. }, "")
  1616. return s
  1617. }
  1618. func (this *Service) String() string {
  1619. if this == nil {
  1620. return "nil"
  1621. }
  1622. s := strings.Join([]string{`&Service{`,
  1623. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  1624. `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
  1625. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "ServiceSpec", 1), `&`, ``, 1) + `,`,
  1626. `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "Endpoint", "Endpoint", 1) + `,`,
  1627. `UpdateStatus:` + strings.Replace(fmt.Sprintf("%v", this.UpdateStatus), "UpdateStatus", "UpdateStatus", 1) + `,`,
  1628. `PreviousSpec:` + strings.Replace(fmt.Sprintf("%v", this.PreviousSpec), "ServiceSpec", "ServiceSpec", 1) + `,`,
  1629. `}`,
  1630. }, "")
  1631. return s
  1632. }
  1633. func (this *Endpoint) String() string {
  1634. if this == nil {
  1635. return "nil"
  1636. }
  1637. s := strings.Join([]string{`&Endpoint{`,
  1638. `Spec:` + strings.Replace(fmt.Sprintf("%v", this.Spec), "EndpointSpec", "EndpointSpec", 1) + `,`,
  1639. `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "PortConfig", "PortConfig", 1) + `,`,
  1640. `VirtualIPs:` + strings.Replace(fmt.Sprintf("%v", this.VirtualIPs), "Endpoint_VirtualIP", "Endpoint_VirtualIP", 1) + `,`,
  1641. `}`,
  1642. }, "")
  1643. return s
  1644. }
  1645. func (this *Endpoint_VirtualIP) String() string {
  1646. if this == nil {
  1647. return "nil"
  1648. }
  1649. s := strings.Join([]string{`&Endpoint_VirtualIP{`,
  1650. `NetworkID:` + fmt.Sprintf("%v", this.NetworkID) + `,`,
  1651. `Addr:` + fmt.Sprintf("%v", this.Addr) + `,`,
  1652. `}`,
  1653. }, "")
  1654. return s
  1655. }
  1656. func (this *Task) String() string {
  1657. if this == nil {
  1658. return "nil"
  1659. }
  1660. s := strings.Join([]string{`&Task{`,
  1661. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  1662. `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
  1663. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TaskSpec", "TaskSpec", 1), `&`, ``, 1) + `,`,
  1664. `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`,
  1665. `Slot:` + fmt.Sprintf("%v", this.Slot) + `,`,
  1666. `NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`,
  1667. `Annotations:` + strings.Replace(strings.Replace(this.Annotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  1668. `ServiceAnnotations:` + strings.Replace(strings.Replace(this.ServiceAnnotations.String(), "Annotations", "Annotations", 1), `&`, ``, 1) + `,`,
  1669. `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TaskStatus", "TaskStatus", 1), `&`, ``, 1) + `,`,
  1670. `DesiredState:` + fmt.Sprintf("%v", this.DesiredState) + `,`,
  1671. `Networks:` + strings.Replace(fmt.Sprintf("%v", this.Networks), "NetworkAttachment", "NetworkAttachment", 1) + `,`,
  1672. `Endpoint:` + strings.Replace(fmt.Sprintf("%v", this.Endpoint), "Endpoint", "Endpoint", 1) + `,`,
  1673. `LogDriver:` + strings.Replace(fmt.Sprintf("%v", this.LogDriver), "Driver", "Driver", 1) + `,`,
  1674. `}`,
  1675. }, "")
  1676. return s
  1677. }
  1678. func (this *NetworkAttachment) String() string {
  1679. if this == nil {
  1680. return "nil"
  1681. }
  1682. s := strings.Join([]string{`&NetworkAttachment{`,
  1683. `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "Network", "Network", 1) + `,`,
  1684. `Addresses:` + fmt.Sprintf("%v", this.Addresses) + `,`,
  1685. `Aliases:` + fmt.Sprintf("%v", this.Aliases) + `,`,
  1686. `}`,
  1687. }, "")
  1688. return s
  1689. }
  1690. func (this *Network) String() string {
  1691. if this == nil {
  1692. return "nil"
  1693. }
  1694. s := strings.Join([]string{`&Network{`,
  1695. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  1696. `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
  1697. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "NetworkSpec", "NetworkSpec", 1), `&`, ``, 1) + `,`,
  1698. `DriverState:` + strings.Replace(fmt.Sprintf("%v", this.DriverState), "Driver", "Driver", 1) + `,`,
  1699. `IPAM:` + strings.Replace(fmt.Sprintf("%v", this.IPAM), "IPAMOptions", "IPAMOptions", 1) + `,`,
  1700. `}`,
  1701. }, "")
  1702. return s
  1703. }
  1704. func (this *Cluster) String() string {
  1705. if this == nil {
  1706. return "nil"
  1707. }
  1708. keysForBlacklistedCertificates := make([]string, 0, len(this.BlacklistedCertificates))
  1709. for k, _ := range this.BlacklistedCertificates {
  1710. keysForBlacklistedCertificates = append(keysForBlacklistedCertificates, k)
  1711. }
  1712. github_com_gogo_protobuf_sortkeys.Strings(keysForBlacklistedCertificates)
  1713. mapStringForBlacklistedCertificates := "map[string]*BlacklistedCertificate{"
  1714. for _, k := range keysForBlacklistedCertificates {
  1715. mapStringForBlacklistedCertificates += fmt.Sprintf("%v: %v,", k, this.BlacklistedCertificates[k])
  1716. }
  1717. mapStringForBlacklistedCertificates += "}"
  1718. s := strings.Join([]string{`&Cluster{`,
  1719. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  1720. `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
  1721. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterSpec", "ClusterSpec", 1), `&`, ``, 1) + `,`,
  1722. `RootCA:` + strings.Replace(strings.Replace(this.RootCA.String(), "RootCA", "RootCA", 1), `&`, ``, 1) + `,`,
  1723. `NetworkBootstrapKeys:` + strings.Replace(fmt.Sprintf("%v", this.NetworkBootstrapKeys), "EncryptionKey", "EncryptionKey", 1) + `,`,
  1724. `EncryptionKeyLamportClock:` + fmt.Sprintf("%v", this.EncryptionKeyLamportClock) + `,`,
  1725. `BlacklistedCertificates:` + mapStringForBlacklistedCertificates + `,`,
  1726. `UnlockKeys:` + strings.Replace(fmt.Sprintf("%v", this.UnlockKeys), "EncryptionKey", "EncryptionKey", 1) + `,`,
  1727. `}`,
  1728. }, "")
  1729. return s
  1730. }
  1731. func (this *Secret) String() string {
  1732. if this == nil {
  1733. return "nil"
  1734. }
  1735. s := strings.Join([]string{`&Secret{`,
  1736. `ID:` + fmt.Sprintf("%v", this.ID) + `,`,
  1737. `Meta:` + strings.Replace(strings.Replace(this.Meta.String(), "Meta", "Meta", 1), `&`, ``, 1) + `,`,
  1738. `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SecretSpec", "SecretSpec", 1), `&`, ``, 1) + `,`,
  1739. `Internal:` + fmt.Sprintf("%v", this.Internal) + `,`,
  1740. `}`,
  1741. }, "")
  1742. return s
  1743. }
  1744. func valueToStringObjects(v interface{}) string {
  1745. rv := reflect.ValueOf(v)
  1746. if rv.IsNil() {
  1747. return "nil"
  1748. }
  1749. pv := reflect.Indirect(rv).Interface()
  1750. return fmt.Sprintf("*%v", pv)
  1751. }
  1752. func (m *Meta) Unmarshal(data []byte) error {
  1753. l := len(data)
  1754. iNdEx := 0
  1755. for iNdEx < l {
  1756. preIndex := iNdEx
  1757. var wire uint64
  1758. for shift := uint(0); ; shift += 7 {
  1759. if shift >= 64 {
  1760. return ErrIntOverflowObjects
  1761. }
  1762. if iNdEx >= l {
  1763. return io.ErrUnexpectedEOF
  1764. }
  1765. b := data[iNdEx]
  1766. iNdEx++
  1767. wire |= (uint64(b) & 0x7F) << shift
  1768. if b < 0x80 {
  1769. break
  1770. }
  1771. }
  1772. fieldNum := int32(wire >> 3)
  1773. wireType := int(wire & 0x7)
  1774. if wireType == 4 {
  1775. return fmt.Errorf("proto: Meta: wiretype end group for non-group")
  1776. }
  1777. if fieldNum <= 0 {
  1778. return fmt.Errorf("proto: Meta: illegal tag %d (wire type %d)", fieldNum, wire)
  1779. }
  1780. switch fieldNum {
  1781. case 1:
  1782. if wireType != 2 {
  1783. return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
  1784. }
  1785. var msglen int
  1786. for shift := uint(0); ; shift += 7 {
  1787. if shift >= 64 {
  1788. return ErrIntOverflowObjects
  1789. }
  1790. if iNdEx >= l {
  1791. return io.ErrUnexpectedEOF
  1792. }
  1793. b := data[iNdEx]
  1794. iNdEx++
  1795. msglen |= (int(b) & 0x7F) << shift
  1796. if b < 0x80 {
  1797. break
  1798. }
  1799. }
  1800. if msglen < 0 {
  1801. return ErrInvalidLengthObjects
  1802. }
  1803. postIndex := iNdEx + msglen
  1804. if postIndex > l {
  1805. return io.ErrUnexpectedEOF
  1806. }
  1807. if err := m.Version.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1808. return err
  1809. }
  1810. iNdEx = postIndex
  1811. case 2:
  1812. if wireType != 2 {
  1813. return fmt.Errorf("proto: wrong wireType = %d for field CreatedAt", wireType)
  1814. }
  1815. var msglen int
  1816. for shift := uint(0); ; shift += 7 {
  1817. if shift >= 64 {
  1818. return ErrIntOverflowObjects
  1819. }
  1820. if iNdEx >= l {
  1821. return io.ErrUnexpectedEOF
  1822. }
  1823. b := data[iNdEx]
  1824. iNdEx++
  1825. msglen |= (int(b) & 0x7F) << shift
  1826. if b < 0x80 {
  1827. break
  1828. }
  1829. }
  1830. if msglen < 0 {
  1831. return ErrInvalidLengthObjects
  1832. }
  1833. postIndex := iNdEx + msglen
  1834. if postIndex > l {
  1835. return io.ErrUnexpectedEOF
  1836. }
  1837. if m.CreatedAt == nil {
  1838. m.CreatedAt = &docker_swarmkit_v1.Timestamp{}
  1839. }
  1840. if err := m.CreatedAt.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1841. return err
  1842. }
  1843. iNdEx = postIndex
  1844. case 3:
  1845. if wireType != 2 {
  1846. return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAt", wireType)
  1847. }
  1848. var msglen int
  1849. for shift := uint(0); ; shift += 7 {
  1850. if shift >= 64 {
  1851. return ErrIntOverflowObjects
  1852. }
  1853. if iNdEx >= l {
  1854. return io.ErrUnexpectedEOF
  1855. }
  1856. b := data[iNdEx]
  1857. iNdEx++
  1858. msglen |= (int(b) & 0x7F) << shift
  1859. if b < 0x80 {
  1860. break
  1861. }
  1862. }
  1863. if msglen < 0 {
  1864. return ErrInvalidLengthObjects
  1865. }
  1866. postIndex := iNdEx + msglen
  1867. if postIndex > l {
  1868. return io.ErrUnexpectedEOF
  1869. }
  1870. if m.UpdatedAt == nil {
  1871. m.UpdatedAt = &docker_swarmkit_v1.Timestamp{}
  1872. }
  1873. if err := m.UpdatedAt.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1874. return err
  1875. }
  1876. iNdEx = postIndex
  1877. default:
  1878. iNdEx = preIndex
  1879. skippy, err := skipObjects(data[iNdEx:])
  1880. if err != nil {
  1881. return err
  1882. }
  1883. if skippy < 0 {
  1884. return ErrInvalidLengthObjects
  1885. }
  1886. if (iNdEx + skippy) > l {
  1887. return io.ErrUnexpectedEOF
  1888. }
  1889. iNdEx += skippy
  1890. }
  1891. }
  1892. if iNdEx > l {
  1893. return io.ErrUnexpectedEOF
  1894. }
  1895. return nil
  1896. }
  1897. func (m *Node) Unmarshal(data []byte) error {
  1898. l := len(data)
  1899. iNdEx := 0
  1900. for iNdEx < l {
  1901. preIndex := iNdEx
  1902. var wire uint64
  1903. for shift := uint(0); ; shift += 7 {
  1904. if shift >= 64 {
  1905. return ErrIntOverflowObjects
  1906. }
  1907. if iNdEx >= l {
  1908. return io.ErrUnexpectedEOF
  1909. }
  1910. b := data[iNdEx]
  1911. iNdEx++
  1912. wire |= (uint64(b) & 0x7F) << shift
  1913. if b < 0x80 {
  1914. break
  1915. }
  1916. }
  1917. fieldNum := int32(wire >> 3)
  1918. wireType := int(wire & 0x7)
  1919. if wireType == 4 {
  1920. return fmt.Errorf("proto: Node: wiretype end group for non-group")
  1921. }
  1922. if fieldNum <= 0 {
  1923. return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire)
  1924. }
  1925. switch fieldNum {
  1926. case 1:
  1927. if wireType != 2 {
  1928. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1929. }
  1930. var stringLen uint64
  1931. for shift := uint(0); ; shift += 7 {
  1932. if shift >= 64 {
  1933. return ErrIntOverflowObjects
  1934. }
  1935. if iNdEx >= l {
  1936. return io.ErrUnexpectedEOF
  1937. }
  1938. b := data[iNdEx]
  1939. iNdEx++
  1940. stringLen |= (uint64(b) & 0x7F) << shift
  1941. if b < 0x80 {
  1942. break
  1943. }
  1944. }
  1945. intStringLen := int(stringLen)
  1946. if intStringLen < 0 {
  1947. return ErrInvalidLengthObjects
  1948. }
  1949. postIndex := iNdEx + intStringLen
  1950. if postIndex > l {
  1951. return io.ErrUnexpectedEOF
  1952. }
  1953. m.ID = string(data[iNdEx:postIndex])
  1954. iNdEx = postIndex
  1955. case 2:
  1956. if wireType != 2 {
  1957. return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
  1958. }
  1959. var msglen int
  1960. for shift := uint(0); ; shift += 7 {
  1961. if shift >= 64 {
  1962. return ErrIntOverflowObjects
  1963. }
  1964. if iNdEx >= l {
  1965. return io.ErrUnexpectedEOF
  1966. }
  1967. b := data[iNdEx]
  1968. iNdEx++
  1969. msglen |= (int(b) & 0x7F) << shift
  1970. if b < 0x80 {
  1971. break
  1972. }
  1973. }
  1974. if msglen < 0 {
  1975. return ErrInvalidLengthObjects
  1976. }
  1977. postIndex := iNdEx + msglen
  1978. if postIndex > l {
  1979. return io.ErrUnexpectedEOF
  1980. }
  1981. if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
  1982. return err
  1983. }
  1984. iNdEx = postIndex
  1985. case 3:
  1986. if wireType != 2 {
  1987. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  1988. }
  1989. var msglen int
  1990. for shift := uint(0); ; shift += 7 {
  1991. if shift >= 64 {
  1992. return ErrIntOverflowObjects
  1993. }
  1994. if iNdEx >= l {
  1995. return io.ErrUnexpectedEOF
  1996. }
  1997. b := data[iNdEx]
  1998. iNdEx++
  1999. msglen |= (int(b) & 0x7F) << shift
  2000. if b < 0x80 {
  2001. break
  2002. }
  2003. }
  2004. if msglen < 0 {
  2005. return ErrInvalidLengthObjects
  2006. }
  2007. postIndex := iNdEx + msglen
  2008. if postIndex > l {
  2009. return io.ErrUnexpectedEOF
  2010. }
  2011. if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2012. return err
  2013. }
  2014. iNdEx = postIndex
  2015. case 4:
  2016. if wireType != 2 {
  2017. return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType)
  2018. }
  2019. var msglen int
  2020. for shift := uint(0); ; shift += 7 {
  2021. if shift >= 64 {
  2022. return ErrIntOverflowObjects
  2023. }
  2024. if iNdEx >= l {
  2025. return io.ErrUnexpectedEOF
  2026. }
  2027. b := data[iNdEx]
  2028. iNdEx++
  2029. msglen |= (int(b) & 0x7F) << shift
  2030. if b < 0x80 {
  2031. break
  2032. }
  2033. }
  2034. if msglen < 0 {
  2035. return ErrInvalidLengthObjects
  2036. }
  2037. postIndex := iNdEx + msglen
  2038. if postIndex > l {
  2039. return io.ErrUnexpectedEOF
  2040. }
  2041. if m.Description == nil {
  2042. m.Description = &NodeDescription{}
  2043. }
  2044. if err := m.Description.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2045. return err
  2046. }
  2047. iNdEx = postIndex
  2048. case 5:
  2049. if wireType != 2 {
  2050. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  2051. }
  2052. var msglen int
  2053. for shift := uint(0); ; shift += 7 {
  2054. if shift >= 64 {
  2055. return ErrIntOverflowObjects
  2056. }
  2057. if iNdEx >= l {
  2058. return io.ErrUnexpectedEOF
  2059. }
  2060. b := data[iNdEx]
  2061. iNdEx++
  2062. msglen |= (int(b) & 0x7F) << shift
  2063. if b < 0x80 {
  2064. break
  2065. }
  2066. }
  2067. if msglen < 0 {
  2068. return ErrInvalidLengthObjects
  2069. }
  2070. postIndex := iNdEx + msglen
  2071. if postIndex > l {
  2072. return io.ErrUnexpectedEOF
  2073. }
  2074. if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2075. return err
  2076. }
  2077. iNdEx = postIndex
  2078. case 6:
  2079. if wireType != 2 {
  2080. return fmt.Errorf("proto: wrong wireType = %d for field ManagerStatus", wireType)
  2081. }
  2082. var msglen int
  2083. for shift := uint(0); ; shift += 7 {
  2084. if shift >= 64 {
  2085. return ErrIntOverflowObjects
  2086. }
  2087. if iNdEx >= l {
  2088. return io.ErrUnexpectedEOF
  2089. }
  2090. b := data[iNdEx]
  2091. iNdEx++
  2092. msglen |= (int(b) & 0x7F) << shift
  2093. if b < 0x80 {
  2094. break
  2095. }
  2096. }
  2097. if msglen < 0 {
  2098. return ErrInvalidLengthObjects
  2099. }
  2100. postIndex := iNdEx + msglen
  2101. if postIndex > l {
  2102. return io.ErrUnexpectedEOF
  2103. }
  2104. if m.ManagerStatus == nil {
  2105. m.ManagerStatus = &ManagerStatus{}
  2106. }
  2107. if err := m.ManagerStatus.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2108. return err
  2109. }
  2110. iNdEx = postIndex
  2111. case 7:
  2112. if wireType != 2 {
  2113. return fmt.Errorf("proto: wrong wireType = %d for field Attachment", wireType)
  2114. }
  2115. var msglen int
  2116. for shift := uint(0); ; shift += 7 {
  2117. if shift >= 64 {
  2118. return ErrIntOverflowObjects
  2119. }
  2120. if iNdEx >= l {
  2121. return io.ErrUnexpectedEOF
  2122. }
  2123. b := data[iNdEx]
  2124. iNdEx++
  2125. msglen |= (int(b) & 0x7F) << shift
  2126. if b < 0x80 {
  2127. break
  2128. }
  2129. }
  2130. if msglen < 0 {
  2131. return ErrInvalidLengthObjects
  2132. }
  2133. postIndex := iNdEx + msglen
  2134. if postIndex > l {
  2135. return io.ErrUnexpectedEOF
  2136. }
  2137. if m.Attachment == nil {
  2138. m.Attachment = &NetworkAttachment{}
  2139. }
  2140. if err := m.Attachment.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2141. return err
  2142. }
  2143. iNdEx = postIndex
  2144. case 8:
  2145. if wireType != 2 {
  2146. return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType)
  2147. }
  2148. var msglen int
  2149. for shift := uint(0); ; shift += 7 {
  2150. if shift >= 64 {
  2151. return ErrIntOverflowObjects
  2152. }
  2153. if iNdEx >= l {
  2154. return io.ErrUnexpectedEOF
  2155. }
  2156. b := data[iNdEx]
  2157. iNdEx++
  2158. msglen |= (int(b) & 0x7F) << shift
  2159. if b < 0x80 {
  2160. break
  2161. }
  2162. }
  2163. if msglen < 0 {
  2164. return ErrInvalidLengthObjects
  2165. }
  2166. postIndex := iNdEx + msglen
  2167. if postIndex > l {
  2168. return io.ErrUnexpectedEOF
  2169. }
  2170. if err := m.Certificate.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2171. return err
  2172. }
  2173. iNdEx = postIndex
  2174. default:
  2175. iNdEx = preIndex
  2176. skippy, err := skipObjects(data[iNdEx:])
  2177. if err != nil {
  2178. return err
  2179. }
  2180. if skippy < 0 {
  2181. return ErrInvalidLengthObjects
  2182. }
  2183. if (iNdEx + skippy) > l {
  2184. return io.ErrUnexpectedEOF
  2185. }
  2186. iNdEx += skippy
  2187. }
  2188. }
  2189. if iNdEx > l {
  2190. return io.ErrUnexpectedEOF
  2191. }
  2192. return nil
  2193. }
  2194. func (m *Service) Unmarshal(data []byte) error {
  2195. l := len(data)
  2196. iNdEx := 0
  2197. for iNdEx < l {
  2198. preIndex := iNdEx
  2199. var wire uint64
  2200. for shift := uint(0); ; shift += 7 {
  2201. if shift >= 64 {
  2202. return ErrIntOverflowObjects
  2203. }
  2204. if iNdEx >= l {
  2205. return io.ErrUnexpectedEOF
  2206. }
  2207. b := data[iNdEx]
  2208. iNdEx++
  2209. wire |= (uint64(b) & 0x7F) << shift
  2210. if b < 0x80 {
  2211. break
  2212. }
  2213. }
  2214. fieldNum := int32(wire >> 3)
  2215. wireType := int(wire & 0x7)
  2216. if wireType == 4 {
  2217. return fmt.Errorf("proto: Service: wiretype end group for non-group")
  2218. }
  2219. if fieldNum <= 0 {
  2220. return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire)
  2221. }
  2222. switch fieldNum {
  2223. case 1:
  2224. if wireType != 2 {
  2225. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2226. }
  2227. var stringLen uint64
  2228. for shift := uint(0); ; shift += 7 {
  2229. if shift >= 64 {
  2230. return ErrIntOverflowObjects
  2231. }
  2232. if iNdEx >= l {
  2233. return io.ErrUnexpectedEOF
  2234. }
  2235. b := data[iNdEx]
  2236. iNdEx++
  2237. stringLen |= (uint64(b) & 0x7F) << shift
  2238. if b < 0x80 {
  2239. break
  2240. }
  2241. }
  2242. intStringLen := int(stringLen)
  2243. if intStringLen < 0 {
  2244. return ErrInvalidLengthObjects
  2245. }
  2246. postIndex := iNdEx + intStringLen
  2247. if postIndex > l {
  2248. return io.ErrUnexpectedEOF
  2249. }
  2250. m.ID = string(data[iNdEx:postIndex])
  2251. iNdEx = postIndex
  2252. case 2:
  2253. if wireType != 2 {
  2254. return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
  2255. }
  2256. var msglen int
  2257. for shift := uint(0); ; shift += 7 {
  2258. if shift >= 64 {
  2259. return ErrIntOverflowObjects
  2260. }
  2261. if iNdEx >= l {
  2262. return io.ErrUnexpectedEOF
  2263. }
  2264. b := data[iNdEx]
  2265. iNdEx++
  2266. msglen |= (int(b) & 0x7F) << shift
  2267. if b < 0x80 {
  2268. break
  2269. }
  2270. }
  2271. if msglen < 0 {
  2272. return ErrInvalidLengthObjects
  2273. }
  2274. postIndex := iNdEx + msglen
  2275. if postIndex > l {
  2276. return io.ErrUnexpectedEOF
  2277. }
  2278. if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2279. return err
  2280. }
  2281. iNdEx = postIndex
  2282. case 3:
  2283. if wireType != 2 {
  2284. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  2285. }
  2286. var msglen int
  2287. for shift := uint(0); ; shift += 7 {
  2288. if shift >= 64 {
  2289. return ErrIntOverflowObjects
  2290. }
  2291. if iNdEx >= l {
  2292. return io.ErrUnexpectedEOF
  2293. }
  2294. b := data[iNdEx]
  2295. iNdEx++
  2296. msglen |= (int(b) & 0x7F) << shift
  2297. if b < 0x80 {
  2298. break
  2299. }
  2300. }
  2301. if msglen < 0 {
  2302. return ErrInvalidLengthObjects
  2303. }
  2304. postIndex := iNdEx + msglen
  2305. if postIndex > l {
  2306. return io.ErrUnexpectedEOF
  2307. }
  2308. if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2309. return err
  2310. }
  2311. iNdEx = postIndex
  2312. case 4:
  2313. if wireType != 2 {
  2314. return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
  2315. }
  2316. var msglen int
  2317. for shift := uint(0); ; shift += 7 {
  2318. if shift >= 64 {
  2319. return ErrIntOverflowObjects
  2320. }
  2321. if iNdEx >= l {
  2322. return io.ErrUnexpectedEOF
  2323. }
  2324. b := data[iNdEx]
  2325. iNdEx++
  2326. msglen |= (int(b) & 0x7F) << shift
  2327. if b < 0x80 {
  2328. break
  2329. }
  2330. }
  2331. if msglen < 0 {
  2332. return ErrInvalidLengthObjects
  2333. }
  2334. postIndex := iNdEx + msglen
  2335. if postIndex > l {
  2336. return io.ErrUnexpectedEOF
  2337. }
  2338. if m.Endpoint == nil {
  2339. m.Endpoint = &Endpoint{}
  2340. }
  2341. if err := m.Endpoint.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2342. return err
  2343. }
  2344. iNdEx = postIndex
  2345. case 5:
  2346. if wireType != 2 {
  2347. return fmt.Errorf("proto: wrong wireType = %d for field UpdateStatus", wireType)
  2348. }
  2349. var msglen int
  2350. for shift := uint(0); ; shift += 7 {
  2351. if shift >= 64 {
  2352. return ErrIntOverflowObjects
  2353. }
  2354. if iNdEx >= l {
  2355. return io.ErrUnexpectedEOF
  2356. }
  2357. b := data[iNdEx]
  2358. iNdEx++
  2359. msglen |= (int(b) & 0x7F) << shift
  2360. if b < 0x80 {
  2361. break
  2362. }
  2363. }
  2364. if msglen < 0 {
  2365. return ErrInvalidLengthObjects
  2366. }
  2367. postIndex := iNdEx + msglen
  2368. if postIndex > l {
  2369. return io.ErrUnexpectedEOF
  2370. }
  2371. if m.UpdateStatus == nil {
  2372. m.UpdateStatus = &UpdateStatus{}
  2373. }
  2374. if err := m.UpdateStatus.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2375. return err
  2376. }
  2377. iNdEx = postIndex
  2378. case 6:
  2379. if wireType != 2 {
  2380. return fmt.Errorf("proto: wrong wireType = %d for field PreviousSpec", wireType)
  2381. }
  2382. var msglen int
  2383. for shift := uint(0); ; shift += 7 {
  2384. if shift >= 64 {
  2385. return ErrIntOverflowObjects
  2386. }
  2387. if iNdEx >= l {
  2388. return io.ErrUnexpectedEOF
  2389. }
  2390. b := data[iNdEx]
  2391. iNdEx++
  2392. msglen |= (int(b) & 0x7F) << shift
  2393. if b < 0x80 {
  2394. break
  2395. }
  2396. }
  2397. if msglen < 0 {
  2398. return ErrInvalidLengthObjects
  2399. }
  2400. postIndex := iNdEx + msglen
  2401. if postIndex > l {
  2402. return io.ErrUnexpectedEOF
  2403. }
  2404. if m.PreviousSpec == nil {
  2405. m.PreviousSpec = &ServiceSpec{}
  2406. }
  2407. if err := m.PreviousSpec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2408. return err
  2409. }
  2410. iNdEx = postIndex
  2411. default:
  2412. iNdEx = preIndex
  2413. skippy, err := skipObjects(data[iNdEx:])
  2414. if err != nil {
  2415. return err
  2416. }
  2417. if skippy < 0 {
  2418. return ErrInvalidLengthObjects
  2419. }
  2420. if (iNdEx + skippy) > l {
  2421. return io.ErrUnexpectedEOF
  2422. }
  2423. iNdEx += skippy
  2424. }
  2425. }
  2426. if iNdEx > l {
  2427. return io.ErrUnexpectedEOF
  2428. }
  2429. return nil
  2430. }
  2431. func (m *Endpoint) Unmarshal(data []byte) error {
  2432. l := len(data)
  2433. iNdEx := 0
  2434. for iNdEx < l {
  2435. preIndex := iNdEx
  2436. var wire uint64
  2437. for shift := uint(0); ; shift += 7 {
  2438. if shift >= 64 {
  2439. return ErrIntOverflowObjects
  2440. }
  2441. if iNdEx >= l {
  2442. return io.ErrUnexpectedEOF
  2443. }
  2444. b := data[iNdEx]
  2445. iNdEx++
  2446. wire |= (uint64(b) & 0x7F) << shift
  2447. if b < 0x80 {
  2448. break
  2449. }
  2450. }
  2451. fieldNum := int32(wire >> 3)
  2452. wireType := int(wire & 0x7)
  2453. if wireType == 4 {
  2454. return fmt.Errorf("proto: Endpoint: wiretype end group for non-group")
  2455. }
  2456. if fieldNum <= 0 {
  2457. return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire)
  2458. }
  2459. switch fieldNum {
  2460. case 1:
  2461. if wireType != 2 {
  2462. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  2463. }
  2464. var msglen int
  2465. for shift := uint(0); ; shift += 7 {
  2466. if shift >= 64 {
  2467. return ErrIntOverflowObjects
  2468. }
  2469. if iNdEx >= l {
  2470. return io.ErrUnexpectedEOF
  2471. }
  2472. b := data[iNdEx]
  2473. iNdEx++
  2474. msglen |= (int(b) & 0x7F) << shift
  2475. if b < 0x80 {
  2476. break
  2477. }
  2478. }
  2479. if msglen < 0 {
  2480. return ErrInvalidLengthObjects
  2481. }
  2482. postIndex := iNdEx + msglen
  2483. if postIndex > l {
  2484. return io.ErrUnexpectedEOF
  2485. }
  2486. if m.Spec == nil {
  2487. m.Spec = &EndpointSpec{}
  2488. }
  2489. if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2490. return err
  2491. }
  2492. iNdEx = postIndex
  2493. case 2:
  2494. if wireType != 2 {
  2495. return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType)
  2496. }
  2497. var msglen int
  2498. for shift := uint(0); ; shift += 7 {
  2499. if shift >= 64 {
  2500. return ErrIntOverflowObjects
  2501. }
  2502. if iNdEx >= l {
  2503. return io.ErrUnexpectedEOF
  2504. }
  2505. b := data[iNdEx]
  2506. iNdEx++
  2507. msglen |= (int(b) & 0x7F) << shift
  2508. if b < 0x80 {
  2509. break
  2510. }
  2511. }
  2512. if msglen < 0 {
  2513. return ErrInvalidLengthObjects
  2514. }
  2515. postIndex := iNdEx + msglen
  2516. if postIndex > l {
  2517. return io.ErrUnexpectedEOF
  2518. }
  2519. m.Ports = append(m.Ports, &PortConfig{})
  2520. if err := m.Ports[len(m.Ports)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2521. return err
  2522. }
  2523. iNdEx = postIndex
  2524. case 3:
  2525. if wireType != 2 {
  2526. return fmt.Errorf("proto: wrong wireType = %d for field VirtualIPs", wireType)
  2527. }
  2528. var msglen int
  2529. for shift := uint(0); ; shift += 7 {
  2530. if shift >= 64 {
  2531. return ErrIntOverflowObjects
  2532. }
  2533. if iNdEx >= l {
  2534. return io.ErrUnexpectedEOF
  2535. }
  2536. b := data[iNdEx]
  2537. iNdEx++
  2538. msglen |= (int(b) & 0x7F) << shift
  2539. if b < 0x80 {
  2540. break
  2541. }
  2542. }
  2543. if msglen < 0 {
  2544. return ErrInvalidLengthObjects
  2545. }
  2546. postIndex := iNdEx + msglen
  2547. if postIndex > l {
  2548. return io.ErrUnexpectedEOF
  2549. }
  2550. m.VirtualIPs = append(m.VirtualIPs, &Endpoint_VirtualIP{})
  2551. if err := m.VirtualIPs[len(m.VirtualIPs)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  2552. return err
  2553. }
  2554. iNdEx = postIndex
  2555. default:
  2556. iNdEx = preIndex
  2557. skippy, err := skipObjects(data[iNdEx:])
  2558. if err != nil {
  2559. return err
  2560. }
  2561. if skippy < 0 {
  2562. return ErrInvalidLengthObjects
  2563. }
  2564. if (iNdEx + skippy) > l {
  2565. return io.ErrUnexpectedEOF
  2566. }
  2567. iNdEx += skippy
  2568. }
  2569. }
  2570. if iNdEx > l {
  2571. return io.ErrUnexpectedEOF
  2572. }
  2573. return nil
  2574. }
  2575. func (m *Endpoint_VirtualIP) Unmarshal(data []byte) error {
  2576. l := len(data)
  2577. iNdEx := 0
  2578. for iNdEx < l {
  2579. preIndex := iNdEx
  2580. var wire uint64
  2581. for shift := uint(0); ; shift += 7 {
  2582. if shift >= 64 {
  2583. return ErrIntOverflowObjects
  2584. }
  2585. if iNdEx >= l {
  2586. return io.ErrUnexpectedEOF
  2587. }
  2588. b := data[iNdEx]
  2589. iNdEx++
  2590. wire |= (uint64(b) & 0x7F) << shift
  2591. if b < 0x80 {
  2592. break
  2593. }
  2594. }
  2595. fieldNum := int32(wire >> 3)
  2596. wireType := int(wire & 0x7)
  2597. if wireType == 4 {
  2598. return fmt.Errorf("proto: VirtualIP: wiretype end group for non-group")
  2599. }
  2600. if fieldNum <= 0 {
  2601. return fmt.Errorf("proto: VirtualIP: illegal tag %d (wire type %d)", fieldNum, wire)
  2602. }
  2603. switch fieldNum {
  2604. case 1:
  2605. if wireType != 2 {
  2606. return fmt.Errorf("proto: wrong wireType = %d for field NetworkID", wireType)
  2607. }
  2608. var stringLen uint64
  2609. for shift := uint(0); ; shift += 7 {
  2610. if shift >= 64 {
  2611. return ErrIntOverflowObjects
  2612. }
  2613. if iNdEx >= l {
  2614. return io.ErrUnexpectedEOF
  2615. }
  2616. b := data[iNdEx]
  2617. iNdEx++
  2618. stringLen |= (uint64(b) & 0x7F) << shift
  2619. if b < 0x80 {
  2620. break
  2621. }
  2622. }
  2623. intStringLen := int(stringLen)
  2624. if intStringLen < 0 {
  2625. return ErrInvalidLengthObjects
  2626. }
  2627. postIndex := iNdEx + intStringLen
  2628. if postIndex > l {
  2629. return io.ErrUnexpectedEOF
  2630. }
  2631. m.NetworkID = string(data[iNdEx:postIndex])
  2632. iNdEx = postIndex
  2633. case 2:
  2634. if wireType != 2 {
  2635. return fmt.Errorf("proto: wrong wireType = %d for field Addr", wireType)
  2636. }
  2637. var stringLen uint64
  2638. for shift := uint(0); ; shift += 7 {
  2639. if shift >= 64 {
  2640. return ErrIntOverflowObjects
  2641. }
  2642. if iNdEx >= l {
  2643. return io.ErrUnexpectedEOF
  2644. }
  2645. b := data[iNdEx]
  2646. iNdEx++
  2647. stringLen |= (uint64(b) & 0x7F) << shift
  2648. if b < 0x80 {
  2649. break
  2650. }
  2651. }
  2652. intStringLen := int(stringLen)
  2653. if intStringLen < 0 {
  2654. return ErrInvalidLengthObjects
  2655. }
  2656. postIndex := iNdEx + intStringLen
  2657. if postIndex > l {
  2658. return io.ErrUnexpectedEOF
  2659. }
  2660. m.Addr = string(data[iNdEx:postIndex])
  2661. iNdEx = postIndex
  2662. default:
  2663. iNdEx = preIndex
  2664. skippy, err := skipObjects(data[iNdEx:])
  2665. if err != nil {
  2666. return err
  2667. }
  2668. if skippy < 0 {
  2669. return ErrInvalidLengthObjects
  2670. }
  2671. if (iNdEx + skippy) > l {
  2672. return io.ErrUnexpectedEOF
  2673. }
  2674. iNdEx += skippy
  2675. }
  2676. }
  2677. if iNdEx > l {
  2678. return io.ErrUnexpectedEOF
  2679. }
  2680. return nil
  2681. }
  2682. func (m *Task) Unmarshal(data []byte) error {
  2683. l := len(data)
  2684. iNdEx := 0
  2685. for iNdEx < l {
  2686. preIndex := iNdEx
  2687. var wire uint64
  2688. for shift := uint(0); ; shift += 7 {
  2689. if shift >= 64 {
  2690. return ErrIntOverflowObjects
  2691. }
  2692. if iNdEx >= l {
  2693. return io.ErrUnexpectedEOF
  2694. }
  2695. b := data[iNdEx]
  2696. iNdEx++
  2697. wire |= (uint64(b) & 0x7F) << shift
  2698. if b < 0x80 {
  2699. break
  2700. }
  2701. }
  2702. fieldNum := int32(wire >> 3)
  2703. wireType := int(wire & 0x7)
  2704. if wireType == 4 {
  2705. return fmt.Errorf("proto: Task: wiretype end group for non-group")
  2706. }
  2707. if fieldNum <= 0 {
  2708. return fmt.Errorf("proto: Task: illegal tag %d (wire type %d)", fieldNum, wire)
  2709. }
  2710. switch fieldNum {
  2711. case 1:
  2712. if wireType != 2 {
  2713. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  2714. }
  2715. var stringLen uint64
  2716. for shift := uint(0); ; shift += 7 {
  2717. if shift >= 64 {
  2718. return ErrIntOverflowObjects
  2719. }
  2720. if iNdEx >= l {
  2721. return io.ErrUnexpectedEOF
  2722. }
  2723. b := data[iNdEx]
  2724. iNdEx++
  2725. stringLen |= (uint64(b) & 0x7F) << shift
  2726. if b < 0x80 {
  2727. break
  2728. }
  2729. }
  2730. intStringLen := int(stringLen)
  2731. if intStringLen < 0 {
  2732. return ErrInvalidLengthObjects
  2733. }
  2734. postIndex := iNdEx + intStringLen
  2735. if postIndex > l {
  2736. return io.ErrUnexpectedEOF
  2737. }
  2738. m.ID = string(data[iNdEx:postIndex])
  2739. iNdEx = postIndex
  2740. case 2:
  2741. if wireType != 2 {
  2742. return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
  2743. }
  2744. var msglen int
  2745. for shift := uint(0); ; shift += 7 {
  2746. if shift >= 64 {
  2747. return ErrIntOverflowObjects
  2748. }
  2749. if iNdEx >= l {
  2750. return io.ErrUnexpectedEOF
  2751. }
  2752. b := data[iNdEx]
  2753. iNdEx++
  2754. msglen |= (int(b) & 0x7F) << shift
  2755. if b < 0x80 {
  2756. break
  2757. }
  2758. }
  2759. if msglen < 0 {
  2760. return ErrInvalidLengthObjects
  2761. }
  2762. postIndex := iNdEx + msglen
  2763. if postIndex > l {
  2764. return io.ErrUnexpectedEOF
  2765. }
  2766. if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2767. return err
  2768. }
  2769. iNdEx = postIndex
  2770. case 3:
  2771. if wireType != 2 {
  2772. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  2773. }
  2774. var msglen int
  2775. for shift := uint(0); ; shift += 7 {
  2776. if shift >= 64 {
  2777. return ErrIntOverflowObjects
  2778. }
  2779. if iNdEx >= l {
  2780. return io.ErrUnexpectedEOF
  2781. }
  2782. b := data[iNdEx]
  2783. iNdEx++
  2784. msglen |= (int(b) & 0x7F) << shift
  2785. if b < 0x80 {
  2786. break
  2787. }
  2788. }
  2789. if msglen < 0 {
  2790. return ErrInvalidLengthObjects
  2791. }
  2792. postIndex := iNdEx + msglen
  2793. if postIndex > l {
  2794. return io.ErrUnexpectedEOF
  2795. }
  2796. if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2797. return err
  2798. }
  2799. iNdEx = postIndex
  2800. case 4:
  2801. if wireType != 2 {
  2802. return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType)
  2803. }
  2804. var stringLen uint64
  2805. for shift := uint(0); ; shift += 7 {
  2806. if shift >= 64 {
  2807. return ErrIntOverflowObjects
  2808. }
  2809. if iNdEx >= l {
  2810. return io.ErrUnexpectedEOF
  2811. }
  2812. b := data[iNdEx]
  2813. iNdEx++
  2814. stringLen |= (uint64(b) & 0x7F) << shift
  2815. if b < 0x80 {
  2816. break
  2817. }
  2818. }
  2819. intStringLen := int(stringLen)
  2820. if intStringLen < 0 {
  2821. return ErrInvalidLengthObjects
  2822. }
  2823. postIndex := iNdEx + intStringLen
  2824. if postIndex > l {
  2825. return io.ErrUnexpectedEOF
  2826. }
  2827. m.ServiceID = string(data[iNdEx:postIndex])
  2828. iNdEx = postIndex
  2829. case 5:
  2830. if wireType != 0 {
  2831. return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType)
  2832. }
  2833. m.Slot = 0
  2834. for shift := uint(0); ; shift += 7 {
  2835. if shift >= 64 {
  2836. return ErrIntOverflowObjects
  2837. }
  2838. if iNdEx >= l {
  2839. return io.ErrUnexpectedEOF
  2840. }
  2841. b := data[iNdEx]
  2842. iNdEx++
  2843. m.Slot |= (uint64(b) & 0x7F) << shift
  2844. if b < 0x80 {
  2845. break
  2846. }
  2847. }
  2848. case 6:
  2849. if wireType != 2 {
  2850. return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType)
  2851. }
  2852. var stringLen uint64
  2853. for shift := uint(0); ; shift += 7 {
  2854. if shift >= 64 {
  2855. return ErrIntOverflowObjects
  2856. }
  2857. if iNdEx >= l {
  2858. return io.ErrUnexpectedEOF
  2859. }
  2860. b := data[iNdEx]
  2861. iNdEx++
  2862. stringLen |= (uint64(b) & 0x7F) << shift
  2863. if b < 0x80 {
  2864. break
  2865. }
  2866. }
  2867. intStringLen := int(stringLen)
  2868. if intStringLen < 0 {
  2869. return ErrInvalidLengthObjects
  2870. }
  2871. postIndex := iNdEx + intStringLen
  2872. if postIndex > l {
  2873. return io.ErrUnexpectedEOF
  2874. }
  2875. m.NodeID = string(data[iNdEx:postIndex])
  2876. iNdEx = postIndex
  2877. case 7:
  2878. if wireType != 2 {
  2879. return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType)
  2880. }
  2881. var msglen int
  2882. for shift := uint(0); ; shift += 7 {
  2883. if shift >= 64 {
  2884. return ErrIntOverflowObjects
  2885. }
  2886. if iNdEx >= l {
  2887. return io.ErrUnexpectedEOF
  2888. }
  2889. b := data[iNdEx]
  2890. iNdEx++
  2891. msglen |= (int(b) & 0x7F) << shift
  2892. if b < 0x80 {
  2893. break
  2894. }
  2895. }
  2896. if msglen < 0 {
  2897. return ErrInvalidLengthObjects
  2898. }
  2899. postIndex := iNdEx + msglen
  2900. if postIndex > l {
  2901. return io.ErrUnexpectedEOF
  2902. }
  2903. if err := m.Annotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2904. return err
  2905. }
  2906. iNdEx = postIndex
  2907. case 8:
  2908. if wireType != 2 {
  2909. return fmt.Errorf("proto: wrong wireType = %d for field ServiceAnnotations", wireType)
  2910. }
  2911. var msglen int
  2912. for shift := uint(0); ; shift += 7 {
  2913. if shift >= 64 {
  2914. return ErrIntOverflowObjects
  2915. }
  2916. if iNdEx >= l {
  2917. return io.ErrUnexpectedEOF
  2918. }
  2919. b := data[iNdEx]
  2920. iNdEx++
  2921. msglen |= (int(b) & 0x7F) << shift
  2922. if b < 0x80 {
  2923. break
  2924. }
  2925. }
  2926. if msglen < 0 {
  2927. return ErrInvalidLengthObjects
  2928. }
  2929. postIndex := iNdEx + msglen
  2930. if postIndex > l {
  2931. return io.ErrUnexpectedEOF
  2932. }
  2933. if err := m.ServiceAnnotations.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2934. return err
  2935. }
  2936. iNdEx = postIndex
  2937. case 9:
  2938. if wireType != 2 {
  2939. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  2940. }
  2941. var msglen int
  2942. for shift := uint(0); ; shift += 7 {
  2943. if shift >= 64 {
  2944. return ErrIntOverflowObjects
  2945. }
  2946. if iNdEx >= l {
  2947. return io.ErrUnexpectedEOF
  2948. }
  2949. b := data[iNdEx]
  2950. iNdEx++
  2951. msglen |= (int(b) & 0x7F) << shift
  2952. if b < 0x80 {
  2953. break
  2954. }
  2955. }
  2956. if msglen < 0 {
  2957. return ErrInvalidLengthObjects
  2958. }
  2959. postIndex := iNdEx + msglen
  2960. if postIndex > l {
  2961. return io.ErrUnexpectedEOF
  2962. }
  2963. if err := m.Status.Unmarshal(data[iNdEx:postIndex]); err != nil {
  2964. return err
  2965. }
  2966. iNdEx = postIndex
  2967. case 10:
  2968. if wireType != 0 {
  2969. return fmt.Errorf("proto: wrong wireType = %d for field DesiredState", wireType)
  2970. }
  2971. m.DesiredState = 0
  2972. for shift := uint(0); ; shift += 7 {
  2973. if shift >= 64 {
  2974. return ErrIntOverflowObjects
  2975. }
  2976. if iNdEx >= l {
  2977. return io.ErrUnexpectedEOF
  2978. }
  2979. b := data[iNdEx]
  2980. iNdEx++
  2981. m.DesiredState |= (TaskState(b) & 0x7F) << shift
  2982. if b < 0x80 {
  2983. break
  2984. }
  2985. }
  2986. case 11:
  2987. if wireType != 2 {
  2988. return fmt.Errorf("proto: wrong wireType = %d for field Networks", wireType)
  2989. }
  2990. var msglen int
  2991. for shift := uint(0); ; shift += 7 {
  2992. if shift >= 64 {
  2993. return ErrIntOverflowObjects
  2994. }
  2995. if iNdEx >= l {
  2996. return io.ErrUnexpectedEOF
  2997. }
  2998. b := data[iNdEx]
  2999. iNdEx++
  3000. msglen |= (int(b) & 0x7F) << shift
  3001. if b < 0x80 {
  3002. break
  3003. }
  3004. }
  3005. if msglen < 0 {
  3006. return ErrInvalidLengthObjects
  3007. }
  3008. postIndex := iNdEx + msglen
  3009. if postIndex > l {
  3010. return io.ErrUnexpectedEOF
  3011. }
  3012. m.Networks = append(m.Networks, &NetworkAttachment{})
  3013. if err := m.Networks[len(m.Networks)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  3014. return err
  3015. }
  3016. iNdEx = postIndex
  3017. case 12:
  3018. if wireType != 2 {
  3019. return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType)
  3020. }
  3021. var msglen int
  3022. for shift := uint(0); ; shift += 7 {
  3023. if shift >= 64 {
  3024. return ErrIntOverflowObjects
  3025. }
  3026. if iNdEx >= l {
  3027. return io.ErrUnexpectedEOF
  3028. }
  3029. b := data[iNdEx]
  3030. iNdEx++
  3031. msglen |= (int(b) & 0x7F) << shift
  3032. if b < 0x80 {
  3033. break
  3034. }
  3035. }
  3036. if msglen < 0 {
  3037. return ErrInvalidLengthObjects
  3038. }
  3039. postIndex := iNdEx + msglen
  3040. if postIndex > l {
  3041. return io.ErrUnexpectedEOF
  3042. }
  3043. if m.Endpoint == nil {
  3044. m.Endpoint = &Endpoint{}
  3045. }
  3046. if err := m.Endpoint.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3047. return err
  3048. }
  3049. iNdEx = postIndex
  3050. case 13:
  3051. if wireType != 2 {
  3052. return fmt.Errorf("proto: wrong wireType = %d for field LogDriver", wireType)
  3053. }
  3054. var msglen int
  3055. for shift := uint(0); ; shift += 7 {
  3056. if shift >= 64 {
  3057. return ErrIntOverflowObjects
  3058. }
  3059. if iNdEx >= l {
  3060. return io.ErrUnexpectedEOF
  3061. }
  3062. b := data[iNdEx]
  3063. iNdEx++
  3064. msglen |= (int(b) & 0x7F) << shift
  3065. if b < 0x80 {
  3066. break
  3067. }
  3068. }
  3069. if msglen < 0 {
  3070. return ErrInvalidLengthObjects
  3071. }
  3072. postIndex := iNdEx + msglen
  3073. if postIndex > l {
  3074. return io.ErrUnexpectedEOF
  3075. }
  3076. if m.LogDriver == nil {
  3077. m.LogDriver = &Driver{}
  3078. }
  3079. if err := m.LogDriver.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3080. return err
  3081. }
  3082. iNdEx = postIndex
  3083. default:
  3084. iNdEx = preIndex
  3085. skippy, err := skipObjects(data[iNdEx:])
  3086. if err != nil {
  3087. return err
  3088. }
  3089. if skippy < 0 {
  3090. return ErrInvalidLengthObjects
  3091. }
  3092. if (iNdEx + skippy) > l {
  3093. return io.ErrUnexpectedEOF
  3094. }
  3095. iNdEx += skippy
  3096. }
  3097. }
  3098. if iNdEx > l {
  3099. return io.ErrUnexpectedEOF
  3100. }
  3101. return nil
  3102. }
  3103. func (m *NetworkAttachment) Unmarshal(data []byte) error {
  3104. l := len(data)
  3105. iNdEx := 0
  3106. for iNdEx < l {
  3107. preIndex := iNdEx
  3108. var wire uint64
  3109. for shift := uint(0); ; shift += 7 {
  3110. if shift >= 64 {
  3111. return ErrIntOverflowObjects
  3112. }
  3113. if iNdEx >= l {
  3114. return io.ErrUnexpectedEOF
  3115. }
  3116. b := data[iNdEx]
  3117. iNdEx++
  3118. wire |= (uint64(b) & 0x7F) << shift
  3119. if b < 0x80 {
  3120. break
  3121. }
  3122. }
  3123. fieldNum := int32(wire >> 3)
  3124. wireType := int(wire & 0x7)
  3125. if wireType == 4 {
  3126. return fmt.Errorf("proto: NetworkAttachment: wiretype end group for non-group")
  3127. }
  3128. if fieldNum <= 0 {
  3129. return fmt.Errorf("proto: NetworkAttachment: illegal tag %d (wire type %d)", fieldNum, wire)
  3130. }
  3131. switch fieldNum {
  3132. case 1:
  3133. if wireType != 2 {
  3134. return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
  3135. }
  3136. var msglen int
  3137. for shift := uint(0); ; shift += 7 {
  3138. if shift >= 64 {
  3139. return ErrIntOverflowObjects
  3140. }
  3141. if iNdEx >= l {
  3142. return io.ErrUnexpectedEOF
  3143. }
  3144. b := data[iNdEx]
  3145. iNdEx++
  3146. msglen |= (int(b) & 0x7F) << shift
  3147. if b < 0x80 {
  3148. break
  3149. }
  3150. }
  3151. if msglen < 0 {
  3152. return ErrInvalidLengthObjects
  3153. }
  3154. postIndex := iNdEx + msglen
  3155. if postIndex > l {
  3156. return io.ErrUnexpectedEOF
  3157. }
  3158. if m.Network == nil {
  3159. m.Network = &Network{}
  3160. }
  3161. if err := m.Network.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3162. return err
  3163. }
  3164. iNdEx = postIndex
  3165. case 2:
  3166. if wireType != 2 {
  3167. return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType)
  3168. }
  3169. var stringLen uint64
  3170. for shift := uint(0); ; shift += 7 {
  3171. if shift >= 64 {
  3172. return ErrIntOverflowObjects
  3173. }
  3174. if iNdEx >= l {
  3175. return io.ErrUnexpectedEOF
  3176. }
  3177. b := data[iNdEx]
  3178. iNdEx++
  3179. stringLen |= (uint64(b) & 0x7F) << shift
  3180. if b < 0x80 {
  3181. break
  3182. }
  3183. }
  3184. intStringLen := int(stringLen)
  3185. if intStringLen < 0 {
  3186. return ErrInvalidLengthObjects
  3187. }
  3188. postIndex := iNdEx + intStringLen
  3189. if postIndex > l {
  3190. return io.ErrUnexpectedEOF
  3191. }
  3192. m.Addresses = append(m.Addresses, string(data[iNdEx:postIndex]))
  3193. iNdEx = postIndex
  3194. case 3:
  3195. if wireType != 2 {
  3196. return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType)
  3197. }
  3198. var stringLen uint64
  3199. for shift := uint(0); ; shift += 7 {
  3200. if shift >= 64 {
  3201. return ErrIntOverflowObjects
  3202. }
  3203. if iNdEx >= l {
  3204. return io.ErrUnexpectedEOF
  3205. }
  3206. b := data[iNdEx]
  3207. iNdEx++
  3208. stringLen |= (uint64(b) & 0x7F) << shift
  3209. if b < 0x80 {
  3210. break
  3211. }
  3212. }
  3213. intStringLen := int(stringLen)
  3214. if intStringLen < 0 {
  3215. return ErrInvalidLengthObjects
  3216. }
  3217. postIndex := iNdEx + intStringLen
  3218. if postIndex > l {
  3219. return io.ErrUnexpectedEOF
  3220. }
  3221. m.Aliases = append(m.Aliases, string(data[iNdEx:postIndex]))
  3222. iNdEx = postIndex
  3223. default:
  3224. iNdEx = preIndex
  3225. skippy, err := skipObjects(data[iNdEx:])
  3226. if err != nil {
  3227. return err
  3228. }
  3229. if skippy < 0 {
  3230. return ErrInvalidLengthObjects
  3231. }
  3232. if (iNdEx + skippy) > l {
  3233. return io.ErrUnexpectedEOF
  3234. }
  3235. iNdEx += skippy
  3236. }
  3237. }
  3238. if iNdEx > l {
  3239. return io.ErrUnexpectedEOF
  3240. }
  3241. return nil
  3242. }
  3243. func (m *Network) Unmarshal(data []byte) error {
  3244. l := len(data)
  3245. iNdEx := 0
  3246. for iNdEx < l {
  3247. preIndex := iNdEx
  3248. var wire uint64
  3249. for shift := uint(0); ; shift += 7 {
  3250. if shift >= 64 {
  3251. return ErrIntOverflowObjects
  3252. }
  3253. if iNdEx >= l {
  3254. return io.ErrUnexpectedEOF
  3255. }
  3256. b := data[iNdEx]
  3257. iNdEx++
  3258. wire |= (uint64(b) & 0x7F) << shift
  3259. if b < 0x80 {
  3260. break
  3261. }
  3262. }
  3263. fieldNum := int32(wire >> 3)
  3264. wireType := int(wire & 0x7)
  3265. if wireType == 4 {
  3266. return fmt.Errorf("proto: Network: wiretype end group for non-group")
  3267. }
  3268. if fieldNum <= 0 {
  3269. return fmt.Errorf("proto: Network: illegal tag %d (wire type %d)", fieldNum, wire)
  3270. }
  3271. switch fieldNum {
  3272. case 1:
  3273. if wireType != 2 {
  3274. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3275. }
  3276. var stringLen uint64
  3277. for shift := uint(0); ; shift += 7 {
  3278. if shift >= 64 {
  3279. return ErrIntOverflowObjects
  3280. }
  3281. if iNdEx >= l {
  3282. return io.ErrUnexpectedEOF
  3283. }
  3284. b := data[iNdEx]
  3285. iNdEx++
  3286. stringLen |= (uint64(b) & 0x7F) << shift
  3287. if b < 0x80 {
  3288. break
  3289. }
  3290. }
  3291. intStringLen := int(stringLen)
  3292. if intStringLen < 0 {
  3293. return ErrInvalidLengthObjects
  3294. }
  3295. postIndex := iNdEx + intStringLen
  3296. if postIndex > l {
  3297. return io.ErrUnexpectedEOF
  3298. }
  3299. m.ID = string(data[iNdEx:postIndex])
  3300. iNdEx = postIndex
  3301. case 2:
  3302. if wireType != 2 {
  3303. return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
  3304. }
  3305. var msglen int
  3306. for shift := uint(0); ; shift += 7 {
  3307. if shift >= 64 {
  3308. return ErrIntOverflowObjects
  3309. }
  3310. if iNdEx >= l {
  3311. return io.ErrUnexpectedEOF
  3312. }
  3313. b := data[iNdEx]
  3314. iNdEx++
  3315. msglen |= (int(b) & 0x7F) << shift
  3316. if b < 0x80 {
  3317. break
  3318. }
  3319. }
  3320. if msglen < 0 {
  3321. return ErrInvalidLengthObjects
  3322. }
  3323. postIndex := iNdEx + msglen
  3324. if postIndex > l {
  3325. return io.ErrUnexpectedEOF
  3326. }
  3327. if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3328. return err
  3329. }
  3330. iNdEx = postIndex
  3331. case 3:
  3332. if wireType != 2 {
  3333. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  3334. }
  3335. var msglen int
  3336. for shift := uint(0); ; shift += 7 {
  3337. if shift >= 64 {
  3338. return ErrIntOverflowObjects
  3339. }
  3340. if iNdEx >= l {
  3341. return io.ErrUnexpectedEOF
  3342. }
  3343. b := data[iNdEx]
  3344. iNdEx++
  3345. msglen |= (int(b) & 0x7F) << shift
  3346. if b < 0x80 {
  3347. break
  3348. }
  3349. }
  3350. if msglen < 0 {
  3351. return ErrInvalidLengthObjects
  3352. }
  3353. postIndex := iNdEx + msglen
  3354. if postIndex > l {
  3355. return io.ErrUnexpectedEOF
  3356. }
  3357. if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3358. return err
  3359. }
  3360. iNdEx = postIndex
  3361. case 4:
  3362. if wireType != 2 {
  3363. return fmt.Errorf("proto: wrong wireType = %d for field DriverState", wireType)
  3364. }
  3365. var msglen int
  3366. for shift := uint(0); ; shift += 7 {
  3367. if shift >= 64 {
  3368. return ErrIntOverflowObjects
  3369. }
  3370. if iNdEx >= l {
  3371. return io.ErrUnexpectedEOF
  3372. }
  3373. b := data[iNdEx]
  3374. iNdEx++
  3375. msglen |= (int(b) & 0x7F) << shift
  3376. if b < 0x80 {
  3377. break
  3378. }
  3379. }
  3380. if msglen < 0 {
  3381. return ErrInvalidLengthObjects
  3382. }
  3383. postIndex := iNdEx + msglen
  3384. if postIndex > l {
  3385. return io.ErrUnexpectedEOF
  3386. }
  3387. if m.DriverState == nil {
  3388. m.DriverState = &Driver{}
  3389. }
  3390. if err := m.DriverState.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3391. return err
  3392. }
  3393. iNdEx = postIndex
  3394. case 5:
  3395. if wireType != 2 {
  3396. return fmt.Errorf("proto: wrong wireType = %d for field IPAM", wireType)
  3397. }
  3398. var msglen int
  3399. for shift := uint(0); ; shift += 7 {
  3400. if shift >= 64 {
  3401. return ErrIntOverflowObjects
  3402. }
  3403. if iNdEx >= l {
  3404. return io.ErrUnexpectedEOF
  3405. }
  3406. b := data[iNdEx]
  3407. iNdEx++
  3408. msglen |= (int(b) & 0x7F) << shift
  3409. if b < 0x80 {
  3410. break
  3411. }
  3412. }
  3413. if msglen < 0 {
  3414. return ErrInvalidLengthObjects
  3415. }
  3416. postIndex := iNdEx + msglen
  3417. if postIndex > l {
  3418. return io.ErrUnexpectedEOF
  3419. }
  3420. if m.IPAM == nil {
  3421. m.IPAM = &IPAMOptions{}
  3422. }
  3423. if err := m.IPAM.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3424. return err
  3425. }
  3426. iNdEx = postIndex
  3427. default:
  3428. iNdEx = preIndex
  3429. skippy, err := skipObjects(data[iNdEx:])
  3430. if err != nil {
  3431. return err
  3432. }
  3433. if skippy < 0 {
  3434. return ErrInvalidLengthObjects
  3435. }
  3436. if (iNdEx + skippy) > l {
  3437. return io.ErrUnexpectedEOF
  3438. }
  3439. iNdEx += skippy
  3440. }
  3441. }
  3442. if iNdEx > l {
  3443. return io.ErrUnexpectedEOF
  3444. }
  3445. return nil
  3446. }
  3447. func (m *Cluster) Unmarshal(data []byte) error {
  3448. l := len(data)
  3449. iNdEx := 0
  3450. for iNdEx < l {
  3451. preIndex := iNdEx
  3452. var wire uint64
  3453. for shift := uint(0); ; shift += 7 {
  3454. if shift >= 64 {
  3455. return ErrIntOverflowObjects
  3456. }
  3457. if iNdEx >= l {
  3458. return io.ErrUnexpectedEOF
  3459. }
  3460. b := data[iNdEx]
  3461. iNdEx++
  3462. wire |= (uint64(b) & 0x7F) << shift
  3463. if b < 0x80 {
  3464. break
  3465. }
  3466. }
  3467. fieldNum := int32(wire >> 3)
  3468. wireType := int(wire & 0x7)
  3469. if wireType == 4 {
  3470. return fmt.Errorf("proto: Cluster: wiretype end group for non-group")
  3471. }
  3472. if fieldNum <= 0 {
  3473. return fmt.Errorf("proto: Cluster: illegal tag %d (wire type %d)", fieldNum, wire)
  3474. }
  3475. switch fieldNum {
  3476. case 1:
  3477. if wireType != 2 {
  3478. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3479. }
  3480. var stringLen uint64
  3481. for shift := uint(0); ; shift += 7 {
  3482. if shift >= 64 {
  3483. return ErrIntOverflowObjects
  3484. }
  3485. if iNdEx >= l {
  3486. return io.ErrUnexpectedEOF
  3487. }
  3488. b := data[iNdEx]
  3489. iNdEx++
  3490. stringLen |= (uint64(b) & 0x7F) << shift
  3491. if b < 0x80 {
  3492. break
  3493. }
  3494. }
  3495. intStringLen := int(stringLen)
  3496. if intStringLen < 0 {
  3497. return ErrInvalidLengthObjects
  3498. }
  3499. postIndex := iNdEx + intStringLen
  3500. if postIndex > l {
  3501. return io.ErrUnexpectedEOF
  3502. }
  3503. m.ID = string(data[iNdEx:postIndex])
  3504. iNdEx = postIndex
  3505. case 2:
  3506. if wireType != 2 {
  3507. return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
  3508. }
  3509. var msglen int
  3510. for shift := uint(0); ; shift += 7 {
  3511. if shift >= 64 {
  3512. return ErrIntOverflowObjects
  3513. }
  3514. if iNdEx >= l {
  3515. return io.ErrUnexpectedEOF
  3516. }
  3517. b := data[iNdEx]
  3518. iNdEx++
  3519. msglen |= (int(b) & 0x7F) << shift
  3520. if b < 0x80 {
  3521. break
  3522. }
  3523. }
  3524. if msglen < 0 {
  3525. return ErrInvalidLengthObjects
  3526. }
  3527. postIndex := iNdEx + msglen
  3528. if postIndex > l {
  3529. return io.ErrUnexpectedEOF
  3530. }
  3531. if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3532. return err
  3533. }
  3534. iNdEx = postIndex
  3535. case 3:
  3536. if wireType != 2 {
  3537. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  3538. }
  3539. var msglen int
  3540. for shift := uint(0); ; shift += 7 {
  3541. if shift >= 64 {
  3542. return ErrIntOverflowObjects
  3543. }
  3544. if iNdEx >= l {
  3545. return io.ErrUnexpectedEOF
  3546. }
  3547. b := data[iNdEx]
  3548. iNdEx++
  3549. msglen |= (int(b) & 0x7F) << shift
  3550. if b < 0x80 {
  3551. break
  3552. }
  3553. }
  3554. if msglen < 0 {
  3555. return ErrInvalidLengthObjects
  3556. }
  3557. postIndex := iNdEx + msglen
  3558. if postIndex > l {
  3559. return io.ErrUnexpectedEOF
  3560. }
  3561. if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3562. return err
  3563. }
  3564. iNdEx = postIndex
  3565. case 4:
  3566. if wireType != 2 {
  3567. return fmt.Errorf("proto: wrong wireType = %d for field RootCA", wireType)
  3568. }
  3569. var msglen int
  3570. for shift := uint(0); ; shift += 7 {
  3571. if shift >= 64 {
  3572. return ErrIntOverflowObjects
  3573. }
  3574. if iNdEx >= l {
  3575. return io.ErrUnexpectedEOF
  3576. }
  3577. b := data[iNdEx]
  3578. iNdEx++
  3579. msglen |= (int(b) & 0x7F) << shift
  3580. if b < 0x80 {
  3581. break
  3582. }
  3583. }
  3584. if msglen < 0 {
  3585. return ErrInvalidLengthObjects
  3586. }
  3587. postIndex := iNdEx + msglen
  3588. if postIndex > l {
  3589. return io.ErrUnexpectedEOF
  3590. }
  3591. if err := m.RootCA.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3592. return err
  3593. }
  3594. iNdEx = postIndex
  3595. case 5:
  3596. if wireType != 2 {
  3597. return fmt.Errorf("proto: wrong wireType = %d for field NetworkBootstrapKeys", wireType)
  3598. }
  3599. var msglen int
  3600. for shift := uint(0); ; shift += 7 {
  3601. if shift >= 64 {
  3602. return ErrIntOverflowObjects
  3603. }
  3604. if iNdEx >= l {
  3605. return io.ErrUnexpectedEOF
  3606. }
  3607. b := data[iNdEx]
  3608. iNdEx++
  3609. msglen |= (int(b) & 0x7F) << shift
  3610. if b < 0x80 {
  3611. break
  3612. }
  3613. }
  3614. if msglen < 0 {
  3615. return ErrInvalidLengthObjects
  3616. }
  3617. postIndex := iNdEx + msglen
  3618. if postIndex > l {
  3619. return io.ErrUnexpectedEOF
  3620. }
  3621. m.NetworkBootstrapKeys = append(m.NetworkBootstrapKeys, &EncryptionKey{})
  3622. if err := m.NetworkBootstrapKeys[len(m.NetworkBootstrapKeys)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  3623. return err
  3624. }
  3625. iNdEx = postIndex
  3626. case 6:
  3627. if wireType != 0 {
  3628. return fmt.Errorf("proto: wrong wireType = %d for field EncryptionKeyLamportClock", wireType)
  3629. }
  3630. m.EncryptionKeyLamportClock = 0
  3631. for shift := uint(0); ; shift += 7 {
  3632. if shift >= 64 {
  3633. return ErrIntOverflowObjects
  3634. }
  3635. if iNdEx >= l {
  3636. return io.ErrUnexpectedEOF
  3637. }
  3638. b := data[iNdEx]
  3639. iNdEx++
  3640. m.EncryptionKeyLamportClock |= (uint64(b) & 0x7F) << shift
  3641. if b < 0x80 {
  3642. break
  3643. }
  3644. }
  3645. case 8:
  3646. if wireType != 2 {
  3647. return fmt.Errorf("proto: wrong wireType = %d for field BlacklistedCertificates", wireType)
  3648. }
  3649. var msglen int
  3650. for shift := uint(0); ; shift += 7 {
  3651. if shift >= 64 {
  3652. return ErrIntOverflowObjects
  3653. }
  3654. if iNdEx >= l {
  3655. return io.ErrUnexpectedEOF
  3656. }
  3657. b := data[iNdEx]
  3658. iNdEx++
  3659. msglen |= (int(b) & 0x7F) << shift
  3660. if b < 0x80 {
  3661. break
  3662. }
  3663. }
  3664. if msglen < 0 {
  3665. return ErrInvalidLengthObjects
  3666. }
  3667. postIndex := iNdEx + msglen
  3668. if postIndex > l {
  3669. return io.ErrUnexpectedEOF
  3670. }
  3671. var keykey uint64
  3672. for shift := uint(0); ; shift += 7 {
  3673. if shift >= 64 {
  3674. return ErrIntOverflowObjects
  3675. }
  3676. if iNdEx >= l {
  3677. return io.ErrUnexpectedEOF
  3678. }
  3679. b := data[iNdEx]
  3680. iNdEx++
  3681. keykey |= (uint64(b) & 0x7F) << shift
  3682. if b < 0x80 {
  3683. break
  3684. }
  3685. }
  3686. var stringLenmapkey uint64
  3687. for shift := uint(0); ; shift += 7 {
  3688. if shift >= 64 {
  3689. return ErrIntOverflowObjects
  3690. }
  3691. if iNdEx >= l {
  3692. return io.ErrUnexpectedEOF
  3693. }
  3694. b := data[iNdEx]
  3695. iNdEx++
  3696. stringLenmapkey |= (uint64(b) & 0x7F) << shift
  3697. if b < 0x80 {
  3698. break
  3699. }
  3700. }
  3701. intStringLenmapkey := int(stringLenmapkey)
  3702. if intStringLenmapkey < 0 {
  3703. return ErrInvalidLengthObjects
  3704. }
  3705. postStringIndexmapkey := iNdEx + intStringLenmapkey
  3706. if postStringIndexmapkey > l {
  3707. return io.ErrUnexpectedEOF
  3708. }
  3709. mapkey := string(data[iNdEx:postStringIndexmapkey])
  3710. iNdEx = postStringIndexmapkey
  3711. if m.BlacklistedCertificates == nil {
  3712. m.BlacklistedCertificates = make(map[string]*BlacklistedCertificate)
  3713. }
  3714. if iNdEx < postIndex {
  3715. var valuekey uint64
  3716. for shift := uint(0); ; shift += 7 {
  3717. if shift >= 64 {
  3718. return ErrIntOverflowObjects
  3719. }
  3720. if iNdEx >= l {
  3721. return io.ErrUnexpectedEOF
  3722. }
  3723. b := data[iNdEx]
  3724. iNdEx++
  3725. valuekey |= (uint64(b) & 0x7F) << shift
  3726. if b < 0x80 {
  3727. break
  3728. }
  3729. }
  3730. var mapmsglen int
  3731. for shift := uint(0); ; shift += 7 {
  3732. if shift >= 64 {
  3733. return ErrIntOverflowObjects
  3734. }
  3735. if iNdEx >= l {
  3736. return io.ErrUnexpectedEOF
  3737. }
  3738. b := data[iNdEx]
  3739. iNdEx++
  3740. mapmsglen |= (int(b) & 0x7F) << shift
  3741. if b < 0x80 {
  3742. break
  3743. }
  3744. }
  3745. if mapmsglen < 0 {
  3746. return ErrInvalidLengthObjects
  3747. }
  3748. postmsgIndex := iNdEx + mapmsglen
  3749. if mapmsglen < 0 {
  3750. return ErrInvalidLengthObjects
  3751. }
  3752. if postmsgIndex > l {
  3753. return io.ErrUnexpectedEOF
  3754. }
  3755. mapvalue := &BlacklistedCertificate{}
  3756. if err := mapvalue.Unmarshal(data[iNdEx:postmsgIndex]); err != nil {
  3757. return err
  3758. }
  3759. iNdEx = postmsgIndex
  3760. m.BlacklistedCertificates[mapkey] = mapvalue
  3761. } else {
  3762. var mapvalue *BlacklistedCertificate
  3763. m.BlacklistedCertificates[mapkey] = mapvalue
  3764. }
  3765. iNdEx = postIndex
  3766. case 9:
  3767. if wireType != 2 {
  3768. return fmt.Errorf("proto: wrong wireType = %d for field UnlockKeys", wireType)
  3769. }
  3770. var msglen int
  3771. for shift := uint(0); ; shift += 7 {
  3772. if shift >= 64 {
  3773. return ErrIntOverflowObjects
  3774. }
  3775. if iNdEx >= l {
  3776. return io.ErrUnexpectedEOF
  3777. }
  3778. b := data[iNdEx]
  3779. iNdEx++
  3780. msglen |= (int(b) & 0x7F) << shift
  3781. if b < 0x80 {
  3782. break
  3783. }
  3784. }
  3785. if msglen < 0 {
  3786. return ErrInvalidLengthObjects
  3787. }
  3788. postIndex := iNdEx + msglen
  3789. if postIndex > l {
  3790. return io.ErrUnexpectedEOF
  3791. }
  3792. m.UnlockKeys = append(m.UnlockKeys, &EncryptionKey{})
  3793. if err := m.UnlockKeys[len(m.UnlockKeys)-1].Unmarshal(data[iNdEx:postIndex]); err != nil {
  3794. return err
  3795. }
  3796. iNdEx = postIndex
  3797. default:
  3798. iNdEx = preIndex
  3799. skippy, err := skipObjects(data[iNdEx:])
  3800. if err != nil {
  3801. return err
  3802. }
  3803. if skippy < 0 {
  3804. return ErrInvalidLengthObjects
  3805. }
  3806. if (iNdEx + skippy) > l {
  3807. return io.ErrUnexpectedEOF
  3808. }
  3809. iNdEx += skippy
  3810. }
  3811. }
  3812. if iNdEx > l {
  3813. return io.ErrUnexpectedEOF
  3814. }
  3815. return nil
  3816. }
  3817. func (m *Secret) Unmarshal(data []byte) error {
  3818. l := len(data)
  3819. iNdEx := 0
  3820. for iNdEx < l {
  3821. preIndex := iNdEx
  3822. var wire uint64
  3823. for shift := uint(0); ; shift += 7 {
  3824. if shift >= 64 {
  3825. return ErrIntOverflowObjects
  3826. }
  3827. if iNdEx >= l {
  3828. return io.ErrUnexpectedEOF
  3829. }
  3830. b := data[iNdEx]
  3831. iNdEx++
  3832. wire |= (uint64(b) & 0x7F) << shift
  3833. if b < 0x80 {
  3834. break
  3835. }
  3836. }
  3837. fieldNum := int32(wire >> 3)
  3838. wireType := int(wire & 0x7)
  3839. if wireType == 4 {
  3840. return fmt.Errorf("proto: Secret: wiretype end group for non-group")
  3841. }
  3842. if fieldNum <= 0 {
  3843. return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire)
  3844. }
  3845. switch fieldNum {
  3846. case 1:
  3847. if wireType != 2 {
  3848. return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  3849. }
  3850. var stringLen uint64
  3851. for shift := uint(0); ; shift += 7 {
  3852. if shift >= 64 {
  3853. return ErrIntOverflowObjects
  3854. }
  3855. if iNdEx >= l {
  3856. return io.ErrUnexpectedEOF
  3857. }
  3858. b := data[iNdEx]
  3859. iNdEx++
  3860. stringLen |= (uint64(b) & 0x7F) << shift
  3861. if b < 0x80 {
  3862. break
  3863. }
  3864. }
  3865. intStringLen := int(stringLen)
  3866. if intStringLen < 0 {
  3867. return ErrInvalidLengthObjects
  3868. }
  3869. postIndex := iNdEx + intStringLen
  3870. if postIndex > l {
  3871. return io.ErrUnexpectedEOF
  3872. }
  3873. m.ID = string(data[iNdEx:postIndex])
  3874. iNdEx = postIndex
  3875. case 2:
  3876. if wireType != 2 {
  3877. return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
  3878. }
  3879. var msglen int
  3880. for shift := uint(0); ; shift += 7 {
  3881. if shift >= 64 {
  3882. return ErrIntOverflowObjects
  3883. }
  3884. if iNdEx >= l {
  3885. return io.ErrUnexpectedEOF
  3886. }
  3887. b := data[iNdEx]
  3888. iNdEx++
  3889. msglen |= (int(b) & 0x7F) << shift
  3890. if b < 0x80 {
  3891. break
  3892. }
  3893. }
  3894. if msglen < 0 {
  3895. return ErrInvalidLengthObjects
  3896. }
  3897. postIndex := iNdEx + msglen
  3898. if postIndex > l {
  3899. return io.ErrUnexpectedEOF
  3900. }
  3901. if err := m.Meta.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3902. return err
  3903. }
  3904. iNdEx = postIndex
  3905. case 3:
  3906. if wireType != 2 {
  3907. return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType)
  3908. }
  3909. var msglen int
  3910. for shift := uint(0); ; shift += 7 {
  3911. if shift >= 64 {
  3912. return ErrIntOverflowObjects
  3913. }
  3914. if iNdEx >= l {
  3915. return io.ErrUnexpectedEOF
  3916. }
  3917. b := data[iNdEx]
  3918. iNdEx++
  3919. msglen |= (int(b) & 0x7F) << shift
  3920. if b < 0x80 {
  3921. break
  3922. }
  3923. }
  3924. if msglen < 0 {
  3925. return ErrInvalidLengthObjects
  3926. }
  3927. postIndex := iNdEx + msglen
  3928. if postIndex > l {
  3929. return io.ErrUnexpectedEOF
  3930. }
  3931. if err := m.Spec.Unmarshal(data[iNdEx:postIndex]); err != nil {
  3932. return err
  3933. }
  3934. iNdEx = postIndex
  3935. case 4:
  3936. if wireType != 0 {
  3937. return fmt.Errorf("proto: wrong wireType = %d for field Internal", wireType)
  3938. }
  3939. var v int
  3940. for shift := uint(0); ; shift += 7 {
  3941. if shift >= 64 {
  3942. return ErrIntOverflowObjects
  3943. }
  3944. if iNdEx >= l {
  3945. return io.ErrUnexpectedEOF
  3946. }
  3947. b := data[iNdEx]
  3948. iNdEx++
  3949. v |= (int(b) & 0x7F) << shift
  3950. if b < 0x80 {
  3951. break
  3952. }
  3953. }
  3954. m.Internal = bool(v != 0)
  3955. default:
  3956. iNdEx = preIndex
  3957. skippy, err := skipObjects(data[iNdEx:])
  3958. if err != nil {
  3959. return err
  3960. }
  3961. if skippy < 0 {
  3962. return ErrInvalidLengthObjects
  3963. }
  3964. if (iNdEx + skippy) > l {
  3965. return io.ErrUnexpectedEOF
  3966. }
  3967. iNdEx += skippy
  3968. }
  3969. }
  3970. if iNdEx > l {
  3971. return io.ErrUnexpectedEOF
  3972. }
  3973. return nil
  3974. }
  3975. func skipObjects(data []byte) (n int, err error) {
  3976. l := len(data)
  3977. iNdEx := 0
  3978. for iNdEx < l {
  3979. var wire uint64
  3980. for shift := uint(0); ; shift += 7 {
  3981. if shift >= 64 {
  3982. return 0, ErrIntOverflowObjects
  3983. }
  3984. if iNdEx >= l {
  3985. return 0, io.ErrUnexpectedEOF
  3986. }
  3987. b := data[iNdEx]
  3988. iNdEx++
  3989. wire |= (uint64(b) & 0x7F) << shift
  3990. if b < 0x80 {
  3991. break
  3992. }
  3993. }
  3994. wireType := int(wire & 0x7)
  3995. switch wireType {
  3996. case 0:
  3997. for shift := uint(0); ; shift += 7 {
  3998. if shift >= 64 {
  3999. return 0, ErrIntOverflowObjects
  4000. }
  4001. if iNdEx >= l {
  4002. return 0, io.ErrUnexpectedEOF
  4003. }
  4004. iNdEx++
  4005. if data[iNdEx-1] < 0x80 {
  4006. break
  4007. }
  4008. }
  4009. return iNdEx, nil
  4010. case 1:
  4011. iNdEx += 8
  4012. return iNdEx, nil
  4013. case 2:
  4014. var length int
  4015. for shift := uint(0); ; shift += 7 {
  4016. if shift >= 64 {
  4017. return 0, ErrIntOverflowObjects
  4018. }
  4019. if iNdEx >= l {
  4020. return 0, io.ErrUnexpectedEOF
  4021. }
  4022. b := data[iNdEx]
  4023. iNdEx++
  4024. length |= (int(b) & 0x7F) << shift
  4025. if b < 0x80 {
  4026. break
  4027. }
  4028. }
  4029. iNdEx += length
  4030. if length < 0 {
  4031. return 0, ErrInvalidLengthObjects
  4032. }
  4033. return iNdEx, nil
  4034. case 3:
  4035. for {
  4036. var innerWire uint64
  4037. var start int = iNdEx
  4038. for shift := uint(0); ; shift += 7 {
  4039. if shift >= 64 {
  4040. return 0, ErrIntOverflowObjects
  4041. }
  4042. if iNdEx >= l {
  4043. return 0, io.ErrUnexpectedEOF
  4044. }
  4045. b := data[iNdEx]
  4046. iNdEx++
  4047. innerWire |= (uint64(b) & 0x7F) << shift
  4048. if b < 0x80 {
  4049. break
  4050. }
  4051. }
  4052. innerWireType := int(innerWire & 0x7)
  4053. if innerWireType == 4 {
  4054. break
  4055. }
  4056. next, err := skipObjects(data[start:])
  4057. if err != nil {
  4058. return 0, err
  4059. }
  4060. iNdEx = start + next
  4061. }
  4062. return iNdEx, nil
  4063. case 4:
  4064. return iNdEx, nil
  4065. case 5:
  4066. iNdEx += 4
  4067. return iNdEx, nil
  4068. default:
  4069. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  4070. }
  4071. }
  4072. panic("unreachable")
  4073. }
  4074. var (
  4075. ErrInvalidLengthObjects = fmt.Errorf("proto: negative length found during unmarshaling")
  4076. ErrIntOverflowObjects = fmt.Errorf("proto: integer overflow")
  4077. )
  4078. func init() { proto.RegisterFile("objects.proto", fileDescriptorObjects) }
  4079. var fileDescriptorObjects = []byte{
  4080. // 1161 bytes of a gzipped FileDescriptorProto
  4081. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xbc, 0x57, 0x4d, 0x8f, 0x1b, 0x35,
  4082. 0x18, 0xee, 0x24, 0xb3, 0xf9, 0x78, 0xb3, 0x59, 0x81, 0xa9, 0xca, 0x34, 0x2c, 0xc9, 0x92, 0x0a,
  4083. 0x54, 0xa1, 0x2a, 0x15, 0xa5, 0xa0, 0x2d, 0xb4, 0x82, 0x7c, 0x09, 0xa2, 0x52, 0xa8, 0xdc, 0xb2,
  4084. 0x3d, 0x46, 0xde, 0x19, 0x37, 0x0c, 0x99, 0x8c, 0x47, 0xb6, 0x93, 0x2a, 0x37, 0xc4, 0x0f, 0xe0,
  4085. 0x27, 0x20, 0xce, 0xfc, 0x09, 0xae, 0x7b, 0xe0, 0xc0, 0x0d, 0x4e, 0x11, 0x9b, 0x1b, 0x37, 0x7e,
  4086. 0x02, 0xb2, 0xc7, 0x93, 0xcc, 0x2a, 0x93, 0x65, 0x2b, 0x55, 0x7b, 0xb3, 0xe3, 0xe7, 0x79, 0xde,
  4087. 0xd7, 0xaf, 0x1f, 0xbf, 0xe3, 0x40, 0x95, 0x1d, 0x7f, 0x4f, 0x5d, 0x29, 0x5a, 0x11, 0x67, 0x92,
  4088. 0x21, 0xe4, 0x31, 0x77, 0x4c, 0x79, 0x4b, 0xbc, 0x20, 0x7c, 0x32, 0xf6, 0x65, 0x6b, 0xf6, 0x41,
  4089. 0xad, 0x22, 0xe7, 0x11, 0x35, 0x80, 0x5a, 0x45, 0x44, 0xd4, 0x4d, 0x26, 0xd7, 0xa5, 0x3f, 0xa1,
  4090. 0x42, 0x92, 0x49, 0x74, 0x7b, 0x35, 0x32, 0x4b, 0x57, 0x47, 0x6c, 0xc4, 0xf4, 0xf0, 0xb6, 0x1a,
  4091. 0xc5, 0xbf, 0x36, 0x7f, 0xb3, 0xc0, 0x7e, 0x44, 0x25, 0x41, 0x9f, 0x42, 0x71, 0x46, 0xb9, 0xf0,
  4092. 0x59, 0xe8, 0x58, 0x07, 0xd6, 0xcd, 0xca, 0x9d, 0xb7, 0x5a, 0x9b, 0x91, 0x5b, 0x47, 0x31, 0xa4,
  4093. 0x63, 0x9f, 0x2c, 0x1a, 0x57, 0x70, 0xc2, 0x40, 0xf7, 0x01, 0x5c, 0x4e, 0x89, 0xa4, 0xde, 0x90,
  4094. 0x48, 0x27, 0xa7, 0xf9, 0x6f, 0x67, 0xf1, 0x9f, 0x26, 0x49, 0xe1, 0xb2, 0x21, 0xb4, 0xa5, 0x62,
  4095. 0x4f, 0x23, 0x2f, 0x61, 0xe7, 0x2f, 0xc4, 0x36, 0x84, 0xb6, 0x6c, 0xfe, 0x93, 0x07, 0xfb, 0x6b,
  4096. 0xe6, 0x51, 0x74, 0x0d, 0x72, 0xbe, 0xa7, 0x93, 0x2f, 0x77, 0x0a, 0xcb, 0x45, 0x23, 0x37, 0xe8,
  4097. 0xe1, 0x9c, 0xef, 0xa1, 0x3b, 0x60, 0x4f, 0xa8, 0x24, 0x26, 0x2d, 0x27, 0x4b, 0x58, 0x55, 0xc0,
  4098. 0xec, 0x49, 0x63, 0xd1, 0xc7, 0x60, 0xab, 0xb2, 0x9a, 0x64, 0xf6, 0xb3, 0x38, 0x2a, 0xe6, 0x93,
  4099. 0x88, 0xba, 0x09, 0x4f, 0xe1, 0x51, 0x1f, 0x2a, 0x1e, 0x15, 0x2e, 0xf7, 0x23, 0xa9, 0x2a, 0x69,
  4100. 0x6b, 0xfa, 0x8d, 0x6d, 0xf4, 0xde, 0x1a, 0x8a, 0xd3, 0x3c, 0x74, 0x1f, 0x0a, 0x42, 0x12, 0x39,
  4101. 0x15, 0xce, 0x8e, 0x56, 0xa8, 0x6f, 0x4d, 0x40, 0xa3, 0x4c, 0x0a, 0x86, 0x83, 0xbe, 0x84, 0xbd,
  4102. 0x09, 0x09, 0xc9, 0x88, 0xf2, 0xa1, 0x51, 0x29, 0x68, 0x95, 0x77, 0x32, 0xb7, 0x1e, 0x23, 0x63,
  4103. 0x21, 0x5c, 0x9d, 0xa4, 0xa7, 0xa8, 0x0f, 0x40, 0xa4, 0x24, 0xee, 0x77, 0x13, 0x1a, 0x4a, 0xa7,
  4104. 0xa8, 0x55, 0xde, 0xcd, 0xcc, 0x85, 0xca, 0x17, 0x8c, 0x8f, 0xdb, 0x2b, 0x30, 0x4e, 0x11, 0xd1,
  4105. 0x17, 0x50, 0x71, 0x29, 0x97, 0xfe, 0x73, 0xdf, 0x25, 0x92, 0x3a, 0x25, 0xad, 0xd3, 0xc8, 0xd2,
  4106. 0xe9, 0xae, 0x61, 0x66, 0x53, 0x69, 0x66, 0xf3, 0xcf, 0x1c, 0x14, 0x9f, 0x50, 0x3e, 0xf3, 0xdd,
  4107. 0x57, 0x7b, 0xdc, 0xf7, 0xce, 0x1c, 0x77, 0x66, 0x66, 0x26, 0xec, 0xc6, 0x89, 0x1f, 0x42, 0x89,
  4108. 0x86, 0x5e, 0xc4, 0xfc, 0x50, 0x9a, 0xe3, 0xce, 0x74, 0x4b, 0xdf, 0x60, 0xf0, 0x0a, 0x8d, 0xfa,
  4109. 0x50, 0x8d, 0x5d, 0x3c, 0x3c, 0x73, 0xd6, 0x07, 0x59, 0xf4, 0x6f, 0x35, 0xd0, 0x1c, 0xd2, 0xee,
  4110. 0x34, 0x35, 0x43, 0x3d, 0xa8, 0x46, 0x9c, 0xce, 0x7c, 0x36, 0x15, 0x43, 0xbd, 0x89, 0xc2, 0x85,
  4111. 0x36, 0x81, 0x77, 0x13, 0x96, 0x9a, 0x35, 0x7f, 0xce, 0x41, 0x29, 0xc9, 0x11, 0xdd, 0x35, 0xe5,
  4112. 0xb0, 0xb6, 0x27, 0x94, 0x60, 0xb5, 0x54, 0x5c, 0x89, 0xbb, 0xb0, 0x13, 0x31, 0x2e, 0x85, 0x93,
  4113. 0x3b, 0xc8, 0x6f, 0xf3, 0xec, 0x63, 0xc6, 0x65, 0x97, 0x85, 0xcf, 0xfd, 0x11, 0x8e, 0xc1, 0xe8,
  4114. 0x19, 0x54, 0x66, 0x3e, 0x97, 0x53, 0x12, 0x0c, 0xfd, 0x48, 0x38, 0x79, 0xcd, 0x7d, 0xef, 0xbc,
  4115. 0x90, 0xad, 0xa3, 0x18, 0x3f, 0x78, 0xdc, 0xd9, 0x5b, 0x2e, 0x1a, 0xb0, 0x9a, 0x0a, 0x0c, 0x46,
  4116. 0x6a, 0x10, 0x89, 0xda, 0x23, 0x28, 0xaf, 0x56, 0xd0, 0x2d, 0x80, 0x30, 0xb6, 0xe8, 0x70, 0x65,
  4117. 0x9a, 0xea, 0x72, 0xd1, 0x28, 0x1b, 0xe3, 0x0e, 0x7a, 0xb8, 0x6c, 0x00, 0x03, 0x0f, 0x21, 0xb0,
  4118. 0x89, 0xe7, 0x71, 0x6d, 0xa1, 0x32, 0xd6, 0xe3, 0xe6, 0xef, 0x3b, 0x60, 0x3f, 0x25, 0x62, 0x7c,
  4119. 0xd9, 0x6d, 0x46, 0xc5, 0xdc, 0x30, 0xdd, 0x2d, 0x00, 0x11, 0x1f, 0xa5, 0xda, 0x8e, 0xbd, 0xde,
  4120. 0x8e, 0x39, 0x60, 0xb5, 0x1d, 0x03, 0x88, 0xb7, 0x23, 0x02, 0x26, 0xb5, 0xbf, 0x6c, 0xac, 0xc7,
  4121. 0xe8, 0x06, 0x14, 0x43, 0xe6, 0x69, 0x7a, 0x41, 0xd3, 0x61, 0xb9, 0x68, 0x14, 0x54, 0x4b, 0x19,
  4122. 0xf4, 0x70, 0x41, 0x2d, 0x0d, 0x3c, 0x75, 0x6f, 0x49, 0x18, 0x32, 0x49, 0x54, 0x53, 0x12, 0xe6,
  4123. 0xfe, 0x67, 0x1a, 0xab, 0xbd, 0x86, 0x25, 0xf7, 0x36, 0xc5, 0x44, 0x47, 0xf0, 0x46, 0x92, 0x6f,
  4124. 0x5a, 0xb0, 0xf4, 0x32, 0x82, 0xc8, 0x28, 0xa4, 0x56, 0x52, 0x7d, 0xb2, 0xbc, 0xbd, 0x4f, 0xea,
  4125. 0x0a, 0x66, 0xf5, 0xc9, 0x0e, 0x54, 0x3d, 0x2a, 0x7c, 0x4e, 0x3d, 0x7d, 0x03, 0xa9, 0x03, 0x07,
  4126. 0xd6, 0xcd, 0xbd, 0x2d, 0x9f, 0x1e, 0x23, 0x42, 0xf1, 0xae, 0xe1, 0xe8, 0x19, 0x6a, 0x43, 0xc9,
  4127. 0xf8, 0x46, 0x38, 0x15, 0xed, 0xdd, 0x0b, 0xf6, 0xc7, 0x15, 0xed, 0x4c, 0x07, 0xd9, 0x7d, 0xa9,
  4128. 0x0e, 0x72, 0x0f, 0x20, 0x60, 0xa3, 0xa1, 0xc7, 0xfd, 0x19, 0xe5, 0x4e, 0x55, 0x73, 0x6b, 0x59,
  4129. 0xdc, 0x9e, 0x46, 0xe0, 0x72, 0xc0, 0x46, 0xf1, 0xb0, 0xf9, 0xa3, 0x05, 0xaf, 0x6f, 0x24, 0x85,
  4130. 0x3e, 0x82, 0xa2, 0x49, 0xeb, 0xbc, 0x47, 0x80, 0xe1, 0xe1, 0x04, 0x8b, 0xf6, 0xa1, 0xac, 0xee,
  4131. 0x08, 0x15, 0x82, 0xc6, 0xb7, 0xbf, 0x8c, 0xd7, 0x3f, 0x20, 0x07, 0x8a, 0x24, 0xf0, 0x89, 0x5a,
  4132. 0xcb, 0xeb, 0xb5, 0x64, 0xda, 0xfc, 0x29, 0x07, 0x45, 0x23, 0x76, 0xd9, 0xed, 0xdc, 0x84, 0xdd,
  4133. 0xb8, 0x59, 0x0f, 0x60, 0x37, 0x2e, 0xa7, 0xb1, 0x84, 0xfd, 0xbf, 0x45, 0xad, 0xc4, 0xf8, 0xd8,
  4134. 0x0e, 0x0f, 0xc0, 0xf6, 0x23, 0x32, 0x31, 0xad, 0x3c, 0x33, 0xf2, 0xe0, 0x71, 0xfb, 0xd1, 0x37,
  4135. 0x51, 0xec, 0xec, 0xd2, 0x72, 0xd1, 0xb0, 0xd5, 0x0f, 0x58, 0xd3, 0x9a, 0xbf, 0xec, 0x40, 0xb1,
  4136. 0x1b, 0x4c, 0x85, 0xa4, 0xfc, 0xb2, 0x0b, 0x62, 0xc2, 0x6e, 0x14, 0xa4, 0x0b, 0x45, 0xce, 0x98,
  4137. 0x1c, 0xba, 0xe4, 0xbc, 0x5a, 0x60, 0xc6, 0x64, 0xb7, 0xdd, 0xd9, 0x53, 0x44, 0xd5, 0x48, 0xe2,
  4138. 0x39, 0x2e, 0x28, 0x6a, 0x97, 0xa0, 0x67, 0x70, 0x2d, 0x69, 0xbf, 0xc7, 0x8c, 0x49, 0x21, 0x39,
  4139. 0x89, 0x86, 0x63, 0x3a, 0x57, 0xdf, 0xbc, 0xfc, 0xb6, 0x97, 0x49, 0x3f, 0x74, 0xf9, 0x5c, 0x17,
  4140. 0xea, 0x21, 0x9d, 0xe3, 0xab, 0x46, 0xa0, 0x93, 0xf0, 0x1f, 0xd2, 0xb9, 0x40, 0x9f, 0xc1, 0x3e,
  4141. 0x5d, 0xc1, 0x94, 0xe2, 0x30, 0x20, 0x13, 0xf5, 0x61, 0x19, 0xba, 0x01, 0x73, 0xc7, 0xba, 0xb7,
  4142. 0xd9, 0xf8, 0x3a, 0x4d, 0x4b, 0x7d, 0x15, 0x23, 0xba, 0x0a, 0x80, 0x04, 0x38, 0xc7, 0x01, 0x71,
  4143. 0xc7, 0x81, 0x2f, 0xd4, 0xfb, 0x33, 0xf5, 0xd8, 0x50, 0xed, 0x49, 0xe5, 0x76, 0x78, 0x4e, 0xb5,
  4144. 0x5a, 0x9d, 0x35, 0x37, 0xf5, 0x74, 0x11, 0xfd, 0x50, 0xf2, 0x39, 0x7e, 0xf3, 0x38, 0x7b, 0x15,
  4145. 0x75, 0xa0, 0x32, 0x0d, 0x55, 0xf8, 0xb8, 0x06, 0xe5, 0x8b, 0xd6, 0x00, 0x62, 0x96, 0xda, 0x79,
  4146. 0x6d, 0x06, 0xfb, 0xe7, 0x05, 0x47, 0xaf, 0x41, 0x7e, 0x4c, 0xe7, 0xb1, 0x7f, 0xb0, 0x1a, 0xa2,
  4147. 0xcf, 0x61, 0x67, 0x46, 0x82, 0x29, 0x35, 0xce, 0x79, 0x3f, 0x2b, 0x5e, 0xb6, 0x24, 0x8e, 0x89,
  4148. 0x9f, 0xe4, 0x0e, 0xad, 0xe6, 0xaf, 0x16, 0x14, 0x9e, 0x50, 0x97, 0x53, 0xf9, 0x4a, 0x1d, 0x7a,
  4149. 0x78, 0xc6, 0xa1, 0xf5, 0xec, 0xc7, 0x8b, 0x8a, 0xba, 0x61, 0xd0, 0x1a, 0x94, 0xfc, 0x50, 0x52,
  4150. 0x1e, 0x92, 0x40, 0x3b, 0xb4, 0x84, 0x57, 0xf3, 0xce, 0xfe, 0xc9, 0x69, 0xfd, 0xca, 0x5f, 0xa7,
  4151. 0xf5, 0x2b, 0xff, 0x9e, 0xd6, 0xad, 0x1f, 0x96, 0x75, 0xeb, 0x64, 0x59, 0xb7, 0xfe, 0x58, 0xd6,
  4152. 0xad, 0xbf, 0x97, 0x75, 0xeb, 0xb8, 0xa0, 0xff, 0x02, 0x7d, 0xf8, 0x5f, 0x00, 0x00, 0x00, 0xff,
  4153. 0xff, 0x38, 0xf8, 0x23, 0xac, 0x72, 0x0d, 0x00, 0x00,
  4154. }