Class HealthCheck.Builder (1.9.1)

public static final class HealthCheck.Builder extends GeneratedMessageV3.Builder<HealthCheck.Builder> implements HealthCheckOrBuilder

Represents a Health Check resource. Google Compute Engine has two Health Check resources: * Global * Regional Internal HTTP(S) load balancers must use regional health checks (compute.v1.regionHealthChecks). Traffic Director must use global health checks (compute.v1.HealthChecks). Internal TCP/UDP load balancers can use either regional or global health checks (compute.v1.regionHealthChecks or compute.v1.HealthChecks). External HTTP(S), TCP proxy, and SSL proxy load balancers as well as managed instance group auto-healing must use global health checks (compute.v1.HealthChecks). Backend service-based network load balancers must use regional health checks (compute.v1.regionHealthChecks). Target pool-based network load balancers must use legacy HTTP health checks (compute.v1.httpHealthChecks). For more information, see Health checks overview.

Protobuf type google.cloud.compute.v1.HealthCheck

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public HealthCheck build()
Returns
TypeDescription
HealthCheck

buildPartial()

public HealthCheck buildPartial()
Returns
TypeDescription
HealthCheck

clear()

public HealthCheck.Builder clear()
Returns
TypeDescription
HealthCheck.Builder
Overrides

clearCheckIntervalSec()

public HealthCheck.Builder clearCheckIntervalSec()

How often (in seconds) to send a health check. The default value is 5 seconds.

optional int32 check_interval_sec = 345561006;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearCreationTimestamp()

public HealthCheck.Builder clearCreationTimestamp()

[Output Only] Creation timestamp in 3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearDescription()

public HealthCheck.Builder clearDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public HealthCheck.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
HealthCheck.Builder
Overrides

clearGrpcHealthCheck()

public HealthCheck.Builder clearGrpcHealthCheck()

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Returns
TypeDescription
HealthCheck.Builder

clearHealthyThreshold()

public HealthCheck.Builder clearHealthyThreshold()

A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

optional int32 healthy_threshold = 403212361;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearHttp2HealthCheck()

public HealthCheck.Builder clearHttp2HealthCheck()

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Returns
TypeDescription
HealthCheck.Builder

clearHttpHealthCheck()

public HealthCheck.Builder clearHttpHealthCheck()

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Returns
TypeDescription
HealthCheck.Builder

clearHttpsHealthCheck()

public HealthCheck.Builder clearHttpsHealthCheck()

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Returns
TypeDescription
HealthCheck.Builder

clearId()

public HealthCheck.Builder clearId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearKind()

public HealthCheck.Builder clearKind()

Type of the resource.

optional string kind = 3292052;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearLogConfig()

public HealthCheck.Builder clearLogConfig()

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Returns
TypeDescription
HealthCheck.Builder

clearName()

public HealthCheck.Builder clearName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. For example, a name that is 1-63 characters long, matches the regular expression a-z?, and otherwise complies with RFC1035. This regular expression describes a name where the first character is a lowercase letter, and all following characters are a dash, lowercase letter, or digit, except the last character, which isn't a dash.

optional string name = 3373707;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HealthCheck.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
HealthCheck.Builder
Overrides

clearRegion()

public HealthCheck.Builder clearRegion()

[Output Only] Region where the health check resides. Not applicable to global health checks.

optional string region = 138946292;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

public HealthCheck.Builder clearSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearSslHealthCheck()

public HealthCheck.Builder clearSslHealthCheck()

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Returns
TypeDescription
HealthCheck.Builder

clearTcpHealthCheck()

public HealthCheck.Builder clearTcpHealthCheck()

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Returns
TypeDescription
HealthCheck.Builder

clearTimeoutSec()

public HealthCheck.Builder clearTimeoutSec()

How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

optional int32 timeout_sec = 79994995;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearType()

public HealthCheck.Builder clearType()

Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. Exactly one of the protocol-specific health check field must be specified, which must match type field. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clearUnhealthyThreshold()

public HealthCheck.Builder clearUnhealthyThreshold()

A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

optional int32 unhealthy_threshold = 227958480;

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

clone()

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

getCheckIntervalSec()

public int getCheckIntervalSec()

How often (in seconds) to send a health check. The default value is 5 seconds.

optional int32 check_interval_sec = 345561006;

