getNextMessage method
Retrieves next message on an Amazon Q in Connect session.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
May throw UnprocessableContentException.
May throw ValidationException.
Parameter assistantId :
The identifier of the Amazon Q in Connect assistant.
Parameter nextMessageToken :
The token for the next message. Use the value returned in the SendMessage
or previous response in the next request to retrieve the next message.
Parameter sessionId :
The identifier of the Amazon Q in Connect session.
Implementation
Future<GetNextMessageResponse> getNextMessage({
required String assistantId,
required String nextMessageToken,
required String sessionId,
}) async {
final $query = <String, List<String>>{
'nextMessageToken': [nextMessageToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/assistants/${Uri.encodeComponent(assistantId)}/sessions/${Uri.encodeComponent(sessionId)}/messages/next',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetNextMessageResponse.fromJson(response);
}