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 classTaskTemplate.BuilderTaskTemplate describes the data a task should have when created from a template.static classTaskTemplate.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 intCONTAINERS_FIELD_NUMBERstatic intENCRYPTION_KEY_FIELD_NUMBERstatic intEXECUTION_ENVIRONMENT_FIELD_NUMBERstatic intMAX_RETRIES_FIELD_NUMBERstatic intSERVICE_ACCOUNT_FIELD_NUMBERstatic intTIMEOUT_FIELD_NUMBERstatic intVOLUMES_FIELD_NUMBERstatic intVPC_ACCESS_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)ContainergetContainers(int index)Holds the single container that defines the unit of execution for this task.intgetContainersCount()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.ContainerOrBuildergetContainersOrBuilder(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 TaskTemplategetDefaultInstance()TaskTemplategetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetEncryptionKey()A reference to a customer managed encryption key (CMEK) to use to encrypt this container image.com.google.protobuf.ByteStringgetEncryptionKeyBytes()A reference to a customer managed encryption key (CMEK) to use to encrypt this container image.ExecutionEnvironmentgetExecutionEnvironment()The execution environment being used to host this Task.intgetExecutionEnvironmentValue()The execution environment being used to host this Task.intgetMaxRetries()Number of retries allowed per Task, before marking this Task failed.com.google.protobuf.Parser<TaskTemplate>getParserForType()TaskTemplate.RetriesCasegetRetriesCase()intgetSerializedSize()StringgetServiceAccount()Email address of the IAM service account associated with the Task of a Job.com.google.protobuf.ByteStringgetServiceAccountBytes()Email address of the IAM service account associated with the Task of a Job.com.google.protobuf.DurationgetTimeout()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.DurationOrBuildergetTimeoutOrBuilder()Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers.VolumegetVolumes(int index)A list of Volumes to make available to containers.intgetVolumesCount()A list of Volumes to make available to containers.List<Volume>getVolumesList()A list of Volumes to make available to containers.VolumeOrBuildergetVolumesOrBuilder(int index)A list of Volumes to make available to containers.List<? extends VolumeOrBuilder>getVolumesOrBuilderList()A list of Volumes to make available to containers.VpcAccessgetVpcAccess()VPC Access configuration to use for this Task.VpcAccessOrBuildergetVpcAccessOrBuilder()VPC Access configuration to use for this Task.inthashCode()booleanhasMaxRetries()Number of retries allowed per Task, before marking this Task failed.booleanhasTimeout()Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers.booleanhasVpcAccess()VPC Access configuration to use for this Task.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static TaskTemplate.BuildernewBuilder()static TaskTemplate.BuildernewBuilder(TaskTemplate prototype)TaskTemplate.BuildernewBuilderForType()protected TaskTemplate.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static TaskTemplateparseDelimitedFrom(InputStream input)static TaskTemplateparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TaskTemplateparseFrom(byte[] data)static TaskTemplateparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TaskTemplateparseFrom(com.google.protobuf.ByteString data)static TaskTemplateparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TaskTemplateparseFrom(com.google.protobuf.CodedInputStream input)static TaskTemplateparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TaskTemplateparseFrom(InputStream input)static TaskTemplateparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TaskTemplateparseFrom(ByteBuffer data)static TaskTemplateparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<TaskTemplate>parser()TaskTemplate.BuildertoBuilder()voidwriteTo(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:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getRetriesCase
public TaskTemplate.RetriesCase getRetriesCase()
- Specified by:
getRetriesCasein 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:
getContainersListin 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:
getContainersOrBuilderListin 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:
getContainersCountin 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:
getContainersin 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:
getContainersOrBuilderin 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:
getVolumesListin 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:
getVolumesOrBuilderListin interfaceTaskTemplateOrBuilder
-
getVolumesCount
public int getVolumesCount()
A list of Volumes to make available to containers.
repeated .google.cloud.run.v2.Volume volumes = 2;- Specified by:
getVolumesCountin 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:
getVolumesin 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:
getVolumesOrBuilderin 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:
hasMaxRetriesin 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:
getMaxRetriesin 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:
hasTimeoutin 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:
getTimeoutin 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:
getTimeoutOrBuilderin 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:
getServiceAccountin 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:
getServiceAccountBytesin 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:
getExecutionEnvironmentValuein 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:
getExecutionEnvironmentin 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:
getEncryptionKeyin 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:
getEncryptionKeyBytesin 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:
hasVpcAccessin 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:
getVpcAccessin 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:
getVpcAccessOrBuilderin interfaceTaskTemplateOrBuilder
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein 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:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein 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:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TaskTemplate.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein 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:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public TaskTemplate getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-