Class Volume.Builder (0.51.0)

public static final class Volume.Builder extends 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.v1alpha.Volume

Implements

VolumeOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllMountOptions(Iterable<String> values)

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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Parameter
Name Description
values Iterable<String>

The mountOptions to add.

Returns
Type Description
Volume.Builder

This builder for chaining.

addMountOptions(String value)

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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Parameter
Name Description
value String

The mountOptions to add.

Returns
Type Description
Volume.Builder

This builder for chaining.

addMountOptionsBytes(ByteString value)

public Volume.Builder addMountOptionsBytes(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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Parameter
Name Description
value ByteString

The bytes of the mountOptions to add.

Returns
Type Description
Volume.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Volume.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Volume.Builder
Overrides

build()

public Volume build()
Returns
Type Description
Volume

buildPartial()

public Volume buildPartial()
Returns
Type Description
Volume

clear()

public Volume.Builder clear()
Returns
Type Description
Volume.Builder
Overrides

clearDeviceName()

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;

Returns
Type Description
Volume.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Volume.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Volume.Builder
Overrides

clearGcs()

public Volume.Builder clearGcs()

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Returns
Type Description
Volume.Builder

clearMountOptions()

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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Returns
Type Description
Volume.Builder

This builder for chaining.

clearMountPath()

public Volume.Builder clearMountPath()

The mount path for the volume, e.g. /mnt/disks/share.

string mount_path = 4;

Returns
Type Description
Volume.Builder

This builder for chaining.

clearNfs()

public Volume.Builder clearNfs()

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Returns
Type Description
Volume.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public Volume.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Volume.Builder
Overrides

clearPd() (deprecated)

public Volume.Builder clearPd()

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Returns
Type Description
Volume.Builder

clearSource()

public Volume.Builder clearSource()
Returns
Type Description
Volume.Builder

clone()

public Volume.Builder clone()
Returns
Type Description
Volume.Builder
Overrides

getDefaultInstanceForType()

public Volume getDefaultInstanceForType()
Returns
Type Description
Volume

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDeviceName()

public 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;

Returns
Type Description
String

The deviceName.

getDeviceNameBytes()

public 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;

Returns
Type Description
ByteString

The bytes for deviceName.

getGcs()

public GCS getGcs()

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Returns
Type Description
GCS

The gcs.

getGcsBuilder()

public GCS.Builder getGcsBuilder()

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Returns
Type Description
GCS.Builder

getGcsOrBuilder()

public GCSOrBuilder getGcsOrBuilder()

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Returns
Type Description
GCSOrBuilder

getMountOptions(int index)

public 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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The mountOptions at the given index.

getMountOptionsBytes(int index)

public 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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the mountOptions at the given index.

getMountOptionsCount()

public 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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Returns
Type Description
int

The count of mountOptions.

getMountOptionsList()

public 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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Returns
Type Description
ProtocolStringList

A list containing the mountOptions.

getMountPath()

public String getMountPath()

The mount path for the volume, e.g. /mnt/disks/share.

string mount_path = 4;

Returns
Type Description
String

The mountPath.

getMountPathBytes()

public ByteString getMountPathBytes()

The mount path for the volume, e.g. /mnt/disks/share.

string mount_path = 4;

Returns
Type Description
ByteString

The bytes for mountPath.

getNfs()

public NFS getNfs()

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Returns
Type Description
NFS

The nfs.

getNfsBuilder()

public NFS.Builder getNfsBuilder()

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Returns
Type Description
NFS.Builder

getNfsOrBuilder()

public NFSOrBuilder getNfsOrBuilder()

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Returns
Type Description
NFSOrBuilder

getPd() (deprecated)

public PD getPd()

Deprecated. google.cloud.batch.v1alpha.Volume.pd is deprecated. See google/cloud/batch/v1alpha/volume.proto;l=36

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Returns
Type Description
PD

The pd.

getPdBuilder() (deprecated)

public PD.Builder getPdBuilder()

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Returns
Type Description
PD.Builder

getPdOrBuilder() (deprecated)

public PDOrBuilder getPdOrBuilder()

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Returns
Type Description
PDOrBuilder

getSourceCase()

public Volume.SourceCase getSourceCase()
Returns
Type Description
Volume.SourceCase

hasDeviceName()

public 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;

Returns
Type Description
boolean

Whether the deviceName field is set.

hasGcs()

public boolean hasGcs()

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Returns
Type Description
boolean

Whether the gcs field is set.

hasNfs()

public boolean hasNfs()

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Returns
Type Description
boolean

Whether the nfs field is set.

hasPd() (deprecated)

public boolean hasPd()

Deprecated. google.cloud.batch.v1alpha.Volume.pd is deprecated. See google/cloud/batch/v1alpha/volume.proto;l=36

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Returns
Type Description
boolean

Whether the pd field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Volume other)

public Volume.Builder mergeFrom(Volume other)
Parameter
Name Description
other Volume
Returns
Type Description
Volume.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Volume.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Volume.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Volume.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Volume.Builder
Overrides

mergeGcs(GCS value)

public Volume.Builder mergeGcs(GCS value)

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Parameter
Name Description
value GCS
Returns
Type Description
Volume.Builder

mergeNfs(NFS value)

public Volume.Builder mergeNfs(NFS value)

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Parameter
Name Description
value NFS
Returns
Type Description
Volume.Builder

mergePd(PD value) (deprecated)

public Volume.Builder mergePd(PD value)

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Parameter
Name Description
value PD
Returns
Type Description
Volume.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Volume.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Volume.Builder
Overrides

setDeviceName(String value)

public 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;

Parameter
Name Description
value String

The deviceName to set.

Returns
Type Description
Volume.Builder

This builder for chaining.

setDeviceNameBytes(ByteString value)

public Volume.Builder setDeviceNameBytes(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;

Parameter
Name Description
value ByteString

The bytes for deviceName to set.

Returns
Type Description
Volume.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Volume.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Volume.Builder
Overrides

setGcs(GCS value)

public Volume.Builder setGcs(GCS value)

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Parameter
Name Description
value GCS
Returns
Type Description
Volume.Builder

setGcs(GCS.Builder builderForValue)

public Volume.Builder setGcs(GCS.Builder builderForValue)

A Google Cloud Storage (GCS) volume.

.google.cloud.batch.v1alpha.GCS gcs = 3;

Parameter
Name Description
builderForValue GCS.Builder
Returns
Type Description
Volume.Builder

setMountOptions(int index, String value)

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 are supported.
  • For an existing persistent disk, all mount options provided by the mount command except writing are supported. This is due to restrictions of multi-writer mode.
  • 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;

Parameters
Name Description
index int

The index to set the value at.

value String

The mountOptions to set.

Returns
Type Description
Volume.Builder

This builder for chaining.

setMountPath(String value)

public Volume.Builder setMountPath(String value)

The mount path for the volume, e.g. /mnt/disks/share.

string mount_path = 4;

Parameter
Name Description
value String

The mountPath to set.

Returns
Type Description
Volume.Builder

This builder for chaining.

setMountPathBytes(ByteString value)

public Volume.Builder setMountPathBytes(ByteString value)

The mount path for the volume, e.g. /mnt/disks/share.

string mount_path = 4;

Parameter
Name Description
value ByteString

The bytes for mountPath to set.

Returns
Type Description
Volume.Builder

This builder for chaining.

setNfs(NFS value)

public Volume.Builder setNfs(NFS value)

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Parameter
Name Description
value NFS
Returns
Type Description
Volume.Builder

setNfs(NFS.Builder builderForValue)

public Volume.Builder setNfs(NFS.Builder builderForValue)

A Network File System (NFS) volume. For example, a Filestore file share.

.google.cloud.batch.v1alpha.NFS nfs = 1;

Parameter
Name Description
builderForValue NFS.Builder
Returns
Type Description
Volume.Builder

setPd(PD value) (deprecated)

public Volume.Builder setPd(PD value)

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Parameter
Name Description
value PD
Returns
Type Description
Volume.Builder

setPd(PD.Builder builderForValue) (deprecated)

public Volume.Builder setPd(PD.Builder builderForValue)

Deprecated: please use device_name instead.

.google.cloud.batch.v1alpha.PD pd = 2 [deprecated = true];

Parameter
Name Description
builderForValue PD.Builder
Returns
Type Description
Volume.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Volume.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Volume.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Volume.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Volume.Builder
Overrides