Class Runnable.Builder

  • All Implemented Interfaces:
    RunnableOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    Runnable

    public static final class Runnable.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
    implements RunnableOrBuilder
     Runnable describes instructions for executing a specific script or container
     as part of a Task.
     
    Protobuf type google.cloud.batch.v1.Runnable
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • internalGetFieldAccessorTable

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

        public Runnable.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.GeneratedMessageV3.Builder<Runnable.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.GeneratedMessageV3.Builder<Runnable.Builder>
      • getDefaultInstanceForType

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

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

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

        public Runnable.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • setField

        public Runnable.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                         Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • clearField

        public Runnable.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • clearOneof

        public Runnable.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • setRepeatedField

        public Runnable.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 int index,
                                                 Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • addRepeatedField

        public Runnable.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • mergeFrom

        public Runnable.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<Runnable.Builder>
      • isInitialized

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

        public Runnable.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<Runnable.Builder>
        Throws:
        IOException
      • hasContainer

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

        public Runnable.Builder clearContainer()
         Container runnable.
         
        .google.cloud.batch.v1.Runnable.Container container = 1;
      • getContainerBuilder

        public Runnable.Container.Builder getContainerBuilder()
         Container runnable.
         
        .google.cloud.batch.v1.Runnable.Container container = 1;
      • hasScript

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

        public Runnable.Builder clearScript()
         Script runnable.
         
        .google.cloud.batch.v1.Runnable.Script script = 2;
      • getScriptBuilder

        public Runnable.Script.Builder getScriptBuilder()
         Script runnable.
         
        .google.cloud.batch.v1.Runnable.Script script = 2;
      • hasBarrier

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

        public Runnable.Builder clearBarrier()
         Barrier runnable.
         
        .google.cloud.batch.v1.Runnable.Barrier barrier = 6;
      • getBarrierBuilder

        public Runnable.Barrier.Builder getBarrierBuilder()
         Barrier runnable.
         
        .google.cloud.batch.v1.Runnable.Barrier barrier = 6;
      • getIgnoreExitStatus

        public boolean getIgnoreExitStatus()
         Normally, a non-zero exit status causes the Task to fail. This flag allows
         execution of other Runnables to continue instead.
         
        bool ignore_exit_status = 3;
        Specified by:
        getIgnoreExitStatus in interface RunnableOrBuilder
        Returns:
        The ignoreExitStatus.
      • setIgnoreExitStatus

        public Runnable.Builder setIgnoreExitStatus​(boolean value)
         Normally, a non-zero exit status causes the Task to fail. This flag allows
         execution of other Runnables to continue instead.
         
        bool ignore_exit_status = 3;
        Parameters:
        value - The ignoreExitStatus to set.
        Returns:
        This builder for chaining.
      • clearIgnoreExitStatus

        public Runnable.Builder clearIgnoreExitStatus()
         Normally, a non-zero exit status causes the Task to fail. This flag allows
         execution of other Runnables to continue instead.
         
        bool ignore_exit_status = 3;
        Returns:
        This builder for chaining.
      • getBackground

        public boolean getBackground()
         This flag allows a Runnable to continue running in the background while the
         Task executes subsequent Runnables. This is useful to provide services to
         other Runnables (or to provide debugging support tools like SSH servers).
         
        bool background = 4;
        Specified by:
        getBackground in interface RunnableOrBuilder
        Returns:
        The background.
      • setBackground

        public Runnable.Builder setBackground​(boolean value)
         This flag allows a Runnable to continue running in the background while the
         Task executes subsequent Runnables. This is useful to provide services to
         other Runnables (or to provide debugging support tools like SSH servers).
         
        bool background = 4;
        Parameters:
        value - The background to set.
        Returns:
        This builder for chaining.
      • clearBackground

        public Runnable.Builder clearBackground()
         This flag allows a Runnable to continue running in the background while the
         Task executes subsequent Runnables. This is useful to provide services to
         other Runnables (or to provide debugging support tools like SSH servers).
         
        bool background = 4;
        Returns:
        This builder for chaining.
      • 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.
      • setAlwaysRun

        public Runnable.Builder setAlwaysRun​(boolean value)
         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;
        Parameters:
        value - The alwaysRun to set.
        Returns:
        This builder for chaining.
      • clearAlwaysRun

        public Runnable.Builder clearAlwaysRun()
         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;
        Returns:
        This builder for chaining.
      • hasEnvironment

        public boolean hasEnvironment()
         Environment variables for this Runnable (overrides variables set for the
         whole Task or TaskGroup).
         
        .google.cloud.batch.v1.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.v1.Environment environment = 7;
        Specified by:
        getEnvironment in interface RunnableOrBuilder
        Returns:
        The environment.
      • setEnvironment

        public Runnable.Builder setEnvironment​(Environment value)
         Environment variables for this Runnable (overrides variables set for the
         whole Task or TaskGroup).
         
        .google.cloud.batch.v1.Environment environment = 7;
      • setEnvironment

        public Runnable.Builder setEnvironment​(Environment.Builder builderForValue)
         Environment variables for this Runnable (overrides variables set for the
         whole Task or TaskGroup).
         
        .google.cloud.batch.v1.Environment environment = 7;
      • mergeEnvironment

        public Runnable.Builder mergeEnvironment​(Environment value)
         Environment variables for this Runnable (overrides variables set for the
         whole Task or TaskGroup).
         
        .google.cloud.batch.v1.Environment environment = 7;
      • clearEnvironment

        public Runnable.Builder clearEnvironment()
         Environment variables for this Runnable (overrides variables set for the
         whole Task or TaskGroup).
         
        .google.cloud.batch.v1.Environment environment = 7;
      • getEnvironmentBuilder

        public Environment.Builder getEnvironmentBuilder()
         Environment variables for this Runnable (overrides variables set for the
         whole Task or TaskGroup).
         
        .google.cloud.batch.v1.Environment environment = 7;
      • getEnvironmentOrBuilder

        public EnvironmentOrBuilder getEnvironmentOrBuilder()
         Environment variables for this Runnable (overrides variables set for the
         whole Task or TaskGroup).
         
        .google.cloud.batch.v1.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.
      • setTimeout

        public Runnable.Builder setTimeout​(com.google.protobuf.Duration value)
         Timeout for this Runnable.
         
        .google.protobuf.Duration timeout = 8;
      • setTimeout

        public Runnable.Builder setTimeout​(com.google.protobuf.Duration.Builder builderForValue)
         Timeout for this Runnable.
         
        .google.protobuf.Duration timeout = 8;
      • mergeTimeout

        public Runnable.Builder mergeTimeout​(com.google.protobuf.Duration value)
         Timeout for this Runnable.
         
        .google.protobuf.Duration timeout = 8;
      • clearTimeout

        public Runnable.Builder clearTimeout()
         Timeout for this Runnable.
         
        .google.protobuf.Duration timeout = 8;
      • getTimeoutBuilder

        public com.google.protobuf.Duration.Builder getTimeoutBuilder()
         Timeout for this Runnable.
         
        .google.protobuf.Duration timeout = 8;
      • getTimeoutOrBuilder

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

        public Runnable.Builder removeLabels​(String key)
         Labels for this Runnable.
         
        map<string, string> labels = 9;
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • setUnknownFields

        public final Runnable.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>
      • mergeUnknownFields

        public final Runnable.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Runnable.Builder>