public final class TaskTemplate extends com.google.protobuf.GeneratedMessageV3 implements TaskTemplateOrBuilder
TaskTemplate describes the data a task should have when created from a template.Protobuf type
google.cloud.run.v2.TaskTemplate| Modifier and Type | Class and Description |
|---|---|
static class |
TaskTemplate.Builder
TaskTemplate describes the data a task should have when created
from a template.
|
static class |
TaskTemplate.RetriesCase |
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| Modifier and Type | Field and Description |
|---|---|
static int |
CONTAINERS_FIELD_NUMBER |
static int |
ENCRYPTION_KEY_FIELD_NUMBER |
static int |
EXECUTION_ENVIRONMENT_FIELD_NUMBER |
static int |
MAX_RETRIES_FIELD_NUMBER |
static int |
NODE_SELECTOR_FIELD_NUMBER |
static int |
SERVICE_ACCOUNT_FIELD_NUMBER |
static int |
TIMEOUT_FIELD_NUMBER |
static int |
VOLUMES_FIELD_NUMBER |
static int |
VPC_ACCESS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Container |
getContainers(int index)
Holds the single container that defines the unit of execution for this
task.
|
int |
getContainersCount()
Holds the single container that defines the unit of execution for this
task.
|
List<Container> |
getContainersList()
Holds the single container that defines the unit of execution for this
task.
|
ContainerOrBuilder |
getContainersOrBuilder(int index)
Holds the single container that defines the unit of execution for this
task.
|
List<? extends ContainerOrBuilder> |
getContainersOrBuilderList()
Holds the single container that defines the unit of execution for this
task.
|
static TaskTemplate |
getDefaultInstance() |
TaskTemplate |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getEncryptionKey()
A reference to a customer managed encryption key (CMEK) to use to encrypt
this container image.
|
com.google.protobuf.ByteString |
getEncryptionKeyBytes()
A reference to a customer managed encryption key (CMEK) to use to encrypt
this container image.
|
ExecutionEnvironment |
getExecutionEnvironment()
Optional.
|
int |
getExecutionEnvironmentValue()
Optional.
|
int |
getMaxRetries()
Number of retries allowed per Task, before marking this Task failed.
|
NodeSelector |
getNodeSelector()
Optional.
|
NodeSelectorOrBuilder |
getNodeSelectorOrBuilder()
Optional.
|
com.google.protobuf.Parser<TaskTemplate> |
getParserForType() |
TaskTemplate.RetriesCase |
getRetriesCase() |
int |
getSerializedSize() |
String |
getServiceAccount()
Optional.
|
com.google.protobuf.ByteString |
getServiceAccountBytes()
Optional.
|
com.google.protobuf.Duration |
getTimeout()
Optional.
|
com.google.protobuf.DurationOrBuilder |
getTimeoutOrBuilder()
Optional.
|
Volume |
getVolumes(int index)
Optional.
|
int |
getVolumesCount()
Optional.
|
List<Volume> |
getVolumesList()
Optional.
|
VolumeOrBuilder |
getVolumesOrBuilder(int index)
Optional.
|
List<? extends VolumeOrBuilder> |
getVolumesOrBuilderList()
Optional.
|
VpcAccess |
getVpcAccess()
Optional.
|
VpcAccessOrBuilder |
getVpcAccessOrBuilder()
Optional.
|
int |
hashCode() |
boolean |
hasMaxRetries()
Number of retries allowed per Task, before marking this Task failed.
|
boolean |
hasNodeSelector()
Optional.
|
boolean |
hasTimeout()
Optional.
|
boolean |
hasVpcAccess()
Optional.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static TaskTemplate.Builder |
newBuilder() |
static TaskTemplate.Builder |
newBuilder(TaskTemplate prototype) |
TaskTemplate.Builder |
newBuilderForType() |
protected TaskTemplate.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static TaskTemplate |
parseDelimitedFrom(InputStream input) |
static TaskTemplate |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskTemplate |
parseFrom(byte[] data) |
static TaskTemplate |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskTemplate |
parseFrom(ByteBuffer data) |
static TaskTemplate |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskTemplate |
parseFrom(com.google.protobuf.ByteString data) |
static TaskTemplate |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskTemplate |
parseFrom(com.google.protobuf.CodedInputStream input) |
static TaskTemplate |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskTemplate |
parseFrom(InputStream input) |
static TaskTemplate |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<TaskTemplate> |
parser() |
TaskTemplate.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int CONTAINERS_FIELD_NUMBER
public static final int VOLUMES_FIELD_NUMBER
public static final int MAX_RETRIES_FIELD_NUMBER
public static final int TIMEOUT_FIELD_NUMBER
public static final int SERVICE_ACCOUNT_FIELD_NUMBER
public static final int EXECUTION_ENVIRONMENT_FIELD_NUMBER
public static final int ENCRYPTION_KEY_FIELD_NUMBER
public static final int VPC_ACCESS_FIELD_NUMBER
public static final int NODE_SELECTOR_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public TaskTemplate.RetriesCase getRetriesCase()
getRetriesCase in interface TaskTemplateOrBuilderpublic List<Container> getContainersList()
Holds the single container that defines the unit of execution for this task.
repeated .google.cloud.run.v2.Container containers = 1;getContainersList in interface TaskTemplateOrBuilderpublic List<? extends ContainerOrBuilder> getContainersOrBuilderList()
Holds the single container that defines the unit of execution for this task.
repeated .google.cloud.run.v2.Container containers = 1;getContainersOrBuilderList in interface TaskTemplateOrBuilderpublic int getContainersCount()
Holds the single container that defines the unit of execution for this task.
repeated .google.cloud.run.v2.Container containers = 1;getContainersCount in interface TaskTemplateOrBuilderpublic Container getContainers(int index)
Holds the single container that defines the unit of execution for this task.
repeated .google.cloud.run.v2.Container containers = 1;getContainers in interface TaskTemplateOrBuilderpublic ContainerOrBuilder getContainersOrBuilder(int index)
Holds the single container that defines the unit of execution for this task.
repeated .google.cloud.run.v2.Container containers = 1;getContainersOrBuilder in interface TaskTemplateOrBuilderpublic List<Volume> getVolumesList()
Optional. A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL];
getVolumesList in interface TaskTemplateOrBuilderpublic List<? extends VolumeOrBuilder> getVolumesOrBuilderList()
Optional. A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL];
getVolumesOrBuilderList in interface TaskTemplateOrBuilderpublic int getVolumesCount()
Optional. A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL];
getVolumesCount in interface TaskTemplateOrBuilderpublic Volume getVolumes(int index)
Optional. A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL];
getVolumes in interface TaskTemplateOrBuilderpublic VolumeOrBuilder getVolumesOrBuilder(int index)
Optional. A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2 [(.google.api.field_behavior) = OPTIONAL];
getVolumesOrBuilder in interface TaskTemplateOrBuilderpublic boolean hasMaxRetries()
Number of retries allowed per Task, before marking this Task failed. Defaults to 3.
int32 max_retries = 3;hasMaxRetries in interface TaskTemplateOrBuilderpublic int getMaxRetries()
Number of retries allowed per Task, before marking this Task failed. Defaults to 3.
int32 max_retries = 3;getMaxRetries in interface TaskTemplateOrBuilderpublic boolean hasTimeout()
Optional. Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds.
.google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL];hasTimeout in interface TaskTemplateOrBuilderpublic com.google.protobuf.Duration getTimeout()
Optional. Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds.
.google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL];getTimeout in interface TaskTemplateOrBuilderpublic com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
Optional. Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds.
.google.protobuf.Duration timeout = 4 [(.google.api.field_behavior) = OPTIONAL];getTimeoutOrBuilder in interface TaskTemplateOrBuilderpublic String getServiceAccount()
Optional. Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
string service_account = 5 [(.google.api.field_behavior) = OPTIONAL];getServiceAccount in interface TaskTemplateOrBuilderpublic com.google.protobuf.ByteString getServiceAccountBytes()
Optional. Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
string service_account = 5 [(.google.api.field_behavior) = OPTIONAL];getServiceAccountBytes in interface TaskTemplateOrBuilderpublic int getExecutionEnvironmentValue()
Optional. The execution environment being used to host this Task.
.google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL];
getExecutionEnvironmentValue in interface TaskTemplateOrBuilderpublic ExecutionEnvironment getExecutionEnvironment()
Optional. The execution environment being used to host this Task.
.google.cloud.run.v2.ExecutionEnvironment execution_environment = 6 [(.google.api.field_behavior) = OPTIONAL];
getExecutionEnvironment in interface TaskTemplateOrBuilderpublic String getEncryptionKey()
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
string encryption_key = 7 [(.google.api.resource_reference) = { ... }getEncryptionKey in interface TaskTemplateOrBuilderpublic com.google.protobuf.ByteString getEncryptionKeyBytes()
A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
string encryption_key = 7 [(.google.api.resource_reference) = { ... }getEncryptionKeyBytes in interface TaskTemplateOrBuilderpublic boolean hasVpcAccess()
Optional. VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
.google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL];
hasVpcAccess in interface TaskTemplateOrBuilderpublic VpcAccess getVpcAccess()
Optional. VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
.google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL];
getVpcAccess in interface TaskTemplateOrBuilderpublic VpcAccessOrBuilder getVpcAccessOrBuilder()
Optional. VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
.google.cloud.run.v2.VpcAccess vpc_access = 8 [(.google.api.field_behavior) = OPTIONAL];
getVpcAccessOrBuilder in interface TaskTemplateOrBuilderpublic boolean hasNodeSelector()
Optional. The node selector for the task template.
.google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL];
hasNodeSelector in interface TaskTemplateOrBuilderpublic NodeSelector getNodeSelector()
Optional. The node selector for the task template.
.google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL];
getNodeSelector in interface TaskTemplateOrBuilderpublic NodeSelectorOrBuilder getNodeSelectorOrBuilder()
Optional. The node selector for the task template.
.google.cloud.run.v2.NodeSelector node_selector = 11 [(.google.api.field_behavior) = OPTIONAL];
getNodeSelectorOrBuilder in interface TaskTemplateOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static TaskTemplate parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskTemplate parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskTemplate parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskTemplate parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskTemplate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskTemplate parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskTemplate parseFrom(InputStream input) throws IOException
IOExceptionpublic static TaskTemplate parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TaskTemplate parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static TaskTemplate parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TaskTemplate parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static TaskTemplate parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic TaskTemplate.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static TaskTemplate.Builder newBuilder()
public static TaskTemplate.Builder newBuilder(TaskTemplate prototype)
public TaskTemplate.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected TaskTemplate.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static TaskTemplate getDefaultInstance()
public static com.google.protobuf.Parser<TaskTemplate> parser()
public com.google.protobuf.Parser<TaskTemplate> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public TaskTemplate getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.