Class Probe.Builder (0.39.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Probe.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Probe.Builder
Overrides

build()

public Probe build()
Returns
TypeDescription
Probe

buildPartial()

public Probe buildPartial()
Returns
TypeDescription
Probe

clear()

public Probe.Builder clear()
Returns
TypeDescription
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
TypeDescription
Probe.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Probe.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
Probe.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Probe.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
Probe.Builder

This builder for chaining.

clearProbeType()

public Probe.Builder clearProbeType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Probe.Builder

This builder for chaining.

clone()

public Probe.Builder clone()
Returns
TypeDescription
Probe.Builder
Overrides

getDefaultInstanceForType()

public Probe getDefaultInstanceForType()
Returns
TypeDescription
Probe

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
int

The periodSeconds.

getProbeTypeCase()

public Probe.ProbeTypeCase getProbeTypeCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the tcpSocket field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Probe other)

public Probe.Builder mergeFrom(Probe other)
Parameter
NameDescription
otherProbe
Returns
TypeDescription
Probe.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Probe.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Probe.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Probe.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueGRPCAction
Returns
TypeDescription
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
NameDescription
valueHTTPGetAction
Returns
TypeDescription
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
NameDescription
valueTCPSocketAction
Returns
TypeDescription
Probe.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Probe.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueint

The failureThreshold to set.

Returns
TypeDescription
Probe.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Probe.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueGRPCAction
Returns
TypeDescription
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
NameDescription
builderForValueGRPCAction.Builder
Returns
TypeDescription
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
NameDescription
valueHTTPGetAction
Returns
TypeDescription
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
NameDescription
builderForValueHTTPGetAction.Builder
Returns
TypeDescription
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
NameDescription
valueint

The initialDelaySeconds to set.

Returns
TypeDescription
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
NameDescription
valueint

The periodSeconds to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueTCPSocketAction
Returns
TypeDescription
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
NameDescription
builderForValueTCPSocketAction.Builder
Returns
TypeDescription
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
NameDescription
valueint

The timeoutSeconds to set.

Returns
TypeDescription
Probe.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Probe.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Probe.Builder
Overrides