Package com.io7m.waxmill.machines
Class WXMBootConfigurationGRUBBhyve.Builder
java.lang.Object
com.io7m.waxmill.machines.WXMBootConfigurationGRUBBhyve.Builder
- Enclosing class:
- WXMBootConfigurationGRUBBhyve
public static final class WXMBootConfigurationGRUBBhyve.Builder
extends java.lang.Object
Builds instances of type
WXMBootConfigurationGRUBBhyve.
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
-
Method Details
-
from
public final WXMBootConfigurationGRUBBhyve.Builder from(WXMBootConfigurationType.WXMBootConfigurationGRUBBhyveType instance)Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMBootConfigurationType.WXMBootConfigurationGRUBBhyveTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedcom.io7m.waxmill.machines.WXMBootConfigurationTypeinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addDiskAttachments
public final WXMBootConfigurationGRUBBhyve.Builder addDiskAttachments(WXMBootDiskAttachment element)Adds one element todiskAttachmentslist.- Parameters:
element- A diskAttachments element- Returns:
thisbuilder for use in a chained invocation
-
addDiskAttachments
public final WXMBootConfigurationGRUBBhyve.Builder addDiskAttachments(WXMBootDiskAttachment... elements)Adds elements todiskAttachmentslist.- Parameters:
elements- An array of diskAttachments elements- Returns:
thisbuilder for use in a chained invocation
-
setDiskAttachments
public final WXMBootConfigurationGRUBBhyve.Builder setDiskAttachments(java.lang.Iterable<? extends WXMBootDiskAttachment> elements)Sets or replaces all elements fordiskAttachmentslist.- Parameters:
elements- An iterable of diskAttachments elements- Returns:
thisbuilder for use in a chained invocation
-
addAllDiskAttachments
public final WXMBootConfigurationGRUBBhyve.Builder addAllDiskAttachments(java.lang.Iterable<? extends WXMBootDiskAttachment> elements)Adds elements todiskAttachmentslist.- Parameters:
elements- An iterable of diskAttachments elements- Returns:
thisbuilder for use in a chained invocation
-
setComment
Initializes the value for thecommentattribute.If not set, this attribute will have a default value as returned by the initializer of
comment.- Parameters:
comment- The value for comment- Returns:
thisbuilder for use in a chained invocation
-
setName
Initializes the value for thenameattribute.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
setKernelInstructions
public final WXMBootConfigurationGRUBBhyve.Builder setKernelInstructions(WXMBootConfigurationType.WXMGRUBKernelInstructionsType kernelInstructions)Initializes the value for thekernelInstructionsattribute.- Parameters:
kernelInstructions- The value for kernelInstructions- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newWXMBootConfigurationGRUBBhyve.- Returns:
- An immutable instance of WXMBootConfigurationGRUBBhyve
- Throws:
java.lang.IllegalStateException- if any required attributes are missing
-