Class: DockerEngineRuby::Models::Task::AssignedGenericResource

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

Defined Under Namespace

Classes: DiscreteResourceSpec, NamedResourceSpec

Instance Attribute 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(kind: nil, value: nil) ⇒ Object

Parameters:

  • kind (String) (defaults to: nil)
  • value (Integer) (defaults to: nil)


138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# File 'lib/docker_engine_ruby/models/task.rb', line 138

class AssignedGenericResource < DockerEngineRuby::Internal::Type::BaseModel
  # @!attribute discrete_resource_spec
  #
  #   @return [DockerEngineRuby::Models::Task::AssignedGenericResource::DiscreteResourceSpec, nil]
  optional :discrete_resource_spec,
           -> { DockerEngineRuby::Task::AssignedGenericResource::DiscreteResourceSpec },
           api_name: :DiscreteResourceSpec

  # @!attribute named_resource_spec
  #
  #   @return [DockerEngineRuby::Models::Task::AssignedGenericResource::NamedResourceSpec, nil]
  optional :named_resource_spec,
           -> { DockerEngineRuby::Task::AssignedGenericResource::NamedResourceSpec },
           api_name: :NamedResourceSpec

  # @!method initialize(discrete_resource_spec: nil, named_resource_spec: nil)
  #   @param discrete_resource_spec [DockerEngineRuby::Models::Task::AssignedGenericResource::DiscreteResourceSpec]
  #   @param named_resource_spec [DockerEngineRuby::Models::Task::AssignedGenericResource::NamedResourceSpec]

  # @see DockerEngineRuby::Models::Task::AssignedGenericResource#discrete_resource_spec
  class DiscreteResourceSpec < DockerEngineRuby::Internal::Type::BaseModel
    # @!attribute kind
    #
    #   @return [String, nil]
    optional :kind, String, api_name: :Kind

    # @!attribute value
    #
    #   @return [Integer, nil]
    optional :value, Integer, api_name: :Value

    # @!method initialize(kind: nil, value: nil)
    #   @param kind [String]
    #   @param value [Integer]
  end

  # @see DockerEngineRuby::Models::Task::AssignedGenericResource#named_resource_spec
  class NamedResourceSpec < DockerEngineRuby::Internal::Type::BaseModel
    # @!attribute kind
    #
    #   @return [String, nil]
    optional :kind, String, api_name: :Kind

    # @!attribute value
    #
    #   @return [String, nil]
    optional :value, String, api_name: :Value

    # @!method initialize(kind: nil, value: nil)
    #   @param kind [String]
    #   @param value [String]
  end
end

Instance Attribute Details

#discrete_resource_specDockerEngineRuby::Models::Task::AssignedGenericResource::DiscreteResourceSpec?



142
143
144
# File 'lib/docker_engine_ruby/models/task.rb', line 142

optional :discrete_resource_spec,
-> { DockerEngineRuby::Task::AssignedGenericResource::DiscreteResourceSpec },
api_name: :DiscreteResourceSpec

#named_resource_specDockerEngineRuby::Models::Task::AssignedGenericResource::NamedResourceSpec?



149
150
151
# File 'lib/docker_engine_ruby/models/task.rb', line 149

optional :named_resource_spec,
-> { DockerEngineRuby::Task::AssignedGenericResource::NamedResourceSpec },
api_name: :NamedResourceSpec