# `Gemini.Types.Live.SessionResumptionUpdate`
[🔗](https://github.com/nshkrdotcom/gemini_ex/blob/v0.15.0/lib/gemini/types/live/session_resumption_update.ex#L1)

Session resumption state update from the server.

Only sent if `session_resumption` was set in the connection config.
Contains information about whether the session can be resumed and the
handle to use for resumption.

## Fields

- `new_handle` - New handle representing a state that can be resumed. Empty if not resumable.
- `resumable` - True if the session can be resumed at this point.
- `last_consumed_client_message_index` - Index of last message processed (only with transparent mode).

## Example

    %SessionResumptionUpdate{
      new_handle: "session_handle_123",
      resumable: true,
      last_consumed_client_message_index: 42
    }

# `t`

```elixir
@type t() :: %Gemini.Types.Live.SessionResumptionUpdate{
  last_consumed_client_message_index: integer() | nil,
  new_handle: String.t() | nil,
  resumable: boolean() | nil
}
```

# `from_api`

```elixir
@spec from_api(map() | nil) :: t() | nil
```

Parses from API response.

# `new`

```elixir
@spec new(keyword()) :: t()
```

Creates a new SessionResumptionUpdate.

# `to_api`

```elixir
@spec to_api(t() | nil) :: map() | nil
```

Converts to API format (camelCase).

---

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