Class: Google::Apis::BatchV1::AgentTaskSpec

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

AgentTaskSpec is the user's TaskSpec representation between Agent and CLH communication.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AgentTaskSpec

Returns a new instance of AgentTaskSpec.



523
524
525
# File 'lib/google/apis/batch_v1/classes.rb', line 523

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

Instance Attribute Details

#environmentGoogle::Apis::BatchV1::AgentEnvironment

AgentEnvironment is the Environment representation between Agent and CLH communication. The environment is used in both task level and agent level. Corresponds to the JSON property environment



510
511
512
# File 'lib/google/apis/batch_v1/classes.rb', line 510

def environment
  @environment
end

#max_run_durationString

Maximum duration the task should run. The task will be killed and marked as FAILED if over this limit. Corresponds to the JSON property maxRunDuration

Returns:

  • (String)


516
517
518
# File 'lib/google/apis/batch_v1/classes.rb', line 516

def max_run_duration
  @max_run_duration
end

#runnablesArray<Google::Apis::BatchV1::AgentTaskRunnable>

AgentTaskRunnable is runanbles that will be executed on the agent. Corresponds to the JSON property runnables



521
522
523
# File 'lib/google/apis/batch_v1/classes.rb', line 521

def runnables
  @runnables
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



528
529
530
531
532
# File 'lib/google/apis/batch_v1/classes.rb', line 528

def update!(**args)
  @environment = args[:environment] if args.key?(:environment)
  @max_run_duration = args[:max_run_duration] if args.key?(:max_run_duration)
  @runnables = args[:runnables] if args.key?(:runnables)
end