Class RegionPreferences.Builder (0.14.0)

public static final class RegionPreferences.Builder extends GeneratedMessageV3.Builder<RegionPreferences.Builder> implements RegionPreferencesOrBuilder

The user preferences relating to target regions.

Protobuf type google.cloud.migrationcenter.v1.RegionPreferences

Static Methods

getDescriptor()

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

Methods

addAllPreferredRegions(Iterable<String> values)

public RegionPreferences.Builder addAllPreferredRegions(Iterable<String> values)

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Parameter
NameDescription
valuesIterable<String>

The preferredRegions to add.

Returns
TypeDescription
RegionPreferences.Builder

This builder for chaining.

addPreferredRegions(String value)

public RegionPreferences.Builder addPreferredRegions(String value)

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Parameter
NameDescription
valueString

The preferredRegions to add.

Returns
TypeDescription
RegionPreferences.Builder

This builder for chaining.

addPreferredRegionsBytes(ByteString value)

public RegionPreferences.Builder addPreferredRegionsBytes(ByteString value)

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Parameter
NameDescription
valueByteString

The bytes of the preferredRegions to add.

Returns
TypeDescription
RegionPreferences.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RegionPreferences build()
Returns
TypeDescription
RegionPreferences

buildPartial()

public RegionPreferences buildPartial()
Returns
TypeDescription
RegionPreferences

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPreferredRegions()

public RegionPreferences.Builder clearPreferredRegions()

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Returns
TypeDescription
RegionPreferences.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public RegionPreferences getDefaultInstanceForType()
Returns
TypeDescription
RegionPreferences

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getPreferredRegions(int index)

public String getPreferredRegions(int index)

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The preferredRegions at the given index.

getPreferredRegionsBytes(int index)

public ByteString getPreferredRegionsBytes(int index)

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the preferredRegions at the given index.

getPreferredRegionsCount()

public int getPreferredRegionsCount()

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Returns
TypeDescription
int

The count of preferredRegions.

getPreferredRegionsList()

public ProtocolStringList getPreferredRegionsList()

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the preferredRegions.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(RegionPreferences other)

public RegionPreferences.Builder mergeFrom(RegionPreferences other)
Parameter
NameDescription
otherRegionPreferences
Returns
TypeDescription
RegionPreferences.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setPreferredRegions(int index, String value)

public RegionPreferences.Builder setPreferredRegions(int index, String value)

A list of preferred regions, ordered by the most preferred region first. Set only valid Google Cloud region names. See https://cloud.google.com/compute/docs/regions-zones for available regions.

repeated string preferred_regions = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The preferredRegions to set.

Returns
TypeDescription
RegionPreferences.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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