Package com.google.cloud.batch.v1alpha
Class Runnable
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- 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
public final class Runnable extends com.google.protobuf.GeneratedMessageV3 implements RunnableOrBuilder
Runnable describes instructions for executing a specific script or container as part of a Task.
Protobuf typegoogle.cloud.batch.v1alpha.Runnable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Runnable.Barrier
Barrier runnable blocks until all tasks in a taskgroup reach it.static interface
Runnable.BarrierOrBuilder
static class
Runnable.Builder
Runnable describes instructions for executing a specific script or container as part of a Task.static class
Runnable.Container
Container runnable.static interface
Runnable.ContainerOrBuilder
static class
Runnable.ExecutableCase
static class
Runnable.Script
Script runnable.static interface
Runnable.ScriptOrBuilder
-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static int
ALWAYS_RUN_FIELD_NUMBER
static int
BACKGROUND_FIELD_NUMBER
static int
BARRIER_FIELD_NUMBER
static int
CONTAINER_FIELD_NUMBER
static int
DISPLAY_NAME_FIELD_NUMBER
static int
ENVIRONMENT_FIELD_NUMBER
static int
IGNORE_EXIT_STATUS_FIELD_NUMBER
static int
LABELS_FIELD_NUMBER
static int
SCRIPT_FIELD_NUMBER
static int
TIMEOUT_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
containsLabels(String key)
Labels for this Runnable.boolean
equals(Object obj)
boolean
getAlwaysRun()
By default, after a Runnable fails, no further Runnable are executed.boolean
getBackground()
This flag allows a Runnable to continue running in the background while the Task executes subsequent Runnables.Runnable.Barrier
getBarrier()
Barrier runnable.Runnable.BarrierOrBuilder
getBarrierOrBuilder()
Barrier runnable.Runnable.Container
getContainer()
Container runnable.Runnable.ContainerOrBuilder
getContainerOrBuilder()
Container runnable.static Runnable
getDefaultInstance()
Runnable
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
String
getDisplayName()
Optional.com.google.protobuf.ByteString
getDisplayNameBytes()
Optional.Environment
getEnvironment()
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).EnvironmentOrBuilder
getEnvironmentOrBuilder()
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).Runnable.ExecutableCase
getExecutableCase()
boolean
getIgnoreExitStatus()
Normally, a non-zero exit status causes the Task to fail.Map<String,String>
getLabels()
Deprecated.int
getLabelsCount()
Labels for this Runnable.Map<String,String>
getLabelsMap()
Labels for this Runnable.String
getLabelsOrDefault(String key, String defaultValue)
Labels for this Runnable.String
getLabelsOrThrow(String key)
Labels for this Runnable.com.google.protobuf.Parser<Runnable>
getParserForType()
Runnable.Script
getScript()
Script runnable.Runnable.ScriptOrBuilder
getScriptOrBuilder()
Script runnable.int
getSerializedSize()
com.google.protobuf.Duration
getTimeout()
Timeout for this Runnable.com.google.protobuf.DurationOrBuilder
getTimeoutOrBuilder()
Timeout for this Runnable.boolean
hasBarrier()
Barrier runnable.boolean
hasContainer()
Container runnable.boolean
hasEnvironment()
Environment variables for this Runnable (overrides variables set for the whole Task or TaskGroup).int
hashCode()
boolean
hasScript()
Script runnable.boolean
hasTimeout()
Timeout for this Runnable.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapField
internalGetMapField(int number)
boolean
isInitialized()
static Runnable.Builder
newBuilder()
static Runnable.Builder
newBuilder(Runnable prototype)
Runnable.Builder
newBuilderForType()
protected Runnable.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static Runnable
parseDelimitedFrom(InputStream input)
static Runnable
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Runnable
parseFrom(byte[] data)
static Runnable
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Runnable
parseFrom(com.google.protobuf.ByteString data)
static Runnable
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Runnable
parseFrom(com.google.protobuf.CodedInputStream input)
static Runnable
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Runnable
parseFrom(InputStream input)
static Runnable
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Runnable
parseFrom(ByteBuffer data)
static Runnable
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<Runnable>
parser()
Runnable.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
CONTAINER_FIELD_NUMBER
public static final int CONTAINER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCRIPT_FIELD_NUMBER
public static final int SCRIPT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BARRIER_FIELD_NUMBER
public static final int BARRIER_FIELD_NUMBER
- See Also:
- Constant Field Values
-
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
IGNORE_EXIT_STATUS_FIELD_NUMBER
public static final int IGNORE_EXIT_STATUS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
BACKGROUND_FIELD_NUMBER
public static final int BACKGROUND_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ALWAYS_RUN_FIELD_NUMBER
public static final int ALWAYS_RUN_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENVIRONMENT_FIELD_NUMBER
public static final int ENVIRONMENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TIMEOUT_FIELD_NUMBER
public static final int TIMEOUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getExecutableCase
public Runnable.ExecutableCase getExecutableCase()
- Specified by:
getExecutableCase
in interfaceRunnableOrBuilder
-
hasContainer
public boolean hasContainer()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;
- Specified by:
hasContainer
in interfaceRunnableOrBuilder
- 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 interfaceRunnableOrBuilder
- Returns:
- The container.
-
getContainerOrBuilder
public Runnable.ContainerOrBuilder getContainerOrBuilder()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;
- Specified by:
getContainerOrBuilder
in interfaceRunnableOrBuilder
-
hasScript
public boolean hasScript()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;
- Specified by:
hasScript
in interfaceRunnableOrBuilder
- 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 interfaceRunnableOrBuilder
- Returns:
- The script.
-
getScriptOrBuilder
public Runnable.ScriptOrBuilder getScriptOrBuilder()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;
- Specified by:
getScriptOrBuilder
in interfaceRunnableOrBuilder
-
hasBarrier
public boolean hasBarrier()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
- Specified by:
hasBarrier
in interfaceRunnableOrBuilder
- 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 interfaceRunnableOrBuilder
- Returns:
- The barrier.
-
getBarrierOrBuilder
public Runnable.BarrierOrBuilder getBarrierOrBuilder()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
- Specified by:
getBarrierOrBuilder
in interfaceRunnableOrBuilder
-
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 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:
getDisplayNameBytes
in interfaceRunnableOrBuilder
- Returns:
- The bytes for displayName.
-
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 interfaceRunnableOrBuilder
- Returns:
- The ignoreExitStatus.
-
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 interfaceRunnableOrBuilder
- 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 interfaceRunnableOrBuilder
- 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 interfaceRunnableOrBuilder
- 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 interfaceRunnableOrBuilder
- 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 interfaceRunnableOrBuilder
-
hasTimeout
public boolean hasTimeout()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;
- Specified by:
hasTimeout
in 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:
getTimeout
in interfaceRunnableOrBuilder
- Returns:
- The timeout.
-
getTimeoutOrBuilder
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;
- Specified by:
getTimeoutOrBuilder
in interfaceRunnableOrBuilder
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:RunnableOrBuilder
Labels for this Runnable.
map<string, string> labels = 9;
- Specified by:
getLabelsCount
in interfaceRunnableOrBuilder
-
containsLabels
public boolean containsLabels(String key)
Labels for this Runnable.
map<string, string> labels = 9;
- Specified by:
containsLabels
in interfaceRunnableOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceRunnableOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
Labels for this Runnable.
map<string, string> labels = 9;
- Specified by:
getLabelsMap
in interfaceRunnableOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
Labels for this Runnable.
map<string, string> labels = 9;
- Specified by:
getLabelsOrDefault
in interfaceRunnableOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
Labels for this Runnable.
map<string, string> labels = 9;
- Specified by:
getLabelsOrThrow
in interfaceRunnableOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.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 interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.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 interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected Runnable.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
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 interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public Runnable getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-