public static final class InstanceFlexibilityPolicyInstanceSelection.Builder extends GeneratedMessage.Builder<InstanceFlexibilityPolicyInstanceSelection.Builder> implements InstanceFlexibilityPolicyInstanceSelectionOrBuilderSpecification of machine type to use. Every position inside this message is an alternative. The count specified in the shape flexibility must not exceed the number of entries in per_instance_properties or the capacity of the name_pattern, if used.
Protobuf type google.cloud.compute.v1.InstanceFlexibilityPolicyInstanceSelection
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > InstanceFlexibilityPolicyInstanceSelection.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllDisks(Iterable<? extends AttachedDisk> values)
public InstanceFlexibilityPolicyInstanceSelection.Builder addAllDisks(Iterable<? extends AttachedDisk> values)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.compute.v1.AttachedDisk> |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
addAllMachineTypes(Iterable<String> values)
public InstanceFlexibilityPolicyInstanceSelection.Builder addAllMachineTypes(Iterable<String> values) Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<String>The machineTypes to add. |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
This builder for chaining. |
addDisks(AttachedDisk value)
public InstanceFlexibilityPolicyInstanceSelection.Builder addDisks(AttachedDisk value)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
value |
AttachedDisk |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
addDisks(AttachedDisk.Builder builderForValue)
public InstanceFlexibilityPolicyInstanceSelection.Builder addDisks(AttachedDisk.Builder builderForValue)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
AttachedDisk.Builder |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
addDisks(int index, AttachedDisk value)
public InstanceFlexibilityPolicyInstanceSelection.Builder addDisks(int index, AttachedDisk value)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
AttachedDisk |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
addDisks(int index, AttachedDisk.Builder builderForValue)
public InstanceFlexibilityPolicyInstanceSelection.Builder addDisks(int index, AttachedDisk.Builder builderForValue)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
AttachedDisk.Builder |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
addDisksBuilder()
public AttachedDisk.Builder addDisksBuilder()Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Returns | |
|---|---|
| Type | Description |
AttachedDisk.Builder |
|
addDisksBuilder(int index)
public AttachedDisk.Builder addDisksBuilder(int index)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AttachedDisk.Builder |
|
addMachineTypes(String value)
public InstanceFlexibilityPolicyInstanceSelection.Builder addMachineTypes(String value) Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe machineTypes to add. |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
This builder for chaining. |
addMachineTypesBytes(ByteString value)
public InstanceFlexibilityPolicyInstanceSelection.Builder addMachineTypesBytes(ByteString value) Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes of the machineTypes to add. |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
This builder for chaining. |
build()
public InstanceFlexibilityPolicyInstanceSelection build()| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection |
|
buildPartial()
public InstanceFlexibilityPolicyInstanceSelection buildPartial()| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection |
|
clear()
public InstanceFlexibilityPolicyInstanceSelection.Builder clear()| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
clearDisks()
public InstanceFlexibilityPolicyInstanceSelection.Builder clearDisks()Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
clearMachineTypes()
public InstanceFlexibilityPolicyInstanceSelection.Builder clearMachineTypes() Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
This builder for chaining. |
clearRank()
public InstanceFlexibilityPolicyInstanceSelection.Builder clearRank()Rank when prioritizing the shape flexibilities. The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0.
optional int64 rank = 3492908;
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public InstanceFlexibilityPolicyInstanceSelection getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getDisks(int index)
public AttachedDisk getDisks(int index)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AttachedDisk |
|
getDisksBuilder(int index)
public AttachedDisk.Builder getDisksBuilder(int index)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AttachedDisk.Builder |
|
getDisksBuilderList()
public List<AttachedDisk.Builder> getDisksBuilderList()Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getDisksCount()
public int getDisksCount()Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Returns | |
|---|---|
| Type | Description |
int |
|
getDisksList()
public List<AttachedDisk> getDisksList()Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Returns | |
|---|---|
| Type | Description |
List<AttachedDisk> |
|
getDisksOrBuilder(int index)
public AttachedDiskOrBuilder getDisksOrBuilder(int index)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
AttachedDiskOrBuilder |
|
getDisksOrBuilderList()
public List<? extends AttachedDiskOrBuilder> getDisksOrBuilderList()Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.compute.v1.AttachedDiskOrBuilder> |
|
getMachineTypes(int index)
public String getMachineTypes(int index) Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the element to return. |
| Returns | |
|---|---|
| Type | Description |
String |
The machineTypes at the given index. |
getMachineTypesBytes(int index)
public ByteString getMachineTypesBytes(int index) Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Parameter | |
|---|---|
| Name | Description |
index |
intThe index of the value to return. |
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes of the machineTypes at the given index. |
getMachineTypesCount()
public int getMachineTypesCount() Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Returns | |
|---|---|
| Type | Description |
int |
The count of machineTypes. |
getMachineTypesList()
public ProtocolStringList getMachineTypesList() Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Returns | |
|---|---|
| Type | Description |
ProtocolStringList |
A list containing the machineTypes. |
getRank()
public long getRank()Rank when prioritizing the shape flexibilities. The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0.
optional int64 rank = 3492908;
| Returns | |
|---|---|
| Type | Description |
long |
The rank. |
hasRank()
public boolean hasRank()Rank when prioritizing the shape flexibilities. The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0.
optional int64 rank = 3492908;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the rank field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(InstanceFlexibilityPolicyInstanceSelection other)
public InstanceFlexibilityPolicyInstanceSelection.Builder mergeFrom(InstanceFlexibilityPolicyInstanceSelection other)| Parameter | |
|---|---|
| Name | Description |
other |
InstanceFlexibilityPolicyInstanceSelection |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public InstanceFlexibilityPolicyInstanceSelection.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public InstanceFlexibilityPolicyInstanceSelection.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
removeDisks(int index)
public InstanceFlexibilityPolicyInstanceSelection.Builder removeDisks(int index)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
setDisks(int index, AttachedDisk value)
public InstanceFlexibilityPolicyInstanceSelection.Builder setDisks(int index, AttachedDisk value)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
AttachedDisk |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
setDisks(int index, AttachedDisk.Builder builderForValue)
public InstanceFlexibilityPolicyInstanceSelection.Builder setDisks(int index, AttachedDisk.Builder builderForValue)Disks to be attached to the instances created from in this selection. They override the disks specified in the instance properties.
repeated .google.cloud.compute.v1.AttachedDisk disks = 95594102;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
AttachedDisk.Builder |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
|
setMachineTypes(int index, String value)
public InstanceFlexibilityPolicyInstanceSelection.Builder setMachineTypes(int index, String value) Alternative machine types to use for instances that are created from
these properties. This field only accepts a machine type names, for
example n2-standard-4 and not URLs or partial URLs.
repeated string machine_types = 79720065;
| Parameters | |
|---|---|
| Name | Description |
index |
intThe index to set the value at. |
value |
StringThe machineTypes to set. |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
This builder for chaining. |
setRank(long value)
public InstanceFlexibilityPolicyInstanceSelection.Builder setRank(long value)Rank when prioritizing the shape flexibilities. The instance selections with rank are considered first, in the ascending order of the rank. If not set, defaults to 0.
optional int64 rank = 3492908;
| Parameter | |
|---|---|
| Name | Description |
value |
longThe rank to set. |
| Returns | |
|---|---|
| Type | Description |
InstanceFlexibilityPolicyInstanceSelection.Builder |
This builder for chaining. |