Class Service.Builder (0.13.0)

publicstaticfinalclass Service.BuilderextendsGeneratedMessageV3.Builder<Service.Builder>implementsServiceOrBuilder

Service acts as a top-level container that manages a set of configurations and revision templates which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership.

Protobuf type google.cloud.run.v2.Service

Implements

ServiceOrBuilder

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
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

addAllConditions(Iterable<? extends Condition> values)

publicService.BuilderaddAllConditions(Iterable<?extendsCondition>values)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.cloud.run.v2.Condition>
Returns
Type Description
Service.Builder

addAllTraffic(Iterable<? extends TrafficTarget> values)

publicService.BuilderaddAllTraffic(Iterable<?extendsTrafficTarget>values)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
values Iterable<? extends com.google.cloud.run.v2.TrafficTarget>
Returns
Type Description
Service.Builder

addAllTrafficStatuses(Iterable<? extends TrafficTargetStatus> values)

publicService.BuilderaddAllTrafficStatuses(Iterable<?extendsTrafficTargetStatus>values)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
values Iterable<? extends com.google.cloud.run.v2.TrafficTargetStatus>
Returns
Type Description
Service.Builder

addConditions(Condition value)

publicService.BuilderaddConditions(Conditionvalue)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Condition
Returns
Type Description
Service.Builder

addConditions(Condition.Builder builderForValue)

publicService.BuilderaddConditions(Condition.BuilderbuilderForValue)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Condition.Builder
Returns
Type Description
Service.Builder

addConditions(int index, Condition value)

publicService.BuilderaddConditions(intindex,Conditionvalue)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Condition
Returns
Type Description
Service.Builder

addConditions(int index, Condition.Builder builderForValue)

publicService.BuilderaddConditions(intindex,Condition.BuilderbuilderForValue)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Condition.Builder
Returns
Type Description
Service.Builder

addConditionsBuilder()

publicCondition.BuilderaddConditionsBuilder()

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Condition.Builder

addConditionsBuilder(int index)

publicCondition.BuilderaddConditionsBuilder(intindex)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Condition.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addTraffic(TrafficTarget value)

publicService.BuilderaddTraffic(TrafficTargetvalue)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
value TrafficTarget
Returns
Type Description
Service.Builder

addTraffic(TrafficTarget.Builder builderForValue)

publicService.BuilderaddTraffic(TrafficTarget.BuilderbuilderForValue)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
builderForValue TrafficTarget.Builder
Returns
Type Description
Service.Builder

addTraffic(int index, TrafficTarget value)

publicService.BuilderaddTraffic(intindex,TrafficTargetvalue)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameters
Name Description
index int
value TrafficTarget
Returns
Type Description
Service.Builder

addTraffic(int index, TrafficTarget.Builder builderForValue)

publicService.BuilderaddTraffic(intindex,TrafficTarget.BuilderbuilderForValue)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameters
Name Description
index int
builderForValue TrafficTarget.Builder
Returns
Type Description
Service.Builder

addTrafficBuilder()

publicTrafficTarget.BuilderaddTrafficBuilder()

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Returns
Type Description
TrafficTarget.Builder

addTrafficBuilder(int index)

publicTrafficTarget.BuilderaddTrafficBuilder(intindex)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
index int
Returns
Type Description
TrafficTarget.Builder

addTrafficStatuses(TrafficTargetStatus value)

publicService.BuilderaddTrafficStatuses(TrafficTargetStatusvalue)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value TrafficTargetStatus
Returns
Type Description
Service.Builder

addTrafficStatuses(TrafficTargetStatus.Builder builderForValue)

publicService.BuilderaddTrafficStatuses(TrafficTargetStatus.BuilderbuilderForValue)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue TrafficTargetStatus.Builder
Returns
Type Description
Service.Builder

addTrafficStatuses(int index, TrafficTargetStatus value)

publicService.BuilderaddTrafficStatuses(intindex,TrafficTargetStatusvalue)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value TrafficTargetStatus
Returns
Type Description
Service.Builder

addTrafficStatuses(int index, TrafficTargetStatus.Builder builderForValue)

publicService.BuilderaddTrafficStatuses(intindex,TrafficTargetStatus.BuilderbuilderForValue)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue TrafficTargetStatus.Builder
Returns
Type Description
Service.Builder

addTrafficStatusesBuilder()

publicTrafficTargetStatus.BuilderaddTrafficStatusesBuilder()

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TrafficTargetStatus.Builder

addTrafficStatusesBuilder(int index)

publicTrafficTargetStatus.BuilderaddTrafficStatusesBuilder(intindex)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
TrafficTargetStatus.Builder

build()

publicServicebuild()
Returns
Type Description
Service

buildPartial()

publicServicebuildPartial()
Returns
Type Description
Service

clear()

publicService.Builderclear()
Returns
Type Description
Service.Builder
Overrides

clearAnnotations()

publicService.BuilderclearAnnotations()
Returns
Type Description
Service.Builder

clearBinaryAuthorization()

publicService.BuilderclearBinaryAuthorization()

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Returns
Type Description
Service.Builder

clearClient()

publicService.BuilderclearClient()

Arbitrary identifier for the API client.

string client = 13;

Returns
Type Description
Service.Builder

This builder for chaining.

clearClientVersion()

publicService.BuilderclearClientVersion()

Arbitrary version identifier for the API client.

string client_version = 14;

Returns
Type Description
Service.Builder

This builder for chaining.

clearConditions()

publicService.BuilderclearConditions()

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

clearCreateTime()

publicService.BuilderclearCreateTime()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

clearCreator()

publicService.BuilderclearCreator()

Output only. Email address of the authenticated creator.

string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clearDeleteTime()

publicService.BuilderclearDeleteTime()

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

clearDescription()

publicService.BuilderclearDescription()

User-provided description of the Service. This field currently has a 512-character limit.

string description = 2;

Returns
Type Description
Service.Builder

This builder for chaining.

clearEtag()

publicService.BuilderclearEtag()

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clearExpireTime()

publicService.BuilderclearExpireTime()

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

clearField(Descriptors.FieldDescriptor field)

publicService.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Service.Builder
Overrides

clearGeneration()

publicService.BuilderclearGeneration()

Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.

int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clearIngress()

publicService.BuilderclearIngress()

Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.

.google.cloud.run.v2.IngressTraffic ingress = 15;

Returns
Type Description
Service.Builder

This builder for chaining.

clearLabels()

publicService.BuilderclearLabels()
Returns
Type Description
Service.Builder

clearLastModifier()

publicService.BuilderclearLastModifier()

Output only. Email address of the last authenticated modifier.

string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clearLatestCreatedRevision()

publicService.BuilderclearLatestCreatedRevision()

Output only. Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
Service.Builder

This builder for chaining.

clearLatestReadyRevision()

publicService.BuilderclearLatestReadyRevision()

Output only. Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
Service.Builder

This builder for chaining.

clearLaunchStage()

publicService.BuilderclearLaunchStage()

The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed.

.google.api.LaunchStage launch_stage = 16;

Returns
Type Description
Service.Builder

This builder for chaining.

clearName()

publicService.BuilderclearName()

The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id}

string name = 1;

Returns
Type Description
Service.Builder

This builder for chaining.

clearObservedGeneration()

publicService.BuilderclearObservedGeneration()

Output only. The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.

int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicService.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Service.Builder
Overrides

clearReconciling()

publicService.BuilderclearReconciling()

Output only. Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observed_generation, latest_ready_revison, traffic_statuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminal_condition.state. If reconciliation succeeded, the following fields will match: traffic and traffic_statuses, observed_generation and generation, latest_ready_revision and latest_created_revision. If reconciliation failed, traffic_statuses, observed_generation, and latest_ready_revision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminal_condition and conditions.

bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clearTemplate()

publicService.BuilderclearTemplate()

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Service.Builder

clearTerminalCondition()

publicService.BuilderclearTerminalCondition()

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

clearTraffic()

publicService.BuilderclearTraffic()

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Returns
Type Description
Service.Builder

clearTrafficStatuses()

publicService.BuilderclearTrafficStatuses()

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

clearUid()

publicService.BuilderclearUid()

Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clearUpdateTime()

publicService.BuilderclearUpdateTime()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

clearUri()

publicService.BuilderclearUri()

Output only. The main URI in which this Service is serving traffic.

string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Service.Builder

This builder for chaining.

clone()

publicService.Builderclone()
Returns
Type Description
Service.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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

Parameter
Name Description
key String
Returns
Type Description
boolean

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Map of string keys and values 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 Service.

map<string, string> labels = 5;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAnnotations()

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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

Parameter
Name Description
key String
Returns
Type Description
String

getBinaryAuthorization()

publicBinaryAuthorizationgetBinaryAuthorization()

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Returns
Type Description
BinaryAuthorization

The binaryAuthorization.

getBinaryAuthorizationBuilder()

publicBinaryAuthorization.BuildergetBinaryAuthorizationBuilder()

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Returns
Type Description
BinaryAuthorization.Builder

getBinaryAuthorizationOrBuilder()

publicBinaryAuthorizationOrBuildergetBinaryAuthorizationOrBuilder()

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Returns
Type Description
BinaryAuthorizationOrBuilder

getClient()

publicStringgetClient()

Arbitrary identifier for the API client.

string client = 13;

Returns
Type Description
String

The client.

getClientBytes()

publicByteStringgetClientBytes()

Arbitrary identifier for the API client.

string client = 13;

Returns
Type Description
ByteString

The bytes for client.

getClientVersion()

publicStringgetClientVersion()

Arbitrary version identifier for the API client.

string client_version = 14;

Returns
Type Description
String

The clientVersion.

getClientVersionBytes()

publicByteStringgetClientVersionBytes()

Arbitrary version identifier for the API client.

string client_version = 14;

Returns
Type Description
ByteString

The bytes for clientVersion.

getConditions(int index)

publicConditiongetConditions(intindex)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Condition

getConditionsBuilder(int index)

publicCondition.BuildergetConditionsBuilder(intindex)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Condition.Builder

getConditionsBuilderList()

publicList<Condition.Builder>getConditionsBuilderList()

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getConditionsCount()

publicintgetConditionsCount()

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getConditionsList()

publicList<Condition>getConditionsList()

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Condition>

getConditionsOrBuilder(int index)

publicConditionOrBuildergetConditionsOrBuilder(intindex)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
ConditionOrBuilder

getConditionsOrBuilderList()

publicList<?extendsConditionOrBuilder>getConditionsOrBuilderList()

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.run.v2.ConditionOrBuilder>

getCreateTime()

publicTimestampgetCreateTime()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

publicTimestamp.BuildergetCreateTimeBuilder()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

publicTimestampOrBuildergetCreateTimeOrBuilder()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getCreator()

publicStringgetCreator()

Output only. Email address of the authenticated creator.

string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The creator.

getCreatorBytes()

publicByteStringgetCreatorBytes()

Output only. Email address of the authenticated creator.

string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for creator.

getDefaultInstanceForType()

publicServicegetDefaultInstanceForType()
Returns
Type Description
Service

getDeleteTime()

publicTimestampgetDeleteTime()

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The deleteTime.

getDeleteTimeBuilder()

publicTimestamp.BuildergetDeleteTimeBuilder()

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getDeleteTimeOrBuilder()

publicTimestampOrBuildergetDeleteTimeOrBuilder()

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDescription()

publicStringgetDescription()

User-provided description of the Service. This field currently has a 512-character limit.

string description = 2;

Returns
Type Description
String

The description.

getDescriptionBytes()

publicByteStringgetDescriptionBytes()

User-provided description of the Service. This field currently has a 512-character limit.

string description = 2;

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEtag()

publicStringgetEtag()

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The etag.

getEtagBytes()

publicByteStringgetEtagBytes()

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for etag.

getExpireTime()

publicTimestampgetExpireTime()

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The expireTime.

getExpireTimeBuilder()

publicTimestamp.BuildergetExpireTimeBuilder()

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getExpireTimeOrBuilder()

publicTimestampOrBuildergetExpireTimeOrBuilder()

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getGeneration()

publiclonggetGeneration()

Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.

int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The generation.

getIngress()

publicIngressTrafficgetIngress()

Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.

.google.cloud.run.v2.IngressTraffic ingress = 15;

Returns
Type Description
IngressTraffic

The ingress.

getIngressValue()

publicintgetIngressValue()

Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.

.google.cloud.run.v2.IngressTraffic ingress = 15;

Returns
Type Description
int

The enum numeric value on the wire for ingress.

getLabels()

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
Type Description
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

Map of string keys and values 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 Service.

map<string, string> labels = 5;

Returns
Type Description
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

Map of string keys and values 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 Service.

map<string, string> labels = 5;

Returns
Type Description
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

Map of string keys and values 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 Service.

map<string, string> labels = 5;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Map of string keys and values 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 Service.

map<string, string> labels = 5;

Parameter
Name Description
key String
Returns
Type Description
String

getLastModifier()

publicStringgetLastModifier()

Output only. Email address of the last authenticated modifier.

string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The lastModifier.

getLastModifierBytes()

publicByteStringgetLastModifierBytes()

Output only. Email address of the last authenticated modifier.

string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for lastModifier.

getLatestCreatedRevision()

publicStringgetLatestCreatedRevision()

Output only. Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The latestCreatedRevision.

getLatestCreatedRevisionBytes()

publicByteStringgetLatestCreatedRevisionBytes()

Output only. Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for latestCreatedRevision.

getLatestReadyRevision()

publicStringgetLatestReadyRevision()

Output only. Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The latestReadyRevision.

getLatestReadyRevisionBytes()

publicByteStringgetLatestReadyRevisionBytes()

Output only. Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for latestReadyRevision.

getLaunchStage()

publicLaunchStagegetLaunchStage()

The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed.

.google.api.LaunchStage launch_stage = 16;

Returns
Type Description
com.google.api.LaunchStage

The launchStage.

getLaunchStageValue()

publicintgetLaunchStageValue()

The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed.

.google.api.LaunchStage launch_stage = 16;

Returns
Type Description
int

The enum numeric value on the wire for launchStage.

getMutableAnnotations()

publicMap<String,String>getMutableAnnotations()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getMutableLabels()

publicMap<String,String>getMutableLabels()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

publicStringgetName()

The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id}

string name = 1;

Returns
Type Description
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id}

string name = 1;

Returns
Type Description
ByteString

The bytes for name.

getObservedGeneration()

publiclonggetObservedGeneration()

Output only. The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.

int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
long

The observedGeneration.

getReconciling()

publicbooleangetReconciling()

Output only. Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observed_generation, latest_ready_revison, traffic_statuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminal_condition.state. If reconciliation succeeded, the following fields will match: traffic and traffic_statuses, observed_generation and generation, latest_ready_revision and latest_created_revision. If reconciliation failed, traffic_statuses, observed_generation, and latest_ready_revision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminal_condition and conditions.

bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The reconciling.

getTemplate()

publicRevisionTemplategetTemplate()

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RevisionTemplate

The template.

getTemplateBuilder()

publicRevisionTemplate.BuildergetTemplateBuilder()

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RevisionTemplate.Builder

getTemplateOrBuilder()

publicRevisionTemplateOrBuildergetTemplateOrBuilder()

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
RevisionTemplateOrBuilder

getTerminalCondition()

publicConditiongetTerminalCondition()

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Condition

The terminalCondition.

getTerminalConditionBuilder()

publicCondition.BuildergetTerminalConditionBuilder()

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Condition.Builder

getTerminalConditionOrBuilder()

publicConditionOrBuildergetTerminalConditionOrBuilder()

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ConditionOrBuilder

getTraffic(int index)

publicTrafficTargetgetTraffic(intindex)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
index int
Returns
Type Description
TrafficTarget

getTrafficBuilder(int index)

publicTrafficTarget.BuildergetTrafficBuilder(intindex)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
index int
Returns
Type Description
TrafficTarget.Builder

