Class: Google::Apis::BatchV1::AgentTask

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/batch_v1/classes.rb,
lib/google/apis/batch_v1/representations.rb,
lib/google/apis/batch_v1/representations.rb

Overview

TODO(b/182501497) The message needs to be redefined when the Agent API server updates data in storage per the backend design.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AgentTask

Returns a new instance of AgentTask.



209
210
211
# File 'lib/google/apis/batch_v1/classes.rb', line 209

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#intended_stateString

The intended state of the task. Corresponds to the JSON property intendedState

Returns:

  • (String)


187
188
189
# File 'lib/google/apis/batch_v1/classes.rb', line 187

def intended_state
  @intended_state
end

#reached_barrierFixnum

The highest barrier reached by all tasks in the task's TaskGroup. Corresponds to the JSON property reachedBarrier

Returns:

  • (Fixnum)


192
193
194
# File 'lib/google/apis/batch_v1/classes.rb', line 192

def reached_barrier
  @reached_barrier
end

#specGoogle::Apis::BatchV1::TaskSpec

Spec of a task Corresponds to the JSON property spec



197
198
199
# File 'lib/google/apis/batch_v1/classes.rb', line 197

def spec
  @spec
end

#statusGoogle::Apis::BatchV1::TaskStatus

Status of a task Corresponds to the JSON property status



202
203
204
# File 'lib/google/apis/batch_v1/classes.rb', line 202

def status
  @status
end

#taskString

Task name. Corresponds to the JSON property task

Returns:

  • (String)


207
208
209
# File 'lib/google/apis/batch_v1/classes.rb', line 207

def task
  @task
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



214
215
216
217
218
219
220
# File 'lib/google/apis/batch_v1/classes.rb', line 214

def update!(**args)
  @intended_state = args[:intended_state] if args.key?(:intended_state)
  @reached_barrier = args[:reached_barrier] if args.key?(:reached_barrier)
  @spec = args[:spec] if args.key?(:spec)
  @status = args[:status] if args.key?(:status)
  @task = args[:task] if args.key?(:task)
end