# `Opsmaru.Incus.Response`
[🔗](https://github.com/upmaru/opsmaru-incus/blob/v0.1.0/lib/opsmaru/incus/response.ex#L1)

Native Incus envelope with lossless metadata/unknown fields and ETag.

# `t`

```elixir
@type t() :: %Opsmaru.Incus.Response{
  connection: term(),
  error: term(),
  error_code: term(),
  etag: term(),
  http_status: term(),
  identity: term(),
  metadata: term(),
  operation: term(),
  raw: term(),
  status: term(),
  status_code: term(),
  type: term()
}
```

# `accepted?`

Accepted async envelopes are not completed operations.

# `decode`

# `decode_native`

Explicit typed JSON projection for native Response, ResponseRaw and ResponseType.

Unlike the wire envelope decoder, arbitrary response-type strings and native
null/default fields are accepted. Unknown fields are dropped. Response metadata
retains decoded JSON numbers; ResponseRaw metadata uses native float64 numbers.
This returns model data, never an accepted operation or authorized connection.

Input/output are bounded to 1 MiB and input nesting to 64 levels. Duplicate
object keys, ambiguous case aliases and non-ASCII envelope keys reject rather
than emulate Go's ordered merging and Unicode field-name folding. ResponseRaw
also rejects negative zero with an integer mantissa (including exponents),
whose sign Jason discards. RawMessage
whitespace/number spelling is not retained. Equality concerns parsed JSON for
RawMessage and exact native float64 values for ResponseRaw metadata.

# `metadata_as_map`

Extract native map metadata without modifying the originating response.

# `metadata_as_model`

Explicit typed native projection; ordinary response/model decoding remains lossless.

# `metadata_as_operation`

# `metadata_as_string_slice`

Extract native string-slice metadata; native null retains the initialized empty slice.

---

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