getTrafficBuilderList()

publicList<TrafficTarget.Builder>getTrafficBuilderList()

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Returns
Type Description
List<Builder>

getTrafficCount()

publicintgetTrafficCount()

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Returns
Type Description
int

getTrafficList()

publicList<TrafficTarget>getTrafficList()

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Returns
Type Description
List<TrafficTarget>

getTrafficOrBuilder(int index)

publicTrafficTargetOrBuildergetTrafficOrBuilder(intindex)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
index int
Returns
Type Description
TrafficTargetOrBuilder

getTrafficOrBuilderList()

publicList<?extendsTrafficTargetOrBuilder>getTrafficOrBuilderList()

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Returns
Type Description
List<? extends com.google.cloud.run.v2.TrafficTargetOrBuilder>

getTrafficStatuses(int index)

publicTrafficTargetStatusgetTrafficStatuses(intindex)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
TrafficTargetStatus

getTrafficStatusesBuilder(int index)

publicTrafficTargetStatus.BuildergetTrafficStatusesBuilder(intindex)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
TrafficTargetStatus.Builder

getTrafficStatusesBuilderList()

publicList<TrafficTargetStatus.Builder>getTrafficStatusesBuilderList()

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<Builder>

getTrafficStatusesCount()

publicintgetTrafficStatusesCount()

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getTrafficStatusesList()

publicList<TrafficTargetStatus>getTrafficStatusesList()

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<TrafficTargetStatus>

getTrafficStatusesOrBuilder(int index)

publicTrafficTargetStatusOrBuildergetTrafficStatusesOrBuilder(intindex)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
TrafficTargetStatusOrBuilder

getTrafficStatusesOrBuilderList()

publicList<?extendsTrafficTargetStatusOrBuilder>getTrafficStatusesOrBuilderList()

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.run.v2.TrafficTargetStatusOrBuilder>

getUid()

publicStringgetUid()

Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uid.

getUidBytes()

publicByteStringgetUidBytes()

Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uid.

getUpdateTime()

publicTimestampgetUpdateTime()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

publicTimestamp.BuildergetUpdateTimeBuilder()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

publicTimestampOrBuildergetUpdateTimeOrBuilder()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getUri()

publicStringgetUri()

Output only. The main URI in which this Service is serving traffic.

string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The uri.

getUriBytes()

publicByteStringgetUriBytes()

Output only. The main URI in which this Service is serving traffic.

string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for uri.

hasBinaryAuthorization()

publicbooleanhasBinaryAuthorization()

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Returns
Type Description
boolean

Whether the binaryAuthorization field is set.

hasCreateTime()

publicbooleanhasCreateTime()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasDeleteTime()

publicbooleanhasDeleteTime()

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the deleteTime field is set.

hasExpireTime()

publicbooleanhasExpireTime()

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the expireTime field is set.

hasTemplate()

publicbooleanhasTemplate()

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the template field is set.

hasTerminalCondition()

publicbooleanhasTerminalCondition()

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the terminalCondition field is set.

hasUpdateTime()

publicbooleanhasUpdateTime()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

internalGetMutableMapField(int number)

protectedMapFieldinternalGetMutableMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeBinaryAuthorization(BinaryAuthorization value)

publicService.BuildermergeBinaryAuthorization(BinaryAuthorizationvalue)

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Parameter
Name Description
value BinaryAuthorization
Returns
Type Description
Service.Builder

mergeCreateTime(Timestamp value)

publicService.BuildermergeCreateTime(Timestampvalue)

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

mergeDeleteTime(Timestamp value)

publicService.BuildermergeDeleteTime(Timestampvalue)

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

mergeExpireTime(Timestamp value)

publicService.BuildermergeExpireTime(Timestampvalue)

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

mergeFrom(Service other)

publicService.BuildermergeFrom(Serviceother)
Parameter
Name Description
other Service
Returns
Type Description
Service.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

publicService.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Service.Builder
Overrides

mergeTemplate(RevisionTemplate value)

publicService.BuildermergeTemplate(RevisionTemplatevalue)

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value RevisionTemplate
Returns
Type Description
Service.Builder

mergeTerminalCondition(Condition value)

publicService.BuildermergeTerminalCondition(Conditionvalue)

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Condition
Returns
Type Description
Service.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalService.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Service.Builder
Overrides

mergeUpdateTime(Timestamp value)

publicService.BuildermergeUpdateTime(Timestampvalue)

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

putAllAnnotations(Map<String,String> values)

publicService.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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

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

putAllLabels(Map<String,String> values)

publicService.BuilderputAllLabels(Map<String,String>values)

Map of string keys and values 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 Service.

map<string, string> labels = 5;

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

putAnnotations(String key, String value)

publicService.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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

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

putLabels(String key, String value)

publicService.BuilderputLabels(Stringkey,Stringvalue)

Map of string keys and values 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 Service.

map<string, string> labels = 5;

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

removeAnnotations(String key)

publicService.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 Service. <p>This field follows Kubernetes annotations' namespacing, limits, and rules. More info: https://kubernetes.io/docs/user-guide/annotations

map<string, string> annotations = 6;

Parameter
Name Description
key String
Returns
Type Description
Service.Builder

removeConditions(int index)

publicService.BuilderremoveConditions(intindex)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Service.Builder

removeLabels(String key)

publicService.BuilderremoveLabels(Stringkey)

Map of string keys and values 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 Service.

map<string, string> labels = 5;

Parameter
Name Description
key String
Returns
Type Description
Service.Builder

removeTraffic(int index)

publicService.BuilderremoveTraffic(intindex)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameter
Name Description
index int
Returns
Type Description
Service.Builder

removeTrafficStatuses(int index)

publicService.BuilderremoveTrafficStatuses(intindex)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
Service.Builder

setBinaryAuthorization(BinaryAuthorization value)

publicService.BuildersetBinaryAuthorization(BinaryAuthorizationvalue)

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Parameter
Name Description
value BinaryAuthorization
Returns
Type Description
Service.Builder

setBinaryAuthorization(BinaryAuthorization.Builder builderForValue)

publicService.BuildersetBinaryAuthorization(BinaryAuthorization.BuilderbuilderForValue)

Settings for the Binary Authorization feature.

.google.cloud.run.v2.BinaryAuthorization binary_authorization = 17;

Parameter
Name Description
builderForValue BinaryAuthorization.Builder
Returns
Type Description
Service.Builder

setClient(String value)

publicService.BuildersetClient(Stringvalue)

Arbitrary identifier for the API client.

string client = 13;

Parameter
Name Description
value String

The client to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setClientBytes(ByteString value)

publicService.BuildersetClientBytes(ByteStringvalue)

Arbitrary identifier for the API client.

string client = 13;

Parameter
Name Description
value ByteString

The bytes for client to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setClientVersion(String value)

publicService.BuildersetClientVersion(Stringvalue)

Arbitrary version identifier for the API client.

string client_version = 14;

Parameter
Name Description
value String

The clientVersion to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setClientVersionBytes(ByteString value)

publicService.BuildersetClientVersionBytes(ByteStringvalue)

Arbitrary version identifier for the API client.

string client_version = 14;

Parameter
Name Description
value ByteString

The bytes for clientVersion to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setConditions(int index, Condition value)

publicService.BuildersetConditions(intindex,Conditionvalue)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value Condition
Returns
Type Description
Service.Builder

setConditions(int index, Condition.Builder builderForValue)

publicService.BuildersetConditions(intindex,Condition.BuilderbuilderForValue)

Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.Condition conditions = 32 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue Condition.Builder
Returns
Type Description
Service.Builder

setCreateTime(Timestamp value)

publicService.BuildersetCreateTime(Timestampvalue)

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

setCreateTime(Timestamp.Builder builderForValue)

publicService.BuildersetCreateTime(Timestamp.BuilderbuilderForValue)

Output only. The creation time.

.google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Service.Builder

setCreator(String value)

publicService.BuildersetCreator(Stringvalue)

Output only. Email address of the authenticated creator.

string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The creator to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setCreatorBytes(ByteString value)

publicService.BuildersetCreatorBytes(ByteStringvalue)

Output only. Email address of the authenticated creator.

string creator = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for creator to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setDeleteTime(Timestamp value)

publicService.BuildersetDeleteTime(Timestampvalue)

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

setDeleteTime(Timestamp.Builder builderForValue)

publicService.BuildersetDeleteTime(Timestamp.BuilderbuilderForValue)

Output only. The deletion time.

.google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Service.Builder

setDescription(String value)

publicService.BuildersetDescription(Stringvalue)

User-provided description of the Service. This field currently has a 512-character limit.

string description = 2;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

publicService.BuildersetDescriptionBytes(ByteStringvalue)

User-provided description of the Service. This field currently has a 512-character limit.

string description = 2;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setEtag(String value)

publicService.BuildersetEtag(Stringvalue)

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The etag to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setEtagBytes(ByteString value)

publicService.BuildersetEtagBytes(ByteStringvalue)

Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.

string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for etag to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setExpireTime(Timestamp value)

publicService.BuildersetExpireTime(Timestampvalue)

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

setExpireTime(Timestamp.Builder builderForValue)

publicService.BuildersetExpireTime(Timestamp.BuilderbuilderForValue)

Output only. For a deleted resource, the time after which it will be permamently deleted.

.google.protobuf.Timestamp expire_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Service.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setGeneration(long value)

publicService.BuildersetGeneration(longvalue)

Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.

int64 generation = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The generation to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setIngress(IngressTraffic value)

publicService.BuildersetIngress(IngressTrafficvalue)

Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.

.google.cloud.run.v2.IngressTraffic ingress = 15;

Parameter
Name Description
value IngressTraffic

The ingress to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setIngressValue(int value)

publicService.BuildersetIngressValue(intvalue)

Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.

.google.cloud.run.v2.IngressTraffic ingress = 15;

Parameter
Name Description
value int

The enum numeric value on the wire for ingress to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLastModifier(String value)

publicService.BuildersetLastModifier(Stringvalue)

Output only. Email address of the last authenticated modifier.

string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The lastModifier to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLastModifierBytes(ByteString value)

publicService.BuildersetLastModifierBytes(ByteStringvalue)

Output only. Email address of the last authenticated modifier.

string last_modifier = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for lastModifier to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLatestCreatedRevision(String value)

publicService.BuildersetLatestCreatedRevision(Stringvalue)

Output only. Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The latestCreatedRevision to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLatestCreatedRevisionBytes(ByteString value)

publicService.BuildersetLatestCreatedRevisionBytes(ByteStringvalue)

Output only. Name of the last created revision. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_created_revision = 34 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for latestCreatedRevision to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLatestReadyRevision(String value)

publicService.BuildersetLatestReadyRevision(Stringvalue)

Output only. Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The latestReadyRevision to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLatestReadyRevisionBytes(ByteString value)

publicService.BuildersetLatestReadyRevisionBytes(ByteStringvalue)

Output only. Name of the latest revision that is serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run.

string latest_ready_revision = 33 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for latestReadyRevision to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLaunchStage(LaunchStage value)

publicService.BuildersetLaunchStage(LaunchStagevalue)

The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed.

.google.api.LaunchStage launch_stage = 16;

Parameter
Name Description
value com.google.api.LaunchStage

The launchStage to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setLaunchStageValue(int value)

publicService.BuildersetLaunchStageValue(intvalue)

The launch stage as defined by Google Cloud Platform Launch Stages. Cloud Run supports ALPHA, BETA, and GA. If no value is specified, GA is assumed.

.google.api.LaunchStage launch_stage = 16;

Parameter
Name Description
value int

The enum numeric value on the wire for launchStage to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setName(String value)

publicService.BuildersetName(Stringvalue)

The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id}

string name = 1;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setNameBytes(ByteString value)

publicService.BuildersetNameBytes(ByteStringvalue)

The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id}

string name = 1;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setObservedGeneration(long value)

publicService.BuildersetObservedGeneration(longvalue)

Output only. The generation of this Service currently serving traffic. See comments in reconciling for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a string instead of an integer.

int64 observed_generation = 30 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value long

The observedGeneration to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setReconciling(boolean value)

publicService.BuildersetReconciling(booleanvalue)

Output only. Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, observed_generation, latest_ready_revison, traffic_statuses, and uri will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in terminal_condition.state. If reconciliation succeeded, the following fields will match: traffic and traffic_statuses, observed_generation and generation, latest_ready_revision and latest_created_revision. If reconciliation failed, traffic_statuses, observed_generation, and latest_ready_revision will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in terminal_condition and conditions.

bool reconciling = 98 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The reconciling to set.

Returns
Type Description
Service.Builder

This builder for chaining.

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

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

setTemplate(RevisionTemplate value)

publicService.BuildersetTemplate(RevisionTemplatevalue)

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value RevisionTemplate
Returns
Type Description
Service.Builder

setTemplate(RevisionTemplate.Builder builderForValue)

publicService.BuildersetTemplate(RevisionTemplate.BuilderbuilderForValue)

Required. The template used to create revisions for this Service.

.google.cloud.run.v2.RevisionTemplate template = 18 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue RevisionTemplate.Builder
Returns
Type Description
Service.Builder

setTerminalCondition(Condition value)

publicService.BuildersetTerminalCondition(Conditionvalue)

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Condition
Returns
Type Description
Service.Builder

setTerminalCondition(Condition.Builder builderForValue)

publicService.BuildersetTerminalCondition(Condition.BuilderbuilderForValue)

Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in reconciling for additional information on reconciliation process in Cloud Run.

.google.cloud.run.v2.Condition terminal_condition = 31 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Condition.Builder
Returns
Type Description
Service.Builder

setTraffic(int index, TrafficTarget value)

publicService.BuildersetTraffic(intindex,TrafficTargetvalue)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameters
Name Description
index int
value TrafficTarget
Returns
Type Description
Service.Builder

setTraffic(int index, TrafficTarget.Builder builderForValue)

publicService.BuildersetTraffic(intindex,TrafficTarget.BuilderbuilderForValue)

Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest Ready Revision.

repeated .google.cloud.run.v2.TrafficTarget traffic = 19;

Parameters
Name Description
index int
builderForValue TrafficTarget.Builder
Returns
Type Description
Service.Builder

setTrafficStatuses(int index, TrafficTargetStatus value)

publicService.BuildersetTrafficStatuses(intindex,TrafficTargetStatusvalue)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
value TrafficTargetStatus
Returns
Type Description
Service.Builder

setTrafficStatuses(int index, TrafficTargetStatus.Builder builderForValue)

publicService.BuildersetTrafficStatuses(intindex,TrafficTargetStatus.BuilderbuilderForValue)

Output only. Detailed status information for corresponding traffic targets. See comments in reconciling for additional information on reconciliation process in Cloud Run.

repeated .google.cloud.run.v2.TrafficTargetStatus traffic_statuses = 35 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
Name Description
index int
builderForValue TrafficTargetStatus.Builder
Returns
Type Description
Service.Builder

setUid(String value)

publicService.BuildersetUid(Stringvalue)

Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The uid to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setUidBytes(ByteString value)

publicService.BuildersetUidBytes(ByteStringvalue)

Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.

string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for uid to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalService.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Service.Builder
Overrides

setUpdateTime(Timestamp value)

publicService.BuildersetUpdateTime(Timestampvalue)

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Service.Builder

setUpdateTime(Timestamp.Builder builderForValue)

publicService.BuildersetUpdateTime(Timestamp.BuilderbuilderForValue)

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Service.Builder

setUri(String value)

publicService.BuildersetUri(Stringvalue)

Output only. The main URI in which this Service is serving traffic.

string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
Service.Builder

This builder for chaining.

setUriBytes(ByteString value)

publicService.BuildersetUriBytes(ByteStringvalue)

Output only. The main URI in which this Service is serving traffic.

string uri = 36 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
Service.Builder

This builder for chaining.

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.