Package com.google.cloud.run.v2
Class TaskTemplate
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.run.v2.TaskTemplate
-
- All Implemented Interfaces:
TaskTemplateOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
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 typegoogle.cloud.run.v2.TaskTemplate
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TaskTemplate.Builder
TaskTemplate describes the data a task should have when created from a template.static class
TaskTemplate.RetriesCase
-
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
CONTAINERS_FIELD_NUMBER
static int
ENCRYPTION_KEY_FIELD_NUMBER
static int
EXECUTION_ENVIRONMENT_FIELD_NUMBER
static int
MAX_RETRIES_FIELD_NUMBER
static int
SERVICE_ACCOUNT_FIELD_NUMBER
static int
TIMEOUT_FIELD_NUMBER
static int
VOLUMES_FIELD_NUMBER
static int
VPC_ACCESS_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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()
The execution environment being used to host this Task.int
getExecutionEnvironmentValue()
The execution environment being used to host this Task.int
getMaxRetries()
Number of retries allowed per Task, before marking this Task failed.com.google.protobuf.Parser<TaskTemplate>
getParserForType()
TaskTemplate.RetriesCase
getRetriesCase()
int
getSerializedSize()
String
getServiceAccount()
Email address of the IAM service account associated with the Task of a Job.com.google.protobuf.ByteString
getServiceAccountBytes()
Email address of the IAM service account associated with the Task of a Job.com.google.protobuf.Duration
getTimeout()
Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers.com.google.protobuf.DurationOrBuilder
getTimeoutOrBuilder()
Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers.Volume
getVolumes(int index)
A list of Volumes to make available to containers.int
getVolumesCount()
A list of Volumes to make available to containers.List<Volume>
getVolumesList()
A list of Volumes to make available to containers.VolumeOrBuilder
getVolumesOrBuilder(int index)
A list of Volumes to make available to containers.List<? extends VolumeOrBuilder>
getVolumesOrBuilderList()
A list of Volumes to make available to containers.VpcAccess
getVpcAccess()
VPC Access configuration to use for this Task.VpcAccessOrBuilder
getVpcAccessOrBuilder()
VPC Access configuration to use for this Task.int
hashCode()
boolean
hasMaxRetries()
Number of retries allowed per Task, before marking this Task failed.boolean
hasTimeout()
Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers.boolean
hasVpcAccess()
VPC Access configuration to use for this Task.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(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 TaskTemplate
parseFrom(ByteBuffer data)
static TaskTemplate
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<TaskTemplate>
parser()
TaskTemplate.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, internalGetMapField, 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
-
CONTAINERS_FIELD_NUMBER
public static final int CONTAINERS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VOLUMES_FIELD_NUMBER
public static final int VOLUMES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MAX_RETRIES_FIELD_NUMBER
public static final int MAX_RETRIES_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TIMEOUT_FIELD_NUMBER
public static final int TIMEOUT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SERVICE_ACCOUNT_FIELD_NUMBER
public static final int SERVICE_ACCOUNT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
EXECUTION_ENVIRONMENT_FIELD_NUMBER
public static final int EXECUTION_ENVIRONMENT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
ENCRYPTION_KEY_FIELD_NUMBER
public static final int ENCRYPTION_KEY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
VPC_ACCESS_FIELD_NUMBER
public static final int VPC_ACCESS_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()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getRetriesCase
public TaskTemplate.RetriesCase getRetriesCase()
- Specified by:
getRetriesCase
in interfaceTaskTemplateOrBuilder
-
getContainersList
public List<Container> getContainersList()
Holds the single container that defines the unit of execution for this task.
repeated .google.cloud.run.v2.Container containers = 1;
- Specified by:
getContainersList
in interfaceTaskTemplateOrBuilder
-
getContainersOrBuilderList
public 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;
- Specified by:
getContainersOrBuilderList
in interfaceTaskTemplateOrBuilder
-
getContainersCount
public int getContainersCount()
Holds the single container that defines the unit of execution for this task.
repeated .google.cloud.run.v2.Container containers = 1;
- Specified by:
getContainersCount
in interfaceTaskTemplateOrBuilder
-
getContainers
public 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;
- Specified by:
getContainers
in interfaceTaskTemplateOrBuilder
-
getContainersOrBuilder
public 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;
- Specified by:
getContainersOrBuilder
in interfaceTaskTemplateOrBuilder
-
getVolumesList
public List<Volume> getVolumesList()
A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2;
- Specified by:
getVolumesList
in interfaceTaskTemplateOrBuilder
-
getVolumesOrBuilderList
public List<? extends VolumeOrBuilder> getVolumesOrBuilderList()
A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2;
- Specified by:
getVolumesOrBuilderList
in interfaceTaskTemplateOrBuilder
-
getVolumesCount
public int getVolumesCount()
A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2;
- Specified by:
getVolumesCount
in interfaceTaskTemplateOrBuilder
-
getVolumes
public Volume getVolumes(int index)
A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2;
- Specified by:
getVolumes
in interfaceTaskTemplateOrBuilder
-
getVolumesOrBuilder
public VolumeOrBuilder getVolumesOrBuilder(int index)
A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2;
- Specified by:
getVolumesOrBuilder
in interfaceTaskTemplateOrBuilder
-
hasMaxRetries
public boolean hasMaxRetries()
Number of retries allowed per Task, before marking this Task failed. Defaults to 3.
int32 max_retries = 3;
- Specified by:
hasMaxRetries
in interfaceTaskTemplateOrBuilder
- Returns:
- Whether the maxRetries field is set.
-
getMaxRetries
public int getMaxRetries()
Number of retries allowed per Task, before marking this Task failed. Defaults to 3.
int32 max_retries = 3;
- Specified by:
getMaxRetries
in interfaceTaskTemplateOrBuilder
- Returns:
- The maxRetries.
-
hasTimeout
public boolean hasTimeout()
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;
- Specified by:
hasTimeout
in interfaceTaskTemplateOrBuilder
- Returns:
- Whether the timeout field is set.
-
getTimeout
public com.google.protobuf.Duration getTimeout()
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;
- Specified by:
getTimeout
in interfaceTaskTemplateOrBuilder
- Returns:
- The timeout.
-
getTimeoutOrBuilder
public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
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;
- Specified by:
getTimeoutOrBuilder
in interfaceTaskTemplateOrBuilder
-
getServiceAccount
public String getServiceAccount()
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;
- Specified by:
getServiceAccount
in interfaceTaskTemplateOrBuilder
- Returns:
- The serviceAccount.
-
getServiceAccountBytes
public com.google.protobuf.ByteString getServiceAccountBytes()
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;
- Specified by:
getServiceAccountBytes
in interfaceTaskTemplateOrBuilder
- Returns:
- The bytes for serviceAccount.
-
getExecutionEnvironmentValue
public int getExecutionEnvironmentValue()
The execution environment being used to host this Task.
.google.cloud.run.v2.ExecutionEnvironment execution_environment = 6;
- Specified by:
getExecutionEnvironmentValue
in interfaceTaskTemplateOrBuilder
- Returns:
- The enum numeric value on the wire for executionEnvironment.
-
getExecutionEnvironment
public ExecutionEnvironment getExecutionEnvironment()
The execution environment being used to host this Task.
.google.cloud.run.v2.ExecutionEnvironment execution_environment = 6;
- Specified by:
getExecutionEnvironment
in interfaceTaskTemplateOrBuilder
- Returns:
- The executionEnvironment.
-
getEncryptionKey
public 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) = { ... }
- Specified by:
getEncryptionKey
in interfaceTaskTemplateOrBuilder
- Returns:
- The encryptionKey.
-
getEncryptionKeyBytes
public 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) = { ... }
- Specified by:
getEncryptionKeyBytes
in interfaceTaskTemplateOrBuilder
- Returns:
- The bytes for encryptionKey.
-
hasVpcAccess
public boolean hasVpcAccess()
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;
- Specified by:
hasVpcAccess
in interfaceTaskTemplateOrBuilder
- Returns:
- Whether the vpcAccess field is set.
-
getVpcAccess
public VpcAccess getVpcAccess()
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;
- Specified by:
getVpcAccess
in interfaceTaskTemplateOrBuilder
- Returns:
- The vpcAccess.
-
getVpcAccessOrBuilder
public VpcAccessOrBuilder getVpcAccessOrBuilder()
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;
- Specified by:
getVpcAccessOrBuilder
in interfaceTaskTemplateOrBuilder
-
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 TaskTemplate parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskTemplate parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskTemplate parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskTemplate parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskTemplate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskTemplate parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskTemplate parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TaskTemplate parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TaskTemplate parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TaskTemplate parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static TaskTemplate parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TaskTemplate parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public TaskTemplate.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static TaskTemplate.Builder newBuilder()
-
newBuilder
public static TaskTemplate.Builder newBuilder(TaskTemplate prototype)
-
toBuilder
public TaskTemplate.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TaskTemplate.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static TaskTemplate getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<TaskTemplate> parser()
-
getParserForType
public com.google.protobuf.Parser<TaskTemplate> 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 TaskTemplate getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-