Package com.io7m.waxmill.machines
Class WXMBootDiskAttachment.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMBootDiskAttachment.Builder
- Enclosing class:
- WXMBootDiskAttachment
public static final class WXMBootDiskAttachment.Builder
extends java.lang.Object
Builds instances of type
WXMBootDiskAttachment.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and Type Method Description WXMBootDiskAttachmentbuild()Builds a newWXMBootDiskAttachment.WXMBootDiskAttachment.Builderfrom(WXMBootConfigurationType.WXMBootDiskAttachmentType instance)Fill a builder with attribute values from the providedWXMBootDiskAttachmentTypeinstance.WXMBootDiskAttachment.BuildersetBackend(WXMDeviceType.WXMStorageBackendType backend)Initializes the value for thebackendattribute.WXMBootDiskAttachment.BuildersetDevice(WXMDeviceSlot device)Initializes the value for thedeviceattribute.
-
Method Details
-
from
public final WXMBootDiskAttachment.Builder from(WXMBootConfigurationType.WXMBootDiskAttachmentType instance)Fill a builder with attribute values from the providedWXMBootDiskAttachmentTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setDevice
Initializes the value for thedeviceattribute.- Parameters:
device- The value for device- Returns:
thisbuilder for use in a chained invocation
-
setBackend
Initializes the value for thebackendattribute.- Parameters:
backend- The value for backend- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMBootDiskAttachment.- Returns:
- An immutable instance of WXMBootDiskAttachment
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-