# `Jido.Chat.Message`
[🔗](https://github.com/agentjido/jido_chat/blob/v1.0.0/lib/jido/chat/message.ex#L1)

Chat SDK-style normalized message model.

# `t`

```elixir
@type t() :: %Jido.Chat.Message{
  attachments: [
    %Jido.Chat.Media{
      duration: term(),
      filename: term(),
      height: term(),
      kind: term(),
      media_type: term(),
      metadata: term(),
      size_bytes: term(),
      url: term(),
      width: term()
    }
  ],
  author:
    nil
    | nil
    | %Jido.Chat.Author{
        full_name: term(),
        is_bot: term(),
        is_me: term(),
        metadata: term(),
        user_id: term(),
        user_name: term()
      },
  channel_id: nil | nil | binary(),
  created_at: nil | nil | any(),
  external_message_id: nil | nil | binary(),
  external_room_id: nil | nil | any(),
  formatted: nil | nil | binary(),
  id: binary(),
  is_mention: boolean(),
  metadata: map(),
  raw: nil | nil | any(),
  text: nil | nil | binary(),
  thread_id: nil | nil | binary(),
  updated_at: nil | nil | any()
}
```

# `from_incoming`

```elixir
@spec from_incoming(
  Jido.Chat.Incoming.t(),
  keyword()
) :: t()
```

Creates a normalized message from canonical incoming payload.

# `from_map`

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

Builds a message from serialized map data.

# `new`

Creates a normalized message from map input.

# `schema`

Returns the Zoi schema for Message.

# `to_map`

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

Serializes the message into a plain map with a revivable type marker.

---

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