Class Probe.Builder (0.6.0)

publicstaticfinalclass Probe.BuilderextendsGeneratedMessageV3.Builder<Probe.Builder>implementsProbeOrBuilder

Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.

Protobuf type google.cloud.run.v2.Probe

Implements

ProbeOrBuilder

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicProbe.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

build()

publicProbebuild()
Returns
Type Description

buildPartial()

publicProbebuildPartial()
Returns
Type Description

clear()

publicProbe.Builderclear()
Returns
Type Description
Overrides

clearFailureThreshold()

publicProbe.BuilderclearFailureThreshold()

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

int32 failure_threshold = 4;

Returns
Type Description
Probe.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

publicProbe.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
Returns
Type Description
Overrides

clearGrpc()

publicProbe.BuilderclearGrpc()

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Returns
Type Description

clearHttpGet()

publicProbe.BuilderclearHttpGet()

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Returns
Type Description

clearInitialDelaySeconds()

publicProbe.BuilderclearInitialDelaySeconds()

Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

int32 initial_delay_seconds = 1;

Returns
Type Description
Probe.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicProbe.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
Returns
Type Description
Overrides

clearPeriodSeconds()

publicProbe.BuilderclearPeriodSeconds()

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.

int32 period_seconds = 3;

Returns
Type Description
Probe.Builder

This builder for chaining.

clearProbeType()

publicProbe.BuilderclearProbeType()
Returns
Type Description

clearTcpSocket()

publicProbe.BuilderclearTcpSocket()

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Returns
Type Description

clearTimeoutSeconds()

publicProbe.BuilderclearTimeoutSeconds()

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

int32 timeout_seconds = 2;

Returns
Type Description
Probe.Builder

This builder for chaining.

clone()

publicProbe.Builderclone()
Returns
Type Description
Overrides

getDefaultInstanceForType()

publicProbegetDefaultInstanceForType()
Returns
Type Description

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Overrides

getFailureThreshold()

publicintgetFailureThreshold()

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

int32 failure_threshold = 4;

Returns
Type Description
int

The failureThreshold.

getGrpc()

publicGRPCActiongetGrpc()

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Returns
Type Description
GRPCAction

The grpc.

getGrpcBuilder()

publicGRPCAction.BuildergetGrpcBuilder()

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Returns
Type Description

getGrpcOrBuilder()

publicGRPCActionOrBuildergetGrpcOrBuilder()

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Returns
Type Description

getHttpGet()

publicHTTPGetActiongetHttpGet()

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Returns
Type Description
HTTPGetAction

The httpGet.

getHttpGetBuilder()

publicHTTPGetAction.BuildergetHttpGetBuilder()

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Returns
Type Description

getHttpGetOrBuilder()

publicHTTPGetActionOrBuildergetHttpGetOrBuilder()

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Returns
Type Description

getInitialDelaySeconds()

publicintgetInitialDelaySeconds()

Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

int32 initial_delay_seconds = 1;

Returns
Type Description
int

The initialDelaySeconds.

getPeriodSeconds()

publicintgetPeriodSeconds()

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.

int32 period_seconds = 3;

Returns
Type Description
int

The periodSeconds.

getProbeTypeCase()

publicProbe.ProbeTypeCasegetProbeTypeCase()
Returns
Type Description

getTcpSocket()

publicTCPSocketActiongetTcpSocket()

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Returns
Type Description
TCPSocketAction

The tcpSocket.

getTcpSocketBuilder()

publicTCPSocketAction.BuildergetTcpSocketBuilder()

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Returns
Type Description

getTcpSocketOrBuilder()

publicTCPSocketActionOrBuildergetTcpSocketOrBuilder()

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Returns
Type Description

getTimeoutSeconds()

publicintgetTimeoutSeconds()

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

int32 timeout_seconds = 2;

Returns
Type Description
int

The timeoutSeconds.

hasGrpc()

publicbooleanhasGrpc()

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Returns
Type Description
boolean

Whether the grpc field is set.

hasHttpGet()

publicbooleanhasHttpGet()

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Returns
Type Description
boolean

Whether the httpGet field is set.

hasTcpSocket()

publicbooleanhasTcpSocket()

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Returns
Type Description
boolean

Whether the tcpSocket field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

mergeFrom(Probe other)

publicProbe.BuildermergeFrom(Probeother)
Parameter
Name Description
other Probe
Returns
Type Description

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicProbe.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Overrides Exceptions
Type Description

mergeFrom(Message other)

publicProbe.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
Overrides

mergeGrpc(GRPCAction value)

publicProbe.BuildermergeGrpc(GRPCActionvalue)

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Parameter
Name Description
value GRPCAction
Returns
Type Description

mergeHttpGet(HTTPGetAction value)

publicProbe.BuildermergeHttpGet(HTTPGetActionvalue)

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Parameter
Name Description
Returns
Type Description

mergeTcpSocket(TCPSocketAction value)

publicProbe.BuildermergeTcpSocket(TCPSocketActionvalue)

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Parameter
Name Description
Returns
Type Description

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalProbe.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Overrides

setFailureThreshold(int value)

publicProbe.BuildersetFailureThreshold(intvalue)

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.

int32 failure_threshold = 4;

Parameter
Name Description
value int

The failureThreshold to set.

Returns
Type Description
Probe.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicProbe.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
value Object
Returns
Type Description
Overrides

setGrpc(GRPCAction value)

publicProbe.BuildersetGrpc(GRPCActionvalue)

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Parameter
Name Description
value GRPCAction
Returns
Type Description

setGrpc(GRPCAction.Builder builderForValue)

publicProbe.BuildersetGrpc(GRPCAction.BuilderbuilderForValue)

GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.GRPCAction grpc = 7;

Parameter
Name Description
builderForValue GRPCAction.Builder
Returns
Type Description

setHttpGet(HTTPGetAction value)

publicProbe.BuildersetHttpGet(HTTPGetActionvalue)

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Parameter
Name Description
Returns
Type Description

setHttpGet(HTTPGetAction.Builder builderForValue)

publicProbe.BuildersetHttpGet(HTTPGetAction.BuilderbuilderForValue)

HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.HTTPGetAction http_get = 5;

Parameter
Name Description
builderForValue HTTPGetAction.Builder
Returns
Type Description

setInitialDelaySeconds(int value)

publicProbe.BuildersetInitialDelaySeconds(intvalue)

Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

int32 initial_delay_seconds = 1;

Parameter
Name Description
value int

The initialDelaySeconds to set.

Returns
Type Description
Probe.Builder

This builder for chaining.

setPeriodSeconds(int value)

publicProbe.BuildersetPeriodSeconds(intvalue)

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.

int32 period_seconds = 3;

Parameter
Name Description
value int

The periodSeconds to set.

Returns
Type Description
Probe.Builder

This builder for chaining.

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

publicProbe.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
index int
value Object
Returns
Type Description
Overrides

setTcpSocket(TCPSocketAction value)

publicProbe.BuildersetTcpSocket(TCPSocketActionvalue)

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Parameter
Name Description
Returns
Type Description

setTcpSocket(TCPSocketAction.Builder builderForValue)

publicProbe.BuildersetTcpSocket(TCPSocketAction.BuilderbuilderForValue)

TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified.

.google.cloud.run.v2.TCPSocketAction tcp_socket = 6;

Parameter
Name Description
builderForValue TCPSocketAction.Builder
Returns
Type Description

setTimeoutSeconds(int value)

publicProbe.BuildersetTimeoutSeconds(intvalue)

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes

int32 timeout_seconds = 2;

Parameter
Name Description
value int

The timeoutSeconds to set.

Returns
Type Description
Probe.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalProbe.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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.