Class: DockerEngineAPI::Models::Task

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_api/models/task.rb

Overview

Defined Under Namespace

Modules: DesiredState Classes: AssignedGenericResource, JobIteration, Status, Version

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(index: nil) ⇒ Object

The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects.

This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other.

Parameters:

  • index (Integer) (defaults to: nil)


# File 'lib/docker_engine_api/models/task.rb', line 188


Instance Attribute Details

#assigned_generic_resourcesArray<DockerEngineAPI::Models::Task::AssignedGenericResource>?

User-defined resources can be either Integer resources (e.g, ‘SSD=3`) or String resources (e.g, `GPU=UUID1`).



12
13
14
15
16
# File 'lib/docker_engine_api/models/task.rb', line 12

optional :assigned_generic_resources,
-> {
  DockerEngineAPI::Internal::Type::ArrayOf[DockerEngineAPI::Task::AssignedGenericResource]
},
api_name: :AssignedGenericResources

#created_atString?

Returns:

  • (String, nil)


21
# File 'lib/docker_engine_api/models/task.rb', line 21

optional :created_at, String, api_name: :CreatedAt

#desired_stateSymbol, ...



26
# File 'lib/docker_engine_api/models/task.rb', line 26

optional :desired_state, enum: -> { DockerEngineAPI::Task::DesiredState }, api_name: :DesiredState

#idString?

The ID of the task.

Returns:

  • (String, nil)


32
# File 'lib/docker_engine_api/models/task.rb', line 32

optional :id, String, api_name: :ID

#job_iterationDockerEngineAPI::Models::Task::JobIteration?

The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects.

This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other.



46
# File 'lib/docker_engine_api/models/task.rb', line 46

optional :job_iteration, -> { DockerEngineAPI::Task::JobIteration }, api_name: :JobIteration

#labelsHash{Symbol=>String}?

User-defined key/value metadata.

Returns:

  • (Hash{Symbol=>String}, nil)


52
# File 'lib/docker_engine_api/models/task.rb', line 52

optional :labels, DockerEngineAPI::Internal::Type::HashOf[String], api_name: :Labels

#nameString?

Name of the task.

Returns:

  • (String, nil)


58
# File 'lib/docker_engine_api/models/task.rb', line 58

optional :name, String, api_name: :Name

#node_idString?

The ID of the node that this task is on.

Returns:

  • (String, nil)


64
# File 'lib/docker_engine_api/models/task.rb', line 64

optional :node_id, String, api_name: :NodeID

#service_idString?

The ID of the service this task is part of.

Returns:

  • (String, nil)


70
# File 'lib/docker_engine_api/models/task.rb', line 70

optional :service_id, String, api_name: :ServiceID

#slotInteger?

Returns:

  • (Integer, nil)


75
# File 'lib/docker_engine_api/models/task.rb', line 75

optional :slot, Integer, api_name: :Slot

#specDockerEngineAPI::Models::Spec?

User modifiable task configuration.



81
# File 'lib/docker_engine_api/models/task.rb', line 81

optional :spec, -> { DockerEngineAPI::Spec }, api_name: :Spec

#statusDockerEngineAPI::Models::Task::Status?

represents the status of a task.



87
# File 'lib/docker_engine_api/models/task.rb', line 87

optional :status, -> { DockerEngineAPI::Task::Status }, api_name: :Status

#updated_atString?

Returns:

  • (String, nil)


92
# File 'lib/docker_engine_api/models/task.rb', line 92

optional :updated_at, String, api_name: :UpdatedAt

#versionDockerEngineAPI::Models::Task::Version?

The version number of the object such as node, service, etc. This is needed to avoid conflicting writes. The client must send the version number along with the modified specification when updating these objects.

This approach ensures safe concurrency and determinism in that the change on the object may not be applied if the version number has changed from the last read. In other words, if two update requests specify the same base version, only one of the requests can succeed. As a result, two separate update requests that happen at the same time will not unintentionally overwrite each other.



106
# File 'lib/docker_engine_api/models/task.rb', line 106

optional :version, -> { DockerEngineAPI::Task::Version }, api_name: :Version

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine_api/models/task.rb', line 214