Package com.io7m.coffeepick.api

# Class CoffeePickSearch

java.lang.Object
com.io7m.coffeepick.api.CoffeePickSearch

All Implemented Interfaces:
  `CoffeePickSearchType`

    public final class CoffeePickSearch
    extends java.lang.Object
    implements CoffeePickSearchType

Inventory search parameters.

- ## Nested Class Summary

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

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.util.Optional<java.lang.String>` | `architecture()` |
  `java.util.Optional<RuntimeHash>` | `archiveHash()` |
  `java.util.OptionalLong` | `archiveSize()` |
  `java.util.Optional<java.net.URI>` | `archiveURI()` |
  `static CoffeePickSearch.Builder` | `builder()` | Creates a builder for `CoffeePickSearch`.
  `java.util.Optional<RuntimeConfiguration>` | `configuration()` |
  `static CoffeePickSearch` | `copyOf​(CoffeePickSearchType instance)` | Creates an immutable copy of a `CoffeePickSearchType` value.
  `boolean` | `equals​(java.lang.Object another)` | This instance is equal to all instances of `CoffeePickSearch` that have equal attribute values.
  `int` | `hashCode()` | Computes a hash code from attributes: `repository`, `versionRange`, `platform`, `architecture`, `vm`, `configuration`, `archiveURI`, `archiveSize`, `archiveHash`, `id`, `requiredTags`.
  `java.util.Optional<java.lang.String>` | `id()` |
  `java.util.Optional<java.lang.String>` | `platform()` |
  `java.util.Optional<java.lang.String>` | `repository()` |
  `java.util.Set<java.lang.String>` | `requiredTags()` |
  `java.lang.String` | `toString()` | Prints the immutable value `CoffeePickSearch` with attribute values.
  `java.util.Optional<RuntimeVersionRange>` | `versionRange()` |
  `java.util.Optional<java.lang.String>` | `vm()` |
  `CoffeePickSearch` | `withArchitecture​(java.lang.String value)` | Copy the current immutable object by setting a present value for the optional `architecture` attribute.
  `CoffeePickSearch` | `withArchitecture​(java.util.Optional<java.lang.String> optional)` | Copy the current immutable object by setting an optional value for the `architecture` attribute.
  `CoffeePickSearch` | `withArchiveHash​(RuntimeHash value)` | Copy the current immutable object by setting a present value for the optional `archiveHash` attribute.
  `CoffeePickSearch` | `withArchiveHash​(java.util.Optional<? extends RuntimeHash> optional)` | Copy the current immutable object by setting an optional value for the `archiveHash` attribute.
  `CoffeePickSearch` | `withArchiveSize​(long value)` | Copy the current immutable object by setting a present value for the optional `archiveSize` attribute.
  `CoffeePickSearch` | `withArchiveSize​(java.util.OptionalLong optional)` | Copy the current immutable object by setting an optional value for the `archiveSize` attribute.
  `CoffeePickSearch` | `withArchiveURI​(java.net.URI value)` | Copy the current immutable object by setting a present value for the optional `archiveURI` attribute.
  `CoffeePickSearch` | `withArchiveURI​(java.util.Optional<? extends java.net.URI> optional)` | Copy the current immutable object by setting an optional value for the `archiveURI` attribute.
  `CoffeePickSearch` | `withConfiguration​(RuntimeConfiguration value)` | Copy the current immutable object by setting a present value for the optional `configuration` attribute.
  `CoffeePickSearch` | `withConfiguration​(java.util.Optional<? extends RuntimeConfiguration> optional)` | Copy the current immutable object by setting an optional value for the `configuration` attribute.
  `CoffeePickSearch` | `withId​(java.lang.String value)` | Copy the current immutable object by setting a present value for the optional `id` attribute.
  `CoffeePickSearch` | `withId​(java.util.Optional<java.lang.String> optional)` | Copy the current immutable object by setting an optional value for the `id` attribute.
  `CoffeePickSearch` | `withPlatform​(java.lang.String value)` | Copy the current immutable object by setting a present value for the optional `platform` attribute.
  `CoffeePickSearch` | `withPlatform​(java.util.Optional<java.lang.String> optional)` | Copy the current immutable object by setting an optional value for the `platform` attribute.
  `CoffeePickSearch` | `withRepository​(java.lang.String value)` | Copy the current immutable object by setting a present value for the optional `repository` attribute.
  `CoffeePickSearch` | `withRepository​(java.util.Optional<java.lang.String> optional)` | Copy the current immutable object by setting an optional value for the `repository` attribute.
  `CoffeePickSearch` | `withRequiredTags​(java.lang.Iterable<java.lang.String> elements)` | Copy the current immutable object with elements that replace the content of `requiredTags`.
  `CoffeePickSearch` | `withRequiredTags​(java.lang.String... elements)` | Copy the current immutable object with elements that replace the content of `requiredTags`.
  `CoffeePickSearch` | `withVersionRange​(RuntimeVersionRange value)` | Copy the current immutable object by setting a present value for the optional `versionRange` attribute.
  `CoffeePickSearch` | `withVersionRange​(java.util.Optional<? extends RuntimeVersionRange> optional)` | Copy the current immutable object by setting an optional value for the `versionRange` attribute.
  `CoffeePickSearch` | `withVm​(java.lang.String value)` | Copy the current immutable object by setting a present value for the optional `vm` attribute.
  `CoffeePickSearch` | `withVm​(java.util.Optional<java.lang.String> optional)` | Copy the current immutable object by setting an optional value for the `vm` attribute.

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

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

- ## Method Details

  - ### repository

    public java.util.Optional<java.lang.String> repository()
    Specified by:
      `repository` in interface `CoffeePickSearchType`
    Returns:
      The repository URI

  - ### versionRange

    public java.util.Optional<RuntimeVersionRange> versionRange()
    Specified by:
      `versionRange` in interface `CoffeePickSearchType`
    Returns:
      The range of acceptable runtime versions

  - ### platform

    public java.util.Optional<java.lang.String> platform()
    Specified by:
      `platform` in interface `CoffeePickSearchType`
    Returns:
      The name of the platform upon which this runtime will run

  - ### architecture

    public java.util.Optional<java.lang.String> architecture()
    Specified by:
      `architecture` in interface `CoffeePickSearchType`
    Returns:
      The name of the architecture upon which this runtime will run

  - ### vm

    public java.util.Optional<java.lang.String> vm()
    Specified by:
      `vm` in interface `CoffeePickSearchType`
    Returns:
      The name of the VM used for this runtime

  - ### configuration

    public java.util.Optional<RuntimeConfiguration> configuration()
    Specified by:
      `configuration` in interface `CoffeePickSearchType`
    Returns:
      The configuration of the runtime

  - ### archiveURI

    public java.util.Optional<java.net.URI> archiveURI()
    Specified by:
      `archiveURI` in interface `CoffeePickSearchType`
    Returns:
      A URI that can be used to fetch an archive of the runtime

  - ### archiveSize

    public java.util.OptionalLong archiveSize()
    Specified by:
      `archiveSize` in interface `CoffeePickSearchType`
    Returns:
      The size in octets of the archive

  - ### archiveHash

    public java.util.Optional<RuntimeHash> archiveHash()
    Specified by:
      `archiveHash` in interface `CoffeePickSearchType`
    Returns:
      The hash of the runtime

  - ### id

    public java.util.Optional<java.lang.String> id()
    Specified by:
      `id` in interface `CoffeePickSearchType`
    Returns:
      The unique identifier of the runtime

  - ### requiredTags

    public java.util.Set<java.lang.String> requiredTags()
    Specified by:
      `requiredTags` in interface `CoffeePickSearchType`
    Returns:
      A set of tags that must be present on a given runtime

  - ### withRepository

    public final CoffeePickSearch withRepository​(java.lang.String value)
    Copy the current immutable object by setting a present value for the optional `repository` attribute.
    Parameters:
      `value` - The value for repository
    Returns:
      A modified copy of `this` object

  - ### withRepository

    public final CoffeePickSearch withRepository​(java.util.Optional<java.lang.String> optional)
    Copy the current immutable object by setting an optional value for the `repository` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for repository
    Returns:
      A modified copy of `this` object

  - ### withVersionRange

    public final CoffeePickSearch withVersionRange​(RuntimeVersionRange value)
    Copy the current immutable object by setting a present value for the optional `versionRange` attribute.
    Parameters:
      `value` - The value for versionRange
    Returns:
      A modified copy of `this` object

  - ### withVersionRange

    public final CoffeePickSearch withVersionRange​(java.util.Optional<? extends RuntimeVersionRange> optional)
    Copy the current immutable object by setting an optional value for the `versionRange` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for versionRange
    Returns:
      A modified copy of `this` object

  - ### withPlatform

    public final CoffeePickSearch withPlatform​(java.lang.String value)
    Copy the current immutable object by setting a present value for the optional `platform` attribute.
    Parameters:
      `value` - The value for platform
    Returns:
      A modified copy of `this` object

  - ### withPlatform

    public final CoffeePickSearch withPlatform​(java.util.Optional<java.lang.String> optional)
    Copy the current immutable object by setting an optional value for the `platform` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for platform
    Returns:
      A modified copy of `this` object

  - ### withArchitecture

    public final CoffeePickSearch withArchitecture​(java.lang.String value)
    Copy the current immutable object by setting a present value for the optional `architecture` attribute.
    Parameters:
      `value` - The value for architecture
    Returns:
      A modified copy of `this` object

  - ### withArchitecture

    public final CoffeePickSearch withArchitecture​(java.util.Optional<java.lang.String> optional)
    Copy the current immutable object by setting an optional value for the `architecture` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for architecture
    Returns:
      A modified copy of `this` object

  - ### withVm

    public final CoffeePickSearch withVm​(java.lang.String value)
    Copy the current immutable object by setting a present value for the optional `vm` attribute.
    Parameters:
      `value` - The value for vm
    Returns:
      A modified copy of `this` object

  - ### withVm

    public final CoffeePickSearch withVm​(java.util.Optional<java.lang.String> optional)
    Copy the current immutable object by setting an optional value for the `vm` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for vm
    Returns:
      A modified copy of `this` object

  - ### withConfiguration

    public final CoffeePickSearch withConfiguration​(RuntimeConfiguration value)
    Copy the current immutable object by setting a present value for the optional `configuration` attribute.
    Parameters:
      `value` - The value for configuration
    Returns:
      A modified copy of `this` object

  - ### withConfiguration

    public final CoffeePickSearch withConfiguration​(java.util.Optional<? extends RuntimeConfiguration> optional)
    Copy the current immutable object by setting an optional value for the `configuration` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for configuration
    Returns:
      A modified copy of `this` object

  - ### withArchiveURI

    public final CoffeePickSearch withArchiveURI​(java.net.URI value)
    Copy the current immutable object by setting a present value for the optional `archiveURI` attribute.
    Parameters:
      `value` - The value for archiveURI
    Returns:
      A modified copy of `this` object

  - ### withArchiveURI

    public final CoffeePickSearch withArchiveURI​(java.util.Optional<? extends java.net.URI> optional)
    Copy the current immutable object by setting an optional value for the `archiveURI` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for archiveURI
    Returns:
      A modified copy of `this` object

  - ### withArchiveSize

    public final CoffeePickSearch withArchiveSize​(long value)
    Copy the current immutable object by setting a present value for the optional `archiveSize` attribute.
    Parameters:
      `value` - The value for archiveSize
    Returns:
      A modified copy of `this` object

  - ### withArchiveSize

    public final CoffeePickSearch withArchiveSize​(java.util.OptionalLong optional)
    Copy the current immutable object by setting an optional value for the `archiveSize` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for archiveSize
    Returns:
      A modified copy of `this` object

  - ### withArchiveHash

    public final CoffeePickSearch withArchiveHash​(RuntimeHash value)
    Copy the current immutable object by setting a present value for the optional `archiveHash` attribute.
    Parameters:
      `value` - The value for archiveHash
    Returns:
      A modified copy of `this` object

  - ### withArchiveHash

    public final CoffeePickSearch withArchiveHash​(java.util.Optional<? extends RuntimeHash> optional)
    Copy the current immutable object by setting an optional value for the `archiveHash` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for archiveHash
    Returns:
      A modified copy of `this` object

  - ### withId

    public final CoffeePickSearch withId​(java.lang.String value)
    Copy the current immutable object by setting a present value for the optional `id` attribute.
    Parameters:
      `value` - The value for id
    Returns:
      A modified copy of `this` object

  - ### withId

    public final CoffeePickSearch withId​(java.util.Optional<java.lang.String> optional)
    Copy the current immutable object by setting an optional value for the `id` attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - A value for id
    Returns:
      A modified copy of `this` object

  - ### withRequiredTags

    public final CoffeePickSearch withRequiredTags​(java.lang.String... elements)
    Copy the current immutable object with elements that replace the content of `requiredTags`.
    Parameters:
      `elements` - The elements to set
    Returns:
      A modified copy of `this` object

  - ### withRequiredTags

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

  - ### equals

    public boolean equals​(java.lang.Object another)
    This instance is equal to all instances of `CoffeePickSearch` 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: `repository`, `versionRange`, `platform`, `architecture`, `vm`, `configuration`, `archiveURI`, `archiveSize`, `archiveHash`, `id`, `requiredTags`.
    Overrides:
      `hashCode` in class `java.lang.Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

    public static CoffeePickSearch copyOf​(CoffeePickSearchType instance)
    Creates an immutable copy of a `CoffeePickSearchType` 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 CoffeePickSearch instance

  - ### builder

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

         CoffeePickSearch.builder()
            .setRepository(String) // optional repository
            .setVersionRange(com.io7m.coffeepick.runtime.RuntimeVersionRange) // optional versionRange
            .setPlatform(String) // optional platform
            .setArchitecture(String) // optional architecture
            .setVm(String) // optional vm
            .setConfiguration(com.io7m.coffeepick.runtime.RuntimeConfiguration) // optional configuration
            .setArchiveURI(java.net.URI) // optional archiveURI
            .setArchiveSize(long) // optional archiveSize
            .setArchiveHash(com.io7m.coffeepick.runtime.RuntimeHash) // optional archiveHash
            .setId(String) // optional id
            .addRequiredTags|addAllRequiredTags(String) // requiredTags elements
            .build();

    Returns:
      A new CoffeePickSearch builder