Class: Google::Apis::BatchV1::LifecyclePolicy

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

LifecyclePolicy describes how to deal with task failures based on different conditions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ LifecyclePolicy

Returns a new instance of LifecyclePolicy.



1104
1105
1106
# File 'lib/google/apis/batch_v1/classes.rb', line 1104

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

Instance Attribute Details

#actionString

Action to execute when ActionCondition is true. Corresponds to the JSON property action

Returns:

  • (String)


1097
1098
1099
# File 'lib/google/apis/batch_v1/classes.rb', line 1097

def action
  @action
end

#action_conditionGoogle::Apis::BatchV1::ActionCondition

Conditions for actions to deal with task failures. Corresponds to the JSON property actionCondition



1102
1103
1104
# File 'lib/google/apis/batch_v1/classes.rb', line 1102

def action_condition
  @action_condition
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1109
1110
1111
1112
# File 'lib/google/apis/batch_v1/classes.rb', line 1109

def update!(**args)
  @action = args[:action] if args.key?(:action)
  @action_condition = args[:action_condition] if args.key?(:action_condition)
end