Class Probe.Builder (0.43.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()

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)

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

clearGrpc()

public Probe.Builder clearGrpc()

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
Probe.Builder

clearHttpGet()

public Probe.Builder clearHttpGet()

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
Probe.Builder

clearInitialDelaySeconds()

public Probe.Builder clearInitialDelaySeconds()

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;

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()

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()

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

clearTcpSocket()

public Probe.Builder clearTcpSocket()

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
Probe.Builder

clearTimeoutSeconds()

public Probe.Builder clearTimeoutSeconds()

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;

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()

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()

public GRPCAction getGrpc()

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()

public GRPCAction.Builder getGrpcBuilder()

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

getGrpcOrBuilder()

public GRPCActionOrBuilder getGrpcOrBuilder()

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
GRPCActionOrBuilder

getHttpGet()

public HTTPGetAction getHttpGet()

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()

public HTTPGetAction.Builder getHttpGetBuilder()

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

getHttpGetOrBuilder()

public HTTPGetActionOrBuilder getHttpGetOrBuilder()

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
HTTPGetActionOrBuilder

getInitialDelaySeconds()

public int getInitialDelaySeconds()

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;

Returns
Type Description
int

The initialDelaySeconds.

getPeriodSeconds()

public int getPeriodSeconds()

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()

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

getTcpSocket()

public TCPSocketAction getTcpSocket()

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()

public TCPSocketAction.Builder getTcpSocketBuilder()

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

getTcpSocketOrBuilder()

public TCPSocketActionOrBuilder getTcpSocketOrBuilder()

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
TCPSocketActionOrBuilder

getTimeoutSeconds()

public int getTimeoutSeconds()

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;

Returns
Type Description
int

The timeoutSeconds.

hasGrpc()

public boolean hasGrpc()

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()

public boolean hasHttpGet()

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()

public boolean hasTcpSocket()

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()

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)

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
Probe.Builder

mergeHttpGet(HTTPGetAction value)

public Probe.Builder mergeHttpGet(HTTPGetAction value)

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
value HTTPGetAction
Returns
Type Description
Probe.Builder

mergeTcpSocket(TCPSocketAction value)

public Probe.Builder mergeTcpSocket(TCPSocketAction value)

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
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)

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)

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)

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
Probe.Builder

setGrpc(GRPCAction.Builder builderForValue)

public Probe.Builder setGrpc(GRPCAction.Builder builderForValue)

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
Probe.Builder

setHttpGet(HTTPGetAction value)

public Probe.Builder setHttpGet(HTTPGetAction value)

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
value HTTPGetAction
Returns
Type Description
Probe.Builder

setHttpGet(HTTPGetAction.Builder builderForValue)

public Probe.Builder setHttpGet(HTTPGetAction.Builder builderForValue)

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
Probe.Builder

setInitialDelaySeconds(int value)

public Probe.Builder setInitialDelaySeconds(int value)

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;

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)

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)

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)

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
value TCPSocketAction
Returns
Type Description
Probe.Builder

setTcpSocket(TCPSocketAction.Builder builderForValue)

public Probe.Builder setTcpSocket(TCPSocketAction.Builder builderForValue)

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
Probe.Builder

setTimeoutSeconds(int value)

public Probe.Builder setTimeoutSeconds(int value)

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;

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