Package com.google.cloud.batch.v1alpha
Class AllocationPolicy.Disk.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Disk.Builder>
com.google.cloud.batch.v1alpha.AllocationPolicy.Disk.Builder
- All Implemented Interfaces:
AllocationPolicy.DiskOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- AllocationPolicy.Disk
public static final class AllocationPolicy.Disk.Builder
extends com.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Disk.Builder>
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.v1alpha.AllocationPolicy.Disk-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Local SSDs are available through both "SCSI" and "NVMe" interfaces.URL for a VM image to use as the data source for this disk.Disk size in GB.Name of a snapshot used as the data source.Disk type as shown in `gcloud compute disk-types list`.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorLocal SSDs are available through both "SCSI" and "NVMe" interfaces.com.google.protobuf.ByteStringLocal SSDs are available through both "SCSI" and "NVMe" interfaces.getImage()URL for a VM image to use as the data source for this disk.com.google.protobuf.ByteStringURL for a VM image to use as the data source for this disk.longDisk size in GB.Name of a snapshot used as the data source.com.google.protobuf.ByteStringName of a snapshot used as the data source.getType()Disk type as shown in `gcloud compute disk-types list`.com.google.protobuf.ByteStringDisk type as shown in `gcloud compute disk-types list`.booleanhasImage()URL for a VM image to use as the data source for this disk.booleanName of a snapshot used as the data source.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(AllocationPolicy.Disk other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setDiskInterface(String value) Local SSDs are available through both "SCSI" and "NVMe" interfaces.setDiskInterfaceBytes(com.google.protobuf.ByteString value) Local SSDs are available through both "SCSI" and "NVMe" interfaces.URL for a VM image to use as the data source for this disk.setImageBytes(com.google.protobuf.ByteString value) URL for a VM image to use as the data source for this disk.setSizeGb(long value) Disk size in GB.setSnapshot(String value) Name of a snapshot used as the data source.setSnapshotBytes(com.google.protobuf.ByteString value) Name of a snapshot used as the data source.Disk type as shown in `gcloud compute disk-types list`.setTypeBytes(com.google.protobuf.ByteString value) Disk type as shown in `gcloud compute disk-types list`.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Disk.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Disk.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Disk.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AllocationPolicy.Disk.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<AllocationPolicy.Disk.Builder>
-
mergeFrom
public AllocationPolicy.Disk.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AllocationPolicy.Disk.Builder>- Throws:
IOException
-
getDataSourceCase
- Specified by:
getDataSourceCasein interfaceAllocationPolicy.DiskOrBuilder
-
clearDataSource
-
hasImage
public 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;- Specified by:
hasImagein interfaceAllocationPolicy.DiskOrBuilder- Returns:
- Whether the image field is set.
-
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;- Specified by:
getImagein interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The image.
-
getImageBytes
public 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;- Specified by:
getImageBytesin interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The bytes for image.
-
setImage
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;- Parameters:
value- The image to set.- Returns:
- This builder for chaining.
-
clearImage
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;- Returns:
- This builder for chaining.
-
setImageBytes
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;- Parameters:
value- The bytes for image to set.- Returns:
- This builder for chaining.
-
hasSnapshot
public boolean hasSnapshot()Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;- Specified by:
hasSnapshotin interfaceAllocationPolicy.DiskOrBuilder- Returns:
- Whether the snapshot field is set.
-
getSnapshot
Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;- Specified by:
getSnapshotin interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The snapshot.
-
getSnapshotBytes
public 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;- Specified by:
getSnapshotBytesin interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The bytes for snapshot.
-
setSnapshot
Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;- Parameters:
value- The snapshot to set.- Returns:
- This builder for chaining.
-
clearSnapshot
Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;- Returns:
- This builder for chaining.
-
setSnapshotBytes
Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
string snapshot = 5;- Parameters:
value- The bytes for snapshot to set.- Returns:
- This builder for chaining.
-
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;- Specified by:
getTypein interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The type.
-
getTypeBytes
public 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;- Specified by:
getTypeBytesin interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The bytes for type.
-
setType
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;- Parameters:
value- The type to set.- Returns:
- This builder for chaining.
-
clearType
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;- Returns:
- This builder for chaining.
-
setTypeBytes
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;- Parameters:
value- The bytes for type to set.- Returns:
- This builder for chaining.
-
getSizeGb
public 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;- Specified by:
getSizeGbin interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The sizeGb.
-
setSizeGb
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;- Parameters:
value- The sizeGb to set.- Returns:
- This builder for chaining.
-
clearSizeGb
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;- Returns:
- This builder for chaining.
-
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;- Specified by:
getDiskInterfacein interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The diskInterface.
-
getDiskInterfaceBytes
public 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;- Specified by:
getDiskInterfaceBytesin interfaceAllocationPolicy.DiskOrBuilder- Returns:
- The bytes for diskInterface.
-
setDiskInterface
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;- Parameters:
value- The diskInterface to set.- Returns:
- This builder for chaining.
-
clearDiskInterface
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;- Returns:
- This builder for chaining.
-
setDiskInterfaceBytes
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;- Parameters:
value- The bytes for diskInterface to set.- Returns:
- This builder for chaining.
-