Package com.io7m.waxmill.machines
Class WXMBootConfigurationUEFI
java.lang.Object
com.io7m.waxmill.machines.WXMBootConfigurationUEFI
- All Implemented Interfaces:
WXMBootConfigurationType,WXMBootConfigurationType.WXMBootConfigurationUEFIType
public final class WXMBootConfigurationUEFI extends java.lang.Object implements WXMBootConfigurationType.WXMBootConfigurationUEFIType
A boot configuration that uses UEFI.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMBootConfigurationUEFI.BuilderBuilds instances of typeWXMBootConfigurationUEFI.Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType
WXMBootConfigurationType.Kind, WXMBootConfigurationType.WXMBootConfigurationGRUBBhyveType, WXMBootConfigurationType.WXMBootConfigurationUEFIType, WXMBootConfigurationType.WXMBootDiskAttachmentType, WXMBootConfigurationType.WXMEvaluatedBootCommandsType, WXMBootConfigurationType.WXMEvaluatedBootConfigurationGRUBBhyveType, WXMBootConfigurationType.WXMEvaluatedBootConfigurationType, WXMBootConfigurationType.WXMEvaluatedBootConfigurationUEFIType, WXMBootConfigurationType.WXMGRUBKernelInstructionsType, WXMBootConfigurationType.WXMGRUBKernelLinuxType, WXMBootConfigurationType.WXMGRUBKernelOpenBSDType -
Method Summary
Modifier and Type Method Description static WXMBootConfigurationUEFI.Builderbuilder()Creates a builder forWXMBootConfigurationUEFI.java.lang.Stringcomment()static WXMBootConfigurationUEFIcopyOf(WXMBootConfigurationType.WXMBootConfigurationUEFIType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMBootConfigurationUEFITypevalue.java.util.Map<WXMDeviceSlot,WXMBootDiskAttachment>diskAttachmentMap()java.util.List<WXMBootDiskAttachment>diskAttachments()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMBootConfigurationUEFIthat have equal attribute values.java.nio.file.Pathfirmware()inthashCode()Computes a hash code from attributes:diskAttachments,comment,name,firmware.WXMBootConfigurationNamename()The unique-within-a-virtual-machine name of the boot configuration.java.lang.StringtoString()Prints the immutable valueWXMBootConfigurationUEFIwith attribute values.WXMBootConfigurationUEFIwithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMBootConfigurationUEFIwithDiskAttachments(WXMBootDiskAttachment... elements)Copy the current immutable object with elements that replace the content ofdiskAttachments.WXMBootConfigurationUEFIwithDiskAttachments(java.lang.Iterable<? extends WXMBootDiskAttachment> elements)Copy the current immutable object with elements that replace the content ofdiskAttachments.WXMBootConfigurationUEFIwithFirmware(java.nio.file.Path value)Copy the current immutable object by setting a value for thefirmwareattribute.WXMBootConfigurationUEFIwithName(WXMBootConfigurationName value)Copy the current immutable object by setting a value for thenameattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.waxmill.machines.WXMBootConfigurationType.WXMBootConfigurationUEFIType
checkPreconditions, kind, requiredDevices
-
Method Details
-
diskAttachments
- Specified by:
diskAttachmentsin interfaceWXMBootConfigurationType- Returns:
- The disks attached to the virtual machine on boot
-
diskAttachmentMap
- Specified by:
diskAttachmentMapin interfaceWXMBootConfigurationType- Returns:
- The disk attachments by device slot
-
comment
public java.lang.String comment()- Specified by:
commentin interfaceWXMBootConfigurationType- Specified by:
commentin interfaceWXMBootConfigurationType.WXMBootConfigurationUEFIType- Returns:
- The value of the
commentattribute
-
name
Description copied from interface:WXMBootConfigurationTypeThe unique-within-a-virtual-machine name of the boot configuration.- Specified by:
namein interfaceWXMBootConfigurationType- Specified by:
namein interfaceWXMBootConfigurationType.WXMBootConfigurationUEFIType- Returns:
- The value of the
nameattribute
-
firmware
public java.nio.file.Path firmware()- Specified by:
firmwarein interfaceWXMBootConfigurationType.WXMBootConfigurationUEFIType- Returns:
- The location of the UEFI firmware to load into the machine
-
withDiskAttachments
Copy the current immutable object with elements that replace the content ofdiskAttachments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withDiskAttachments
public final WXMBootConfigurationUEFI withDiskAttachments(java.lang.Iterable<? extends WXMBootDiskAttachment> elements)Copy the current immutable object with elements that replace the content ofdiskAttachments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of diskAttachments elements to set- Returns:
- A modified copy of
thisobject
-
withComment
Copy the current immutable object by setting a value for thecommentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for comment- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withFirmware
Copy the current immutable object by setting a value for thefirmwareattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for firmware- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMBootConfigurationUEFIthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:diskAttachments,comment,name,firmware.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMBootConfigurationUEFIwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static WXMBootConfigurationUEFI copyOf(WXMBootConfigurationType.WXMBootConfigurationUEFIType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMBootConfigurationUEFITypevalue. 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 WXMBootConfigurationUEFI instance
-
builder
Creates a builder forWXMBootConfigurationUEFI.WXMBootConfigurationUEFI.builder() .addDiskAttachments|addAllDiskAttachments(WXMBootDiskAttachment) //diskAttachmentselements .setComment(String) // optionalcomment.setName(com.io7m.waxmill.machines.WXMBootConfigurationName) // requiredname.setFirmware(java.nio.file.Path) // requiredfirmware.build();- Returns:
- A new WXMBootConfigurationUEFI builder
-