public static final class AllocationPolicy.Disk extends com.google.protobuf.GeneratedMessageV3 implements AllocationPolicy.DiskOrBuilder
A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. See https://cloud.google.com/compute/docs/disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds.Protobuf type
google.cloud.batch.v1.AllocationPolicy.Disk| Modifier and Type | Class and Description |
|---|---|
static class |
AllocationPolicy.Disk.Builder
A new persistent disk or a local ssd.
|
static class |
AllocationPolicy.Disk.DataSourceCase |
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
DISK_INTERFACE_FIELD_NUMBER |
static int |
IMAGE_FIELD_NUMBER |
static int |
SIZE_GB_FIELD_NUMBER |
static int |
SNAPSHOT_FIELD_NUMBER |
static int |
TYPE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
AllocationPolicy.Disk.DataSourceCase |
getDataSourceCase() |
static AllocationPolicy.Disk |
getDefaultInstance() |
AllocationPolicy.Disk |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getDiskInterface()
Local SSDs are available through both "SCSI" and "NVMe" interfaces.
|
com.google.protobuf.ByteString |
getDiskInterfaceBytes()
Local SSDs are available through both "SCSI" and "NVMe" interfaces.
|
String |
getImage()
URL for a VM image to use as the data source for this disk.
|
com.google.protobuf.ByteString |
getImageBytes()
URL for a VM image to use as the data source for this disk.
|
com.google.protobuf.Parser<AllocationPolicy.Disk> |
getParserForType() |
int |
getSerializedSize() |
long |
getSizeGb()
Disk size in GB.
|
String |
getSnapshot()
Name of a snapshot used as the data source.
|
com.google.protobuf.ByteString |
getSnapshotBytes()
Name of a snapshot used as the data source.
|
String |
getType()
Disk type as shown in `gcloud compute disk-types list`.
|
com.google.protobuf.ByteString |
getTypeBytes()
Disk type as shown in `gcloud compute disk-types list`.
|
int |
hashCode() |
boolean |
hasImage()
URL for a VM image to use as the data source for this disk.
|
boolean |
hasSnapshot()
Name of a snapshot used as the data source.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static AllocationPolicy.Disk.Builder |
newBuilder() |
static AllocationPolicy.Disk.Builder |
newBuilder(AllocationPolicy.Disk prototype) |
AllocationPolicy.Disk.Builder |
newBuilderForType() |
protected AllocationPolicy.Disk.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static AllocationPolicy.Disk |
parseDelimitedFrom(InputStream input) |
static AllocationPolicy.Disk |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AllocationPolicy.Disk |
parseFrom(byte[] data) |
static AllocationPolicy.Disk |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AllocationPolicy.Disk |
parseFrom(ByteBuffer data) |
static AllocationPolicy.Disk |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AllocationPolicy.Disk |
parseFrom(com.google.protobuf.ByteString data) |
static AllocationPolicy.Disk |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AllocationPolicy.Disk |
parseFrom(com.google.protobuf.CodedInputStream input) |
static AllocationPolicy.Disk |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AllocationPolicy.Disk |
parseFrom(InputStream input) |
static AllocationPolicy.Disk |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<AllocationPolicy.Disk> |
parser() |
AllocationPolicy.Disk.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int IMAGE_FIELD_NUMBER
public static final int SNAPSHOT_FIELD_NUMBER
public static final int TYPE_FIELD_NUMBER
public static final int SIZE_GB_FIELD_NUMBER
public static final int DISK_INTERFACE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public AllocationPolicy.Disk.DataSourceCase getDataSourceCase()
getDataSourceCase in interface AllocationPolicy.DiskOrBuilderpublic boolean hasImage()
URL for a VM image to use as the data source for this disk.
For example, the following are all valid URLs:
* Specify the image by its family name:
projects/{project}/global/images/family/{image_family}
* Specify the image version:
projects/{project}/global/images/{image_version}
You can also use Batch customized image in short names.
The following image values are supported for a boot disk:
* `batch-debian`: use Batch Debian images.
* `batch-cos`: use Batch Container-Optimized images.
* `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
string image = 4;hasImage in interface AllocationPolicy.DiskOrBuilderpublic String getImage()
URL for a VM image to use as the data source for this disk.
For example, the following are all valid URLs:
* Specify the image by its family name:
projects/{project}/global/images/family/{image_family}
* Specify the image version:
projects/{project}/global/images/{image_version}
You can also use Batch customized image in short names.
The following image values are supported for a boot disk:
* `batch-debian`: use Batch Debian images.
* `batch-cos`: use Batch Container-Optimized images.
* `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
string image = 4;getImage in interface AllocationPolicy.DiskOrBuilderpublic com.google.protobuf.ByteString getImageBytes()
URL for a VM image to use as the data source for this disk.
For example, the following are all valid URLs:
* Specify the image by its family name:
projects/{project}/global/images/family/{image_family}
* Specify the image version:
projects/{project}/global/images/{image_version}
You can also use Batch customized image in short names.
The following image values are supported for a boot disk:
* `batch-debian`: use Batch Debian images.
* `batch-cos`: use Batch Container-Optimized images.
* `batch-hpc-rocky`: use Batch HPC Rocky Linux images.
string image = 4;getImageBytes in interface AllocationPolicy.DiskOrBuilderpublic boolean hasSnapshot()
Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;hasSnapshot in interface AllocationPolicy.DiskOrBuilderpublic String getSnapshot()
Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;getSnapshot in interface AllocationPolicy.DiskOrBuilderpublic com.google.protobuf.ByteString getSnapshotBytes()
Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;getSnapshotBytes in interface AllocationPolicy.DiskOrBuilderpublic String getType()
Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type "local-ssd". Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" or "pd-standard". If not specified, "pd-standard" will be used as the default type for non-boot disks, "pd-balanced" will be used as the default type for boot disks.
string type = 1;getType in interface AllocationPolicy.DiskOrBuilderpublic com.google.protobuf.ByteString getTypeBytes()
Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type "local-ssd". Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" or "pd-standard". If not specified, "pd-standard" will be used as the default type for non-boot disks, "pd-balanced" will be used as the default type for boot disks.
string type = 1;getTypeBytes in interface AllocationPolicy.DiskOrBuilderpublic long getSizeGb()
Disk size in GB. **Non-Boot Disk**: If the `type` specifies a persistent disk, this field is ignored if `data_source` is set as `image` or `snapshot`. If the `type` specifies a local SSD, this field should be a multiple of 375 GB, otherwise, the final size will be the next greater multiple of 375 GB. **Boot Disk**: Batch will calculate the boot disk size based on source image and task requirements if you do not speicify the size. If both this field and the `boot_disk_mib` field in task spec's `compute_resource` are defined, Batch will only honor this field. Also, this field should be no smaller than the source disk's size when the `data_source` is set as `snapshot` or `image`. For example, if you set an image as the `data_source` field and the image's default disk size 30 GB, you can only use this field to make the disk larger or equal to 30 GB.
int64 size_gb = 2;getSizeGb in interface AllocationPolicy.DiskOrBuilderpublic String getDiskInterface()
Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. This field is ignored for persistent disks as the interface is chosen automatically. See https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.
string disk_interface = 6;getDiskInterface in interface AllocationPolicy.DiskOrBuilderpublic com.google.protobuf.ByteString getDiskInterfaceBytes()
Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. This field is ignored for persistent disks as the interface is chosen automatically. See https://cloud.google.com/compute/docs/disks/persistent-disks#choose_an_interface.
string disk_interface = 6;getDiskInterfaceBytes in interface AllocationPolicy.DiskOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static AllocationPolicy.Disk parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AllocationPolicy.Disk parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AllocationPolicy.Disk parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AllocationPolicy.Disk parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AllocationPolicy.Disk parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AllocationPolicy.Disk parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AllocationPolicy.Disk parseFrom(InputStream input) throws IOException
IOExceptionpublic static AllocationPolicy.Disk parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static AllocationPolicy.Disk parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static AllocationPolicy.Disk parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static AllocationPolicy.Disk parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static AllocationPolicy.Disk parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic AllocationPolicy.Disk.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static AllocationPolicy.Disk.Builder newBuilder()
public static AllocationPolicy.Disk.Builder newBuilder(AllocationPolicy.Disk prototype)
public AllocationPolicy.Disk.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected AllocationPolicy.Disk.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static AllocationPolicy.Disk getDefaultInstance()
public static com.google.protobuf.Parser<AllocationPolicy.Disk> parser()
public com.google.protobuf.Parser<AllocationPolicy.Disk> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public AllocationPolicy.Disk getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.