Class Runnable

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.batch.v1alpha.Runnable
All Implemented Interfaces:
RunnableOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Runnable extends com.google.protobuf.GeneratedMessage implements RunnableOrBuilder
 Runnable describes instructions for executing a specific script or container
 as part of a Task.
 
Protobuf type google.cloud.batch.v1alpha.Runnable
See Also:
  • Field Details

    • CONTAINER_FIELD_NUMBER

      public static final int CONTAINER_FIELD_NUMBER
      See Also:
    • SCRIPT_FIELD_NUMBER

      public static final int SCRIPT_FIELD_NUMBER
      See Also:
    • BARRIER_FIELD_NUMBER

      public static final int BARRIER_FIELD_NUMBER
      See Also:
    • DISPLAY_NAME_FIELD_NUMBER

      public static final int DISPLAY_NAME_FIELD_NUMBER
      See Also:
    • IGNORE_EXIT_STATUS_FIELD_NUMBER

      public static final int IGNORE_EXIT_STATUS_FIELD_NUMBER
      See Also:
    • BACKGROUND_FIELD_NUMBER

      public static final int BACKGROUND_FIELD_NUMBER
      See Also:
    • ALWAYS_RUN_FIELD_NUMBER

      public static final int ALWAYS_RUN_FIELD_NUMBER
      See Also:
    • ENVIRONMENT_FIELD_NUMBER

      public static final int ENVIRONMENT_FIELD_NUMBER
      See Also:
    • TIMEOUT_FIELD_NUMBER

      public static final int TIMEOUT_FIELD_NUMBER
      See Also:
    • LABELS_FIELD_NUMBER

      public static final int LABELS_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getExecutableCase

      public Runnable.ExecutableCase getExecutableCase()
      Specified by:
      getExecutableCase in interface RunnableOrBuilder
    • hasContainer

      public boolean hasContainer()
       Container runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Container container = 1;
      Specified by:
      hasContainer in interface RunnableOrBuilder
      Returns:
      Whether the container field is set.
    • getContainer

      public Runnable.Container getContainer()
       Container runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Container container = 1;
      Specified by:
      getContainer in interface RunnableOrBuilder
      Returns:
      The container.
    • getContainerOrBuilder

      public Runnable.ContainerOrBuilder getContainerOrBuilder()
       Container runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Container container = 1;
      Specified by:
      getContainerOrBuilder in interface RunnableOrBuilder
    • hasScript

      public boolean hasScript()
       Script runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Script script = 2;
      Specified by:
      hasScript in interface RunnableOrBuilder
      Returns:
      Whether the script field is set.
    • getScript

      public Runnable.Script getScript()
       Script runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Script script = 2;
      Specified by:
      getScript in interface RunnableOrBuilder
      Returns:
      The script.
    • getScriptOrBuilder

      public Runnable.ScriptOrBuilder getScriptOrBuilder()
       Script runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Script script = 2;
      Specified by:
      getScriptOrBuilder in interface RunnableOrBuilder
    • hasBarrier

      public boolean hasBarrier()
       Barrier runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
      Specified by:
      hasBarrier in interface RunnableOrBuilder
      Returns:
      Whether the barrier field is set.
    • getBarrier

      public Runnable.Barrier getBarrier()
       Barrier runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
      Specified by:
      getBarrier in interface RunnableOrBuilder
      Returns:
      The barrier.
    • getBarrierOrBuilder

      public Runnable.BarrierOrBuilder getBarrierOrBuilder()
       Barrier runnable.
       
      .google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
      Specified by:
      getBarrierOrBuilder in interface RunnableOrBuilder
    • getDisplayName

      public String getDisplayName()
       Optional. DisplayName is an optional field that can be provided by the
       caller. If provided, it will be used in logs and other outputs to identify
       the script, making it easier for users to understand the logs. If not
       provided the index of the runnable will be used for outputs.
       
      string display_name = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisplayName in interface RunnableOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Optional. DisplayName is an optional field that can be provided by the
       caller. If provided, it will be used in logs and other outputs to identify
       the script, making it easier for users to understand the logs. If not
       provided the index of the runnable will be used for outputs.
       
      string display_name = 10 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisplayNameBytes in interface RunnableOrBuilder
      Returns:
      The bytes for displayName.
    • getIgnoreExitStatus

      public boolean getIgnoreExitStatus()
       Normally, a runnable that returns a non-zero exit status fails and causes
       the task to fail. However, you can set this field to `true` to allow the
       task to continue executing its other runnables even if this runnable
       fails.
       
      bool ignore_exit_status = 3;
      Specified by:
      getIgnoreExitStatus in interface RunnableOrBuilder
      Returns:
      The ignoreExitStatus.
    • getBackground

      public boolean getBackground()
       Normally, a runnable that doesn't exit causes its task to fail. However,
       you can set this field to `true` to configure a background runnable.
       Background runnables are allowed continue running in the background while
       the task executes subsequent runnables. For example, background runnables
       are useful for providing services to other runnables or providing
       debugging-support tools like SSH servers.
      
       Specifically, background runnables are killed automatically (if they have
       not already exited) a short time after all foreground runnables have
       completed. Even though this is likely to result in a non-zero exit status
       for the background runnable, these automatic kills are not treated as task
       failures.
       
      bool background = 4;
      Specified by:
      getBackground in interface RunnableOrBuilder
      Returns:
      The background.
    • getAlwaysRun

      public boolean getAlwaysRun()
       By default, after a Runnable fails, no further Runnable are executed. This
       flag indicates that this Runnable must be run even if the Task has already
       failed. This is useful for Runnables that copy output files off of the VM
       or for debugging.
      
       The always_run flag does not override the Task's overall max_run_duration.
       If the max_run_duration has expired then no further Runnables will execute,
       not even always_run Runnables.
       
      bool always_run = 5;
      Specified by:
      getAlwaysRun in interface RunnableOrBuilder
      Returns:
      The alwaysRun.
    • hasEnvironment

      public boolean hasEnvironment()
       Environment variables for this Runnable (overrides variables set for the
       whole Task or TaskGroup).
       
      .google.cloud.batch.v1alpha.Environment environment = 7;
      Specified by:
      hasEnvironment in interface RunnableOrBuilder
      Returns:
      Whether the environment field is set.
    • getEnvironment

      public Environment getEnvironment()
       Environment variables for this Runnable (overrides variables set for the
       whole Task or TaskGroup).
       
      .google.cloud.batch.v1alpha.Environment environment = 7;
      Specified by:
      getEnvironment in interface RunnableOrBuilder
      Returns:
      The environment.
    • getEnvironmentOrBuilder

      public EnvironmentOrBuilder getEnvironmentOrBuilder()
       Environment variables for this Runnable (overrides variables set for the
       whole Task or TaskGroup).
       
      .google.cloud.batch.v1alpha.Environment environment = 7;
      Specified by:
      getEnvironmentOrBuilder in interface RunnableOrBuilder
    • hasTimeout

      public boolean hasTimeout()
       Timeout for this Runnable.
       
      .google.protobuf.Duration timeout = 8;
      Specified by:
      hasTimeout in interface RunnableOrBuilder
      Returns:
      Whether the timeout field is set.
    • getTimeout

      public com.google.protobuf.Duration getTimeout()
       Timeout for this Runnable.
       
      .google.protobuf.Duration timeout = 8;
      Specified by:
      getTimeout in interface RunnableOrBuilder
      Returns:
      The timeout.
    • getTimeoutOrBuilder

      public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
       Timeout for this Runnable.
       
      .google.protobuf.Duration timeout = 8;
      Specified by:
      getTimeoutOrBuilder in interface RunnableOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: RunnableOrBuilder
       Labels for this Runnable.
       
      map<string, string> labels = 9;
      Specified by:
      getLabelsCount in interface RunnableOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels for this Runnable.
       
      map<string, string> labels = 9;
      Specified by:
      containsLabels in interface RunnableOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface RunnableOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels for this Runnable.
       
      map<string, string> labels = 9;
      Specified by:
      getLabelsMap in interface RunnableOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels for this Runnable.
       
      map<string, string> labels = 9;
      Specified by:
      getLabelsOrDefault in interface RunnableOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels for this Runnable.
       
      map<string, string> labels = 9;
      Specified by:
      getLabelsOrThrow in interface RunnableOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Runnable parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Runnable parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Runnable parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Runnable parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Runnable parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Runnable parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Runnable parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Runnable parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Runnable parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Runnable parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Runnable parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Runnable parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Runnable.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Runnable.Builder newBuilder()
    • newBuilder

      public static Runnable.Builder newBuilder(Runnable prototype)
    • toBuilder

      public Runnable.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Runnable.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Runnable getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Runnable> parser()
    • getParserForType

      public com.google.protobuf.Parser<Runnable> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Runnable getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder