Class AllocationPolicy.InstanceSelection (0.95.0)

public static final class AllocationPolicy.InstanceSelection extends GeneratedMessage implements AllocationPolicy.InstanceSelectionOrBuilder

Defines an instance selection for a given instance flexibility policy.

Protobuf type google.cloud.batch.v1alpha.AllocationPolicy.InstanceSelection

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessage > AllocationPolicy.InstanceSelection

Static Fields

MACHINE_TYPES_FIELD_NUMBER

public static final int MACHINE_TYPES_FIELD_NUMBER
Field Value
Type Description
int

RANK_FIELD_NUMBER

public static final int RANK_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static AllocationPolicy.InstanceSelection getDefaultInstance()
Returns
Type Description
AllocationPolicy.InstanceSelection

getDescriptor()

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

newBuilder()

public static AllocationPolicy.InstanceSelection.Builder newBuilder()
Returns
Type Description
AllocationPolicy.InstanceSelection.Builder

newBuilder(AllocationPolicy.InstanceSelection prototype)

public static AllocationPolicy.InstanceSelection.Builder newBuilder(AllocationPolicy.InstanceSelection prototype)
Parameter
Name Description
prototype AllocationPolicy.InstanceSelection
Returns
Type Description
AllocationPolicy.InstanceSelection.Builder

parseDelimitedFrom(InputStream input)

public static AllocationPolicy.InstanceSelection parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AllocationPolicy.InstanceSelection parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static AllocationPolicy.InstanceSelection parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static AllocationPolicy.InstanceSelection parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static AllocationPolicy.InstanceSelection parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static AllocationPolicy.InstanceSelection parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static AllocationPolicy.InstanceSelection parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static AllocationPolicy.InstanceSelection parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static AllocationPolicy.InstanceSelection parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static AllocationPolicy.InstanceSelection parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static AllocationPolicy.InstanceSelection parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static AllocationPolicy.InstanceSelection parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AllocationPolicy.InstanceSelection
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<AllocationPolicy.InstanceSelection> parser()
Returns
Type Description
Parser<InstanceSelection>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public AllocationPolicy.InstanceSelection getDefaultInstanceForType()
Returns
Type Description
AllocationPolicy.InstanceSelection

getMachineTypes(int index)

public String getMachineTypes(int index)

Required. The Compute Engine machine type IDs. Only the machine type ID is supported, such as n1-standard-16. Full or partial URLs are not accepted. The total maximum number of machine types across all instance selections is 200. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

repeated string machine_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The machineTypes at the given index.

getMachineTypesBytes(int index)

public ByteString getMachineTypesBytes(int index)

Required. The Compute Engine machine type IDs. Only the machine type ID is supported, such as n1-standard-16. Full or partial URLs are not accepted. The total maximum number of machine types across all instance selections is 200. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

repeated string machine_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the machineTypes at the given index.

getMachineTypesCount()

public int getMachineTypesCount()

Required. The Compute Engine machine type IDs. Only the machine type ID is supported, such as n1-standard-16. Full or partial URLs are not accepted. The total maximum number of machine types across all instance selections is 200. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

repeated string machine_types = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of machineTypes.

getMachineTypesList()

public ProtocolStringList getMachineTypesList()

Required. The Compute Engine machine type IDs. Only the machine type ID is supported, such as n1-standard-16. Full or partial URLs are not accepted. The total maximum number of machine types across all instance selections is 200. Exceeding this limit results in a validation error with code INVALID_ARGUMENT.

repeated string machine_types = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the machineTypes.

getParserForType()

public Parser<AllocationPolicy.InstanceSelection> getParserForType()
Returns
Type Description
Parser<InstanceSelection>
Overrides

getRank()

public int getRank()

Optional. Indicates the preference of this instance selection. Lower number means higher preference. First try is to create a VM based on the machine-type with lowest rank and fallback to next rank based on availability. Machine types and instance selections with the same rank have the same preference.

optional int32 rank = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The rank.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasRank()

public boolean hasRank()

Optional. Indicates the preference of this instance selection. Lower number means higher preference. First try is to create a VM based on the machine-type with lowest rank and fallback to next rank based on availability. Machine types and instance selections with the same rank have the same preference.

optional int32 rank = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the rank field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public AllocationPolicy.InstanceSelection.Builder newBuilderForType()
Returns
Type Description
AllocationPolicy.InstanceSelection.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected AllocationPolicy.InstanceSelection.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AllocationPolicy.InstanceSelection.Builder
Overrides

toBuilder()

public AllocationPolicy.InstanceSelection.Builder toBuilder()
Returns
Type Description
AllocationPolicy.InstanceSelection.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException