Package com.io7m.waxmill.machines
Class WXMBootConfigurationGRUBBhyve
java.lang.Object
com.io7m.waxmill.machines.WXMBootConfigurationGRUBBhyve
- All Implemented Interfaces:
WXMBootConfigurationType,WXMBootConfigurationType.WXMBootConfigurationGRUBBhyveType
public final class WXMBootConfigurationGRUBBhyve extends java.lang.Object implements WXMBootConfigurationType.WXMBootConfigurationGRUBBhyveType
A boot configuration that uses grub-bhyve.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWXMBootConfigurationGRUBBhyve.BuilderBuilds instances of typeWXMBootConfigurationGRUBBhyve.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 WXMBootConfigurationGRUBBhyve.Builderbuilder()Creates a builder forWXMBootConfigurationGRUBBhyve.java.lang.Stringcomment()static WXMBootConfigurationGRUBBhyvecopyOf(WXMBootConfigurationType.WXMBootConfigurationGRUBBhyveType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMBootConfigurationGRUBBhyveTypevalue.java.util.Map<WXMDeviceSlot,WXMBootDiskAttachment>diskAttachmentMap()java.util.List<WXMBootDiskAttachment>diskAttachments()booleanequals(java.lang.Object another)This instance is equal to all instances ofWXMBootConfigurationGRUBBhyvethat have equal attribute values.inthashCode()Computes a hash code from attributes:diskAttachments,comment,name,kernelInstructions.WXMBootConfigurationType.WXMGRUBKernelInstructionsTypekernelInstructions()WXMBootConfigurationNamename()The unique-within-a-virtual-machine name of the boot configuration.java.lang.StringtoString()Prints the immutable valueWXMBootConfigurationGRUBBhyvewith attribute values.WXMBootConfigurationGRUBBhyvewithComment(java.lang.String value)Copy the current immutable object by setting a value for thecommentattribute.WXMBootConfigurationGRUBBhyvewithDiskAttachments(WXMBootDiskAttachment... elements)Copy the current immutable object with elements that replace the content ofdiskAttachments.WXMBootConfigurationGRUBBhyvewithDiskAttachments(java.lang.Iterable<? extends WXMBootDiskAttachment> elements)Copy the current immutable object with elements that replace the content ofdiskAttachments.WXMBootConfigurationGRUBBhyvewithKernelInstructions(WXMBootConfigurationType.WXMGRUBKernelInstructionsType value)Copy the current immutable object by setting a value for thekernelInstructionsattribute.WXMBootConfigurationGRUBBhyvewithName(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.WXMBootConfigurationGRUBBhyveType
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.WXMBootConfigurationGRUBBhyveType- 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.WXMBootConfigurationGRUBBhyveType- Returns:
- The value of the
nameattribute
-
kernelInstructions
- Specified by:
kernelInstructionsin interfaceWXMBootConfigurationType.WXMBootConfigurationGRUBBhyveType- Returns:
- The underlying kernel instructions
-
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 WXMBootConfigurationGRUBBhyve 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
-
withKernelInstructions
public final WXMBootConfigurationGRUBBhyve withKernelInstructions(WXMBootConfigurationType.WXMGRUBKernelInstructionsType value)Copy the current immutable object by setting a value for thekernelInstructionsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for kernelInstructions- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofWXMBootConfigurationGRUBBhyvethat 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,kernelInstructions.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueWXMBootConfigurationGRUBBhyvewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static WXMBootConfigurationGRUBBhyve copyOf(WXMBootConfigurationType.WXMBootConfigurationGRUBBhyveType instance)Creates an immutable copy of aWXMBootConfigurationType.WXMBootConfigurationGRUBBhyveTypevalue. 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 WXMBootConfigurationGRUBBhyve instance
-
builder
Creates a builder forWXMBootConfigurationGRUBBhyve.WXMBootConfigurationGRUBBhyve.builder() .addDiskAttachments|addAllDiskAttachments(WXMBootDiskAttachment) //diskAttachmentselements .setComment(String) // optionalcomment.setName(com.io7m.waxmill.machines.WXMBootConfigurationName) // requiredname.setKernelInstructions(com.io7m.waxmill.machines.WXMBootConfigurationType.WXMGRUBKernelInstructionsType) // requiredkernelInstructions.build();- Returns:
- A new WXMBootConfigurationGRUBBhyve builder
-