Class RegionPreferences.Builder (0.26.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
Type Description
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
Name Description
values Iterable<String>

The preferredRegions to add.

Returns
Type Description
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
Name Description
value String

The preferredRegions to add.

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

The bytes of the preferredRegions to add.

Returns
Type Description
RegionPreferences.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public RegionPreferences build()
Returns
Type Description
RegionPreferences

buildPartial()

public RegionPreferences buildPartial()
Returns
Type Description
RegionPreferences

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public RegionPreferences.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
RegionPreferences.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public RegionPreferences getDefaultInstanceForType()
Returns
Type Description
RegionPreferences

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

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

A list containing the preferredRegions.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RegionPreferences other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public RegionPreferences.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The preferredRegions to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
RegionPreferences.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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