Class 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 type google.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
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.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 class com.google.protobuf.GeneratedMessageV3
      • 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 interface TaskTemplateOrBuilder
      • 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 interface TaskTemplateOrBuilder
      • 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 interface TaskTemplateOrBuilder
      • 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 interface TaskTemplateOrBuilder
      • 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 interface TaskTemplateOrBuilder
      • 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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
      • 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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        Returns:
        The enum numeric value on the wire for 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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
        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 interface TaskTemplateOrBuilder
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.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​(com.google.protobuf.CodedInputStream input,
                                             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                      throws IOException
        Throws:
        IOException
      • newBuilderForType

        public TaskTemplate.Builder newBuilderForType()
        Specified by:
        newBuilderForType in interface com.google.protobuf.Message
        Specified by:
        newBuilderForType in interface com.google.protobuf.MessageLite
      • toBuilder

        public TaskTemplate.Builder toBuilder()
        Specified by:
        toBuilder in interface com.google.protobuf.Message
        Specified by:
        toBuilder in interface com.google.protobuf.MessageLite
      • newBuilderForType

        protected TaskTemplate.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.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 interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

        public TaskTemplate getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder