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 classWXMBootDiskAttachment.BuilderBuilds instances of typeWXMBootDiskAttachment. -
Method Summary
Modifier and Type Method Description WXMDeviceType.WXMStorageBackendTypebackend()static WXMBootDiskAttachment.Builderbuilder()Creates a builder forWXMBootDiskAttachment.static WXMBootDiskAttachmentcopyOf(WXMBootConfigurationType.WXMBootDiskAttachmentType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMBootDiskAttachmentTypevalue.WXMDeviceSlotdevice()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMBootDiskAttachmentthat have equal attribute values.inthashCode()Computes a hash code from attributes:device,backend.java.lang.StringtoString()Prints the immutable valueWXMBootDiskAttachmentwith attribute values.WXMBootDiskAttachmentwithBackend(WXMDeviceType.WXMStorageBackendType value)Copy the current immutable object by setting a value for thebackendattribute.WXMBootDiskAttachmentwithDevice(WXMDeviceSlot value)Copy the current immutable object by setting a value for thedeviceattribute.
-
Method Details
-
device
- Specified by:
devicein interfaceWXMBootConfigurationType.WXMBootDiskAttachmentType- Returns:
- The disk device slot to which the storage will be attached
-
backend
- Specified by:
backendin interfaceWXMBootConfigurationType.WXMBootDiskAttachmentType- Returns:
- The storage backend
-
withDevice
Copy the current immutable object by setting a value for thedeviceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for device- Returns:
- A modified copy of the
thisobject
-
withBackend
Copy the current immutable object by setting a value for thebackendattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for backend- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMBootDiskAttachmentthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:device,backend.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMBootDiskAttachmentwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static WXMBootDiskAttachment copyOf(WXMBootConfigurationType.WXMBootDiskAttachmentType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMBootDiskAttachmentTypevalue. 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
Creates a builder forWXMBootDiskAttachment.WXMBootDiskAttachment.builder() .setDevice(com.io7m.waxmill.machines.WXMDeviceSlot) // requireddevice.setBackend(com.io7m.waxmill.machines.WXMDeviceType.WXMStorageBackendType) // requiredbackend.build();- Returns:
- A new WXMBootDiskAttachment builder
-