Class LifecyclePolicy.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<LifecyclePolicy.Builder>
com.google.cloud.batch.v1alpha.LifecyclePolicy.Builder
All Implemented Interfaces:
LifecyclePolicyOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
LifecyclePolicy

public static final class LifecyclePolicy.Builder extends com.google.protobuf.GeneratedMessage.Builder<LifecyclePolicy.Builder> implements LifecyclePolicyOrBuilder
 LifecyclePolicy describes how to deal with task failures
 based on different conditions.
 
Protobuf type google.cloud.batch.v1alpha.LifecyclePolicy
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LifecyclePolicy.Builder>
    • clear

      public LifecyclePolicy.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<LifecyclePolicy.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<LifecyclePolicy.Builder>
    • getDefaultInstanceForType

      public LifecyclePolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public LifecyclePolicy build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public LifecyclePolicy buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public LifecyclePolicy.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LifecyclePolicy.Builder>
    • mergeFrom

      public LifecyclePolicy.Builder mergeFrom(LifecyclePolicy other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<LifecyclePolicy.Builder>
    • mergeFrom

      public LifecyclePolicy.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LifecyclePolicy.Builder>
      Throws:
      IOException
    • 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.v1alpha.LifecyclePolicy.Action action = 1;
      Specified by:
      getActionValue in interface LifecyclePolicyOrBuilder
      Returns:
      The enum numeric value on the wire for action.
    • setActionValue

      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.v1alpha.LifecyclePolicy.Action action = 1;
      Parameters:
      value - The enum numeric value on the wire for action to set.
      Returns:
      This builder for chaining.
    • 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.v1alpha.LifecyclePolicy.Action action = 1;
      Specified by:
      getAction in interface LifecyclePolicyOrBuilder
      Returns:
      The action.
    • setAction

       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.v1alpha.LifecyclePolicy.Action action = 1;
      Parameters:
      value - The action to set.
      Returns:
      This builder for chaining.
    • 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.v1alpha.LifecyclePolicy.Action action = 1;
      Returns:
      This builder for chaining.
    • hasActionCondition

      public boolean hasActionCondition()
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
      Specified by:
      hasActionCondition in interface LifecyclePolicyOrBuilder
      Returns:
      Whether the actionCondition field is set.
    • getActionCondition

      public LifecyclePolicy.ActionCondition getActionCondition()
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
      Specified by:
      getActionCondition in interface LifecyclePolicyOrBuilder
      Returns:
      The actionCondition.
    • setActionCondition

      public LifecyclePolicy.Builder setActionCondition(LifecyclePolicy.ActionCondition value)
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
    • setActionCondition

      public LifecyclePolicy.Builder setActionCondition(LifecyclePolicy.ActionCondition.Builder builderForValue)
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
    • mergeActionCondition

      public LifecyclePolicy.Builder mergeActionCondition(LifecyclePolicy.ActionCondition value)
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
    • clearActionCondition

      public LifecyclePolicy.Builder clearActionCondition()
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
    • getActionConditionBuilder

      public LifecyclePolicy.ActionCondition.Builder getActionConditionBuilder()
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
    • getActionConditionOrBuilder

      public LifecyclePolicy.ActionConditionOrBuilder getActionConditionOrBuilder()
       Conditions that decide why a task failure is dealt with a specific action.
       
      .google.cloud.batch.v1alpha.LifecyclePolicy.ActionCondition action_condition = 2;
      Specified by:
      getActionConditionOrBuilder in interface LifecyclePolicyOrBuilder