# Class MNativeWorkspaceConfiguration.Builder

java.lang.Object
com.io7m.montarre.api.natives.MNativeWorkspaceConfiguration.Builder

Enclosing class:
  `MNativeWorkspaceConfiguration`

public static final class MNativeWorkspaceConfiguration.Builder extends Object
Builds instances of type `MNativeWorkspaceConfiguration`. 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
  `MNativeWorkspaceConfiguration`
  `build()`
  Builds a new `MNativeWorkspaceConfiguration`.
  `final MNativeWorkspaceConfiguration.Builder`
  `from(MNativeWorkspaceConfigurationType instance)`
  Fill a builder with attribute values from the provided `MNativeWorkspaceConfigurationType` instance.
  `final MNativeWorkspaceConfiguration.Builder`
  `setBaseDirectory(Path baseDirectory)`
  Initializes the value for the `baseDirectory` attribute.
  `final MNativeWorkspaceConfiguration.Builder`
  `setJavaRuntimeDownloadFormat(MArchiveFormat javaRuntimeDownloadFormat)`
  Initializes the value for the `javaRuntimeDownloadFormat` attribute.
  `final MNativeWorkspaceConfiguration.Builder`
  `setJavaRuntimeDownloadSHA256(String javaRuntimeDownloadSHA256)`
  Initializes the value for the `javaRuntimeDownloadSHA256` attribute.
  `final MNativeWorkspaceConfiguration.Builder`
  `setJavaRuntimeDownloadURI(URI javaRuntimeDownloadURI)`
  Initializes the value for the `javaRuntimeDownloadURI` attribute.

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

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

- ## Method Details

  - ### from

    public final MNativeWorkspaceConfiguration.Builder from(MNativeWorkspaceConfigurationType instance)
    Fill a builder with attribute values from the provided `MNativeWorkspaceConfigurationType` 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

  - ### setBaseDirectory

    public final MNativeWorkspaceConfiguration.Builder setBaseDirectory(Path baseDirectory)
    Initializes the value for the `baseDirectory` attribute.
    Parameters:
      `baseDirectory` - The value for baseDirectory
    Returns:
      `this` builder for use in a chained invocation

  - ### setJavaRuntimeDownloadFormat

    public final MNativeWorkspaceConfiguration.Builder setJavaRuntimeDownloadFormat(MArchiveFormat javaRuntimeDownloadFormat)
    Initializes the value for the `javaRuntimeDownloadFormat` attribute.
    Parameters:
      `javaRuntimeDownloadFormat` - The value for javaRuntimeDownloadFormat
    Returns:
      `this` builder for use in a chained invocation

  - ### setJavaRuntimeDownloadURI

    public final MNativeWorkspaceConfiguration.Builder setJavaRuntimeDownloadURI(URI javaRuntimeDownloadURI)
    Initializes the value for the `javaRuntimeDownloadURI` attribute.
    Parameters:
      `javaRuntimeDownloadURI` - The value for javaRuntimeDownloadURI
    Returns:
      `this` builder for use in a chained invocation

  - ### setJavaRuntimeDownloadSHA256

    public final MNativeWorkspaceConfiguration.Builder setJavaRuntimeDownloadSHA256(String javaRuntimeDownloadSHA256)
    Initializes the value for the `javaRuntimeDownloadSHA256` attribute.
    Parameters:
      `javaRuntimeDownloadSHA256` - The value for javaRuntimeDownloadSHA256
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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