# `Tune.Parameter`
[🔗](https://github.com/mikehostetler/tune/blob/v0.5.0/lib/tune/parameter.ex#L1)

A tunable JSON value with a Zoi schema, such as a lesson list or candidate text.

Application code reads it with `Tune.Execution.value/2` and decides
how to use it. Optimizers replace the value; the schema is code-owned and
every new value is validated against it.

# `t`

```elixir
@type t() :: %Tune.Parameter{
  description: String.t() | nil,
  schema: Zoi.schema(),
  value: term()
}
```

# `new`

```elixir
@spec new(keyword()) :: {:ok, t()} | {:error, Exception.t()}
```

Builds a parameter.

Options: `:schema` (required JSON-compatible Zoi schema), `:value` (required),
and `:description`.

# `put_value`

```elixir
@spec put_value(t(), term()) :: {:ok, t()} | {:error, Exception.t()}
```

Returns the parameter with a new validated value.

# `validate`

```elixir
@spec validate(Zoi.schema(), term()) :: {:ok, term()} | {:error, Exception.t()}
```

Validates a value against a parameter schema.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
