ACPex.Schema.Types.SessionUpdate.CurrentModeUpdate (ACPex v0.1.1)

Copy Markdown View Source

Current mode update.

Notification of a change to the session's current mode.

Required Fields

  • type - Always "current_mode_update" for this variant
  • session_update - Update identifier
  • current_mode_id - New current mode identifier

Optional Fields

  • meta - Additional metadata (map)

Example

%ACPex.Schema.Types.SessionUpdate.CurrentModeUpdate{
  type: "current_mode_update",
  session_update: "update-888",
  current_mode_id: "debug_mode"
}

JSON Representation

{
  "type": "current_mode_update",
  "sessionUpdate": "update-888",
  "currentModeId": "debug_mode"
}

Summary

Functions

Creates a changeset for validation.

Types

t()

@type t() :: %ACPex.Schema.Types.SessionUpdate.CurrentModeUpdate{
  current_mode_id: String.t(),
  meta: map() | nil,
  session_update: String.t(),
  type: String.t()
}

Functions

changeset(struct \\ %__MODULE__{}, params)

@spec changeset(t(), map()) :: Ecto.Changeset.t()

Creates a changeset for validation.

Required Fields

  • session_update - Must be present
  • current_mode_id - Must be present

The type field defaults to "current_mode_update".