Package com.io7m.waxmill.client.api

# Class WXMClientConfiguration.Builder

java.lang.Object
com.io7m.waxmill.client.api.WXMClientConfiguration.Builder

Enclosing class:
  WXMClientConfiguration

    public static final class WXMClientConfiguration.Builder
    extends java.lang.Object

Builds instances of type `WXMClientConfiguration`. 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
  --- | --- | ---
  `WXMClientConfiguration` | `build()` | Builds a new `WXMClientConfiguration`.
  `WXMClientConfiguration.Builder` | `from​(WXMClientConfigurationType instance)` | Fill a builder with attribute values from the provided `WXMClientConfigurationType` instance.
  `WXMClientConfiguration.Builder` | `setBhyveCtlExecutable​(java.nio.file.Path bhyveCtlExecutable)` | Initializes the value for the `bhyveCtlExecutable` attribute.
  `WXMClientConfiguration.Builder` | `setBhyveExecutable​(java.nio.file.Path bhyveExecutable)` | Initializes the value for the `bhyveExecutable` attribute.
  `WXMClientConfiguration.Builder` | `setCuExecutable​(java.nio.file.Path cuExecutable)` | Initializes the value for the `cuExecutable` attribute.
  `WXMClientConfiguration.Builder` | `setGrubBhyveExecutable​(java.nio.file.Path grubBhyveExecutable)` | Initializes the value for the `grubBhyveExecutable` attribute.
  `WXMClientConfiguration.Builder` | `setIfconfigExecutable​(java.nio.file.Path ifconfigExecutable)` | Initializes the value for the `ifconfigExecutable` attribute.
  `WXMClientConfiguration.Builder` | `setVirtualMachineConfigurationDirectory​(java.nio.file.Path virtualMachineConfigurationDirectory)` | Initializes the value for the `virtualMachineConfigurationDirectory` attribute.
  `WXMClientConfiguration.Builder` | `setVirtualMachineRuntimeDirectory​(java.nio.file.Path virtualMachineRuntimeDirectory)` | Initializes the value for the `virtualMachineRuntimeDirectory` attribute.
  `WXMClientConfiguration.Builder` | `setZfsExecutable​(java.nio.file.Path zfsExecutable)` | Initializes the value for the `zfsExecutable` attribute.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### from

    public final WXMClientConfiguration.Builder from​(WXMClientConfigurationType instance)
    Fill a builder with attribute values from the provided `WXMClientConfigurationType` instance. 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:
      `this` builder for use in a chained invocation

  - ### setVirtualMachineConfigurationDirectory

    public final WXMClientConfiguration.Builder setVirtualMachineConfigurationDirectory​(java.nio.file.Path virtualMachineConfigurationDirectory)
    Initializes the value for the `virtualMachineConfigurationDirectory` attribute.
    Parameters:
      `virtualMachineConfigurationDirectory` - The value for virtualMachineConfigurationDirectory
    Returns:
      `this` builder for use in a chained invocation

  - ### setVirtualMachineRuntimeDirectory

    public final WXMClientConfiguration.Builder setVirtualMachineRuntimeDirectory​(java.nio.file.Path virtualMachineRuntimeDirectory)
    Initializes the value for the `virtualMachineRuntimeDirectory` attribute.
    Parameters:
      `virtualMachineRuntimeDirectory` - The value for virtualMachineRuntimeDirectory
    Returns:
      `this` builder for use in a chained invocation

  - ### setBhyveExecutable

    public final WXMClientConfiguration.Builder setBhyveExecutable​(java.nio.file.Path bhyveExecutable)
    Initializes the value for the `bhyveExecutable` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `bhyveExecutable`.

    Parameters:
      `bhyveExecutable` - The value for bhyveExecutable
    Returns:
      `this` builder for use in a chained invocation

  - ### setBhyveCtlExecutable

    public final WXMClientConfiguration.Builder setBhyveCtlExecutable​(java.nio.file.Path bhyveCtlExecutable)
    Initializes the value for the `bhyveCtlExecutable` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `bhyveCtlExecutable`.

    Parameters:
      `bhyveCtlExecutable` - The value for bhyveCtlExecutable
    Returns:
      `this` builder for use in a chained invocation

  - ### setGrubBhyveExecutable

    public final WXMClientConfiguration.Builder setGrubBhyveExecutable​(java.nio.file.Path grubBhyveExecutable)
    Initializes the value for the `grubBhyveExecutable` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `grubBhyveExecutable`.

    Parameters:
      `grubBhyveExecutable` - The value for grubBhyveExecutable
    Returns:
      `this` builder for use in a chained invocation

  - ### setZfsExecutable

    public final WXMClientConfiguration.Builder setZfsExecutable​(java.nio.file.Path zfsExecutable)
    Initializes the value for the `zfsExecutable` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `zfsExecutable`.

    Parameters:
      `zfsExecutable` - The value for zfsExecutable
    Returns:
      `this` builder for use in a chained invocation

  - ### setIfconfigExecutable

    public final WXMClientConfiguration.Builder setIfconfigExecutable​(java.nio.file.Path ifconfigExecutable)
    Initializes the value for the `ifconfigExecutable` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `ifconfigExecutable`.

    Parameters:
      `ifconfigExecutable` - The value for ifconfigExecutable
    Returns:
      `this` builder for use in a chained invocation

  - ### setCuExecutable

    public final WXMClientConfiguration.Builder setCuExecutable​(java.nio.file.Path cuExecutable)
    Initializes the value for the `cuExecutable` attribute.

    If not set, this attribute will have a default value as returned by the initializer of `cuExecutable`.

    Parameters:
      `cuExecutable` - The value for cuExecutable
    Returns:
      `this` builder for use in a chained invocation

  - ### build

    public WXMClientConfiguration build()
    Builds a new `WXMClientConfiguration`.
    Returns:
      An immutable instance of WXMClientConfiguration
    Throws:
      `java.lang.IllegalStateException` - if any required attributes are missing