Class ExecutionTemplate

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

    public final class ExecutionTemplate
    extends com.google.protobuf.GeneratedMessageV3
    implements ExecutionTemplateOrBuilder
     ExecutionTemplate describes the data an execution should have when created
     from a template.
     
    Protobuf type google.cloud.run.v2.ExecutionTemplate
    See Also:
    Serialized Form
    • 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
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: ExecutionTemplateOrBuilder
         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 ExecutionTemplate.
         
        map<string, string> labels = 1;
        Specified by:
        getLabelsCount in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
         
        map<string, string> labels = 1;
        Specified by:
        containsLabels in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
         
        map<string, string> labels = 1;
        Specified by:
        getLabelsMap in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
         
        map<string, string> labels = 1;
        Specified by:
        getLabelsOrDefault in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
         
        map<string, string> labels = 1;
        Specified by:
        getLabelsOrThrow in interface ExecutionTemplateOrBuilder
      • getAnnotationsCount

        public int getAnnotationsCount()
        Description copied from interface: ExecutionTemplateOrBuilder
         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 ExecutionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 2;
        Specified by:
        getAnnotationsCount in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 2;
        Specified by:
        containsAnnotations in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 2;
        Specified by:
        getAnnotationsMap in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 2;
        Specified by:
        getAnnotationsOrDefault in interface ExecutionTemplateOrBuilder
      • 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 ExecutionTemplate.
        
         <p>This field follows Kubernetes annotations' namespacing, limits, and
         rules.
         
        map<string, string> annotations = 2;
        Specified by:
        getAnnotationsOrThrow in interface ExecutionTemplateOrBuilder
      • getParallelism

        public int getParallelism()
         Specifies the maximum desired number of tasks the execution should run at
         given time. Must be <= task_count.
         When the job is run, if this field is 0 or unset, the maximum possible
         value will be used for that execution.
         The actual number of tasks running in steady state will be less than this
         number when there are fewer tasks waiting to be completed remaining,
         i.e. when the work left to do is less than max parallelism.
         
        int32 parallelism = 3;
        Specified by:
        getParallelism in interface ExecutionTemplateOrBuilder
        Returns:
        The parallelism.
      • getTaskCount

        public int getTaskCount()
         Specifies the desired number of tasks the execution should run.
         Setting to 1 means that parallelism is limited to 1 and the success of
         that task signals the success of the execution. Defaults to 1.
         
        int32 task_count = 4;
        Specified by:
        getTaskCount in interface ExecutionTemplateOrBuilder
        Returns:
        The taskCount.
      • hasTemplate

        public boolean hasTemplate()
         Required. Describes the task(s) that will be created when executing an
         execution.
         
        .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasTemplate in interface ExecutionTemplateOrBuilder
        Returns:
        Whether the template field is set.
      • getTemplate

        public TaskTemplate getTemplate()
         Required. Describes the task(s) that will be created when executing an
         execution.
         
        .google.cloud.run.v2.TaskTemplate template = 5 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getTemplate in interface ExecutionTemplateOrBuilder
        Returns:
        The template.
      • 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 ExecutionTemplate parseFrom​(ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

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