# Interface AllocationPolicy.AttachedDiskOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.batch.v1.AllocationPolicy.AttachedDiskOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.batch.v1.AllocationPolicy.AttachedDiskOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.batch.v1.AllocationPolicy.AttachedDiskOrBuilder)

    public static interface AllocationPolicy.AttachedDiskOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getAttachedCase()

    public abstract AllocationPolicy.AttachedDisk.AttachedCase getAttachedCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.batch.v1.AllocationPolicy.AttachedDisk.AttachedCase` |   |

### getDeviceName()

    public abstract String getDeviceName()

Device name that the guest operating system will see.
It is used by Runnable.volumes field to mount disks. So please specify
the device_name if you want Batch to help mount the disk, and it should
match the device_name field in volumes.

`string device_name = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The deviceName. |

### getDeviceNameBytes()

    public abstract ByteString getDeviceNameBytes()

Device name that the guest operating system will see.
It is used by Runnable.volumes field to mount disks. So please specify
the device_name if you want Batch to help mount the disk, and it should
match the device_name field in volumes.

`string device_name = 3;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for deviceName. |

### getExistingDisk()

    public abstract String getExistingDisk()

Name of an existing PD.

`string existing_disk = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The existingDisk. |

### getExistingDiskBytes()

    public abstract ByteString getExistingDiskBytes()

Name of an existing PD.

`string existing_disk = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for existingDisk. |

### getNewDisk()

    public abstract AllocationPolicy.Disk getNewDisk()

`.google.events.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.batch.v1.AllocationPolicy.Disk` | The newDisk. |

### getNewDiskOrBuilder()

    public abstract AllocationPolicy.DiskOrBuilder getNewDiskOrBuilder()

`.google.events.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.batch.v1.AllocationPolicy.DiskOrBuilder` |   |

### hasExistingDisk()

    public abstract boolean hasExistingDisk()

Name of an existing PD.

`string existing_disk = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the existingDisk field is set. |

### hasNewDisk()

    public abstract boolean hasNewDisk()

`.google.events.cloud.batch.v1.AllocationPolicy.Disk new_disk = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the newDisk field is set. |