github.com/kaisenlinux/docker.io@v0.0.0-20230510090727-ea55db55fac7/swarmkit/api/specs.pb.go (about)

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