GetScreenEventSchema

@Serializable
@SerialName(value = "GetScreen")
data class GetScreenEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val method: HttpMethod = HttpMethod.GET, val body: AnySerializable?, val headers: Map<String, String>?, val timeoutMillis: Long? = null) : EventSchema

Fetches the payload of the screen this event lives in and emits it downstream, without applying it. Pair it with ChangeScreenState to decide when and how the fetched content is installed — that split is what makes custom loading and error flows possible.

The request targets the screen's own id; method (default GET), body, headers and timeoutMillis shape it.

incomingData consumed: not used.

Triggers fired:

  • OnStartEventTrigger — before the request is sent.

  • OnSuccessEventTrigger — when the screen was fetched; the ScreenModel is passed as incomingData, ready to be handed to ChangeScreenState.

  • OnNetworkFailureEventTrigger — when the request failed with an HTTP status and this event declares an event wired to that exact status; the failure is passed as incomingData.

  • OnFailureEventTrigger — every other failure, and also HTTP failures with no status-specific event declared; the Throwable is passed as incomingData. Only one of this and the trigger above fires per failure. Failures are logged.

Constructors

Link copied to clipboard
constructor(id: String, trigger: EventTrigger, events: SerializableImmutableList<EventSchema>?, method: HttpMethod = HttpMethod.GET, body: AnySerializable?, headers: Map<String, String>?, timeoutMillis: Long? = null)

Properties

Link copied to clipboard
@SerialName(value = "body")
val body: AnySerializable?
Link copied to clipboard
@SerialName(value = "events")
open override val events: SerializableImmutableList<EventSchema>?

This event's own children — each declaring, via its own trigger, which of this event's outgoing triggers runs it. null when this event declares no children.

Link copied to clipboard
@SerialName(value = "headers")
val headers: Map<String, String>?
Link copied to clipboard
@SerialName(value = "id")
open override val id: String

Unique identifier — how TriggerEvent/UpdateEvents address this event by id. Defaults to a random id when omitted from the DSL.

Link copied to clipboard
@SerialName(value = "method")
val method: HttpMethod
Link copied to clipboard
@SerialName(value = "timeoutMillis")
val timeoutMillis: Long?
Link copied to clipboard
@SerialName(value = "trigger")
open override val trigger: EventTrigger

The condition that must occur for this event to run — matched by structural equality (data class/data object equality) against whatever trigger value fired, never by any kind of subscription or listener registry.