Event

data class Event(val shapeType: String, val contentType: String? = null) : MessageType

Corresponds to the event message type. All events include the headers:

  • :message-type: Always set to event

  • :event-type: (Required) Identifies the event shape from the event stream union. This is the member name from the union.

  • :content-type: (Optional) The content type for the payload

Example message

:message-type: event
:event-type: MyStruct
:content-type: application/json

{...}

Parameters

shapeType

the event type as identified by the :event-type header.

contentType

the content type of the payload (if present)

Constructors

Link copied to clipboard
constructor(shapeType: String, contentType: String? = null)

Properties

Link copied to clipboard
val contentType: String? = null
Link copied to clipboard