Package com.io7m.waxmill.machines

# Class WXMVMNet

java.lang.Object
com.io7m.waxmill.machines.WXMVMNet

All Implemented Interfaces:
  `WXMNetworkDeviceBackendType`, `WXMVMNetType`

    public final class WXMVMNet
    extends java.lang.Object
    implements WXMVMNetType

A vmnet device.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Class | Description
  --- | --- | ---
  `static class` | `WXMVMNet.Builder` | Builds instances of type `WXMVMNet`.

  ## Nested classes/interfaces inherited from interface com.io7m.waxmill.machines.WXMNetworkDeviceBackendType

  `WXMNetworkDeviceBackendType.Kind`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `static WXMVMNet.Builder` | `builder()` | Creates a builder for `WXMVMNet`.
  `java.lang.String` | `comment()` |
  `static WXMVMNet` | `copyOf​(WXMVMNetType instance)` | Creates an immutable copy of a `WXMVMNetType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `WXMVMNet` that have equal attribute values.
  `java.util.List<WXMInterfaceGroupName>` | `groups()` |
  `WXMMACAddress` | `guestMAC()` |
  `int` | `hashCode()` | Computes a hash code from attributes: `name`, `guestMAC`, `hostMAC`, `groups`, `comment`.
  `WXMMACAddress` | `hostMAC()` |
  `WXMVMNetDeviceName` | `name()` |
  `java.lang.String` | `toString()` | Prints the immutable value `WXMVMNet` with attribute values.
  `WXMVMNet` | `withComment​(java.lang.String value)` | Copy the current immutable object by setting a value for the `comment` attribute.
  `WXMVMNet` | `withGroups​(WXMInterfaceGroupName... elements)` | Copy the current immutable object with elements that replace the content of `groups`.
  `WXMVMNet` | `withGroups​(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)` | Copy the current immutable object with elements that replace the content of `groups`.
  `WXMVMNet` | `withGuestMAC​(WXMMACAddress value)` | Copy the current immutable object by setting a value for the `guestMAC` attribute.
  `WXMVMNet` | `withHostMAC​(WXMMACAddress value)` | Copy the current immutable object by setting a value for the `hostMAC` attribute.
  `WXMVMNet` | `withName​(WXMVMNetDeviceName value)` | Copy the current immutable object by setting a value for the `name` attribute.

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface com.io7m.waxmill.machines.WXMVMNetType

  `checkPreconditions, kind`

- ## Method Details

  - ### name

    public WXMVMNetDeviceName name()
    Specified by:
      `name` in interface `WXMVMNetType`
    Returns:
      The underlying device name

  - ### guestMAC

    public WXMMACAddress guestMAC()
    Specified by:
      `guestMAC` in interface `WXMNetworkDeviceBackendType`
    Specified by:
      `guestMAC` in interface `WXMVMNetType`
    Returns:
      The value of the `guestMAC` attribute

  - ### hostMAC

    public WXMMACAddress hostMAC()
    Specified by:
      `hostMAC` in interface `WXMNetworkDeviceBackendType`
    Specified by:
      `hostMAC` in interface `WXMVMNetType`
    Returns:
      The value of the `hostMAC` attribute

  - ### groups

    public java.util.List<WXMInterfaceGroupName> groups()
    Specified by:
      `groups` in interface `WXMNetworkDeviceBackendType`
    Specified by:
      `groups` in interface `WXMVMNetType`
    Returns:
      The value of the `groups` attribute

  - ### comment

    public java.lang.String comment()
    Specified by:
      `comment` in interface `WXMNetworkDeviceBackendType`
    Specified by:
      `comment` in interface `WXMVMNetType`
    Returns:
      The value of the `comment` attribute

  - ### withName

    public final WXMVMNet withName​(WXMVMNetDeviceName value)
    Copy the current immutable object by setting a value for the `name` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for name
    Returns:
      A modified copy of the `this` object

  - ### withGuestMAC

    public final WXMVMNet withGuestMAC​(WXMMACAddress value)
    Copy the current immutable object by setting a value for the `guestMAC` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for guestMAC
    Returns:
      A modified copy of the `this` object

  - ### withHostMAC

    public final WXMVMNet withHostMAC​(WXMMACAddress value)
    Copy the current immutable object by setting a value for the `hostMAC` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for hostMAC
    Returns:
      A modified copy of the `this` object

  - ### withGroups

    public final WXMVMNet withGroups​(WXMInterfaceGroupName... elements)
    Copy the current immutable object with elements that replace the content of `groups`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withGroups

    public final WXMVMNet withGroups​(java.lang.Iterable<? extends WXMInterfaceGroupName> elements)
    Copy the current immutable object with elements that replace the content of `groups`. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `elements` - An iterable of groups elements to set
    Returns:
      A modified copy of `this` object

  - ### withComment

    public final WXMVMNet withComment​(java.lang.String value)
    Copy the current immutable object by setting a value for the `comment` attribute. An equals check used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for comment
    Returns:
      A modified copy of the `this` object

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `WXMVMNet` that have equal attribute values.
    Overrides:
      `equals` in class `java.lang.Object`
    Returns:
      `true` if `this` is equal to `another` instance

  - ### hashCode

    public int hashCode()
    Computes a hash code from attributes: `name`, `guestMAC`, `hostMAC`, `groups`, `comment`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

    public java.lang.String toString()
    Prints the immutable value `WXMVMNet` with attribute values.
    Overrides:
      `toString` in class `java.lang.Object`
    Returns:
      A string representation of the value

  - ### copyOf

    public static WXMVMNet copyOf​(WXMVMNetType instance)
    Creates an immutable copy of a `WXMVMNetType` value. 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 WXMVMNet instance

  - ### builder

    public static WXMVMNet.Builder builder()
    Creates a builder for `WXMVMNet`.

         WXMVMNet.builder()
            .setName(com.io7m.waxmill.machines.WXMVMNetDeviceName) // required name
            .setGuestMAC(com.io7m.waxmill.machines.WXMMACAddress) // required guestMAC
            .setHostMAC(com.io7m.waxmill.machines.WXMMACAddress) // required hostMAC
            .addGroups|addAllGroups(WXMInterfaceGroupName) // groups elements
            .setComment(String) // optional comment
            .build();

    Returns:
      A new WXMVMNet builder