# `Insider.Observability.MockEvent`
[🔗](https://github.com/hiivemarkets/insider/blob/v0.1.0/lib/insider/observability/mock_event.ex#L1)

A canonical, provider-shaped mock event derived from an observability export.

Mock events are inert local values. `mock` is always `true`, delivery is
always `not_attempted`, and the handoff metadata assigns any asynchronous
handling to the host application. This module has no transport operation and
mapping a value is not evidence that a provider accepted it.

# `t`

```elixir
@type t() :: %Insider.Observability.MockEvent{
  body: term(),
  delivery_status: term(),
  export: term(),
  handoff: term(),
  id: term(),
  idempotency_key: term(),
  mock: term(),
  provider: term(),
  schema: term()
}
```

# `canonical_binary`

```elixir
@spec canonical_binary(term()) ::
  {:ok, binary()} | {:error, Insider.Protocol.Error.t()}
```

# `decode`

```elixir
@spec decode(binary()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `decode_map`

```elixir
@spec decode_map(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `new`

```elixir
@spec new(Insider.Observability.Export.t(), Insider.Incident.Capsule.t(), String.t()) ::
  {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

Maps an exact capsule-bound export to a provider-shaped mock value.

`expected_provider` prevents a provider-specific adapter from accepting an
export addressed to the other provider.

# `to_wire_map`

```elixir
@spec to_wire_map(t()) :: map()
```

# `validate`

```elixir
@spec validate(term()) :: {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

# `validate_against_capsule`

```elixir
@spec validate_against_capsule(term(), term()) ::
  {:ok, t()} | {:error, Insider.Protocol.Error.t()}
```

Recomputes the entire mapping from the referenced capsule and compares it.

---

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