Class RevisionTemplate

  • All Implemented Interfaces:
    RevisionTemplateOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class RevisionTemplate
    extends com.google.protobuf.GeneratedMessageV3
    implements RevisionTemplateOrBuilder
     RevisionTemplate describes the data a revision should have when created from
     a template.
     
    Protobuf type google.cloud.run.v2.RevisionTemplate
    See Also:
    Serialized Form
    • Field Detail

      • ANNOTATIONS_FIELD_NUMBER

        public static final int ANNOTATIONS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • VPC_ACCESS_FIELD_NUMBER

        public static final int VPC_ACCESS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SERVICE_ACCOUNT_FIELD_NUMBER

        public static final int SERVICE_ACCOUNT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CONTAINERS_FIELD_NUMBER

        public static final int CONTAINERS_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
      • MAX_INSTANCE_REQUEST_CONCURRENCY_FIELD_NUMBER

        public static final int MAX_INSTANCE_REQUEST_CONCURRENCY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SESSION_AFFINITY_FIELD_NUMBER

        public static final int SESSION_AFFINITY_FIELD_NUMBER
        See Also:
        Constant Field Values
    • 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()
      • internalGetMapField

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getRevision

        public String getRevision()
         The unique name for the revision. If this field is omitted, it will be
         automatically generated based on the Service name.
         
        string revision = 1 [(.google.api.resource_reference) = { ... }
        Specified by:
        getRevision in interface RevisionTemplateOrBuilder
        Returns:
        The revision.
      • getRevisionBytes

        public com.google.protobuf.ByteString getRevisionBytes()
         The unique name for the revision. If this field is omitted, it will be
         automatically generated based on the Service name.
         
        string revision = 1 [(.google.api.resource_reference) = { ... }
        Specified by:
        getRevisionBytes in interface RevisionTemplateOrBuilder
        Returns:
        The bytes for revision.
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: RevisionTemplateOrBuilder
         Unstructured key value map that can be used to organize and categorize
         objects.
         User-provided labels are shared with Google's billing system, so they can
         be used to filter, or break down billing charges by team, component,
         environment, state, etc. For more information, visit
         https://cloud.google.com/resource-manager/docs/creating-managing-labels or
         https://cloud.google.com/run/docs/configuring/labels.
        
         <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system labels in v1 now have a
         corresponding field in v2 RevisionTemplate.
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsCount in interface RevisionTemplateOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Unstructured key value map that can be used to organize and categorize
         objects.
         User-provided labels are shared with Google's billing system, so they can
         be used to filter, or break down billing charges by team, component,
         environment, state, etc. For more information, visit
         https://cloud.google.com/resource-manager/docs/creating-managing-labels or
         https://cloud.google.com/run/docs/configuring/labels.
        
         <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system labels in v1 now have a
         corresponding field in v2 RevisionTemplate.
         
        map<string, string> labels = 2;
        Specified by:
        containsLabels in interface RevisionTemplateOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Unstructured key value map that can be used to organize and categorize
         objects.
         User-provided labels are shared with Google's billing system, so they can
         be used to filter, or break down billing charges by team, component,
         environment, state, etc. For more information, visit
         https://cloud.google.com/resource-manager/docs/creating-managing-labels or
         https://cloud.google.com/run/docs/configuring/labels.
        
         <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system labels in v1 now have a
         corresponding field in v2 RevisionTemplate.
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsMap in interface RevisionTemplateOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Unstructured key value map that can be used to organize and categorize
         objects.
         User-provided labels are shared with Google's billing system, so they can
         be used to filter, or break down billing charges by team, component,
         environment, state, etc. For more information, visit
         https://cloud.google.com/resource-manager/docs/creating-managing-labels or
         https://cloud.google.com/run/docs/configuring/labels.
        
         <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system labels in v1 now have a
         corresponding field in v2 RevisionTemplate.
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsOrDefault in interface RevisionTemplateOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Unstructured key value map that can be used to organize and categorize
         objects.
         User-provided labels are shared with Google's billing system, so they can
         be used to filter, or break down billing charges by team, component,
         environment, state, etc. For more information, visit
         https://cloud.google.com/resource-manager/docs/creating-managing-labels or
         https://cloud.google.com/run/docs/configuring/labels.
        
         <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system labels in v1 now have a
         corresponding field in v2 RevisionTemplate.
         
        map<string, string> labels = 2;
        Specified by:
        getLabelsOrThrow in interface RevisionTemplateOrBuilder
      • getAnnotationsCount

        public int getAnnotationsCount()
        Description copied from interface: RevisionTemplateOrBuilder
         Unstructured key value map that may be set by external tools to store and
         arbitrary metadata. They are not queryable and should be preserved
         when modifying objects.
        
         <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system annotations in v1 now
         have a corresponding field in v2 RevisionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 3;
        Specified by:
        getAnnotationsCount in interface RevisionTemplateOrBuilder
      • containsAnnotations

        public boolean containsAnnotations​(String key)
         Unstructured key value map that may be set by external tools to store and
         arbitrary metadata. They are not queryable and should be preserved
         when modifying objects.
        
         <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system annotations in v1 now
         have a corresponding field in v2 RevisionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 3;
        Specified by:
        containsAnnotations in interface RevisionTemplateOrBuilder
      • getAnnotationsMap

        public Map<String,​String> getAnnotationsMap()
         Unstructured key value map that may be set by external tools to store and
         arbitrary metadata. They are not queryable and should be preserved
         when modifying objects.
        
         <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system annotations in v1 now
         have a corresponding field in v2 RevisionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 3;
        Specified by:
        getAnnotationsMap in interface RevisionTemplateOrBuilder
      • getAnnotationsOrDefault

        public String getAnnotationsOrDefault​(String key,
                                              String defaultValue)
         Unstructured key value map that may be set by external tools to store and
         arbitrary metadata. They are not queryable and should be preserved
         when modifying objects.
        
         <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system annotations in v1 now
         have a corresponding field in v2 RevisionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 3;
        Specified by:
        getAnnotationsOrDefault in interface RevisionTemplateOrBuilder
      • getAnnotationsOrThrow

        public String getAnnotationsOrThrow​(String key)
         Unstructured key value map that may be set by external tools to store and
         arbitrary metadata. They are not queryable and should be preserved
         when modifying objects.
        
         <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
         `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
         namespaces, and they will be rejected. All system annotations in v1 now
         have a corresponding field in v2 RevisionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 3;
        Specified by:
        getAnnotationsOrThrow in interface RevisionTemplateOrBuilder
      • hasScaling

        public boolean hasScaling()
         Scaling settings for this Revision.
         
        .google.cloud.run.v2.RevisionScaling scaling = 4;
        Specified by:
        hasScaling in interface RevisionTemplateOrBuilder
        Returns:
        Whether the scaling field is set.
      • hasVpcAccess

        public boolean hasVpcAccess()
         VPC Access configuration to use for this Revision. For more information,
         visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
         
        .google.cloud.run.v2.VpcAccess vpc_access = 6;
        Specified by:
        hasVpcAccess in interface RevisionTemplateOrBuilder
        Returns:
        Whether the vpcAccess field is set.
      • getVpcAccess

        public VpcAccess getVpcAccess()
         VPC Access configuration to use for this Revision. For more information,
         visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
         
        .google.cloud.run.v2.VpcAccess vpc_access = 6;
        Specified by:
        getVpcAccess in interface RevisionTemplateOrBuilder
        Returns:
        The vpcAccess.
      • getVpcAccessOrBuilder

        public VpcAccessOrBuilder getVpcAccessOrBuilder()
         VPC Access configuration to use for this Revision. For more information,
         visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
         
        .google.cloud.run.v2.VpcAccess vpc_access = 6;
        Specified by:
        getVpcAccessOrBuilder in interface RevisionTemplateOrBuilder
      • hasTimeout

        public boolean hasTimeout()
         Max allowed time for an instance to respond to a request.
         
        .google.protobuf.Duration timeout = 8;
        Specified by:
        hasTimeout in interface RevisionTemplateOrBuilder
        Returns:
        Whether the timeout field is set.
      • getTimeout

        public com.google.protobuf.Duration getTimeout()
         Max allowed time for an instance to respond to a request.
         
        .google.protobuf.Duration timeout = 8;
        Specified by:
        getTimeout in interface RevisionTemplateOrBuilder
        Returns:
        The timeout.
      • getTimeoutOrBuilder

        public com.google.protobuf.DurationOrBuilder getTimeoutOrBuilder()
         Max allowed time for an instance to respond to a request.
         
        .google.protobuf.Duration timeout = 8;
        Specified by:
        getTimeoutOrBuilder in interface RevisionTemplateOrBuilder
      • getServiceAccount

        public String getServiceAccount()
         Email address of the IAM service account associated with the revision of
         the service. The service account represents the identity of the running
         revision, and determines what permissions the revision has. If not
         provided, the revision will use the project's default service account.
         
        string service_account = 9;
        Specified by:
        getServiceAccount in interface RevisionTemplateOrBuilder
        Returns:
        The serviceAccount.
      • getServiceAccountBytes

        public com.google.protobuf.ByteString getServiceAccountBytes()
         Email address of the IAM service account associated with the revision of
         the service. The service account represents the identity of the running
         revision, and determines what permissions the revision has. If not
         provided, the revision will use the project's default service account.
         
        string service_account = 9;
        Specified by:
        getServiceAccountBytes in interface RevisionTemplateOrBuilder
        Returns:
        The bytes for serviceAccount.
      • getContainersList

        public List<Container> getContainersList()
         Holds the single container that defines the unit of execution for this
         Revision.
         
        repeated .google.cloud.run.v2.Container containers = 10;
        Specified by:
        getContainersList in interface RevisionTemplateOrBuilder
      • getContainersCount

        public int getContainersCount()
         Holds the single container that defines the unit of execution for this
         Revision.
         
        repeated .google.cloud.run.v2.Container containers = 10;
        Specified by:
        getContainersCount in interface RevisionTemplateOrBuilder
      • getContainers

        public Container getContainers​(int index)
         Holds the single container that defines the unit of execution for this
         Revision.
         
        repeated .google.cloud.run.v2.Container containers = 10;
        Specified by:
        getContainers in interface RevisionTemplateOrBuilder
      • getVolumesCount

        public int getVolumesCount()
         A list of Volumes to make available to containers.
         
        repeated .google.cloud.run.v2.Volume volumes = 11;
        Specified by:
        getVolumesCount in interface RevisionTemplateOrBuilder
      • getVolumes

        public Volume getVolumes​(int index)
         A list of Volumes to make available to containers.
         
        repeated .google.cloud.run.v2.Volume volumes = 11;
        Specified by:
        getVolumes in interface RevisionTemplateOrBuilder
      • getExecutionEnvironmentValue

        public int getExecutionEnvironmentValue()
         The sandbox environment to host this Revision.
         
        .google.cloud.run.v2.ExecutionEnvironment execution_environment = 13;
        Specified by:
        getExecutionEnvironmentValue in interface RevisionTemplateOrBuilder
        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 = 14 [(.google.api.resource_reference) = { ... }
        Specified by:
        getEncryptionKey in interface RevisionTemplateOrBuilder
        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 = 14 [(.google.api.resource_reference) = { ... }
        Specified by:
        getEncryptionKeyBytes in interface RevisionTemplateOrBuilder
        Returns:
        The bytes for encryptionKey.
      • getMaxInstanceRequestConcurrency

        public int getMaxInstanceRequestConcurrency()
         Sets the maximum number of requests that each serving instance can receive.
         
        int32 max_instance_request_concurrency = 15;
        Specified by:
        getMaxInstanceRequestConcurrency in interface RevisionTemplateOrBuilder
        Returns:
        The maxInstanceRequestConcurrency.
      • getSessionAffinity

        public boolean getSessionAffinity()
         Enable session affinity.
         
        bool session_affinity = 19;
        Specified by:
        getSessionAffinity in interface RevisionTemplateOrBuilder
        Returns:
        The sessionAffinity.
      • 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 RevisionTemplate parseFrom​(ByteBuffer data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RevisionTemplate parseFrom​(ByteBuffer data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RevisionTemplate parseFrom​(com.google.protobuf.ByteString data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RevisionTemplate parseFrom​(com.google.protobuf.ByteString data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RevisionTemplate parseFrom​(byte[] data)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RevisionTemplate parseFrom​(byte[] data,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static RevisionTemplate parseFrom​(com.google.protobuf.CodedInputStream input,
                                                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                          throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected RevisionTemplate.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<RevisionTemplate> 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 RevisionTemplate getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder