Class: DockerEngineRuby::Models::Task

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/docker_engine_ruby/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_ruby/models/task.rb', line 186


Instance Attribute Details

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



10
11
12
13
14
# File 'lib/docker_engine_ruby/models/task.rb', line 10

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

#created_atTime?

Returns:

  • (Time, nil)


19
# File 'lib/docker_engine_ruby/models/task.rb', line 19

optional :created_at, Time, api_name: :CreatedAt

#desired_stateSymbol, ...



24
# File 'lib/docker_engine_ruby/models/task.rb', line 24

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

#idString?

The ID of the task.

Returns:

  • (String, nil)


30
# File 'lib/docker_engine_ruby/models/task.rb', line 30

optional :id, String, api_name: :ID

#job_iterationDockerEngineRuby::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.



44
# File 'lib/docker_engine_ruby/models/task.rb', line 44

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

#labelsHash{Symbol=>String}?

User-defined key/value metadata.

Returns:

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


50
# File 'lib/docker_engine_ruby/models/task.rb', line 50

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

#nameString?

Name of the task.

Returns:

  • (String, nil)


56
# File 'lib/docker_engine_ruby/models/task.rb', line 56

optional :name, String, api_name: :Name

#node_idString?

The ID of the node that this task is on.

Returns:

  • (String, nil)


62
# File 'lib/docker_engine_ruby/models/task.rb', line 62

optional :node_id, String, api_name: :NodeID

#service_idString?

The ID of the service this task is part of.

Returns:

  • (String, nil)


68
# File 'lib/docker_engine_ruby/models/task.rb', line 68

optional :service_id, String, api_name: :ServiceID

#slotInteger?

Returns:

  • (Integer, nil)


73
# File 'lib/docker_engine_ruby/models/task.rb', line 73

optional :slot, Integer, api_name: :Slot

#specDockerEngineRuby::Models::TaskSpec?

User modifiable task configuration.



79
# File 'lib/docker_engine_ruby/models/task.rb', line 79

optional :spec, -> { DockerEngineRuby::TaskSpec }, api_name: :Spec

#statusDockerEngineRuby::Models::Task::Status?

represents the status of a task.



85
# File 'lib/docker_engine_ruby/models/task.rb', line 85

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

#updated_atTime?

Returns:

  • (Time, nil)


90
# File 'lib/docker_engine_ruby/models/task.rb', line 90

optional :updated_at, Time, api_name: :UpdatedAt

#versionDockerEngineRuby::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.



104
# File 'lib/docker_engine_ruby/models/task.rb', line 104

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/docker_engine_ruby/models/task.rb', line 212