# Class MMetadataFlatpak.Builder

java.lang.Object
com.io7m.montarre.api.MMetadataFlatpak.Builder

Enclosing class:
  `MMetadataFlatpak`

public static final class MMetadataFlatpak.Builder extends Object
Builds instances of type `MMetadataFlatpak`. 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
  `final MMetadataFlatpak.Builder`
  `addAllPermissions(Iterable<? extends MFlatpakPermission> elements)`
  Adds elements to `permissions` list.
  `final MMetadataFlatpak.Builder`
  `addAllRuntimes(Iterable<? extends MFlatpakRuntime> elements)`
  Adds elements to `runtimes` list.
  `final MMetadataFlatpak.Builder`
  `addPermissions(MFlatpakPermission element)`
  Adds one element to `permissions` list.
  `final MMetadataFlatpak.Builder`
  `addPermissions(MFlatpakPermission... elements)`
  Adds elements to `permissions` list.
  `final MMetadataFlatpak.Builder`
  `addRuntimes(MFlatpakRuntime element)`
  Adds one element to `runtimes` list.
  `final MMetadataFlatpak.Builder`
  `addRuntimes(MFlatpakRuntime... elements)`
  Adds elements to `runtimes` list.
  `MMetadataFlatpak`
  `build()`
  Builds a new `MMetadataFlatpak`.
  `final MMetadataFlatpak.Builder`
  `from(MMetadataFlatpakType instance)`
  Fill a builder with attribute values from the provided `MMetadataFlatpakType` instance.
  `final MMetadataFlatpak.Builder`
  `setPermissions(Iterable<? extends MFlatpakPermission> elements)`
  Sets or replaces all elements for `permissions` list.
  `final MMetadataFlatpak.Builder`
  `setRuntimes(Iterable<? extends MFlatpakRuntime> elements)`
  Sets or replaces all elements for `runtimes` list.

  ### Methods inherited from class Object

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

- ## Method Details

  - ### from

    public final MMetadataFlatpak.Builder from(MMetadataFlatpakType instance)
    Fill a builder with attribute values from the provided `MMetadataFlatpakType` instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
    Parameters:
      `instance` - The instance from which to copy values
    Returns:
      `this` builder for use in a chained invocation

  - ### addPermissions

    public final MMetadataFlatpak.Builder addPermissions(MFlatpakPermission element)
    Adds one element to `permissions` list.
    Parameters:
      `element` - A permissions element
    Returns:
      `this` builder for use in a chained invocation

  - ### addPermissions

    public final MMetadataFlatpak.Builder addPermissions(MFlatpakPermission... elements)
    Adds elements to `permissions` list.
    Parameters:
      `elements` - An array of permissions elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setPermissions

    public final MMetadataFlatpak.Builder setPermissions(Iterable<? extends MFlatpakPermission> elements)
    Sets or replaces all elements for `permissions` list.
    Parameters:
      `elements` - An iterable of permissions elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllPermissions

    public final MMetadataFlatpak.Builder addAllPermissions(Iterable<? extends MFlatpakPermission> elements)
    Adds elements to `permissions` list.
    Parameters:
      `elements` - An iterable of permissions elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addRuntimes

    public final MMetadataFlatpak.Builder addRuntimes(MFlatpakRuntime element)
    Adds one element to `runtimes` list.
    Parameters:
      `element` - A runtimes element
    Returns:
      `this` builder for use in a chained invocation

  - ### addRuntimes

    public final MMetadataFlatpak.Builder addRuntimes(MFlatpakRuntime... elements)
    Adds elements to `runtimes` list.
    Parameters:
      `elements` - An array of runtimes elements
    Returns:
      `this` builder for use in a chained invocation

  - ### setRuntimes

    public final MMetadataFlatpak.Builder setRuntimes(Iterable<? extends MFlatpakRuntime> elements)
    Sets or replaces all elements for `runtimes` list.
    Parameters:
      `elements` - An iterable of runtimes elements
    Returns:
      `this` builder for use in a chained invocation

  - ### addAllRuntimes

    public final MMetadataFlatpak.Builder addAllRuntimes(Iterable<? extends MFlatpakRuntime> elements)
    Adds elements to `runtimes` list.
    Parameters:
      `elements` - An iterable of runtimes elements
    Returns:
      `this` builder for use in a chained invocation

  - ### build

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