Class ExecutionTemplate.Builder (0.49.0)

publicstaticfinalclass ExecutionTemplate.BuilderextendsGeneratedMessageV3.Builder<ExecutionTemplate.Builder>implementsExecutionTemplateOrBuilder

ExecutionTemplate describes the data an execution should have when created from a template.

Protobuf type google.cloud.run.v2.ExecutionTemplate

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicExecutionTemplate.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ExecutionTemplate.Builder
Overrides

build()

publicExecutionTemplatebuild()
Returns
Type Description
ExecutionTemplate

buildPartial()

publicExecutionTemplatebuildPartial()
Returns
Type Description
ExecutionTemplate

clear()

publicExecutionTemplate.Builderclear()
Returns
Type Description
ExecutionTemplate.Builder
Overrides

clearAnnotations()

publicExecutionTemplate.BuilderclearAnnotations()
Returns
Type Description
ExecutionTemplate.Builder

clearField(Descriptors.FieldDescriptor field)

publicExecutionTemplate.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ExecutionTemplate.Builder
Overrides

clearLabels()

publicExecutionTemplate.BuilderclearLabels()
Returns
Type Description
ExecutionTemplate.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicExecutionTemplate.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ExecutionTemplate.Builder
Overrides

clearParallelism()

publicExecutionTemplate.BuilderclearParallelism()

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
Type Description
ExecutionTemplate.Builder

This builder for chaining.

clearTaskCount()

publicExecutionTemplate.BuilderclearTaskCount()

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
Type Description
ExecutionTemplate.Builder

This builder for chaining.

clearTemplate()

publicExecutionTemplate.BuilderclearTemplate()

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];

Returns
Type Description
ExecutionTemplate.Builder

clone()

publicExecutionTemplate.Builderclone()
Returns
Type Description
ExecutionTemplate.Builder
Overrides

containsAnnotations(String key)

publicbooleancontainsAnnotations(Stringkey)

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;

Parameter
Name Description
key String
Returns
Type Description
boolean

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

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;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnnotations() (deprecated)

publicMap<String,String>getAnnotations()

Use #getAnnotationsMap() instead.

Returns
Type Description
Map<String,String>

getAnnotationsCount()

publicintgetAnnotationsCount()

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;

Returns
Type Description
int

getAnnotationsMap()

publicMap<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;

Returns
Type Description
Map<String,String>

getAnnotationsOrDefault(String key, String defaultValue)

publicStringgetAnnotationsOrDefault(Stringkey,StringdefaultValue)

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;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAnnotationsOrThrow(String key)

publicStringgetAnnotationsOrThrow(Stringkey)

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;

Parameter
Name Description
key String
Returns
Type Description
String

getDefaultInstanceForType()

publicExecutionTemplategetDefaultInstanceForType()
Returns
Type Description
ExecutionTemplate

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLabels() (deprecated)

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

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;

Returns
Type Description
int

getLabelsMap()

publicMap<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;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

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;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

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;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableAnnotations() (deprecated)

publicMap<String,String>getMutableAnnotations()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableLabels() (deprecated)

publicMap<String,String>getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getParallelism()

publicintgetParallelism()

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
Type Description
int

The parallelism.

getTaskCount()

publicintgetTaskCount()

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
Type Description
int

The taskCount.

getTemplate()

publicTaskTemplategetTemplate()

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];

Returns
Type Description
TaskTemplate

The template.

getTemplateBuilder()

publicTaskTemplate.BuildergetTemplateBuilder()

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];

Returns
Type Description
TaskTemplate.Builder

getTemplateOrBuilder()

publicTaskTemplateOrBuildergetTemplateOrBuilder()

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];

Returns
Type Description
TaskTemplateOrBuilder

hasTemplate()

publicbooleanhasTemplate()

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];

Returns
Type Description
boolean

Whether the template field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ExecutionTemplate other)

publicExecutionTemplate.BuildermergeFrom(ExecutionTemplateother)
Parameter
Name Description
other ExecutionTemplate
Returns
Type Description
ExecutionTemplate.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicExecutionTemplate.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ExecutionTemplate.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicExecutionTemplate.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
ExecutionTemplate.Builder
Overrides

mergeTemplate(TaskTemplate value)

publicExecutionTemplate.BuildermergeTemplate(TaskTemplatevalue)

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];

Parameter
Name Description
value TaskTemplate
Returns
Type Description
ExecutionTemplate.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalExecutionTemplate.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ExecutionTemplate.Builder
Overrides

putAllAnnotations(Map<String,String> values)

publicExecutionTemplate.BuilderputAllAnnotations(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;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
ExecutionTemplate.Builder

putAllLabels(Map<String,String> values)

publicExecutionTemplate.BuilderputAllLabels(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;

Parameter
Name Description
values Map<String,String>
Returns
Type Description
ExecutionTemplate.Builder

putAnnotations(String key, String value)

publicExecutionTemplate.BuilderputAnnotations(Stringkey,Stringvalue)

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;

Parameters
Name Description
key String
value String
Returns
Type Description
ExecutionTemplate.Builder

putLabels(String key, String value)

publicExecutionTemplate.BuilderputLabels(Stringkey,Stringvalue)

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;

Parameters
Name Description
key String
value String
Returns
Type Description
ExecutionTemplate.Builder

removeAnnotations(String key)

publicExecutionTemplate.BuilderremoveAnnotations(Stringkey)

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;

Parameter
Name Description
key String
Returns
Type Description
ExecutionTemplate.Builder

removeLabels(String key)

publicExecutionTemplate.BuilderremoveLabels(Stringkey)

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;

Parameter
Name Description
key String
Returns
Type Description
ExecutionTemplate.Builder

setField(Descriptors.FieldDescriptor field, Object value)

publicExecutionTemplate.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ExecutionTemplate.Builder
Overrides

setParallelism(int value)

publicExecutionTemplate.BuildersetParallelism(intvalue)

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;

Parameter
Name Description
value int

The parallelism to set.

Returns
Type Description
ExecutionTemplate.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

publicExecutionTemplate.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ExecutionTemplate.Builder
Overrides

setTaskCount(int value)

publicExecutionTemplate.BuildersetTaskCount(intvalue)

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;

Parameter
Name Description
value int

The taskCount to set.

Returns
Type Description
ExecutionTemplate.Builder

This builder for chaining.

setTemplate(TaskTemplate value)

publicExecutionTemplate.BuildersetTemplate(TaskTemplatevalue)

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];

Parameter
Name Description
value TaskTemplate
Returns
Type Description
ExecutionTemplate.Builder

setTemplate(TaskTemplate.Builder builderForValue)

publicExecutionTemplate.BuildersetTemplate(TaskTemplate.BuilderbuilderForValue)

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];

Parameter
Name Description
builderForValue TaskTemplate.Builder
Returns
Type Description
ExecutionTemplate.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalExecutionTemplate.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ExecutionTemplate.Builder
Overrides

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.