Package com.io7m.waxmill.machines

# Class WXMBootDiskAttachment

java.lang.Object
com.io7m.waxmill.machines.WXMBootDiskAttachment

All Implemented Interfaces:
  `WXMBootConfigurationType.WXMBootDiskAttachmentType`

    public final class WXMBootDiskAttachment
    extends java.lang.Object
    implements WXMBootConfigurationType.WXMBootDiskAttachmentType

A disk attachment.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `WXMBootDiskAttachment.Builder` | Builds instances of type `WXMBootDiskAttachment`.

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `WXMDeviceType.WXMStorageBackendType` | `backend()` |
  `static WXMBootDiskAttachment.Builder` | `builder()` | Creates a builder for `WXMBootDiskAttachment`.
  `static WXMBootDiskAttachment` | `copyOf​(WXMBootConfigurationType.WXMBootDiskAttachmentType instance)` | Creates an immutable copy of a `WXMBootConfigurationType.WXMBootDiskAttachmentType` value.
  `WXMDeviceSlot` | `device()` |
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMBootDiskAttachment` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `device`, `backend`.
  `java.lang.String` | `toString()` | Prints the immutable value `WXMBootDiskAttachment` with attribute values.
  `WXMBootDiskAttachment` | `withBackend​(WXMDeviceType.WXMStorageBackendType value)` | Copy the current immutable object by setting a value for the `backend` attribute.
  `WXMBootDiskAttachment` | `withDevice​(WXMDeviceSlot value)` | Copy the current immutable object by setting a value for the `device` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### device

    public WXMDeviceSlot device()
    Specified by:
      `device` in interface `WXMBootConfigurationType.WXMBootDiskAttachmentType`
    Returns:
      The disk device slot to which the storage will be attached

  - ### backend

    public WXMDeviceType.WXMStorageBackendType backend()
    Specified by:
      `backend` in interface `WXMBootConfigurationType.WXMBootDiskAttachmentType`
    Returns:
      The storage backend

  - ### withDevice

    public final WXMBootDiskAttachment withDevice​(WXMDeviceSlot value)
    Copy the current immutable object by setting a value for the `device` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for device
    Returns:
      A modified copy of the `this` object

  - ### withBackend

    public final WXMBootDiskAttachment withBackend​(WXMDeviceType.WXMStorageBackendType value)
    Copy the current immutable object by setting a value for the `backend` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for backend
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMBootDiskAttachment` that have equal attribute values.
    Overrides:
      `equals` in class `java.lang.Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `device`, `backend`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

    public java.lang.String toString()
    Prints the immutable value `WXMBootDiskAttachment` with attribute values.
    Overrides:
      `toString` in class `java.lang.Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static WXMBootDiskAttachment copyOf​(WXMBootConfigurationType.WXMBootDiskAttachmentType instance)
    Creates an immutable copy of a `WXMBootConfigurationType.WXMBootDiskAttachmentType` value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
    Parameters:
      `instance` - The instance to copy
    Returns:
      A copied immutable WXMBootDiskAttachment instance

  - ### builder

    public static WXMBootDiskAttachment.Builder builder()
    Creates a builder for `WXMBootDiskAttachment`.

         WXMBootDiskAttachment.builder()
            .setDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // required device
            .setBackend(com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendType) // required backend
            .build();

    Returns:
      A new WXMBootDiskAttachment builder