Package com.google.cloud.batch.v1alpha
Class Runnable.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Runnable.Builder>
com.google.cloud.batch.v1alpha.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.GeneratedMessage.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.v1alpha.Runnable-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()By default, after a Runnable fails, no further Runnable are executed.Normally, a runnable that doesn't exit causes its task to fail.Barrier runnable.Container runnable.Optional.Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).Normally, a runnable that returns a non-zero exit status fails and causes the task to fail.Script runnable.Timeout for this Runnable.booleancontainsLabels(String key) Labels for this Runnable.booleanBy default, after a Runnable fails, no further Runnable are executed.booleanNormally, a runnable that doesn't exit causes its task to fail.Barrier runnable.Barrier runnable.Barrier runnable.Container runnable.Container runnable.Container runnable.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorOptional.com.google.protobuf.ByteStringOptional.Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).booleanNormally, a runnable that returns a non-zero exit status fails and causes the task to fail.Deprecated.intLabels for this Runnable.Labels for this Runnable.getLabelsOrDefault(String key, String defaultValue) Labels for this Runnable.getLabelsOrThrow(String key) Labels for this Runnable.Deprecated.Script runnable.Script runnable.Script runnable.com.google.protobuf.DurationTimeout for this Runnable.com.google.protobuf.Duration.BuilderTimeout for this Runnable.com.google.protobuf.DurationOrBuilderTimeout for this Runnable.booleanBarrier runnable.booleanContainer runnable.booleanEnvironment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).booleanScript runnable.booleanTimeout for this Runnable.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeBarrier(Runnable.Barrier value) Barrier runnable.mergeContainer(Runnable.Container value) Container runnable.mergeEnvironment(Environment value) Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeScript(Runnable.Script value) Script runnable.mergeTimeout(com.google.protobuf.Duration value) Timeout for this Runnable.putAllLabels(Map<String, String> values) Labels for this Runnable.Labels for this Runnable.removeLabels(String key) Labels for this Runnable.setAlwaysRun(boolean value) By default, after a Runnable fails, no further Runnable are executed.setBackground(boolean value) Normally, a runnable that doesn't exit causes its task to fail.setBarrier(Runnable.Barrier value) Barrier runnable.setBarrier(Runnable.Barrier.Builder builderForValue) Barrier runnable.setContainer(Runnable.Container value) Container runnable.setContainer(Runnable.Container.Builder builderForValue) Container runnable.setDisplayName(String value) Optional.setDisplayNameBytes(com.google.protobuf.ByteString value) Optional.setEnvironment(Environment value) Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).setEnvironment(Environment.Builder builderForValue) Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).setIgnoreExitStatus(boolean value) Normally, a runnable that returns a non-zero exit status fails and causes the task to fail.setScript(Runnable.Script value) Script runnable.setScript(Runnable.Script.Builder builderForValue) Script runnable.setTimeout(com.google.protobuf.Duration value) Timeout for this Runnable.setTimeout(com.google.protobuf.Duration.Builder builderForValue) Timeout for this Runnable.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Runnable.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Runnable.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Runnable.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Runnable.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Runnable.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Runnable.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Runnable.Builder>
-
mergeFrom
public Runnable.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Runnable.Builder>- Throws:
IOException
-
getExecutableCase
- Specified by:
getExecutableCasein interfaceRunnableOrBuilder
-
clearExecutable
-
hasContainer
public boolean hasContainer()Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;- Specified by:
hasContainerin interfaceRunnableOrBuilder- Returns:
- Whether the container field is set.
-
getContainer
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;- Specified by:
getContainerin interfaceRunnableOrBuilder- Returns:
- The container.
-
setContainer
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1; -
setContainer
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1; -
mergeContainer
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1; -
clearContainer
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1; -
getContainerBuilder
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1; -
getContainerOrBuilder
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;- Specified by:
getContainerOrBuilderin interfaceRunnableOrBuilder
-
hasScript
public boolean hasScript()Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;- Specified by:
hasScriptin interfaceRunnableOrBuilder- Returns:
- Whether the script field is set.
-
getScript
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;- Specified by:
getScriptin interfaceRunnableOrBuilder- Returns:
- The script.
-
setScript
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2; -
setScript
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2; -
mergeScript
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2; -
clearScript
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2; -
getScriptBuilder
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2; -
getScriptOrBuilder
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;- Specified by:
getScriptOrBuilderin interfaceRunnableOrBuilder
-
hasBarrier
public boolean hasBarrier()Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;- Specified by:
hasBarrierin interfaceRunnableOrBuilder- Returns:
- Whether the barrier field is set.
-
getBarrier
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;- Specified by:
getBarrierin interfaceRunnableOrBuilder- Returns:
- The barrier.
-
setBarrier
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6; -
setBarrier
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6; -
mergeBarrier
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6; -
clearBarrier
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6; -
getBarrierBuilder
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6; -
getBarrierOrBuilder
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;- Specified by:
getBarrierOrBuilderin interfaceRunnableOrBuilder
-
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:
getDisplayNamein interfaceRunnableOrBuilder- 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:
getDisplayNameBytesin interfaceRunnableOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
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];- Parameters:
value- The displayName to set.- Returns:
- This builder for chaining.
-
clearDisplayName
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];- Returns:
- This builder for chaining.
-
setDisplayNameBytes
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];- Parameters:
value- The bytes for displayName to set.- Returns:
- This builder for chaining.
-
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:
getIgnoreExitStatusin interfaceRunnableOrBuilder- Returns:
- The ignoreExitStatus.
-
setIgnoreExitStatus
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;- Parameters:
value- The ignoreExitStatus to set.- Returns:
- This builder for chaining.
-
clearIgnoreExitStatus
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;- Returns:
- This builder for chaining.
-
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:
getBackgroundin interfaceRunnableOrBuilder- Returns:
- The background.
-
setBackground
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;- Parameters:
value- The background to set.- Returns:
- This builder for chaining.
-
clearBackground
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;- 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:
getAlwaysRunin interfaceRunnableOrBuilder- Returns:
- The alwaysRun.
-
setAlwaysRun
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
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.v1alpha.Environment environment = 7;- Specified by:
hasEnvironmentin interfaceRunnableOrBuilder- Returns:
- Whether the environment field is set.
-
getEnvironment
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;- Specified by:
getEnvironmentin interfaceRunnableOrBuilder- Returns:
- The environment.
-
setEnvironment
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7; -
setEnvironment
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7; -
mergeEnvironment
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7; -
clearEnvironment
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7; -
getEnvironmentBuilder
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7; -
getEnvironmentOrBuilder
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;- Specified by:
getEnvironmentOrBuilderin interfaceRunnableOrBuilder
-
hasTimeout
public boolean hasTimeout()Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;- Specified by:
hasTimeoutin interfaceRunnableOrBuilder- 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:
getTimeoutin interfaceRunnableOrBuilder- Returns:
- The timeout.
-
setTimeout
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8; -
setTimeout
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8; -
mergeTimeout
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8; -
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:
getTimeoutOrBuilderin interfaceRunnableOrBuilder
-
getLabelsCount
public int getLabelsCount()Description copied from interface:RunnableOrBuilderLabels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsCountin interfaceRunnableOrBuilder
-
containsLabels
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
containsLabelsin interfaceRunnableOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceRunnableOrBuilder
-
getLabelsMap
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsMapin interfaceRunnableOrBuilder
-
getLabelsOrDefault
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsOrDefaultin interfaceRunnableOrBuilder
-
getLabelsOrThrow
Labels for this Runnable.
map<string, string> labels = 9;- Specified by:
getLabelsOrThrowin interfaceRunnableOrBuilder
-
clearLabels
-
removeLabels
Labels for this Runnable.
map<string, string> labels = 9; -
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
Labels for this Runnable.
map<string, string> labels = 9; -
putAllLabels
Labels for this Runnable.
map<string, string> labels = 9;
-