Class LifecyclePolicy.Builder (0.36.0)

public static final class LifecyclePolicy.Builder extends GeneratedMessageV3.Builder<LifecyclePolicy.Builder> implements LifecyclePolicyOrBuilder

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

Protobuf type google.cloud.batch.v1.LifecyclePolicy

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LifecyclePolicy.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LifecyclePolicy.Builder
Overrides

build()

public LifecyclePolicy build()
Returns
Type Description
LifecyclePolicy

buildPartial()

public LifecyclePolicy buildPartial()
Returns
Type Description
LifecyclePolicy

clear()

public LifecyclePolicy.Builder clear()
Returns
Type Description
LifecyclePolicy.Builder
Overrides

clearAction()

public LifecyclePolicy.Builder clearAction()

Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.

.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;

Returns
Type Description
LifecyclePolicy.Builder

This builder for chaining.

clearActionCondition()

public LifecyclePolicy.Builder clearActionCondition()

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Returns
Type Description
LifecyclePolicy.Builder

clearField(Descriptors.FieldDescriptor field)

public LifecyclePolicy.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
LifecyclePolicy.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public LifecyclePolicy.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
LifecyclePolicy.Builder
Overrides

clone()

public LifecyclePolicy.Builder clone()
Returns
Type Description
LifecyclePolicy.Builder
Overrides

getAction()

public LifecyclePolicy.Action getAction()

Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.

.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;

Returns
Type Description
LifecyclePolicy.Action

The action.

getActionCondition()

public LifecyclePolicy.ActionCondition getActionCondition()

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Returns
Type Description
LifecyclePolicy.ActionCondition

The actionCondition.

getActionConditionBuilder()

public LifecyclePolicy.ActionCondition.Builder getActionConditionBuilder()

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Returns
Type Description
LifecyclePolicy.ActionCondition.Builder

getActionConditionOrBuilder()

public LifecyclePolicy.ActionConditionOrBuilder getActionConditionOrBuilder()

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Returns
Type Description
LifecyclePolicy.ActionConditionOrBuilder

getActionValue()

public int getActionValue()

Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.

.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;

Returns
Type Description
int

The enum numeric value on the wire for action.

getDefaultInstanceForType()

public LifecyclePolicy getDefaultInstanceForType()
Returns
Type Description
LifecyclePolicy

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

hasActionCondition()

public boolean hasActionCondition()

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Returns
Type Description
boolean

Whether the actionCondition field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeActionCondition(LifecyclePolicy.ActionCondition value)

public LifecyclePolicy.Builder mergeActionCondition(LifecyclePolicy.ActionCondition value)

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Parameter
Name Description
value LifecyclePolicy.ActionCondition
Returns
Type Description
LifecyclePolicy.Builder

mergeFrom(LifecyclePolicy other)

public LifecyclePolicy.Builder mergeFrom(LifecyclePolicy other)
Parameter
Name Description
other LifecyclePolicy
Returns
Type Description
LifecyclePolicy.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public LifecyclePolicy.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LifecyclePolicy.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public LifecyclePolicy.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
LifecyclePolicy.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LifecyclePolicy.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LifecyclePolicy.Builder
Overrides

setAction(LifecyclePolicy.Action value)

public LifecyclePolicy.Builder setAction(LifecyclePolicy.Action value)

Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.

.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;

Parameter
Name Description
value LifecyclePolicy.Action

The action to set.

Returns
Type Description
LifecyclePolicy.Builder

This builder for chaining.

setActionCondition(LifecyclePolicy.ActionCondition value)

public LifecyclePolicy.Builder setActionCondition(LifecyclePolicy.ActionCondition value)

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Parameter
Name Description
value LifecyclePolicy.ActionCondition
Returns
Type Description
LifecyclePolicy.Builder

setActionCondition(LifecyclePolicy.ActionCondition.Builder builderForValue)

public LifecyclePolicy.Builder setActionCondition(LifecyclePolicy.ActionCondition.Builder builderForValue)

Conditions that decide why a task failure is dealt with a specific action.

.google.cloud.batch.v1.LifecyclePolicy.ActionCondition action_condition = 2;

Parameter
Name Description
builderForValue LifecyclePolicy.ActionCondition.Builder
Returns
Type Description
LifecyclePolicy.Builder

setActionValue(int value)

public LifecyclePolicy.Builder setActionValue(int value)

Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.

.google.cloud.batch.v1.LifecyclePolicy.Action action = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for action to set.

Returns
Type Description
LifecyclePolicy.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public LifecyclePolicy.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LifecyclePolicy.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public LifecyclePolicy.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
LifecyclePolicy.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final LifecyclePolicy.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LifecyclePolicy.Builder
Overrides