Copyright | (c) 2013-2023 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Sends an event to a room. Use this within your application’s business logic to send events to clients of a room; e.g., to notify clients to change the way the chat UI is rendered.
Synopsis
- data SendEvent = SendEvent' {
- attributes :: Maybe (HashMap Text Text)
- eventName :: Text
- roomIdentifier :: Text
- newSendEvent :: Text -> Text -> SendEvent
- sendEvent_attributes :: Lens' SendEvent (Maybe (HashMap Text Text))
- sendEvent_eventName :: Lens' SendEvent Text
- sendEvent_roomIdentifier :: Lens' SendEvent Text
- data SendEventResponse = SendEventResponse' {
- id :: Maybe Text
- httpStatus :: Int
- newSendEventResponse :: Int -> SendEventResponse
- sendEventResponse_id :: Lens' SendEventResponse (Maybe Text)
- sendEventResponse_httpStatus :: Lens' SendEventResponse Int
Creating a Request
See: newSendEvent
smart constructor.
SendEvent' | |
|
Instances
Create a value of SendEvent
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:attributes:SendEvent'
, sendEvent_attributes
- Application-defined metadata to attach to the event sent to clients. The
maximum length of the metadata is 1 KB total.
$sel:eventName:SendEvent'
, sendEvent_eventName
- Application-defined name of the event to send to clients.
$sel:roomIdentifier:SendEvent'
, sendEvent_roomIdentifier
- Identifier of the room to which the event will be sent. Currently this
must be an ARN.
Request Lenses
sendEvent_attributes :: Lens' SendEvent (Maybe (HashMap Text Text)) Source #
Application-defined metadata to attach to the event sent to clients. The maximum length of the metadata is 1 KB total.
sendEvent_eventName :: Lens' SendEvent Text Source #
Application-defined name of the event to send to clients.
sendEvent_roomIdentifier :: Lens' SendEvent Text Source #
Identifier of the room to which the event will be sent. Currently this must be an ARN.
Destructuring the Response
data SendEventResponse Source #
See: newSendEventResponse
smart constructor.
SendEventResponse' | |
|
Instances
Create a value of SendEventResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
SendEventResponse
, sendEventResponse_id
- An identifier generated by Amazon IVS Chat. This identifier must be used
in subsequent operations for this message, such as DeleteMessage.
$sel:httpStatus:SendEventResponse'
, sendEventResponse_httpStatus
- The response's http status code.
Response Lenses
sendEventResponse_id :: Lens' SendEventResponse (Maybe Text) Source #
An identifier generated by Amazon IVS Chat. This identifier must be used in subsequent operations for this message, such as DeleteMessage.
sendEventResponse_httpStatus :: Lens' SendEventResponse Int Source #
The response's http status code.