TaskProgressEvent

data class TaskProgressEvent(val taskId: String, val eventId: String, val createdAt: String, val payload: JsonObject = JsonObject(emptyMap())) : KnownTaskEvent

Emitted to provide updates on task progress.

Constructors

Link copied to clipboard
constructor(taskId: String, eventId: String, createdAt: String, payload: JsonObject = JsonObject(emptyMap()))

Properties

Link copied to clipboard
open override val createdAt: String

ISO 8601 timestamp when the event was created on the server.

Link copied to clipboard
open override val eventId: String

Unique identifier of this specific event for deduplication and replay.

Link copied to clipboard
open override val payload: JsonObject

Raw JSON data associated with the event.

Link copied to clipboard
open override val taskId: String

Unique identifier of the task this event belongs to.

Link copied to clipboard
open override val type: TaskEventType

The typed category of this event.

Link copied to clipboard
open override val wireType: String

The string representation of the event type as received over the wire.

Functions

Link copied to clipboard

Tries to parse the payload as TaskFailedPayload if the event type matches.

Link copied to clipboard

Tries to parse the payload as TaskProgressPayload if the event type matches.

Link copied to clipboard

Returns true if this event indicates the final state of the task.