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.



391
392
393
# File 'lib/google/apis/batch_v1/classes.rb', line 391

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

Instance Attribute Details

#agent_task_specGoogle::Apis::BatchV1::AgentTaskSpec

AgentTaskSpec is the user's TaskSpec representation between Agent and CLH communication. Corresponds to the JSON property agentTaskSpec



359
360
361
# File 'lib/google/apis/batch_v1/classes.rb', line 359

def agent_task_spec
  @agent_task_spec
end

#intended_stateString

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

Returns:

  • (String)


364
365
366
# File 'lib/google/apis/batch_v1/classes.rb', line 364

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)


369
370
371
# File 'lib/google/apis/batch_v1/classes.rb', line 369

def reached_barrier
  @reached_barrier
end

#specGoogle::Apis::BatchV1::TaskSpec

Spec of a task Corresponds to the JSON property spec



374
375
376
# File 'lib/google/apis/batch_v1/classes.rb', line 374

def spec
  @spec
end

#statusGoogle::Apis::BatchV1::TaskStatus

Status of a task. Corresponds to the JSON property status



379
380
381
# File 'lib/google/apis/batch_v1/classes.rb', line 379

def status
  @status
end

#taskString

Task name. Corresponds to the JSON property task

Returns:

  • (String)


384
385
386
# File 'lib/google/apis/batch_v1/classes.rb', line 384

def task
  @task
end

#task_sourceString

TaskSource represents the source of the task. Corresponds to the JSON property taskSource

Returns:

  • (String)


389
390
391
# File 'lib/google/apis/batch_v1/classes.rb', line 389

def task_source
  @task_source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



396
397
398
399
400
401
402
403
404
# File 'lib/google/apis/batch_v1/classes.rb', line 396

def update!(**args)
  @agent_task_spec = args[:agent_task_spec] if args.key?(:agent_task_spec)
  @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)
  @task_source = args[:task_source] if args.key?(:task_source)
end