public static final class Volume.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder> implements VolumeOrBuilder
Volume describes a volume and parameters for it to be mounted to a VM.Protobuf type
google.cloud.batch.v1.Volume| Modifier and Type | Method and Description |
|---|---|
Volume.Builder |
addAllMountOptions(Iterable<String> values)
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
Volume.Builder |
addMountOptions(String value)
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
Volume.Builder |
addMountOptionsBytes(com.google.protobuf.ByteString value)
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
Volume.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Volume |
build() |
Volume |
buildPartial() |
Volume.Builder |
clear() |
Volume.Builder |
clearDeviceName()
Device name of an attached disk volume, which should align with a
device_name specified by
job.allocation_policy.instances[0].policy.disks[i].device_name or
defined by the given instance template in
job.allocation_policy.instances[0].instance_template.
|
Volume.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
Volume.Builder |
clearGcs()
A Google Cloud Storage (GCS) volume.
|
Volume.Builder |
clearMountOptions()
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
Volume.Builder |
clearMountPath()
The mount path for the volume, e.g.
|
Volume.Builder |
clearNfs()
A Network File System (NFS) volume.
|
Volume.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
Volume.Builder |
clearSource() |
Volume.Builder |
clone() |
Volume |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getDeviceName()
Device name of an attached disk volume, which should align with a
device_name specified by
job.allocation_policy.instances[0].policy.disks[i].device_name or
defined by the given instance template in
job.allocation_policy.instances[0].instance_template.
|
com.google.protobuf.ByteString |
getDeviceNameBytes()
Device name of an attached disk volume, which should align with a
device_name specified by
job.allocation_policy.instances[0].policy.disks[i].device_name or
defined by the given instance template in
job.allocation_policy.instances[0].instance_template.
|
GCS |
getGcs()
A Google Cloud Storage (GCS) volume.
|
GCS.Builder |
getGcsBuilder()
A Google Cloud Storage (GCS) volume.
|
GCSOrBuilder |
getGcsOrBuilder()
A Google Cloud Storage (GCS) volume.
|
String |
getMountOptions(int index)
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
com.google.protobuf.ByteString |
getMountOptionsBytes(int index)
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
int |
getMountOptionsCount()
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
com.google.protobuf.ProtocolStringList |
getMountOptionsList()
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
String |
getMountPath()
The mount path for the volume, e.g.
|
com.google.protobuf.ByteString |
getMountPathBytes()
The mount path for the volume, e.g.
|
NFS |
getNfs()
A Network File System (NFS) volume.
|
NFS.Builder |
getNfsBuilder()
A Network File System (NFS) volume.
|
NFSOrBuilder |
getNfsOrBuilder()
A Network File System (NFS) volume.
|
Volume.SourceCase |
getSourceCase() |
boolean |
hasDeviceName()
Device name of an attached disk volume, which should align with a
device_name specified by
job.allocation_policy.instances[0].policy.disks[i].device_name or
defined by the given instance template in
job.allocation_policy.instances[0].instance_template.
|
boolean |
hasGcs()
A Google Cloud Storage (GCS) volume.
|
boolean |
hasNfs()
A Network File System (NFS) volume.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
Volume.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
Volume.Builder |
mergeFrom(com.google.protobuf.Message other) |
Volume.Builder |
mergeFrom(Volume other) |
Volume.Builder |
mergeGcs(GCS value)
A Google Cloud Storage (GCS) volume.
|
Volume.Builder |
mergeNfs(NFS value)
A Network File System (NFS) volume.
|
Volume.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
Volume.Builder |
setDeviceName(String value)
Device name of an attached disk volume, which should align with a
device_name specified by
job.allocation_policy.instances[0].policy.disks[i].device_name or
defined by the given instance template in
job.allocation_policy.instances[0].instance_template.
|
Volume.Builder |
setDeviceNameBytes(com.google.protobuf.ByteString value)
Device name of an attached disk volume, which should align with a
device_name specified by
job.allocation_policy.instances[0].policy.disks[i].device_name or
defined by the given instance template in
job.allocation_policy.instances[0].instance_template.
|
Volume.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
Volume.Builder |
setGcs(GCS.Builder builderForValue)
A Google Cloud Storage (GCS) volume.
|
Volume.Builder |
setGcs(GCS value)
A Google Cloud Storage (GCS) volume.
|
Volume.Builder |
setMountOptions(int index,
String value)
Mount options vary based on the type of storage volume:
* For a Cloud Storage bucket, all the mount options provided
by
the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli)
are supported
|
Volume.Builder |
setMountPath(String value)
The mount path for the volume, e.g.
|
Volume.Builder |
setMountPathBytes(com.google.protobuf.ByteString value)
The mount path for the volume, e.g.
|
Volume.Builder |
setNfs(NFS.Builder builderForValue)
A Network File System (NFS) volume.
|
Volume.Builder |
setNfs(NFS value)
A Network File System (NFS) volume.
|
Volume.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
Volume.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Volume build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Volume buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Volume.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Volume.Builder>public Volume.Builder mergeFrom(Volume other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public Volume.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Volume.Builder>IOExceptionpublic Volume.SourceCase getSourceCase()
getSourceCase in interface VolumeOrBuilderpublic Volume.Builder clearSource()
public boolean hasNfs()
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;hasNfs in interface VolumeOrBuilderpublic NFS getNfs()
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;getNfs in interface VolumeOrBuilderpublic Volume.Builder setNfs(NFS value)
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;public Volume.Builder setNfs(NFS.Builder builderForValue)
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;public Volume.Builder mergeNfs(NFS value)
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;public Volume.Builder clearNfs()
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;public NFS.Builder getNfsBuilder()
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;public NFSOrBuilder getNfsOrBuilder()
A Network File System (NFS) volume. For example, a Filestore file share.
.google.cloud.batch.v1.NFS nfs = 1;getNfsOrBuilder in interface VolumeOrBuilderpublic boolean hasGcs()
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;hasGcs in interface VolumeOrBuilderpublic GCS getGcs()
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;getGcs in interface VolumeOrBuilderpublic Volume.Builder setGcs(GCS value)
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;public Volume.Builder setGcs(GCS.Builder builderForValue)
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;public Volume.Builder mergeGcs(GCS value)
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;public Volume.Builder clearGcs()
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;public GCS.Builder getGcsBuilder()
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;public GCSOrBuilder getGcsOrBuilder()
A Google Cloud Storage (GCS) volume.
.google.cloud.batch.v1.GCS gcs = 3;getGcsOrBuilder in interface VolumeOrBuilderpublic boolean hasDeviceName()
Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
string device_name = 6;hasDeviceName in interface VolumeOrBuilderpublic String getDeviceName()
Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
string device_name = 6;getDeviceName in interface VolumeOrBuilderpublic com.google.protobuf.ByteString getDeviceNameBytes()
Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
string device_name = 6;getDeviceNameBytes in interface VolumeOrBuilderpublic Volume.Builder setDeviceName(String value)
Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
string device_name = 6;value - The deviceName to set.public Volume.Builder clearDeviceName()
Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
string device_name = 6;public Volume.Builder setDeviceNameBytes(com.google.protobuf.ByteString value)
Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
string device_name = 6;value - The bytes for deviceName to set.public String getMountPath()
The mount path for the volume, e.g. /mnt/disks/share.
string mount_path = 4;getMountPath in interface VolumeOrBuilderpublic com.google.protobuf.ByteString getMountPathBytes()
The mount path for the volume, e.g. /mnt/disks/share.
string mount_path = 4;getMountPathBytes in interface VolumeOrBuilderpublic Volume.Builder setMountPath(String value)
The mount path for the volume, e.g. /mnt/disks/share.
string mount_path = 4;value - The mountPath to set.public Volume.Builder clearMountPath()
The mount path for the volume, e.g. /mnt/disks/share.
string mount_path = 4;public Volume.Builder setMountPathBytes(com.google.protobuf.ByteString value)
The mount path for the volume, e.g. /mnt/disks/share.
string mount_path = 4;value - The bytes for mountPath to set.public com.google.protobuf.ProtocolStringList getMountOptionsList()
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;getMountOptionsList in interface VolumeOrBuilderpublic int getMountOptionsCount()
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;getMountOptionsCount in interface VolumeOrBuilderpublic String getMountOptions(int index)
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;getMountOptions in interface VolumeOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getMountOptionsBytes(int index)
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;getMountOptionsBytes in interface VolumeOrBuilderindex - The index of the value to return.public Volume.Builder setMountOptions(int index, String value)
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;index - The index to set the value at.value - The mountOptions to set.public Volume.Builder addMountOptions(String value)
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;value - The mountOptions to add.public Volume.Builder addAllMountOptions(Iterable<String> values)
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;values - The mountOptions to add.public Volume.Builder clearMountOptions()
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;public Volume.Builder addMountOptionsBytes(com.google.protobuf.ByteString value)
Mount options vary based on the type of storage volume: * For a Cloud Storage bucket, all the mount options provided by the [`gcsfuse` tool](https://cloud.google.com/storage/docs/gcsfuse-cli) are supported. * For an existing persistent disk, all mount options provided by the [`mount` command](https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of [multi-writer mode](https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). * For any other disk or a Network File System (NFS), all the mount options provided by the `mount` command are supported.
repeated string mount_options = 5;value - The bytes of the mountOptions to add.public final Volume.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>public final Volume.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Volume.Builder>Copyright © 2025 Google LLC. All rights reserved.