# `Spark.Dsl.Builder`
[🔗](https://github.com/ash-project/spark/blob/v2.6.1/lib/spark/dsl/builder.ex#L5)

Utilities for building DSL objects programatically, generally used in transformers.

# `input`

```elixir
@type input() :: {:ok, Spark.Dsl.t()} | {:error, term()} | Spark.Dsl.t()
```

# `result`

```elixir
@type result() :: {:ok, Spark.Dsl.t()} | {:error, term()}
```

# `defbuilder`
*macro* 

# `defbuilderp`
*macro* 

# `handle_nested_builders`

Handles nested values that may be `{:ok, result}` or `{:error, term}`, returning any errors and unwrapping any ok values

This allows users of builders to do things like:

```elixir
dsl_state
|> Ash.Resource.Builder.add_new_action(:update, :publish,
  changes: [
    Ash.Resource.Builder.build_action_change(
      Ash.Resource.Change.Builtins.set_attribute(:state, :published)
    )
  ]
)
```

If your builder function calls `handle_nested_builders/2` with their input before building the thing its building.

---

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