Example usage for com.amazonaws.services.lexruntime.model PostTextRequest setSessionAttributes

List of usage examples for com.amazonaws.services.lexruntime.model PostTextRequest setSessionAttributes

Introduction

In this page you can find the example usage for com.amazonaws.services.lexruntime.model PostTextRequest setSessionAttributes.

Prototype


public void setSessionAttributes(java.util.Map<String, String> sessionAttributes) 

Source Link

Document

Application-specific information passed between Amazon Lex and a client application.

Usage

From source file:lex.LexBotRelay.java

License:Apache License

private PostTextResult sendLexMessage(SymMessage symMessage) {

    PostTextRequest postTextRequest = new PostTextRequest();

    postTextRequest.setBotAlias(lexBotDetail.getBotAlias());
    postTextRequest.setBotName(lexBotDetail.getBotName());
    postTextRequest.setRequestAttributes(lexBotDetail.getRequestAttributes());
    postTextRequest.setSessionAttributes(lexBotDetail.getSessionAttributes());
    postTextRequest.setUserId(symMessage.getFromUserId().toString());
    postTextRequest.setInputText(symMessage.getMessageText());

    return lexClient.postText(postTextRequest);

}