# `AgentBlueprintProtocol.Bounds`
[🔗](https://github.com/baselabs/agent_blueprint_protocol/blob/v1.1.0/lib/agent_blueprint_protocol/bounds.ex#L1)

This module defines limits for JSON decoding and canonical encoding.

Use it when an application needs tighter parse limits than the package profile.

This module does not authorize operations.

## Example

```elixir
{:ok, bounds} = AgentBlueprintProtocol.Bounds.new(%{bytes: 100_000})
```

# `t`
*since 1.0.0* 

```elixir
@type t() :: %AgentBlueprintProtocol.Bounds{
  bytes: pos_integer(),
  depth: pos_integer(),
  items: pos_integer(),
  key: pos_integer(),
  members: pos_integer(),
  nodes: pos_integer(),
  number_lexeme: pos_integer(),
  string: pos_integer()
}
```

The public data type for AgentBlueprintProtocol.Bounds.

# `coerce`
*since 1.0.0* 

```elixir
@spec coerce(t() | map()) :: {:ok, t()} | {:error, AgentBlueprintProtocol.Error.t()}
```

Validates and normalizes a parse-limit value.

## Example

    iex> match?({:ok, %AgentBlueprintProtocol.Bounds{bytes: 100}}, AgentBlueprintProtocol.Bounds.coerce(%{bytes: 100}))
    true

# `maximum`
*since 1.0.0* 

```elixir
@spec maximum() :: t()
```

Returns the maximum parse-limit profile.

## Example

    iex> is_struct(AgentBlueprintProtocol.Bounds.maximum(), AgentBlueprintProtocol.Bounds)
    true

# `new`
*since 1.0.0* 

```elixir
@spec new(map()) :: {:ok, t()} | {:error, AgentBlueprintProtocol.Error.t()}
```

Builds and validates a value from the supplied options.

## Example

    iex> match?({:ok, %AgentBlueprintProtocol.Bounds{bytes: 100}}, AgentBlueprintProtocol.Bounds.new(%{bytes: 100}))
    true

---

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