Returns
TypeDescription
int

The checkIntervalSec.

getCreationTimestamp()

public String getCreationTimestamp()

[Output Only] Creation timestamp in 3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

[Output Only] Creation timestamp in 3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public HealthCheck getDefaultInstanceForType()
Returns
TypeDescription
HealthCheck

getDescription()

public String getDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getGrpcHealthCheck()

public GRPCHealthCheck getGrpcHealthCheck()

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Returns
TypeDescription
GRPCHealthCheck

The grpcHealthCheck.

getGrpcHealthCheckBuilder()

public GRPCHealthCheck.Builder getGrpcHealthCheckBuilder()

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Returns
TypeDescription
GRPCHealthCheck.Builder

getGrpcHealthCheckOrBuilder()

public GRPCHealthCheckOrBuilder getGrpcHealthCheckOrBuilder()

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Returns
TypeDescription
GRPCHealthCheckOrBuilder

getHealthyThreshold()

public int getHealthyThreshold()

A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

optional int32 healthy_threshold = 403212361;

Returns
TypeDescription
int

The healthyThreshold.

getHttp2HealthCheck()

public HTTP2HealthCheck getHttp2HealthCheck()

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Returns
TypeDescription
HTTP2HealthCheck

The http2HealthCheck.

getHttp2HealthCheckBuilder()

public HTTP2HealthCheck.Builder getHttp2HealthCheckBuilder()

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Returns
TypeDescription
HTTP2HealthCheck.Builder

getHttp2HealthCheckOrBuilder()

public HTTP2HealthCheckOrBuilder getHttp2HealthCheckOrBuilder()

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Returns
TypeDescription
HTTP2HealthCheckOrBuilder

getHttpHealthCheck()

public HTTPHealthCheck getHttpHealthCheck()

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Returns
TypeDescription
HTTPHealthCheck

The httpHealthCheck.

getHttpHealthCheckBuilder()

public HTTPHealthCheck.Builder getHttpHealthCheckBuilder()

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Returns
TypeDescription
HTTPHealthCheck.Builder

getHttpHealthCheckOrBuilder()

public HTTPHealthCheckOrBuilder getHttpHealthCheckOrBuilder()

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Returns
TypeDescription
HTTPHealthCheckOrBuilder

getHttpsHealthCheck()

public HTTPSHealthCheck getHttpsHealthCheck()

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Returns
TypeDescription
HTTPSHealthCheck

The httpsHealthCheck.

getHttpsHealthCheckBuilder()

public HTTPSHealthCheck.Builder getHttpsHealthCheckBuilder()

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Returns
TypeDescription
HTTPSHealthCheck.Builder

getHttpsHealthCheckOrBuilder()

public HTTPSHealthCheckOrBuilder getHttpsHealthCheckOrBuilder()

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Returns
TypeDescription
HTTPSHealthCheckOrBuilder

getId()

public long getId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
long

The id.

getKind()

public String getKind()

Type of the resource.

optional string kind = 3292052;

Returns
TypeDescription
String

The kind.

getKindBytes()

public ByteString getKindBytes()

Type of the resource.

optional string kind = 3292052;

Returns
TypeDescription
ByteString

The bytes for kind.

getLogConfig()

public HealthCheckLogConfig getLogConfig()

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Returns
TypeDescription
HealthCheckLogConfig

The logConfig.

getLogConfigBuilder()

public HealthCheckLogConfig.Builder getLogConfigBuilder()

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Returns
TypeDescription
HealthCheckLogConfig.Builder

getLogConfigOrBuilder()

public HealthCheckLogConfigOrBuilder getLogConfigOrBuilder()

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Returns
TypeDescription
HealthCheckLogConfigOrBuilder

getName()

public String getName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. For example, a name that is 1-63 characters long, matches the regular expression a-z?, and otherwise complies with RFC1035. This regular expression describes a name where the first character is a lowercase letter, and all following characters are a dash, lowercase letter, or digit, except the last character, which isn't a dash.

optional string name = 3373707;

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. For example, a name that is 1-63 characters long, matches the regular expression a-z?, and otherwise complies with RFC1035. This regular expression describes a name where the first character is a lowercase letter, and all following characters are a dash, lowercase letter, or digit, except the last character, which isn't a dash.

optional string name = 3373707;

Returns
TypeDescription
ByteString

The bytes for name.

getRegion()

public String getRegion()

[Output Only] Region where the health check resides. Not applicable to global health checks.

optional string region = 138946292;

Returns
TypeDescription
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

[Output Only] Region where the health check resides. Not applicable to global health checks.

optional string region = 138946292;

Returns
TypeDescription
ByteString

The bytes for region.

public String getSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
ByteString

The bytes for selfLink.

getSslHealthCheck()

public SSLHealthCheck getSslHealthCheck()

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Returns
TypeDescription
SSLHealthCheck

The sslHealthCheck.

getSslHealthCheckBuilder()

public SSLHealthCheck.Builder getSslHealthCheckBuilder()

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Returns
TypeDescription
SSLHealthCheck.Builder

getSslHealthCheckOrBuilder()

public SSLHealthCheckOrBuilder getSslHealthCheckOrBuilder()

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Returns
TypeDescription
SSLHealthCheckOrBuilder

getTcpHealthCheck()

public TCPHealthCheck getTcpHealthCheck()

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Returns
TypeDescription
TCPHealthCheck

The tcpHealthCheck.

getTcpHealthCheckBuilder()

public TCPHealthCheck.Builder getTcpHealthCheckBuilder()

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Returns
TypeDescription
TCPHealthCheck.Builder

getTcpHealthCheckOrBuilder()

public TCPHealthCheckOrBuilder getTcpHealthCheckOrBuilder()

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Returns
TypeDescription
TCPHealthCheckOrBuilder

getTimeoutSec()

public int getTimeoutSec()

How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

optional int32 timeout_sec = 79994995;

Returns
TypeDescription
int

The timeoutSec.

getType()

public String getType()

Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. Exactly one of the protocol-specific health check field must be specified, which must match type field. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
TypeDescription
String

The type.

getTypeBytes()

public ByteString getTypeBytes()

Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. Exactly one of the protocol-specific health check field must be specified, which must match type field. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
TypeDescription
ByteString

The bytes for type.

getUnhealthyThreshold()

public int getUnhealthyThreshold()

A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

optional int32 unhealthy_threshold = 227958480;

Returns
TypeDescription
int

The unhealthyThreshold.

hasCheckIntervalSec()

public boolean hasCheckIntervalSec()

How often (in seconds) to send a health check. The default value is 5 seconds.

optional int32 check_interval_sec = 345561006;

Returns
TypeDescription
boolean

Whether the checkIntervalSec field is set.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

[Output Only] Creation timestamp in 3339 text format.

optional string creation_timestamp = 30525366;

Returns
TypeDescription
boolean

Whether the creationTimestamp field is set.

hasDescription()

public boolean hasDescription()

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Returns
TypeDescription
boolean

Whether the description field is set.

hasGrpcHealthCheck()

public boolean hasGrpcHealthCheck()

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Returns
TypeDescription
boolean

Whether the grpcHealthCheck field is set.

hasHealthyThreshold()

public boolean hasHealthyThreshold()

A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

optional int32 healthy_threshold = 403212361;

Returns
TypeDescription
boolean

Whether the healthyThreshold field is set.

hasHttp2HealthCheck()

public boolean hasHttp2HealthCheck()

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Returns
TypeDescription
boolean

Whether the http2HealthCheck field is set.

hasHttpHealthCheck()

public boolean hasHttpHealthCheck()

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Returns
TypeDescription
boolean

Whether the httpHealthCheck field is set.

hasHttpsHealthCheck()

public boolean hasHttpsHealthCheck()

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Returns
TypeDescription
boolean

Whether the httpsHealthCheck field is set.

hasId()

public boolean hasId()

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Returns
TypeDescription
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

Type of the resource.

optional string kind = 3292052;

Returns
TypeDescription
boolean

Whether the kind field is set.

hasLogConfig()

public boolean hasLogConfig()

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Returns
TypeDescription
boolean

Whether the logConfig field is set.

hasName()

public boolean hasName()

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. For example, a name that is 1-63 characters long, matches the regular expression a-z?, and otherwise complies with RFC1035. This regular expression describes a name where the first character is a lowercase letter, and all following characters are a dash, lowercase letter, or digit, except the last character, which isn't a dash.

optional string name = 3373707;

Returns
TypeDescription
boolean

Whether the name field is set.

hasRegion()

public boolean hasRegion()

[Output Only] Region where the health check resides. Not applicable to global health checks.

optional string region = 138946292;

Returns
TypeDescription
boolean

Whether the region field is set.

public boolean hasSelfLink()

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Returns
TypeDescription
boolean

Whether the selfLink field is set.

hasSslHealthCheck()

public boolean hasSslHealthCheck()

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Returns
TypeDescription
boolean

Whether the sslHealthCheck field is set.

hasTcpHealthCheck()

public boolean hasTcpHealthCheck()

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Returns
TypeDescription
boolean

Whether the tcpHealthCheck field is set.

hasTimeoutSec()

public boolean hasTimeoutSec()

How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

optional int32 timeout_sec = 79994995;

Returns
TypeDescription
boolean

Whether the timeoutSec field is set.

hasType()

public boolean hasType()

Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. Exactly one of the protocol-specific health check field must be specified, which must match type field. Check the Type enum for the list of possible values.

optional string type = 3575610;

Returns
TypeDescription
boolean

Whether the type field is set.

hasUnhealthyThreshold()

public boolean hasUnhealthyThreshold()

A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

optional int32 unhealthy_threshold = 227958480;

Returns
TypeDescription
boolean

Whether the unhealthyThreshold field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(HealthCheck other)

public HealthCheck.Builder mergeFrom(HealthCheck other)
Parameter
NameDescription
otherHealthCheck
Returns
TypeDescription
HealthCheck.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public HealthCheck.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
HealthCheck.Builder
Overrides

mergeGrpcHealthCheck(GRPCHealthCheck value)

public HealthCheck.Builder mergeGrpcHealthCheck(GRPCHealthCheck value)

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Parameter
NameDescription
valueGRPCHealthCheck
Returns
TypeDescription
HealthCheck.Builder

mergeHttp2HealthCheck(HTTP2HealthCheck value)

public HealthCheck.Builder mergeHttp2HealthCheck(HTTP2HealthCheck value)

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Parameter
NameDescription
valueHTTP2HealthCheck
Returns
TypeDescription
HealthCheck.Builder

mergeHttpHealthCheck(HTTPHealthCheck value)

public HealthCheck.Builder mergeHttpHealthCheck(HTTPHealthCheck value)

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Parameter
NameDescription
valueHTTPHealthCheck
Returns
TypeDescription
HealthCheck.Builder

mergeHttpsHealthCheck(HTTPSHealthCheck value)

public HealthCheck.Builder mergeHttpsHealthCheck(HTTPSHealthCheck value)

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Parameter
NameDescription
valueHTTPSHealthCheck
Returns
TypeDescription
HealthCheck.Builder

mergeLogConfig(HealthCheckLogConfig value)

public HealthCheck.Builder mergeLogConfig(HealthCheckLogConfig value)

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Parameter
NameDescription
valueHealthCheckLogConfig
Returns
TypeDescription
HealthCheck.Builder

mergeSslHealthCheck(SSLHealthCheck value)

public HealthCheck.Builder mergeSslHealthCheck(SSLHealthCheck value)

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Parameter
NameDescription
valueSSLHealthCheck
Returns
TypeDescription
HealthCheck.Builder

mergeTcpHealthCheck(TCPHealthCheck value)

public HealthCheck.Builder mergeTcpHealthCheck(TCPHealthCheck value)

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Parameter
NameDescription
valueTCPHealthCheck
Returns
TypeDescription
HealthCheck.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HealthCheck.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
HealthCheck.Builder
Overrides

setCheckIntervalSec(int value)

public HealthCheck.Builder setCheckIntervalSec(int value)

How often (in seconds) to send a health check. The default value is 5 seconds.

optional int32 check_interval_sec = 345561006;

Parameter
NameDescription
valueint

The checkIntervalSec to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setCreationTimestamp(String value)

public HealthCheck.Builder setCreationTimestamp(String value)

[Output Only] Creation timestamp in 3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueString

The creationTimestamp to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public HealthCheck.Builder setCreationTimestampBytes(ByteString value)

[Output Only] Creation timestamp in 3339 text format.

optional string creation_timestamp = 30525366;

Parameter
NameDescription
valueByteString

The bytes for creationTimestamp to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setDescription(String value)

public HealthCheck.Builder setDescription(String value)

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueString

The description to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public HealthCheck.Builder setDescriptionBytes(ByteString value)

An optional description of this resource. Provide this property when you create the resource.

optional string description = 422937596;

Parameter
NameDescription
valueByteString

The bytes for description to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setGrpcHealthCheck(GRPCHealthCheck value)

public HealthCheck.Builder setGrpcHealthCheck(GRPCHealthCheck value)

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Parameter
NameDescription
valueGRPCHealthCheck
Returns
TypeDescription
HealthCheck.Builder

setGrpcHealthCheck(GRPCHealthCheck.Builder builderForValue)

public HealthCheck.Builder setGrpcHealthCheck(GRPCHealthCheck.Builder builderForValue)

optional .google.cloud.compute.v1.GRPCHealthCheck grpc_health_check = 85529574;

Parameter
NameDescription
builderForValueGRPCHealthCheck.Builder
Returns
TypeDescription
HealthCheck.Builder

setHealthyThreshold(int value)

public HealthCheck.Builder setHealthyThreshold(int value)

A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.

optional int32 healthy_threshold = 403212361;

Parameter
NameDescription
valueint

The healthyThreshold to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setHttp2HealthCheck(HTTP2HealthCheck value)

public HealthCheck.Builder setHttp2HealthCheck(HTTP2HealthCheck value)

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Parameter
NameDescription
valueHTTP2HealthCheck
Returns
TypeDescription
HealthCheck.Builder

setHttp2HealthCheck(HTTP2HealthCheck.Builder builderForValue)

public HealthCheck.Builder setHttp2HealthCheck(HTTP2HealthCheck.Builder builderForValue)

optional .google.cloud.compute.v1.HTTP2HealthCheck http2_health_check = 11360986;

Parameter
NameDescription
builderForValueHTTP2HealthCheck.Builder
Returns
TypeDescription
HealthCheck.Builder

setHttpHealthCheck(HTTPHealthCheck value)

public HealthCheck.Builder setHttpHealthCheck(HTTPHealthCheck value)

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Parameter
NameDescription
valueHTTPHealthCheck
Returns
TypeDescription
HealthCheck.Builder

setHttpHealthCheck(HTTPHealthCheck.Builder builderForValue)

public HealthCheck.Builder setHttpHealthCheck(HTTPHealthCheck.Builder builderForValue)

optional .google.cloud.compute.v1.HTTPHealthCheck http_health_check = 412586940;

Parameter
NameDescription
builderForValueHTTPHealthCheck.Builder
Returns
TypeDescription
HealthCheck.Builder

setHttpsHealthCheck(HTTPSHealthCheck value)

public HealthCheck.Builder setHttpsHealthCheck(HTTPSHealthCheck value)

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Parameter
NameDescription
valueHTTPSHealthCheck
Returns
TypeDescription
HealthCheck.Builder

setHttpsHealthCheck(HTTPSHealthCheck.Builder builderForValue)

public HealthCheck.Builder setHttpsHealthCheck(HTTPSHealthCheck.Builder builderForValue)

optional .google.cloud.compute.v1.HTTPSHealthCheck https_health_check = 436046905;

Parameter
NameDescription
builderForValueHTTPSHealthCheck.Builder
Returns
TypeDescription
HealthCheck.Builder

setId(long value)

public HealthCheck.Builder setId(long value)

[Output Only] The unique identifier for the resource. This identifier is defined by the server.

optional uint64 id = 3355;

Parameter
NameDescription
valuelong

The id to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setKind(String value)

public HealthCheck.Builder setKind(String value)

Type of the resource.

optional string kind = 3292052;

Parameter
NameDescription
valueString

The kind to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setKindBytes(ByteString value)

public HealthCheck.Builder setKindBytes(ByteString value)

Type of the resource.

optional string kind = 3292052;

Parameter
NameDescription
valueByteString

The bytes for kind to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setLogConfig(HealthCheckLogConfig value)

public HealthCheck.Builder setLogConfig(HealthCheckLogConfig value)

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Parameter
NameDescription
valueHealthCheckLogConfig
Returns
TypeDescription
HealthCheck.Builder

setLogConfig(HealthCheckLogConfig.Builder builderForValue)

public HealthCheck.Builder setLogConfig(HealthCheckLogConfig.Builder builderForValue)

Configure logging on this health check.

optional .google.cloud.compute.v1.HealthCheckLogConfig log_config = 351299741;

Parameter
NameDescription
builderForValueHealthCheckLogConfig.Builder
Returns
TypeDescription
HealthCheck.Builder

setName(String value)

public HealthCheck.Builder setName(String value)

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. For example, a name that is 1-63 characters long, matches the regular expression a-z?, and otherwise complies with RFC1035. This regular expression describes a name where the first character is a lowercase letter, and all following characters are a dash, lowercase letter, or digit, except the last character, which isn't a dash.

optional string name = 3373707;

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setNameBytes(ByteString value)

public HealthCheck.Builder setNameBytes(ByteString value)

Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. For example, a name that is 1-63 characters long, matches the regular expression a-z?, and otherwise complies with RFC1035. This regular expression describes a name where the first character is a lowercase letter, and all following characters are a dash, lowercase letter, or digit, except the last character, which isn't a dash.

optional string name = 3373707;

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setRegion(String value)

public HealthCheck.Builder setRegion(String value)

[Output Only] Region where the health check resides. Not applicable to global health checks.

optional string region = 138946292;

Parameter
NameDescription
valueString

The region to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setRegionBytes(ByteString value)

public HealthCheck.Builder setRegionBytes(ByteString value)

[Output Only] Region where the health check resides. Not applicable to global health checks.

optional string region = 138946292;

Parameter
NameDescription
valueByteString

The bytes for region to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

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

public HealthCheck.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
HealthCheck.Builder
Overrides
public HealthCheck.Builder setSelfLink(String value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueString

The selfLink to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public HealthCheck.Builder setSelfLinkBytes(ByteString value)

[Output Only] Server-defined URL for the resource.

optional string self_link = 456214797;

Parameter
NameDescription
valueByteString

The bytes for selfLink to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setSslHealthCheck(SSLHealthCheck value)

public HealthCheck.Builder setSslHealthCheck(SSLHealthCheck value)

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Parameter
NameDescription
valueSSLHealthCheck
Returns
TypeDescription
HealthCheck.Builder

setSslHealthCheck(SSLHealthCheck.Builder builderForValue)

public HealthCheck.Builder setSslHealthCheck(SSLHealthCheck.Builder builderForValue)

optional .google.cloud.compute.v1.SSLHealthCheck ssl_health_check = 280032440;

Parameter
NameDescription
builderForValueSSLHealthCheck.Builder
Returns
TypeDescription
HealthCheck.Builder

setTcpHealthCheck(TCPHealthCheck value)

public HealthCheck.Builder setTcpHealthCheck(TCPHealthCheck value)

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Parameter
NameDescription
valueTCPHealthCheck
Returns
TypeDescription
HealthCheck.Builder

setTcpHealthCheck(TCPHealthCheck.Builder builderForValue)

public HealthCheck.Builder setTcpHealthCheck(TCPHealthCheck.Builder builderForValue)

optional .google.cloud.compute.v1.TCPHealthCheck tcp_health_check = 469980419;

Parameter
NameDescription
builderForValueTCPHealthCheck.Builder
Returns
TypeDescription
HealthCheck.Builder

setTimeoutSec(int value)

public HealthCheck.Builder setTimeoutSec(int value)

How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.

optional int32 timeout_sec = 79994995;

Parameter
NameDescription
valueint

The timeoutSec to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setType(String value)

public HealthCheck.Builder setType(String value)

Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. Exactly one of the protocol-specific health check field must be specified, which must match type field. Check the Type enum for the list of possible values.

optional string type = 3575610;

Parameter
NameDescription
valueString

The type to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setTypeBytes(ByteString value)

public HealthCheck.Builder setTypeBytes(ByteString value)

Specifies the type of the healthCheck, either TCP, SSL, HTTP, HTTPS or HTTP2. Exactly one of the protocol-specific health check field must be specified, which must match type field. Check the Type enum for the list of possible values.

optional string type = 3575610;

Parameter
NameDescription
valueByteString

The bytes for type to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setUnhealthyThreshold(int value)

public HealthCheck.Builder setUnhealthyThreshold(int value)

A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.

optional int32 unhealthy_threshold = 227958480;

Parameter
NameDescription
valueint

The unhealthyThreshold to set.

Returns
TypeDescription
HealthCheck.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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