Class HealthSource.Builder (1.101.0)

public static final class HealthSource.Builder extends GeneratedMessage.Builder<HealthSource.Builder> implements HealthSourceOrBuilder

Represents a health source.

A health source resource specifies the source resources and the health aggregation policy applied to the source resources to determine the aggregated health status.

Protobuf type google.cloud.compute.v1.HealthSource

Static Methods

getDescriptor()

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

Methods

addAllSources(Iterable<String> values)

public HealthSource.Builder addAllSources(Iterable<String> values)

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Parameter
Name Description
values Iterable<String>

The sources to add.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

addSources(String value)

public HealthSource.Builder addSources(String value)

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Parameter
Name Description
value String

The sources to add.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

addSourcesBytes(ByteString value)

public HealthSource.Builder addSourcesBytes(ByteString value)

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Parameter
Name Description
value ByteString

The bytes of the sources to add.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

build()

public HealthSource build()
Returns
Type Description
HealthSource

buildPartial()

public HealthSource buildPartial()
Returns
Type Description
HealthSource

clear()

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

clearCreationTimestamp()

public HealthSource.Builder clearCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearDescription()

public HealthSource.Builder clearDescription()

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

optional string description = 422937596;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearFingerprint()

public HealthSource.Builder clearFingerprint()

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource.

optional string fingerprint = 234678500;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearHealthAggregationPolicy()

public HealthSource.Builder clearHealthAggregationPolicy()

URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated.

optional string health_aggregation_policy = 240314354;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearId()

public HealthSource.Builder clearId()

Output only. [Output Only] A unique identifier for this resource type. The server generates this identifier.

optional uint64 id = 3355;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearKind()

public HealthSource.Builder clearKind()

Output only. [Output Only] Type of the resource. Alwayscompute#healthSource for health sources.

optional string kind = 3292052;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearName()

public HealthSource.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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearRegion()

public HealthSource.Builder clearRegion()

Output only. [Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

public HealthSource.Builder clearSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearSelfLinkWithId()

public HealthSource.Builder clearSelfLinkWithId()

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

optional string self_link_with_id = 44520962;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearSourceType()

public HealthSource.Builder clearSourceType()

Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated. Check the SourceType enum for the list of possible values.

optional string source_type = 452245726;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

clearSources()

public HealthSource.Builder clearSources()

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Returns
Type Description
HealthSource.Builder

This builder for chaining.

getCreationTimestamp()

public String getCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
String

The creationTimestamp.

getCreationTimestampBytes()

public ByteString getCreationTimestampBytes()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
ByteString

The bytes for creationTimestamp.

getDefaultInstanceForType()

public HealthSource getDefaultInstanceForType()
Returns
Type Description
HealthSource

getDescription()

public String getDescription()

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

optional string description = 422937596;

Returns
Type Description
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
Type Description
ByteString

The bytes for description.

getDescriptorForType()

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

getFingerprint()

public String getFingerprint()

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource.

optional string fingerprint = 234678500;

Returns
Type Description
String

The fingerprint.

getFingerprintBytes()

public ByteString getFingerprintBytes()

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource.

optional string fingerprint = 234678500;

Returns
Type Description
ByteString

The bytes for fingerprint.

getHealthAggregationPolicy()

public String getHealthAggregationPolicy()

URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated.

optional string health_aggregation_policy = 240314354;

Returns
Type Description
String

The healthAggregationPolicy.

getHealthAggregationPolicyBytes()

public ByteString getHealthAggregationPolicyBytes()

URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated.

optional string health_aggregation_policy = 240314354;

Returns
Type Description
ByteString

The bytes for healthAggregationPolicy.

getId()

public long getId()

Output only. [Output Only] A unique identifier for this resource type. The server generates this identifier.

optional uint64 id = 3355;

Returns
Type Description
long

The id.

getKind()

public String getKind()

Output only. [Output Only] Type of the resource. Alwayscompute#healthSource for health sources.

optional string kind = 3292052;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

Output only. [Output Only] Type of the resource. Alwayscompute#healthSource for health sources.

optional string kind = 3292052;

Returns
Type Description
ByteString

The bytes for kind.

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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
ByteString

The bytes for name.

getRegion()

public String getRegion()

Output only. [Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
String

The region.

getRegionBytes()

public ByteString getRegionBytes()

Output only. [Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
ByteString

The bytes for region.

public String getSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
String

The selfLink.

getSelfLinkBytes()

public ByteString getSelfLinkBytes()

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

optional string self_link = 456214797;

Returns
Type Description
ByteString

The bytes for selfLink.

getSelfLinkWithId()

public String getSelfLinkWithId()

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

optional string self_link_with_id = 44520962;

Returns
Type Description
String

The selfLinkWithId.

getSelfLinkWithIdBytes()

public ByteString getSelfLinkWithIdBytes()

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

optional string self_link_with_id = 44520962;

Returns
Type Description
ByteString

The bytes for selfLinkWithId.

getSourceType()

public String getSourceType()

Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated. Check the SourceType enum for the list of possible values.

optional string source_type = 452245726;

Returns
Type Description
String

The sourceType.

getSourceTypeBytes()

public ByteString getSourceTypeBytes()

Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated. Check the SourceType enum for the list of possible values.

optional string source_type = 452245726;

Returns
Type Description
ByteString

The bytes for sourceType.

getSources(int index)

public String getSources(int index)

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The sources at the given index.

getSourcesBytes(int index)

public ByteString getSourcesBytes(int index)

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the sources at the given index.

getSourcesCount()

public int getSourcesCount()

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Returns
Type Description
int

The count of sources.

getSourcesList()

public ProtocolStringList getSourcesList()

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Returns
Type Description
ProtocolStringList

A list containing the sources.

hasCreationTimestamp()

public boolean hasCreationTimestamp()

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Returns
Type Description
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
Type Description
boolean

Whether the description field is set.

hasFingerprint()

public boolean hasFingerprint()

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource.

optional string fingerprint = 234678500;

Returns
Type Description
boolean

Whether the fingerprint field is set.

hasHealthAggregationPolicy()

public boolean hasHealthAggregationPolicy()

URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated.

optional string health_aggregation_policy = 240314354;

Returns
Type Description
boolean

Whether the healthAggregationPolicy field is set.

hasId()

public boolean hasId()

Output only. [Output Only] A unique identifier for this resource type. The server generates this identifier.

optional uint64 id = 3355;

Returns
Type Description
boolean

Whether the id field is set.

hasKind()

public boolean hasKind()

Output only. [Output Only] Type of the resource. Alwayscompute#healthSource for health sources.

optional string kind = 3292052;

Returns
Type Description
boolean

Whether the kind 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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Returns
Type Description
boolean

Whether the name field is set.

hasRegion()

public boolean hasRegion()

Output only. [Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Returns
Type Description
boolean

Whether the region field is set.

public boolean hasSelfLink()

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

optional string self_link = 456214797;

Returns
Type Description
boolean

Whether the selfLink field is set.

hasSelfLinkWithId()

public boolean hasSelfLinkWithId()

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

optional string self_link_with_id = 44520962;

Returns
Type Description
boolean

Whether the selfLinkWithId field is set.

hasSourceType()

public boolean hasSourceType()

Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated. Check the SourceType enum for the list of possible values.

optional string source_type = 452245726;

Returns
Type Description
boolean

Whether the sourceType field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HealthSource other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setCreationTimestamp(String value)

public HealthSource.Builder setCreationTimestamp(String value)

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
Name Description
value String

The creationTimestamp to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setCreationTimestampBytes(ByteString value)

public HealthSource.Builder setCreationTimestampBytes(ByteString value)

Output only. [Output Only] Creation timestamp inRFC3339 text format.

optional string creation_timestamp = 30525366;

Parameter
Name Description
value ByteString

The bytes for creationTimestamp to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setDescription(String value)

public HealthSource.Builder setDescription(String value)

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

optional string description = 422937596;

Parameter
Name Description
value String

The description to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public HealthSource.Builder setDescriptionBytes(ByteString value)

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

optional string description = 422937596;

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setFingerprint(String value)

public HealthSource.Builder setFingerprint(String value)

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource.

optional string fingerprint = 234678500;

Parameter
Name Description
value String

The fingerprint to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setFingerprintBytes(ByteString value)

public HealthSource.Builder setFingerprintBytes(ByteString value)

Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. This field will be ignored when inserting a HealthSource. An up-to-date fingerprint must be provided in order to patch the HealthSource; Otherwise, the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve the HealthSource.

optional string fingerprint = 234678500;

Parameter
Name Description
value ByteString

The bytes for fingerprint to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setHealthAggregationPolicy(String value)

public HealthSource.Builder setHealthAggregationPolicy(String value)

URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated.

optional string health_aggregation_policy = 240314354;

Parameter
Name Description
value String

The healthAggregationPolicy to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setHealthAggregationPolicyBytes(ByteString value)

public HealthSource.Builder setHealthAggregationPolicyBytes(ByteString value)

URL to the HealthAggregationPolicy resource. Must be set. Must be regional and in the same region as the HealthSource. Can be mutated.

optional string health_aggregation_policy = 240314354;

Parameter
Name Description
value ByteString

The bytes for healthAggregationPolicy to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setId(long value)

public HealthSource.Builder setId(long value)

Output only. [Output Only] A unique identifier for this resource type. The server generates this identifier.

optional uint64 id = 3355;

Parameter
Name Description
value long

The id to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setKind(String value)

public HealthSource.Builder setKind(String value)

Output only. [Output Only] Type of the resource. Alwayscompute#healthSource for health sources.

optional string kind = 3292052;

Parameter
Name Description
value String

The kind to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setKindBytes(ByteString value)

public HealthSource.Builder setKindBytes(ByteString value)

Output only. [Output Only] Type of the resource. Alwayscompute#healthSource for health sources.

optional string kind = 3292052;

Parameter
Name Description
value ByteString

The bytes for kind to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setName(String value)

public HealthSource.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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Parameter
Name Description
value String

The name to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setNameBytes(ByteString value)

public HealthSource.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 withRFC1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

optional string name = 3373707;

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setRegion(String value)

public HealthSource.Builder setRegion(String value)

Output only. [Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Parameter
Name Description
value String

The region to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setRegionBytes(ByteString value)

public HealthSource.Builder setRegionBytes(ByteString value)

Output only. [Output Only] URL of the region where the health source resides. This field applies only to the regional resource. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.

optional string region = 138946292;

Parameter
Name Description
value ByteString

The bytes for region to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

public HealthSource.Builder setSelfLink(String value)

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

optional string self_link = 456214797;

Parameter
Name Description
value String

The selfLink to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setSelfLinkBytes(ByteString value)

public HealthSource.Builder setSelfLinkBytes(ByteString value)

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

optional string self_link = 456214797;

Parameter
Name Description
value ByteString

The bytes for selfLink to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setSelfLinkWithId(String value)

public HealthSource.Builder setSelfLinkWithId(String value)

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

optional string self_link_with_id = 44520962;

Parameter
Name Description
value String

The selfLinkWithId to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setSelfLinkWithIdBytes(ByteString value)

public HealthSource.Builder setSelfLinkWithIdBytes(ByteString value)

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

optional string self_link_with_id = 44520962;

Parameter
Name Description
value ByteString

The bytes for selfLinkWithId to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setSourceType(String value)

public HealthSource.Builder setSourceType(String value)

Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated. Check the SourceType enum for the list of possible values.

optional string source_type = 452245726;

Parameter
Name Description
value String

The sourceType to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setSourceTypeBytes(ByteString value)

public HealthSource.Builder setSourceTypeBytes(ByteString value)

Specifies the type of the HealthSource. The only allowed value is BACKEND_SERVICE. Must be specified when theHealthSource is created, and cannot be mutated. Check the SourceType enum for the list of possible values.

optional string source_type = 452245726;

Parameter
Name Description
value ByteString

The bytes for sourceType to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.

setSources(int index, String value)

public HealthSource.Builder setSources(int index, String value)

URLs to the source resources. Must be size 1. Must be aBackendService if the sourceType is BACKEND_SERVICE. TheBackendService must have load balancing schemeINTERNAL or INTERNAL_MANAGED and must be regional and in the same region as the HealthSource (cross-region deployment for INTERNAL_MANAGED is not supported). TheBackendService may use only IGs, MIGs, or NEGs of typeGCE_VM_IP or GCE_VM_IP_PORT. TheBackendService may not use haPolicy. Can be mutated.

repeated string sources = 125606840;

Parameters
Name Description
index int

The index to set the value at.

value String

The sources to set.

Returns
Type Description
HealthSource.Builder

This builder for chaining.