/// <summary> /// Initializes a new instance of the <see cref="ServiceSpec" /> class. /// </summary> /// <param name="name">Name of the service..</param> /// <param name="labels">User-defined key/value metadata..</param> /// <param name="taskTemplate">taskTemplate.</param> /// <param name="mode">mode.</param> /// <param name="updateConfig">updateConfig.</param> /// <param name="rollbackConfig">rollbackConfig.</param> /// <param name="networks">Array of network names or IDs to attach the service to..</param> /// <param name="endpointSpec">endpointSpec.</param> public ServiceSpec(string name = default(string), Dictionary <string, string> labels = default(Dictionary <string, string>), TaskSpec taskTemplate = default(TaskSpec), ServiceSpecMode mode = default(ServiceSpecMode), ServiceSpecUpdateConfig updateConfig = default(ServiceSpecUpdateConfig), ServiceSpecRollbackConfig rollbackConfig = default(ServiceSpecRollbackConfig), List <TaskSpecNetworks> networks = default(List <TaskSpecNetworks>), EndpointSpec endpointSpec = default(EndpointSpec)) { this.Name = name; this.Labels = labels; this.TaskTemplate = taskTemplate; this.Mode = mode; this.UpdateConfig = updateConfig; this.RollbackConfig = rollbackConfig; this.Networks = networks; this.EndpointSpec = endpointSpec; }
/// <summary> /// Initializes a new instance of the <see cref="Task" /> class. /// </summary> /// <param name="iD">The ID of the task..</param> /// <param name="version">version.</param> /// <param name="createdAt">createdAt.</param> /// <param name="updatedAt">updatedAt.</param> /// <param name="name">Name of the task..</param> /// <param name="labels">User-defined key/value metadata..</param> /// <param name="spec">spec.</param> /// <param name="serviceID">The ID of the service this task is part of..</param> /// <param name="slot">slot.</param> /// <param name="nodeID">The ID of the node that this task is on..</param> /// <param name="assignedGenericResources">assignedGenericResources.</param> /// <param name="status">status.</param> /// <param name="desiredState">desiredState.</param> public Task(string iD = default(string), ObjectVersion version = default(ObjectVersion), string createdAt = default(string), string updatedAt = default(string), string name = default(string), Dictionary <string, string> labels = default(Dictionary <string, string>), TaskSpec spec = default(TaskSpec), string serviceID = default(string), int?slot = default(int?), string nodeID = default(string), GenericResources assignedGenericResources = default(GenericResources), TaskStatus status = default(TaskStatus), TaskState?desiredState = default(TaskState?)) { this.ID = iD; this.Version = version; this.CreatedAt = createdAt; this.UpdatedAt = updatedAt; this.Name = name; this.Labels = labels; this.Spec = spec; this.ServiceID = serviceID; this.Slot = slot; this.NodeID = nodeID; this.AssignedGenericResources = assignedGenericResources; this.Status = status; this.DesiredState = desiredState; }