/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.lexruntime.model; import java.io.Serializable; import javax.annotation.Generated; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class PostTextResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The current user intent that Amazon Lex is aware of. *

*/ private String intentName; /** *

* Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the * user's intent. The score is between 0.0 and 1.0. For more information, see Confidence Scores. *

*

* The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex. *

*/ private IntentConfidence nluIntentConfidence; /** *

* One to four alternative intents that may be applicable to the user's intent. *

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's * intent. The intents are sorted by the confidence score. *

*/ private java.util.List alternativeIntents; /** *

* The intent slots that Amazon Lex detected from the user input in the conversation. *

*

* Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined * by the valueSelectionStrategy selected when the slot type was created or updated. If * valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the user is * returned, if the user value is similar to the slot values. If valueSelectionStrategy is set to * TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if there is no * resolution list, null. If you don't specify a valueSelectionStrategy, the default is * ORIGINAL_VALUE. *

*/ private java.util.Map slots; /** *

* A map of key-value pairs representing the session-specific context information. *

*/ private java.util.Map sessionAttributes; /** *

* The message to convey to the user. The message can come from the bot's configuration or from a Lambda function. *

*

* If the intent is not configured with a Lambda function, or if the Lambda function returned Delegate * as the dialogAction.type its response, Amazon Lex decides on the next course of action and selects * an appropriate message from the bot's configuration based on the current interaction context. For example, if * Amazon Lex isn't able to understand user input, it uses a clarification prompt message. *

*

* When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex * returns one message from each group in the response. The message field is an escaped JSON string containing the * messages. For more information about the structure of the JSON string returned, see msg-prompts-formats. *

*

* If the Lambda function returns a message, Amazon Lex passes it to the client in its response. *

*/ private String message; /** *

* The sentiment expressed in and utterance. *

*

* When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains * the result of the analysis. *

*/ private SentimentResponse sentimentResponse; /** *

* The format of the response message. One of the following values: *

*
    *
  • *

    * PlainText - The message contains plain UTF-8 text. *

    *
  • *
  • *

    * CustomPayload - The message is a custom format defined by the Lambda function. *

    *
  • *
  • *

    * SSML - The message contains text formatted for voice output. *

    *
  • *
  • *

    * Composite - The message contains an escaped JSON object containing one or more messages from the * groups that messages were assigned to when the intent was created. *

    *
  • *
*/ private String messageFormat; /** *

* Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

*
    *
  • *

    * ElicitIntent - Amazon Lex wants to elicit user intent. *

    *

    * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent * from this utterance, it will return this dialogState. *

    *
  • *
  • *

    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

    *

    * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

    *

    * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such additional * information (in these examples, update the crust type slot value, or change intent from OrderPizza to * OrderDrink). *

    *
  • *
  • *

    * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

    *

    * For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A * user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the * response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately. *

    *
  • *
  • *

    * Fulfilled - Conveys that the Lambda function configured for the intent has successfully fulfilled * the intent. *

    *
  • *
  • *

    * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

    *
  • *
  • *

    * Failed - Conveys that the conversation with the user failed. *

    *

    * This can happen for various reasons including that the user did not provide an appropriate response to prompts * from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or the * Lambda function failed to fulfill the intent. *

    *
  • *
*/ private String dialogState; /** *

* If the dialogState value is ElicitSlot, returns the name of the slot for which Amazon * Lex is eliciting a value. *

*/ private String slotToElicit; /** *

* Represents the options that the user has to respond to the current prompt. Response Card can come from the bot * configuration (in the Amazon Lex console, choose the settings button next to a slot) or from a code hook (Lambda * function). *

*/ private ResponseCard responseCard; /** *

* A unique identifier for the session. *

*/ private String sessionId; /** *

* The version of the bot that responded to the conversation. You can use this information to help determine if one * version of a bot is performing better than another version. *

*/ private String botVersion; /** *

* A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the * PostContent, PostText, or PutSession operation. *

*

* You can use a context to control the intents that can follow up an intent, or to modify the operation of your * application. *

*/ private java.util.List activeContexts; /** *

* The current user intent that Amazon Lex is aware of. *

* * @param intentName * The current user intent that Amazon Lex is aware of. */ public void setIntentName(String intentName) { this.intentName = intentName; } /** *

* The current user intent that Amazon Lex is aware of. *

* * @return The current user intent that Amazon Lex is aware of. */ public String getIntentName() { return this.intentName; } /** *

* The current user intent that Amazon Lex is aware of. *

* * @param intentName * The current user intent that Amazon Lex is aware of. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withIntentName(String intentName) { setIntentName(intentName); return this; } /** *

* Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the * user's intent. The score is between 0.0 and 1.0. For more information, see Confidence Scores. *

*

* The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex. *

* * @param nluIntentConfidence * Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that * matches the user's intent. The score is between 0.0 and 1.0. For more information, see Confidence Scores.

*

* The score is a relative score, not an absolute score. The score may change based on improvements to Amazon * Lex. */ public void setNluIntentConfidence(IntentConfidence nluIntentConfidence) { this.nluIntentConfidence = nluIntentConfidence; } /** *

* Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the * user's intent. The score is between 0.0 and 1.0. For more information, see Confidence Scores. *

*

* The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex. *

* * @return Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that * matches the user's intent. The score is between 0.0 and 1.0. For more information, see Confidence Scores.

*

* The score is a relative score, not an absolute score. The score may change based on improvements to * Amazon Lex. */ public IntentConfidence getNluIntentConfidence() { return this.nluIntentConfidence; } /** *

* Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that matches the * user's intent. The score is between 0.0 and 1.0. For more information, see Confidence Scores. *

*

* The score is a relative score, not an absolute score. The score may change based on improvements to Amazon Lex. *

* * @param nluIntentConfidence * Provides a score that indicates how confident Amazon Lex is that the returned intent is the one that * matches the user's intent. The score is between 0.0 and 1.0. For more information, see Confidence Scores.

*

* The score is a relative score, not an absolute score. The score may change based on improvements to Amazon * Lex. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withNluIntentConfidence(IntentConfidence nluIntentConfidence) { setNluIntentConfidence(nluIntentConfidence); return this; } /** *

* One to four alternative intents that may be applicable to the user's intent. *

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's * intent. The intents are sorted by the confidence score. *

* * @return One to four alternative intents that may be applicable to the user's intent.

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the * user's intent. The intents are sorted by the confidence score. */ public java.util.List getAlternativeIntents() { return alternativeIntents; } /** *

* One to four alternative intents that may be applicable to the user's intent. *

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's * intent. The intents are sorted by the confidence score. *

* * @param alternativeIntents * One to four alternative intents that may be applicable to the user's intent.

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the * user's intent. The intents are sorted by the confidence score. */ public void setAlternativeIntents(java.util.Collection alternativeIntents) { if (alternativeIntents == null) { this.alternativeIntents = null; return; } this.alternativeIntents = new java.util.ArrayList(alternativeIntents); } /** *

* One to four alternative intents that may be applicable to the user's intent. *

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's * intent. The intents are sorted by the confidence score. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAlternativeIntents(java.util.Collection)} or {@link #withAlternativeIntents(java.util.Collection)} if * you want to override the existing values. *

* * @param alternativeIntents * One to four alternative intents that may be applicable to the user's intent.

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the * user's intent. The intents are sorted by the confidence score. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withAlternativeIntents(PredictedIntent... alternativeIntents) { if (this.alternativeIntents == null) { setAlternativeIntents(new java.util.ArrayList(alternativeIntents.length)); } for (PredictedIntent ele : alternativeIntents) { this.alternativeIntents.add(ele); } return this; } /** *

* One to four alternative intents that may be applicable to the user's intent. *

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the user's * intent. The intents are sorted by the confidence score. *

* * @param alternativeIntents * One to four alternative intents that may be applicable to the user's intent.

*

* Each alternative includes a score that indicates how confident Amazon Lex is that the intent matches the * user's intent. The intents are sorted by the confidence score. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withAlternativeIntents(java.util.Collection alternativeIntents) { setAlternativeIntents(alternativeIntents); return this; } /** *

* The intent slots that Amazon Lex detected from the user input in the conversation. *

*

* Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined * by the valueSelectionStrategy selected when the slot type was created or updated. If * valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the user is * returned, if the user value is similar to the slot values. If valueSelectionStrategy is set to * TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if there is no * resolution list, null. If you don't specify a valueSelectionStrategy, the default is * ORIGINAL_VALUE. *

* * @return The intent slots that Amazon Lex detected from the user input in the conversation.

*

* Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is * determined by the valueSelectionStrategy selected when the slot type was created or updated. * If valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the * user is returned, if the user value is similar to the slot values. If valueSelectionStrategy * is set to TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if * there is no resolution list, null. If you don't specify a valueSelectionStrategy, the * default is ORIGINAL_VALUE. */ public java.util.Map getSlots() { return slots; } /** *

* The intent slots that Amazon Lex detected from the user input in the conversation. *

*

* Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined * by the valueSelectionStrategy selected when the slot type was created or updated. If * valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the user is * returned, if the user value is similar to the slot values. If valueSelectionStrategy is set to * TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if there is no * resolution list, null. If you don't specify a valueSelectionStrategy, the default is * ORIGINAL_VALUE. *

* * @param slots * The intent slots that Amazon Lex detected from the user input in the conversation.

*

* Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is * determined by the valueSelectionStrategy selected when the slot type was created or updated. * If valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the * user is returned, if the user value is similar to the slot values. If valueSelectionStrategy * is set to TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if * there is no resolution list, null. If you don't specify a valueSelectionStrategy, the default * is ORIGINAL_VALUE. */ public void setSlots(java.util.Map slots) { this.slots = slots; } /** *

* The intent slots that Amazon Lex detected from the user input in the conversation. *

*

* Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is determined * by the valueSelectionStrategy selected when the slot type was created or updated. If * valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the user is * returned, if the user value is similar to the slot values. If valueSelectionStrategy is set to * TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if there is no * resolution list, null. If you don't specify a valueSelectionStrategy, the default is * ORIGINAL_VALUE. *

* * @param slots * The intent slots that Amazon Lex detected from the user input in the conversation.

*

* Amazon Lex creates a resolution list containing likely values for a slot. The value that it returns is * determined by the valueSelectionStrategy selected when the slot type was created or updated. * If valueSelectionStrategy is set to ORIGINAL_VALUE, the value provided by the * user is returned, if the user value is similar to the slot values. If valueSelectionStrategy * is set to TOP_RESOLUTION Amazon Lex returns the first value in the resolution list or, if * there is no resolution list, null. If you don't specify a valueSelectionStrategy, the default * is ORIGINAL_VALUE. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withSlots(java.util.Map slots) { setSlots(slots); return this; } /** * Add a single Slots entry * * @see PostTextResult#withSlots * @returns a reference to this object so that method calls can be chained together. */ public PostTextResult addSlotsEntry(String key, String value) { if (null == this.slots) { this.slots = new java.util.HashMap(); } if (this.slots.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.slots.put(key, value); return this; } /** * Removes all the entries added into Slots. * * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult clearSlotsEntries() { this.slots = null; return this; } /** *

* A map of key-value pairs representing the session-specific context information. *

* * @return A map of key-value pairs representing the session-specific context information. */ public java.util.Map getSessionAttributes() { return sessionAttributes; } /** *

* A map of key-value pairs representing the session-specific context information. *

* * @param sessionAttributes * A map of key-value pairs representing the session-specific context information. */ public void setSessionAttributes(java.util.Map sessionAttributes) { this.sessionAttributes = sessionAttributes; } /** *

* A map of key-value pairs representing the session-specific context information. *

* * @param sessionAttributes * A map of key-value pairs representing the session-specific context information. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withSessionAttributes(java.util.Map sessionAttributes) { setSessionAttributes(sessionAttributes); return this; } /** * Add a single SessionAttributes entry * * @see PostTextResult#withSessionAttributes * @returns a reference to this object so that method calls can be chained together. */ public PostTextResult addSessionAttributesEntry(String key, String value) { if (null == this.sessionAttributes) { this.sessionAttributes = new java.util.HashMap(); } if (this.sessionAttributes.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.sessionAttributes.put(key, value); return this; } /** * Removes all the entries added into SessionAttributes. * * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult clearSessionAttributesEntries() { this.sessionAttributes = null; return this; } /** *

* The message to convey to the user. The message can come from the bot's configuration or from a Lambda function. *

*

* If the intent is not configured with a Lambda function, or if the Lambda function returned Delegate * as the dialogAction.type its response, Amazon Lex decides on the next course of action and selects * an appropriate message from the bot's configuration based on the current interaction context. For example, if * Amazon Lex isn't able to understand user input, it uses a clarification prompt message. *

*

* When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex * returns one message from each group in the response. The message field is an escaped JSON string containing the * messages. For more information about the structure of the JSON string returned, see msg-prompts-formats. *

*

* If the Lambda function returns a message, Amazon Lex passes it to the client in its response. *

* * @param message * The message to convey to the user. The message can come from the bot's configuration or from a Lambda * function.

*

* If the intent is not configured with a Lambda function, or if the Lambda function returned * Delegate as the dialogAction.type its response, Amazon Lex decides on the next * course of action and selects an appropriate message from the bot's configuration based on the current * interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a * clarification prompt message. *

*

* When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon * Lex returns one message from each group in the response. The message field is an escaped JSON string * containing the messages. For more information about the structure of the JSON string returned, see * msg-prompts-formats. *

*

* If the Lambda function returns a message, Amazon Lex passes it to the client in its response. */ public void setMessage(String message) { this.message = message; } /** *

* The message to convey to the user. The message can come from the bot's configuration or from a Lambda function. *

*

* If the intent is not configured with a Lambda function, or if the Lambda function returned Delegate * as the dialogAction.type its response, Amazon Lex decides on the next course of action and selects * an appropriate message from the bot's configuration based on the current interaction context. For example, if * Amazon Lex isn't able to understand user input, it uses a clarification prompt message. *

*

* When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex * returns one message from each group in the response. The message field is an escaped JSON string containing the * messages. For more information about the structure of the JSON string returned, see msg-prompts-formats. *

*

* If the Lambda function returns a message, Amazon Lex passes it to the client in its response. *

* * @return The message to convey to the user. The message can come from the bot's configuration or from a Lambda * function.

*

* If the intent is not configured with a Lambda function, or if the Lambda function returned * Delegate as the dialogAction.type its response, Amazon Lex decides on the next * course of action and selects an appropriate message from the bot's configuration based on the current * interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a * clarification prompt message. *

*

* When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon * Lex returns one message from each group in the response. The message field is an escaped JSON string * containing the messages. For more information about the structure of the JSON string returned, see * msg-prompts-formats. *

*

* If the Lambda function returns a message, Amazon Lex passes it to the client in its response. */ public String getMessage() { return this.message; } /** *

* The message to convey to the user. The message can come from the bot's configuration or from a Lambda function. *

*

* If the intent is not configured with a Lambda function, or if the Lambda function returned Delegate * as the dialogAction.type its response, Amazon Lex decides on the next course of action and selects * an appropriate message from the bot's configuration based on the current interaction context. For example, if * Amazon Lex isn't able to understand user input, it uses a clarification prompt message. *

*

* When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon Lex * returns one message from each group in the response. The message field is an escaped JSON string containing the * messages. For more information about the structure of the JSON string returned, see msg-prompts-formats. *

*

* If the Lambda function returns a message, Amazon Lex passes it to the client in its response. *

* * @param message * The message to convey to the user. The message can come from the bot's configuration or from a Lambda * function.

*

* If the intent is not configured with a Lambda function, or if the Lambda function returned * Delegate as the dialogAction.type its response, Amazon Lex decides on the next * course of action and selects an appropriate message from the bot's configuration based on the current * interaction context. For example, if Amazon Lex isn't able to understand user input, it uses a * clarification prompt message. *

*

* When you create an intent you can assign messages to groups. When messages are assigned to groups Amazon * Lex returns one message from each group in the response. The message field is an escaped JSON string * containing the messages. For more information about the structure of the JSON string returned, see * msg-prompts-formats. *

*

* If the Lambda function returns a message, Amazon Lex passes it to the client in its response. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withMessage(String message) { setMessage(message); return this; } /** *

* The sentiment expressed in and utterance. *

*

* When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains * the result of the analysis. *

* * @param sentimentResponse * The sentiment expressed in and utterance.

*

* When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field * contains the result of the analysis. */ public void setSentimentResponse(SentimentResponse sentimentResponse) { this.sentimentResponse = sentimentResponse; } /** *

* The sentiment expressed in and utterance. *

*

* When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains * the result of the analysis. *

* * @return The sentiment expressed in and utterance.

*

* When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field * contains the result of the analysis. */ public SentimentResponse getSentimentResponse() { return this.sentimentResponse; } /** *

* The sentiment expressed in and utterance. *

*

* When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field contains * the result of the analysis. *

* * @param sentimentResponse * The sentiment expressed in and utterance.

*

* When the bot is configured to send utterances to Amazon Comprehend for sentiment analysis, this field * contains the result of the analysis. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withSentimentResponse(SentimentResponse sentimentResponse) { setSentimentResponse(sentimentResponse); return this; } /** *

* The format of the response message. One of the following values: *

*
    *
  • *

    * PlainText - The message contains plain UTF-8 text. *

    *
  • *
  • *

    * CustomPayload - The message is a custom format defined by the Lambda function. *

    *
  • *
  • *

    * SSML - The message contains text formatted for voice output. *

    *
  • *
  • *

    * Composite - The message contains an escaped JSON object containing one or more messages from the * groups that messages were assigned to when the intent was created. *

    *
  • *
* * @param messageFormat * The format of the response message. One of the following values:

*
    *
  • *

    * PlainText - The message contains plain UTF-8 text. *

    *
  • *
  • *

    * CustomPayload - The message is a custom format defined by the Lambda function. *

    *
  • *
  • *

    * SSML - The message contains text formatted for voice output. *

    *
  • *
  • *

    * Composite - The message contains an escaped JSON object containing one or more messages from * the groups that messages were assigned to when the intent was created. *

    *
  • * @see MessageFormatType */ public void setMessageFormat(String messageFormat) { this.messageFormat = messageFormat; } /** *

    * The format of the response message. One of the following values: *

    *
      *
    • *

      * PlainText - The message contains plain UTF-8 text. *

      *
    • *
    • *

      * CustomPayload - The message is a custom format defined by the Lambda function. *

      *
    • *
    • *

      * SSML - The message contains text formatted for voice output. *

      *
    • *
    • *

      * Composite - The message contains an escaped JSON object containing one or more messages from the * groups that messages were assigned to when the intent was created. *

      *
    • *
    * * @return The format of the response message. One of the following values:

    *
      *
    • *

      * PlainText - The message contains plain UTF-8 text. *

      *
    • *
    • *

      * CustomPayload - The message is a custom format defined by the Lambda function. *

      *
    • *
    • *

      * SSML - The message contains text formatted for voice output. *

      *
    • *
    • *

      * Composite - The message contains an escaped JSON object containing one or more messages from * the groups that messages were assigned to when the intent was created. *

      *
    • * @see MessageFormatType */ public String getMessageFormat() { return this.messageFormat; } /** *

      * The format of the response message. One of the following values: *

      *
        *
      • *

        * PlainText - The message contains plain UTF-8 text. *

        *
      • *
      • *

        * CustomPayload - The message is a custom format defined by the Lambda function. *

        *
      • *
      • *

        * SSML - The message contains text formatted for voice output. *

        *
      • *
      • *

        * Composite - The message contains an escaped JSON object containing one or more messages from the * groups that messages were assigned to when the intent was created. *

        *
      • *
      * * @param messageFormat * The format of the response message. One of the following values:

      *
        *
      • *

        * PlainText - The message contains plain UTF-8 text. *

        *
      • *
      • *

        * CustomPayload - The message is a custom format defined by the Lambda function. *

        *
      • *
      • *

        * SSML - The message contains text formatted for voice output. *

        *
      • *
      • *

        * Composite - The message contains an escaped JSON object containing one or more messages from * the groups that messages were assigned to when the intent was created. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see MessageFormatType */ public PostTextResult withMessageFormat(String messageFormat) { setMessageFormat(messageFormat); return this; } /** *

        * The format of the response message. One of the following values: *

        *
          *
        • *

          * PlainText - The message contains plain UTF-8 text. *

          *
        • *
        • *

          * CustomPayload - The message is a custom format defined by the Lambda function. *

          *
        • *
        • *

          * SSML - The message contains text formatted for voice output. *

          *
        • *
        • *

          * Composite - The message contains an escaped JSON object containing one or more messages from the * groups that messages were assigned to when the intent was created. *

          *
        • *
        * * @param messageFormat * The format of the response message. One of the following values:

        *
          *
        • *

          * PlainText - The message contains plain UTF-8 text. *

          *
        • *
        • *

          * CustomPayload - The message is a custom format defined by the Lambda function. *

          *
        • *
        • *

          * SSML - The message contains text formatted for voice output. *

          *
        • *
        • *

          * Composite - The message contains an escaped JSON object containing one or more messages from * the groups that messages were assigned to when the intent was created. *

          *
        • * @see MessageFormatType */ public void setMessageFormat(MessageFormatType messageFormat) { withMessageFormat(messageFormat); } /** *

          * The format of the response message. One of the following values: *

          *
            *
          • *

            * PlainText - The message contains plain UTF-8 text. *

            *
          • *
          • *

            * CustomPayload - The message is a custom format defined by the Lambda function. *

            *
          • *
          • *

            * SSML - The message contains text formatted for voice output. *

            *
          • *
          • *

            * Composite - The message contains an escaped JSON object containing one or more messages from the * groups that messages were assigned to when the intent was created. *

            *
          • *
          * * @param messageFormat * The format of the response message. One of the following values:

          *
            *
          • *

            * PlainText - The message contains plain UTF-8 text. *

            *
          • *
          • *

            * CustomPayload - The message is a custom format defined by the Lambda function. *

            *
          • *
          • *

            * SSML - The message contains text formatted for voice output. *

            *
          • *
          • *

            * Composite - The message contains an escaped JSON object containing one or more messages from * the groups that messages were assigned to when the intent was created. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see MessageFormatType */ public PostTextResult withMessageFormat(MessageFormatType messageFormat) { this.messageFormat = messageFormat.toString(); return this; } /** *

            * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

            *
              *
            • *

              * ElicitIntent - Amazon Lex wants to elicit user intent. *

              *

              * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent * from this utterance, it will return this dialogState. *

              *
            • *
            • *

              * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

              *

              * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

              *

              * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such additional * information (in these examples, update the crust type slot value, or change intent from OrderPizza to * OrderDrink). *

              *
            • *
            • *

              * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

              *

              * For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A * user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the * response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately. *

              *
            • *
            • *

              * Fulfilled - Conveys that the Lambda function configured for the intent has successfully fulfilled * the intent. *

              *
            • *
            • *

              * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

              *
            • *
            • *

              * Failed - Conveys that the conversation with the user failed. *

              *

              * This can happen for various reasons including that the user did not provide an appropriate response to prompts * from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or the * Lambda function failed to fulfill the intent. *

              *
            • *
            * * @param dialogState * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

            *
              *
            • *

              * ElicitIntent - Amazon Lex wants to elicit user intent. *

              *

              * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user * intent from this utterance, it will return this dialogState. *

              *
            • *
            • *

              * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

              *

              * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

              *

              * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such * additional information (in these examples, update the crust type slot value, or change intent from * OrderPizza to OrderDrink). *

              *
            • *
            • *

              * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

              *

              * For example, suppose that in the response Amazon Lex sends this message: * "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might * also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can * process such additional information appropriately. *

              *
            • *
            • *

              * Fulfilled - Conveys that the Lambda function configured for the intent has successfully * fulfilled the intent. *

              *
            • *
            • *

              * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

              *
            • *
            • *

              * Failed - Conveys that the conversation with the user failed. *

              *

              * This can happen for various reasons including that the user did not provide an appropriate response to * prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific * information), or the Lambda function failed to fulfill the intent. *

              *
            • * @see DialogState */ public void setDialogState(String dialogState) { this.dialogState = dialogState; } /** *

              * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

              *
                *
              • *

                * ElicitIntent - Amazon Lex wants to elicit user intent. *

                *

                * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent * from this utterance, it will return this dialogState. *

                *
              • *
              • *

                * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                *

                * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                *

                * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such additional * information (in these examples, update the crust type slot value, or change intent from OrderPizza to * OrderDrink). *

                *
              • *
              • *

                * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                *

                * For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A * user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the * response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately. *

                *
              • *
              • *

                * Fulfilled - Conveys that the Lambda function configured for the intent has successfully fulfilled * the intent. *

                *
              • *
              • *

                * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                *
              • *
              • *

                * Failed - Conveys that the conversation with the user failed. *

                *

                * This can happen for various reasons including that the user did not provide an appropriate response to prompts * from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or the * Lambda function failed to fulfill the intent. *

                *
              • *
              * * @return Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

              *
                *
              • *

                * ElicitIntent - Amazon Lex wants to elicit user intent. *

                *

                * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the * user intent from this utterance, it will return this dialogState. *

                *
              • *
              • *

                * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                *

                * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                *

                * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such * additional information (in these examples, update the crust type slot value, or change intent from * OrderPizza to OrderDrink). *

                *
              • *
              • *

                * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                *

                * For example, suppose that in the response Amazon Lex sends this message: * "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user * might also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex * can process such additional information appropriately. *

                *
              • *
              • *

                * Fulfilled - Conveys that the Lambda function configured for the intent has successfully * fulfilled the intent. *

                *
              • *
              • *

                * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                *
              • *
              • *

                * Failed - Conveys that the conversation with the user failed. *

                *

                * This can happen for various reasons including that the user did not provide an appropriate response to * prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific * information), or the Lambda function failed to fulfill the intent. *

                *
              • * @see DialogState */ public String getDialogState() { return this.dialogState; } /** *

                * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

                *
                  *
                • *

                  * ElicitIntent - Amazon Lex wants to elicit user intent. *

                  *

                  * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent * from this utterance, it will return this dialogState. *

                  *
                • *
                • *

                  * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                  *

                  * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                  *

                  * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such additional * information (in these examples, update the crust type slot value, or change intent from OrderPizza to * OrderDrink). *

                  *
                • *
                • *

                  * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                  *

                  * For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A * user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the * response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately. *

                  *
                • *
                • *

                  * Fulfilled - Conveys that the Lambda function configured for the intent has successfully fulfilled * the intent. *

                  *
                • *
                • *

                  * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                  *
                • *
                • *

                  * Failed - Conveys that the conversation with the user failed. *

                  *

                  * This can happen for various reasons including that the user did not provide an appropriate response to prompts * from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or the * Lambda function failed to fulfill the intent. *

                  *
                • *
                * * @param dialogState * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

                *
                  *
                • *

                  * ElicitIntent - Amazon Lex wants to elicit user intent. *

                  *

                  * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user * intent from this utterance, it will return this dialogState. *

                  *
                • *
                • *

                  * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                  *

                  * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                  *

                  * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such * additional information (in these examples, update the crust type slot value, or change intent from * OrderPizza to OrderDrink). *

                  *
                • *
                • *

                  * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                  *

                  * For example, suppose that in the response Amazon Lex sends this message: * "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might * also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can * process such additional information appropriately. *

                  *
                • *
                • *

                  * Fulfilled - Conveys that the Lambda function configured for the intent has successfully * fulfilled the intent. *

                  *
                • *
                • *

                  * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                  *
                • *
                • *

                  * Failed - Conveys that the conversation with the user failed. *

                  *

                  * This can happen for various reasons including that the user did not provide an appropriate response to * prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific * information), or the Lambda function failed to fulfill the intent. *

                  *
                • * @return Returns a reference to this object so that method calls can be chained together. * @see DialogState */ public PostTextResult withDialogState(String dialogState) { setDialogState(dialogState); return this; } /** *

                  * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

                  *
                    *
                  • *

                    * ElicitIntent - Amazon Lex wants to elicit user intent. *

                    *

                    * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent * from this utterance, it will return this dialogState. *

                    *
                  • *
                  • *

                    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                    *

                    * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                    *

                    * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such additional * information (in these examples, update the crust type slot value, or change intent from OrderPizza to * OrderDrink). *

                    *
                  • *
                  • *

                    * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                    *

                    * For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A * user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the * response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately. *

                    *
                  • *
                  • *

                    * Fulfilled - Conveys that the Lambda function configured for the intent has successfully fulfilled * the intent. *

                    *
                  • *
                  • *

                    * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                    *
                  • *
                  • *

                    * Failed - Conveys that the conversation with the user failed. *

                    *

                    * This can happen for various reasons including that the user did not provide an appropriate response to prompts * from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or the * Lambda function failed to fulfill the intent. *

                    *
                  • *
                  * * @param dialogState * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

                  *
                    *
                  • *

                    * ElicitIntent - Amazon Lex wants to elicit user intent. *

                    *

                    * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user * intent from this utterance, it will return this dialogState. *

                    *
                  • *
                  • *

                    * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                    *

                    * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                    *

                    * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such * additional information (in these examples, update the crust type slot value, or change intent from * OrderPizza to OrderDrink). *

                    *
                  • *
                  • *

                    * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                    *

                    * For example, suppose that in the response Amazon Lex sends this message: * "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might * also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can * process such additional information appropriately. *

                    *
                  • *
                  • *

                    * Fulfilled - Conveys that the Lambda function configured for the intent has successfully * fulfilled the intent. *

                    *
                  • *
                  • *

                    * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                    *
                  • *
                  • *

                    * Failed - Conveys that the conversation with the user failed. *

                    *

                    * This can happen for various reasons including that the user did not provide an appropriate response to * prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific * information), or the Lambda function failed to fulfill the intent. *

                    *
                  • * @see DialogState */ public void setDialogState(DialogState dialogState) { withDialogState(dialogState); } /** *

                    * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

                    *
                      *
                    • *

                      * ElicitIntent - Amazon Lex wants to elicit user intent. *

                      *

                      * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user intent * from this utterance, it will return this dialogState. *

                      *
                    • *
                    • *

                      * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                      *

                      * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                      *

                      * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such additional * information (in these examples, update the crust type slot value, or change intent from OrderPizza to * OrderDrink). *

                      *
                    • *
                    • *

                      * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                      *

                      * For example, suppose that in the response Amazon Lex sends this message: "What size pizza would you like?". A * user might reply with the slot value (e.g., "medium"). The user might also provide additional information in the * response (e.g., "medium thick crust pizza"). Amazon Lex can process such additional information appropriately. *

                      *
                    • *
                    • *

                      * Fulfilled - Conveys that the Lambda function configured for the intent has successfully fulfilled * the intent. *

                      *
                    • *
                    • *

                      * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                      *
                    • *
                    • *

                      * Failed - Conveys that the conversation with the user failed. *

                      *

                      * This can happen for various reasons including that the user did not provide an appropriate response to prompts * from the service (you can configure how many times Amazon Lex can prompt a user for specific information), or the * Lambda function failed to fulfill the intent. *

                      *
                    • *
                    * * @param dialogState * Identifies the current state of the user interaction. Amazon Lex returns one of the following values as * dialogState. The client can optionally use this information to customize the user interface. *

                    *
                      *
                    • *

                      * ElicitIntent - Amazon Lex wants to elicit user intent. *

                      *

                      * For example, a user might utter an intent ("I want to order a pizza"). If Amazon Lex cannot infer the user * intent from this utterance, it will return this dialogState. *

                      *
                    • *
                    • *

                      * ConfirmIntent - Amazon Lex is expecting a "yes" or "no" response. *

                      *

                      * For example, Amazon Lex wants user confirmation before fulfilling an intent. *

                      *

                      * Instead of a simple "yes" or "no," a user might respond with additional information. For example, * "yes, but make it thick crust pizza" or "no, I want to order a drink". Amazon Lex can process such * additional information (in these examples, update the crust type slot value, or change intent from * OrderPizza to OrderDrink). *

                      *
                    • *
                    • *

                      * ElicitSlot - Amazon Lex is expecting a slot value for the current intent. *

                      *

                      * For example, suppose that in the response Amazon Lex sends this message: * "What size pizza would you like?". A user might reply with the slot value (e.g., "medium"). The user might * also provide additional information in the response (e.g., "medium thick crust pizza"). Amazon Lex can * process such additional information appropriately. *

                      *
                    • *
                    • *

                      * Fulfilled - Conveys that the Lambda function configured for the intent has successfully * fulfilled the intent. *

                      *
                    • *
                    • *

                      * ReadyForFulfillment - Conveys that the client has to fulfill the intent. *

                      *
                    • *
                    • *

                      * Failed - Conveys that the conversation with the user failed. *

                      *

                      * This can happen for various reasons including that the user did not provide an appropriate response to * prompts from the service (you can configure how many times Amazon Lex can prompt a user for specific * information), or the Lambda function failed to fulfill the intent. *

                      *
                    • * @return Returns a reference to this object so that method calls can be chained together. * @see DialogState */ public PostTextResult withDialogState(DialogState dialogState) { this.dialogState = dialogState.toString(); return this; } /** *

                      * If the dialogState value is ElicitSlot, returns the name of the slot for which Amazon * Lex is eliciting a value. *

                      * * @param slotToElicit * If the dialogState value is ElicitSlot, returns the name of the slot for which * Amazon Lex is eliciting a value. */ public void setSlotToElicit(String slotToElicit) { this.slotToElicit = slotToElicit; } /** *

                      * If the dialogState value is ElicitSlot, returns the name of the slot for which Amazon * Lex is eliciting a value. *

                      * * @return If the dialogState value is ElicitSlot, returns the name of the slot for which * Amazon Lex is eliciting a value. */ public String getSlotToElicit() { return this.slotToElicit; } /** *

                      * If the dialogState value is ElicitSlot, returns the name of the slot for which Amazon * Lex is eliciting a value. *

                      * * @param slotToElicit * If the dialogState value is ElicitSlot, returns the name of the slot for which * Amazon Lex is eliciting a value. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withSlotToElicit(String slotToElicit) { setSlotToElicit(slotToElicit); return this; } /** *

                      * Represents the options that the user has to respond to the current prompt. Response Card can come from the bot * configuration (in the Amazon Lex console, choose the settings button next to a slot) or from a code hook (Lambda * function). *

                      * * @param responseCard * Represents the options that the user has to respond to the current prompt. Response Card can come from the * bot configuration (in the Amazon Lex console, choose the settings button next to a slot) or from a code * hook (Lambda function). */ public void setResponseCard(ResponseCard responseCard) { this.responseCard = responseCard; } /** *

                      * Represents the options that the user has to respond to the current prompt. Response Card can come from the bot * configuration (in the Amazon Lex console, choose the settings button next to a slot) or from a code hook (Lambda * function). *

                      * * @return Represents the options that the user has to respond to the current prompt. Response Card can come from * the bot configuration (in the Amazon Lex console, choose the settings button next to a slot) or from a * code hook (Lambda function). */ public ResponseCard getResponseCard() { return this.responseCard; } /** *

                      * Represents the options that the user has to respond to the current prompt. Response Card can come from the bot * configuration (in the Amazon Lex console, choose the settings button next to a slot) or from a code hook (Lambda * function). *

                      * * @param responseCard * Represents the options that the user has to respond to the current prompt. Response Card can come from the * bot configuration (in the Amazon Lex console, choose the settings button next to a slot) or from a code * hook (Lambda function). * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withResponseCard(ResponseCard responseCard) { setResponseCard(responseCard); return this; } /** *

                      * A unique identifier for the session. *

                      * * @param sessionId * A unique identifier for the session. */ public void setSessionId(String sessionId) { this.sessionId = sessionId; } /** *

                      * A unique identifier for the session. *

                      * * @return A unique identifier for the session. */ public String getSessionId() { return this.sessionId; } /** *

                      * A unique identifier for the session. *

                      * * @param sessionId * A unique identifier for the session. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withSessionId(String sessionId) { setSessionId(sessionId); return this; } /** *

                      * The version of the bot that responded to the conversation. You can use this information to help determine if one * version of a bot is performing better than another version. *

                      * * @param botVersion * The version of the bot that responded to the conversation. You can use this information to help determine * if one version of a bot is performing better than another version. */ public void setBotVersion(String botVersion) { this.botVersion = botVersion; } /** *

                      * The version of the bot that responded to the conversation. You can use this information to help determine if one * version of a bot is performing better than another version. *

                      * * @return The version of the bot that responded to the conversation. You can use this information to help determine * if one version of a bot is performing better than another version. */ public String getBotVersion() { return this.botVersion; } /** *

                      * The version of the bot that responded to the conversation. You can use this information to help determine if one * version of a bot is performing better than another version. *

                      * * @param botVersion * The version of the bot that responded to the conversation. You can use this information to help determine * if one version of a bot is performing better than another version. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withBotVersion(String botVersion) { setBotVersion(botVersion); return this; } /** *

                      * A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the * PostContent, PostText, or PutSession operation. *

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of your * application. *

                      * * @return A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling * the PostContent, PostText, or PutSession operation.

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of * your application. */ public java.util.List getActiveContexts() { return activeContexts; } /** *

                      * A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the * PostContent, PostText, or PutSession operation. *

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of your * application. *

                      * * @param activeContexts * A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling * the PostContent, PostText, or PutSession operation.

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of * your application. */ public void setActiveContexts(java.util.Collection activeContexts) { if (activeContexts == null) { this.activeContexts = null; return; } this.activeContexts = new java.util.ArrayList(activeContexts); } /** *

                      * A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the * PostContent, PostText, or PutSession operation. *

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of your * application. *

                      *

                      * NOTE: This method appends the values to the existing list (if any). Use * {@link #setActiveContexts(java.util.Collection)} or {@link #withActiveContexts(java.util.Collection)} if you want * to override the existing values. *

                      * * @param activeContexts * A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling * the PostContent, PostText, or PutSession operation.

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of * your application. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withActiveContexts(ActiveContext... activeContexts) { if (this.activeContexts == null) { setActiveContexts(new java.util.ArrayList(activeContexts.length)); } for (ActiveContext ele : activeContexts) { this.activeContexts.add(ele); } return this; } /** *

                      * A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling the * PostContent, PostText, or PutSession operation. *

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of your * application. *

                      * * @param activeContexts * A list of active contexts for the session. A context can be set when an intent is fulfilled or by calling * the PostContent, PostText, or PutSession operation.

                      *

                      * You can use a context to control the intents that can follow up an intent, or to modify the operation of * your application. * @return Returns a reference to this object so that method calls can be chained together. */ public PostTextResult withActiveContexts(java.util.Collection activeContexts) { setActiveContexts(activeContexts); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getIntentName() != null) sb.append("IntentName: ").append(getIntentName()).append(","); if (getNluIntentConfidence() != null) sb.append("NluIntentConfidence: ").append(getNluIntentConfidence()).append(","); if (getAlternativeIntents() != null) sb.append("AlternativeIntents: ").append(getAlternativeIntents()).append(","); if (getSlots() != null) sb.append("Slots: ").append("***Sensitive Data Redacted***").append(","); if (getSessionAttributes() != null) sb.append("SessionAttributes: ").append("***Sensitive Data Redacted***").append(","); if (getMessage() != null) sb.append("Message: ").append("***Sensitive Data Redacted***").append(","); if (getSentimentResponse() != null) sb.append("SentimentResponse: ").append(getSentimentResponse()).append(","); if (getMessageFormat() != null) sb.append("MessageFormat: ").append(getMessageFormat()).append(","); if (getDialogState() != null) sb.append("DialogState: ").append(getDialogState()).append(","); if (getSlotToElicit() != null) sb.append("SlotToElicit: ").append(getSlotToElicit()).append(","); if (getResponseCard() != null) sb.append("ResponseCard: ").append(getResponseCard()).append(","); if (getSessionId() != null) sb.append("SessionId: ").append(getSessionId()).append(","); if (getBotVersion() != null) sb.append("BotVersion: ").append(getBotVersion()).append(","); if (getActiveContexts() != null) sb.append("ActiveContexts: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PostTextResult == false) return false; PostTextResult other = (PostTextResult) obj; if (other.getIntentName() == null ^ this.getIntentName() == null) return false; if (other.getIntentName() != null && other.getIntentName().equals(this.getIntentName()) == false) return false; if (other.getNluIntentConfidence() == null ^ this.getNluIntentConfidence() == null) return false; if (other.getNluIntentConfidence() != null && other.getNluIntentConfidence().equals(this.getNluIntentConfidence()) == false) return false; if (other.getAlternativeIntents() == null ^ this.getAlternativeIntents() == null) return false; if (other.getAlternativeIntents() != null && other.getAlternativeIntents().equals(this.getAlternativeIntents()) == false) return false; if (other.getSlots() == null ^ this.getSlots() == null) return false; if (other.getSlots() != null && other.getSlots().equals(this.getSlots()) == false) return false; if (other.getSessionAttributes() == null ^ this.getSessionAttributes() == null) return false; if (other.getSessionAttributes() != null && other.getSessionAttributes().equals(this.getSessionAttributes()) == false) return false; if (other.getMessage() == null ^ this.getMessage() == null) return false; if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false) return false; if (other.getSentimentResponse() == null ^ this.getSentimentResponse() == null) return false; if (other.getSentimentResponse() != null && other.getSentimentResponse().equals(this.getSentimentResponse()) == false) return false; if (other.getMessageFormat() == null ^ this.getMessageFormat() == null) return false; if (other.getMessageFormat() != null && other.getMessageFormat().equals(this.getMessageFormat()) == false) return false; if (other.getDialogState() == null ^ this.getDialogState() == null) return false; if (other.getDialogState() != null && other.getDialogState().equals(this.getDialogState()) == false) return false; if (other.getSlotToElicit() == null ^ this.getSlotToElicit() == null) return false; if (other.getSlotToElicit() != null && other.getSlotToElicit().equals(this.getSlotToElicit()) == false) return false; if (other.getResponseCard() == null ^ this.getResponseCard() == null) return false; if (other.getResponseCard() != null && other.getResponseCard().equals(this.getResponseCard()) == false) return false; if (other.getSessionId() == null ^ this.getSessionId() == null) return false; if (other.getSessionId() != null && other.getSessionId().equals(this.getSessionId()) == false) return false; if (other.getBotVersion() == null ^ this.getBotVersion() == null) return false; if (other.getBotVersion() != null && other.getBotVersion().equals(this.getBotVersion()) == false) return false; if (other.getActiveContexts() == null ^ this.getActiveContexts() == null) return false; if (other.getActiveContexts() != null && other.getActiveContexts().equals(this.getActiveContexts()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIntentName() == null) ? 0 : getIntentName().hashCode()); hashCode = prime * hashCode + ((getNluIntentConfidence() == null) ? 0 : getNluIntentConfidence().hashCode()); hashCode = prime * hashCode + ((getAlternativeIntents() == null) ? 0 : getAlternativeIntents().hashCode()); hashCode = prime * hashCode + ((getSlots() == null) ? 0 : getSlots().hashCode()); hashCode = prime * hashCode + ((getSessionAttributes() == null) ? 0 : getSessionAttributes().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getSentimentResponse() == null) ? 0 : getSentimentResponse().hashCode()); hashCode = prime * hashCode + ((getMessageFormat() == null) ? 0 : getMessageFormat().hashCode()); hashCode = prime * hashCode + ((getDialogState() == null) ? 0 : getDialogState().hashCode()); hashCode = prime * hashCode + ((getSlotToElicit() == null) ? 0 : getSlotToElicit().hashCode()); hashCode = prime * hashCode + ((getResponseCard() == null) ? 0 : getResponseCard().hashCode()); hashCode = prime * hashCode + ((getSessionId() == null) ? 0 : getSessionId().hashCode()); hashCode = prime * hashCode + ((getBotVersion() == null) ? 0 : getBotVersion().hashCode()); hashCode = prime * hashCode + ((getActiveContexts() == null) ? 0 : getActiveContexts().hashCode()); return hashCode; } @Override public PostTextResult clone() { try { return (PostTextResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }