Class CloudLocation.Builder (0.1.0)

public static final class CloudLocation.Builder extends GeneratedMessageV3.Builder<CloudLocation.Builder> implements CloudLocationOrBuilder

Represents resource cloud locations.

Protobuf type google.cloud.locationfinder.v1.CloudLocation

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public CloudLocation build()
Returns
Type Description
CloudLocation

buildPartial()

public CloudLocation buildPartial()
Returns
Type Description
CloudLocation

clear()

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

clearCarbonFreeEnergyPercentage()

public CloudLocation.Builder clearCarbonFreeEnergyPercentage()

Optional. The carbon free energy percentage of the cloud location. This represents the average percentage of time customers' application will be running on carbon-free energy. See https://cloud.google.com/sustainability/region-carbon for more details. There is a difference between default value 0 and unset value. 0 means the carbon free energy percentage is 0%, while unset value means the carbon footprint data is not available.

optional float carbon_free_energy_percentage = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

clearCloudLocationType()

public CloudLocation.Builder clearCloudLocationType()

Optional. The type of the cloud location.

.google.cloud.locationfinder.v1.CloudLocation.CloudLocationType cloud_location_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

clearCloudProvider()

public CloudLocation.Builder clearCloudProvider()

Optional. The provider of the cloud location. Values can be Google Cloud or third-party providers, including AWS, Azure, or Oracle Cloud Infrastructure.

.google.cloud.locationfinder.v1.CloudLocation.CloudProvider cloud_provider = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

clearContainingCloudLocation()

public CloudLocation.Builder clearContainingCloudLocation()

Output only. The containing cloud location in the strict nesting hierarchy. For example, the containing cloud location of a zone is a region.

string containing_cloud_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

clearDisplayName()

public CloudLocation.Builder clearDisplayName()

Optional. The human-readable name of the cloud location. Example: us-east-2, us-east1.

string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public CloudLocation.Builder clearName()

Identifier. Name of the cloud location. Unique name of the cloud location including project and location using the form: projects/{project_id}/locations/{location}/cloudLocations/{cloud_location}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTerritoryCode()

public CloudLocation.Builder clearTerritoryCode()

Optional. The two-letter ISO 3166-1 alpha-2 code of the cloud location. Examples: US, JP, KR.

string territory_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

clone()

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

getCarbonFreeEnergyPercentage()

public float getCarbonFreeEnergyPercentage()

Optional. The carbon free energy percentage of the cloud location. This represents the average percentage of time customers' application will be running on carbon-free energy. See https://cloud.google.com/sustainability/region-carbon for more details. There is a difference between default value 0 and unset value. 0 means the carbon free energy percentage is 0%, while unset value means the carbon footprint data is not available.

optional float carbon_free_energy_percentage = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
float

The carbonFreeEnergyPercentage.

getCloudLocationType()

public CloudLocation.CloudLocationType getCloudLocationType()

Optional. The type of the cloud location.

.google.cloud.locationfinder.v1.CloudLocation.CloudLocationType cloud_location_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudLocation.CloudLocationType

The cloudLocationType.

getCloudLocationTypeValue()

public int getCloudLocationTypeValue()

Optional. The type of the cloud location.

.google.cloud.locationfinder.v1.CloudLocation.CloudLocationType cloud_location_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for cloudLocationType.

getCloudProvider()

public CloudLocation.CloudProvider getCloudProvider()

Optional. The provider of the cloud location. Values can be Google Cloud or third-party providers, including AWS, Azure, or Oracle Cloud Infrastructure.

.google.cloud.locationfinder.v1.CloudLocation.CloudProvider cloud_provider = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
CloudLocation.CloudProvider

The cloudProvider.

getCloudProviderValue()

public int getCloudProviderValue()

Optional. The provider of the cloud location. Values can be Google Cloud or third-party providers, including AWS, Azure, or Oracle Cloud Infrastructure.

.google.cloud.locationfinder.v1.CloudLocation.CloudProvider cloud_provider = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The enum numeric value on the wire for cloudProvider.

getContainingCloudLocation()

public String getContainingCloudLocation()

Output only. The containing cloud location in the strict nesting hierarchy. For example, the containing cloud location of a zone is a region.

string containing_cloud_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The containingCloudLocation.

getContainingCloudLocationBytes()

public ByteString getContainingCloudLocationBytes()

Output only. The containing cloud location in the strict nesting hierarchy. For example, the containing cloud location of a zone is a region.

string containing_cloud_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for containingCloudLocation.

getDefaultInstanceForType()

public CloudLocation getDefaultInstanceForType()
Returns
Type Description
CloudLocation

getDescriptorForType()

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

getDisplayName()

public String getDisplayName()

Optional. The human-readable name of the cloud location. Example: us-east-2, us-east1.

string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Optional. The human-readable name of the cloud location. Example: us-east-2, us-east1.

string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for displayName.

getName()

public String getName()

Identifier. Name of the cloud location. Unique name of the cloud location including project and location using the form: projects/{project_id}/locations/{location}/cloudLocations/{cloud_location}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. Name of the cloud location. Unique name of the cloud location including project and location using the form: projects/{project_id}/locations/{location}/cloudLocations/{cloud_location}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getTerritoryCode()

public String getTerritoryCode()

Optional. The two-letter ISO 3166-1 alpha-2 code of the cloud location. Examples: US, JP, KR.

string territory_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The territoryCode.

getTerritoryCodeBytes()

public ByteString getTerritoryCodeBytes()

Optional. The two-letter ISO 3166-1 alpha-2 code of the cloud location. Examples: US, JP, KR.

string territory_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for territoryCode.

hasCarbonFreeEnergyPercentage()

public boolean hasCarbonFreeEnergyPercentage()

Optional. The carbon free energy percentage of the cloud location. This represents the average percentage of time customers' application will be running on carbon-free energy. See https://cloud.google.com/sustainability/region-carbon for more details. There is a difference between default value 0 and unset value. 0 means the carbon free energy percentage is 0%, while unset value means the carbon footprint data is not available.

optional float carbon_free_energy_percentage = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the carbonFreeEnergyPercentage field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CloudLocation other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setCarbonFreeEnergyPercentage(float value)

public CloudLocation.Builder setCarbonFreeEnergyPercentage(float value)

Optional. The carbon free energy percentage of the cloud location. This represents the average percentage of time customers' application will be running on carbon-free energy. See https://cloud.google.com/sustainability/region-carbon for more details. There is a difference between default value 0 and unset value. 0 means the carbon free energy percentage is 0%, while unset value means the carbon footprint data is not available.

optional float carbon_free_energy_percentage = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value float

The carbonFreeEnergyPercentage to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setCloudLocationType(CloudLocation.CloudLocationType value)

public CloudLocation.Builder setCloudLocationType(CloudLocation.CloudLocationType value)

Optional. The type of the cloud location.

.google.cloud.locationfinder.v1.CloudLocation.CloudLocationType cloud_location_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CloudLocation.CloudLocationType

The cloudLocationType to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setCloudLocationTypeValue(int value)

public CloudLocation.Builder setCloudLocationTypeValue(int value)

Optional. The type of the cloud location.

.google.cloud.locationfinder.v1.CloudLocation.CloudLocationType cloud_location_type = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for cloudLocationType to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setCloudProvider(CloudLocation.CloudProvider value)

public CloudLocation.Builder setCloudProvider(CloudLocation.CloudProvider value)

Optional. The provider of the cloud location. Values can be Google Cloud or third-party providers, including AWS, Azure, or Oracle Cloud Infrastructure.

.google.cloud.locationfinder.v1.CloudLocation.CloudProvider cloud_provider = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value CloudLocation.CloudProvider

The cloudProvider to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setCloudProviderValue(int value)

public CloudLocation.Builder setCloudProviderValue(int value)

Optional. The provider of the cloud location. Values can be Google Cloud or third-party providers, including AWS, Azure, or Oracle Cloud Infrastructure.

.google.cloud.locationfinder.v1.CloudLocation.CloudProvider cloud_provider = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The enum numeric value on the wire for cloudProvider to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setContainingCloudLocation(String value)

public CloudLocation.Builder setContainingCloudLocation(String value)

Output only. The containing cloud location in the strict nesting hierarchy. For example, the containing cloud location of a zone is a region.

string containing_cloud_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The containingCloudLocation to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setContainingCloudLocationBytes(ByteString value)

public CloudLocation.Builder setContainingCloudLocationBytes(ByteString value)

Output only. The containing cloud location in the strict nesting hierarchy. For example, the containing cloud location of a zone is a region.

string containing_cloud_location = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for containingCloudLocation to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setDisplayName(String value)

public CloudLocation.Builder setDisplayName(String value)

Optional. The human-readable name of the cloud location. Example: us-east-2, us-east1.

string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public CloudLocation.Builder setDisplayNameBytes(ByteString value)

Optional. The human-readable name of the cloud location. Example: us-east-2, us-east1.

string display_name = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public CloudLocation.Builder setName(String value)

Identifier. Name of the cloud location. Unique name of the cloud location including project and location using the form: projects/{project_id}/locations/{location}/cloudLocations/{cloud_location}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setNameBytes(ByteString value)

public CloudLocation.Builder setNameBytes(ByteString value)

Identifier. Name of the cloud location. Unique name of the cloud location including project and location using the form: projects/{project_id}/locations/{location}/cloudLocations/{cloud_location}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

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

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

setTerritoryCode(String value)

public CloudLocation.Builder setTerritoryCode(String value)

Optional. The two-letter ISO 3166-1 alpha-2 code of the cloud location. Examples: US, JP, KR.

string territory_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The territoryCode to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setTerritoryCodeBytes(ByteString value)

public CloudLocation.Builder setTerritoryCodeBytes(ByteString value)

Optional. The two-letter ISO 3166-1 alpha-2 code of the cloud location. Examples: US, JP, KR.

string territory_code = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for territoryCode to set.

Returns
Type Description
CloudLocation.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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