Class Probe.Builder (0.47.0)

public static final class Probe.Builder extends GeneratedMessageV3.Builder<Probe.Builder> implements ProbeOrBuilder

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Probe.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Probe.Builder
Overrides

build()

public Probe build()
Returns
Type Description
Probe

buildPartial()

public Probe buildPartial()
Returns
Type Description
Probe

clear()

public Probe.Builder clear()
Returns
Type Description
Probe.Builder
Overrides

clearFailureThreshold()

public Probe.Builder clearFailureThreshold()

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

int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Probe.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Probe.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Probe.Builder
Overrides

clearGrpc()

public Probe.Builder clearGrpc()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Probe.Builder

clearHttpGet()

public Probe.Builder clearHttpGet()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Probe.Builder

clearInitialDelaySeconds()

public Probe.Builder clearInitialDelaySeconds()

Optional. 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.

int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Probe.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Probe.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Probe.Builder
Overrides

clearPeriodSeconds()

public Probe.Builder clearPeriodSeconds()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Probe.Builder

This builder for chaining.

clearProbeType()

public Probe.Builder clearProbeType()
Returns
Type Description
Probe.Builder

clearTcpSocket()

public Probe.Builder clearTcpSocket()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Probe.Builder

clearTimeoutSeconds()

public Probe.Builder clearTimeoutSeconds()

Optional. 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.

int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Probe.Builder

This builder for chaining.

clone()

public Probe.Builder clone()
Returns
Type Description
Probe.Builder
Overrides

getDefaultInstanceForType()

public Probe getDefaultInstanceForType()
Returns
Type Description
Probe

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFailureThreshold()

public int getFailureThreshold()

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

int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The failureThreshold.

getGrpc()

public GRPCAction getGrpc()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GRPCAction

The grpc.

getGrpcBuilder()

public GRPCAction.Builder getGrpcBuilder()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GRPCAction.Builder

getGrpcOrBuilder()

public GRPCActionOrBuilder getGrpcOrBuilder()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
GRPCActionOrBuilder

getHttpGet()

public HTTPGetAction getHttpGet()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
HTTPGetAction

The httpGet.

getHttpGetBuilder()

public HTTPGetAction.Builder getHttpGetBuilder()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
HTTPGetAction.Builder

getHttpGetOrBuilder()

public HTTPGetActionOrBuilder getHttpGetOrBuilder()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
HTTPGetActionOrBuilder

getInitialDelaySeconds()

public int getInitialDelaySeconds()

Optional. 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.

int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The initialDelaySeconds.

getPeriodSeconds()

public int getPeriodSeconds()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The periodSeconds.

getProbeTypeCase()

public Probe.ProbeTypeCase getProbeTypeCase()
Returns
Type Description
Probe.ProbeTypeCase

getTcpSocket()

public TCPSocketAction getTcpSocket()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TCPSocketAction

The tcpSocket.

getTcpSocketBuilder()

public TCPSocketAction.Builder getTcpSocketBuilder()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TCPSocketAction.Builder

getTcpSocketOrBuilder()

public TCPSocketActionOrBuilder getTcpSocketOrBuilder()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
TCPSocketActionOrBuilder

getTimeoutSeconds()

public int getTimeoutSeconds()

Optional. 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.

int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The timeoutSeconds.

hasGrpc()

public boolean hasGrpc()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the grpc field is set.

hasHttpGet()

public boolean hasHttpGet()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the httpGet field is set.

hasTcpSocket()

public boolean hasTcpSocket()

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the tcpSocket field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Probe other)

public Probe.Builder mergeFrom(Probe other)
Parameter
Name Description
other Probe
Returns
Type Description
Probe.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Probe.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Probe.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Probe.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Probe.Builder
Overrides

mergeGrpc(GRPCAction value)

public Probe.Builder mergeGrpc(GRPCAction value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value GRPCAction
Returns
Type Description
Probe.Builder

mergeHttpGet(HTTPGetAction value)

public Probe.Builder mergeHttpGet(HTTPGetAction value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value HTTPGetAction
Returns
Type Description
Probe.Builder

mergeTcpSocket(TCPSocketAction value)

public Probe.Builder mergeTcpSocket(TCPSocketAction value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TCPSocketAction
Returns
Type Description
Probe.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Probe.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Probe.Builder
Overrides

setFailureThreshold(int value)

public Probe.Builder setFailureThreshold(int value)

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

int32 failure_threshold = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The failureThreshold to set.

Returns
Type Description
Probe.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Probe.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Probe.Builder
Overrides

setGrpc(GRPCAction value)

public Probe.Builder setGrpc(GRPCAction value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value GRPCAction
Returns
Type Description
Probe.Builder

setGrpc(GRPCAction.Builder builderForValue)

public Probe.Builder setGrpc(GRPCAction.Builder builderForValue)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue GRPCAction.Builder
Returns
Type Description
Probe.Builder

setHttpGet(HTTPGetAction value)

public Probe.Builder setHttpGet(HTTPGetAction value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value HTTPGetAction
Returns
Type Description
Probe.Builder

setHttpGet(HTTPGetAction.Builder builderForValue)

public Probe.Builder setHttpGet(HTTPGetAction.Builder builderForValue)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue HTTPGetAction.Builder
Returns
Type Description
Probe.Builder

setInitialDelaySeconds(int value)

public Probe.Builder setInitialDelaySeconds(int value)

Optional. 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.

int32 initial_delay_seconds = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The initialDelaySeconds to set.

Returns
Type Description
Probe.Builder

This builder for chaining.

setPeriodSeconds(int value)

public Probe.Builder setPeriodSeconds(int value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

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)

public Probe.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Probe.Builder
Overrides

setTcpSocket(TCPSocketAction value)

public Probe.Builder setTcpSocket(TCPSocketAction value)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value TCPSocketAction
Returns
Type Description
Probe.Builder

setTcpSocket(TCPSocketAction.Builder builderForValue)

public Probe.Builder setTcpSocket(TCPSocketAction.Builder builderForValue)

Optional. 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 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue TCPSocketAction.Builder
Returns
Type Description
Probe.Builder

setTimeoutSeconds(int value)

public Probe.Builder setTimeoutSeconds(int value)

Optional. 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.

int32 timeout_seconds = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The timeoutSeconds to set.

Returns
Type Description
Probe.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Probe.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Probe.Builder
Overrides