Class AllocationPolicy.InstancePolicy (0.46.0)

public static final class AllocationPolicy.InstancePolicy extends GeneratedMessageV3 implements AllocationPolicy.InstancePolicyOrBuilder

InstancePolicy describes an instance type and resources attached to each VM created by this InstancePolicy.

Protobuf type google.cloud.batch.v1.AllocationPolicy.InstancePolicy

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > AllocationPolicy.InstancePolicy

Static Fields

ACCELERATORS_FIELD_NUMBER

public static final int ACCELERATORS_FIELD_NUMBER
Field Value
Type Description
int

BOOT_DISK_FIELD_NUMBER

public static final int BOOT_DISK_FIELD_NUMBER
Field Value
Type Description
int

DISKS_FIELD_NUMBER

public static final int DISKS_FIELD_NUMBER
Field Value
Type Description
int

MACHINE_TYPE_FIELD_NUMBER

public static final int MACHINE_TYPE_FIELD_NUMBER
Field Value
Type Description
int

MIN_CPU_PLATFORM_FIELD_NUMBER

public static final int MIN_CPU_PLATFORM_FIELD_NUMBER
Field Value
Type Description
int

PROVISIONING_MODEL_FIELD_NUMBER

public static final int PROVISIONING_MODEL_FIELD_NUMBER
Field Value
Type Description
int

RESERVATION_FIELD_NUMBER

public static final int RESERVATION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

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

getDescriptor()

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

newBuilder()

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

newBuilder(AllocationPolicy.InstancePolicy prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getAccelerators(int index)

public AllocationPolicy.Accelerator getAccelerators(int index)

The accelerators attached to each VM instance.

repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5;

Parameter
Name Description
index int
Returns
Type Description
AllocationPolicy.Accelerator

getAcceleratorsCount()

public int getAcceleratorsCount()

The accelerators attached to each VM instance.

repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5;

Returns
Type Description
int

getAcceleratorsList()

public List<AllocationPolicy.Accelerator> getAcceleratorsList()

The accelerators attached to each VM instance.

repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5;

Returns
Type Description
List<Accelerator>

getAcceleratorsOrBuilder(int index)

public AllocationPolicy.AcceleratorOrBuilder getAcceleratorsOrBuilder(int index)

The accelerators attached to each VM instance.

repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5;

Parameter
Name Description
index int
Returns
Type Description
AllocationPolicy.AcceleratorOrBuilder

getAcceleratorsOrBuilderList()

public List<? extends AllocationPolicy.AcceleratorOrBuilder> getAcceleratorsOrBuilderList()

The accelerators attached to each VM instance.

repeated .google.cloud.batch.v1.AllocationPolicy.Accelerator accelerators = 5;

Returns
Type Description
List<? extends com.google.cloud.batch.v1.AllocationPolicy.AcceleratorOrBuilder>

getBootDisk()

public AllocationPolicy.Disk getBootDisk()

Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image.

.google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8;

Returns
Type Description
AllocationPolicy.Disk

The bootDisk.

getBootDiskOrBuilder()

public AllocationPolicy.DiskOrBuilder getBootDiskOrBuilder()

Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image.

.google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8;

Returns
Type Description
AllocationPolicy.DiskOrBuilder

getDefaultInstanceForType()

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

getDisks(int index)

public AllocationPolicy.AttachedDisk getDisks(int index)

Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.

repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6;

Parameter
Name Description
index int
Returns
Type Description
AllocationPolicy.AttachedDisk

getDisksCount()

public int getDisksCount()

Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.

repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6;

Returns
Type Description
int

getDisksList()

public List<AllocationPolicy.AttachedDisk> getDisksList()

Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.

repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6;

Returns
Type Description
List<AttachedDisk>

getDisksOrBuilder(int index)

public AllocationPolicy.AttachedDiskOrBuilder getDisksOrBuilder(int index)

Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.

repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6;

Parameter
Name Description
index int
Returns
Type Description
AllocationPolicy.AttachedDiskOrBuilder

getDisksOrBuilderList()

public List<? extends AllocationPolicy.AttachedDiskOrBuilder> getDisksOrBuilderList()

Non-boot disks to be attached for each VM created by this InstancePolicy. New disks will be deleted when the VM is deleted. A non-boot disk is a disk that can be of a device with a file system or a raw storage drive that is not ready for data storage and accessing.

repeated .google.cloud.batch.v1.AllocationPolicy.AttachedDisk disks = 6;

Returns
Type Description
List<? extends com.google.cloud.batch.v1.AllocationPolicy.AttachedDiskOrBuilder>

getMachineType()

public String getMachineType()

The Compute Engine machine type.

string machine_type = 2;

Returns
Type Description
String

The machineType.

getMachineTypeBytes()

public ByteString getMachineTypeBytes()

The Compute Engine machine type.

string machine_type = 2;

Returns
Type Description
ByteString

The bytes for machineType.

getMinCpuPlatform()

public String getMinCpuPlatform()

The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.

string min_cpu_platform = 3;

Returns
Type Description
String

The minCpuPlatform.

getMinCpuPlatformBytes()

public ByteString getMinCpuPlatformBytes()

The minimum CPU platform. See https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform.

string min_cpu_platform = 3;

Returns
Type Description
ByteString

The bytes for minCpuPlatform.

getParserForType()

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

getProvisioningModel()

public AllocationPolicy.ProvisioningModel getProvisioningModel()

The provisioning model.

.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4;

Returns
Type Description
AllocationPolicy.ProvisioningModel

The provisioningModel.

getProvisioningModelValue()

public int getProvisioningModelValue()

The provisioning model.

.google.cloud.batch.v1.AllocationPolicy.ProvisioningModel provisioning_model = 4;

Returns
Type Description
int

The enum numeric value on the wire for provisioningModel.

getReservation()

public String getReservation()

Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation.

string reservation = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The reservation.

getReservationBytes()

public ByteString getReservationBytes()

Optional. If specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation.

string reservation = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for reservation.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasBootDisk()

public boolean hasBootDisk()

Boot disk to be created and attached to each VM by this InstancePolicy. Boot disk will be deleted when the VM is deleted. Batch API now only supports booting from image.

.google.cloud.batch.v1.AllocationPolicy.Disk boot_disk = 8;

Returns
Type Description
boolean

Whether the bootDisk field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected AllocationPolicy.InstancePolicy.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
AllocationPolicy.InstancePolicy.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

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