Class ExecutionTemplate.Builder

  • All Implemented Interfaces:
    ExecutionTemplateOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ExecutionTemplate

    public static final class ExecutionTemplate.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
    implements ExecutionTemplateOrBuilder
     ExecutionTemplate describes the data an execution should have when created
     from a template.
     
    Protobuf type google.cloud.run.v2.ExecutionTemplate
    • Method Detail

      • 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.Builder<ExecutionTemplate.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • clear

        public ExecutionTemplate.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • getDefaultInstanceForType

        public ExecutionTemplate getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

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

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

        public ExecutionTemplate.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • setField

        public ExecutionTemplate.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                  Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • clearField

        public ExecutionTemplate.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • clearOneof

        public ExecutionTemplate.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • setRepeatedField

        public ExecutionTemplate.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          int index,
                                                          Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • addRepeatedField

        public ExecutionTemplate.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                          Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • mergeFrom

        public ExecutionTemplate.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ExecutionTemplate.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • mergeFrom

        public ExecutionTemplate.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                   com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                            throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<ExecutionTemplate.Builder>
        Throws:
        IOException
      • 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
      • removeLabels

        public ExecutionTemplate.Builder removeLabels​(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;
      • getMutableLabels

        @Deprecated
        public Map<String,​String> getMutableLabels()
        Deprecated.
        Use alternate mutation accessors instead.
      • putLabels

        public ExecutionTemplate.Builder putLabels​(String key,
                                                   String value)
         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;
      • putAllLabels

        public ExecutionTemplate.Builder putAllLabels​(Map<String,​String> values)
         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;
      • 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
      • removeAnnotations

        public ExecutionTemplate.Builder removeAnnotations​(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;
      • getMutableAnnotations

        @Deprecated
        public Map<String,​String> getMutableAnnotations()
        Deprecated.
        Use alternate mutation accessors instead.
      • putAnnotations

        public ExecutionTemplate.Builder putAnnotations​(String key,
                                                        String value)
         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;
      • putAllAnnotations

        public ExecutionTemplate.Builder putAllAnnotations​(Map<String,​String> values)
         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;
      • 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.
      • setParallelism

        public ExecutionTemplate.Builder setParallelism​(int value)
         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;
        Parameters:
        value - The parallelism to set.
        Returns:
        This builder for chaining.
      • clearParallelism

        public ExecutionTemplate.Builder clearParallelism()
         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;
        Returns:
        This builder for chaining.
      • 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.
      • setTaskCount

        public ExecutionTemplate.Builder setTaskCount​(int value)
         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;
        Parameters:
        value - The taskCount to set.
        Returns:
        This builder for chaining.
      • clearTaskCount

        public ExecutionTemplate.Builder clearTaskCount()
         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;
        Returns:
        This builder for chaining.
      • 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.
      • setTemplate

        public ExecutionTemplate.Builder setTemplate​(TaskTemplate value)
         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];
      • setTemplate

        public ExecutionTemplate.Builder setTemplate​(TaskTemplate.Builder builderForValue)
         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];
      • mergeTemplate

        public ExecutionTemplate.Builder mergeTemplate​(TaskTemplate value)
         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];
      • clearTemplate

        public ExecutionTemplate.Builder clearTemplate()
         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];
      • getTemplateBuilder

        public TaskTemplate.Builder getTemplateBuilder()
         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];
      • setUnknownFields

        public final ExecutionTemplate.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>
      • mergeUnknownFields

        public final ExecutionTemplate.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ExecutionTemplate.Builder>