/* * Copyright 2010-2021 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.lexrts.model; import java.io.Serializable; public class PutSessionResult implements Serializable { /** *

* Content type as specified in the Accept HTTP header in the * request. *

*/ private String contentType; /** *

* The name of the current intent. *

*/ private String intentName; /** *

* Map of zero or more intent slots Amazon Lex detected from the user input * during 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 String slots; /** *

* Map of key/value pairs representing session-specific context information. *

*/ private String sessionAttributes; /** *

* The next message that should be presented to the user. *

*

* You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, * es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the * message field is null. You should use the * encodedMessage field instead. *

*

* Constraints:
* Length: 1 - 1024
*/ private String message; /** *

* The next message that should be presented to the user. *

*

* The encodedMessage field is base-64 encoded. You must decode * the field before you can use the value. *

*

* Constraints:
* Length: 1 - 1366
*/ private String encodedMessage; /** *

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

* *

* Constraints:
* Allowed Values: PlainText, CustomPayload, SSML, Composite */ private String messageFormat; /** *

*

*

* Constraints:
* Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, * Fulfilled, ReadyForFulfillment, Failed */ private String dialogState; /** *

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

*/ private String slotToElicit; /** *

* The audio version of the message to convey to the user. *

*/ private java.io.InputStream audioStream; /** *

* A unique identifier for the session. *

*/ private String sessionId; /** *

* A list of active contexts for the session. *

*/ private String activeContexts; /** *

* Content type as specified in the Accept HTTP header in the * request. *

* * @return

* Content type as specified in the Accept HTTP header * in the request. *

*/ public String getContentType() { return contentType; } /** *

* Content type as specified in the Accept HTTP header in the * request. *

* * @param contentType

* Content type as specified in the Accept HTTP * header in the request. *

*/ public void setContentType(String contentType) { this.contentType = contentType; } /** *

* Content type as specified in the Accept HTTP header in the * request. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param contentType

* Content type as specified in the Accept HTTP * header in the request. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withContentType(String contentType) { this.contentType = contentType; return this; } /** *

* The name of the current intent. *

* * @return

* The name of the current intent. *

*/ public String getIntentName() { return intentName; } /** *

* The name of the current intent. *

* * @param intentName

* The name of the current intent. *

*/ public void setIntentName(String intentName) { this.intentName = intentName; } /** *

* The name of the current intent. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param intentName

* The name of the current intent. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withIntentName(String intentName) { this.intentName = intentName; return this; } /** *

* Map of zero or more intent slots Amazon Lex detected from the user input * during 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

* Map of zero or more intent slots Amazon Lex detected from the * user input during 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 String getSlots() { return slots; } /** *

* Map of zero or more intent slots Amazon Lex detected from the user input * during 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

* Map of zero or more intent slots Amazon Lex detected from the * user input during 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(String slots) { this.slots = slots; } /** *

* Map of zero or more intent slots Amazon Lex detected from the user input * during 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param slots

* Map of zero or more intent slots Amazon Lex detected from the * user input during 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 A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withSlots(String slots) { this.slots = slots; return this; } /** *

* Map of key/value pairs representing session-specific context information. *

* * @return

* Map of key/value pairs representing session-specific context * information. *

*/ public String getSessionAttributes() { return sessionAttributes; } /** *

* Map of key/value pairs representing session-specific context information. *

* * @param sessionAttributes

* Map of key/value pairs representing session-specific context * information. *

*/ public void setSessionAttributes(String sessionAttributes) { this.sessionAttributes = sessionAttributes; } /** *

* Map of key/value pairs representing session-specific context information. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param sessionAttributes

* Map of key/value pairs representing session-specific context * information. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withSessionAttributes(String sessionAttributes) { this.sessionAttributes = sessionAttributes; return this; } /** *

* The next message that should be presented to the user. *

*

* You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, * es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the * message field is null. You should use the * encodedMessage field instead. *

*

* Constraints:
* Length: 1 - 1024
* * @return

* The next message that should be presented to the user. *

*

* You can only use this field in the de-DE, en-AU, en-GB, en-US, * es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all * other locales, the message field is null. You should * use the encodedMessage field instead. *

*/ public String getMessage() { return message; } /** *

* The next message that should be presented to the user. *

*

* You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, * es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the * message field is null. You should use the * encodedMessage field instead. *

*

* Constraints:
* Length: 1 - 1024
* * @param message

* The next message that should be presented to the user. *

*

* You can only use this field in the de-DE, en-AU, en-GB, en-US, * es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all * other locales, the message field is null. You * should use the encodedMessage field instead. *

*/ public void setMessage(String message) { this.message = message; } /** *

* The next message that should be presented to the user. *

*

* You can only use this field in the de-DE, en-AU, en-GB, en-US, es-419, * es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all other locales, the * message field is null. You should use the * encodedMessage field instead. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 1024
* * @param message

* The next message that should be presented to the user. *

*

* You can only use this field in the de-DE, en-AU, en-GB, en-US, * es-419, es-ES, es-US, fr-CA, fr-FR, and it-IT locales. In all * other locales, the message field is null. You * should use the encodedMessage field instead. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withMessage(String message) { this.message = message; return this; } /** *

* The next message that should be presented to the user. *

*

* The encodedMessage field is base-64 encoded. You must decode * the field before you can use the value. *

*

* Constraints:
* Length: 1 - 1366
* * @return

* The next message that should be presented to the user. *

*

* The encodedMessage field is base-64 encoded. You * must decode the field before you can use the value. *

*/ public String getEncodedMessage() { return encodedMessage; } /** *

* The next message that should be presented to the user. *

*

* The encodedMessage field is base-64 encoded. You must decode * the field before you can use the value. *

*

* Constraints:
* Length: 1 - 1366
* * @param encodedMessage

* The next message that should be presented to the user. *

*

* The encodedMessage field is base-64 encoded. You * must decode the field before you can use the value. *

*/ public void setEncodedMessage(String encodedMessage) { this.encodedMessage = encodedMessage; } /** *

* The next message that should be presented to the user. *

*

* The encodedMessage field is base-64 encoded. You must decode * the field before you can use the value. *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Length: 1 - 1366
* * @param encodedMessage

* The next message that should be presented to the user. *

*

* The encodedMessage field is base-64 encoded. You * must decode the field before you can use the value. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withEncodedMessage(String encodedMessage) { this.encodedMessage = encodedMessage; return this; } /** *

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

* *

* Constraints:
* Allowed Values: PlainText, CustomPayload, SSML, Composite * * @return

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

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

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

* *

* Constraints:
* Allowed Values: PlainText, CustomPayload, SSML, Composite * * @param messageFormat

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

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

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

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: PlainText, CustomPayload, SSML, Composite * * @param messageFormat

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

* * @return A reference to this updated object so that method calls can be * chained together. * @see MessageFormatType */ public PutSessionResult withMessageFormat(String messageFormat) { this.messageFormat = messageFormat; return this; } /** *

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

* *

* Constraints:
* Allowed Values: PlainText, CustomPayload, SSML, Composite * * @param messageFormat

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

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

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

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: PlainText, CustomPayload, SSML, Composite * * @param messageFormat

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

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

*

*

* Constraints:
* Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, * Fulfilled, ReadyForFulfillment, Failed * * @return

*

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

*

*

* Constraints:
* Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, * Fulfilled, ReadyForFulfillment, Failed * * @param dialogState

*

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

*

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, * Fulfilled, ReadyForFulfillment, Failed * * @param dialogState

*

* @return A reference to this updated object so that method calls can be * chained together. * @see DialogState */ public PutSessionResult withDialogState(String dialogState) { this.dialogState = dialogState; return this; } /** *

*

*

* Constraints:
* Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, * Fulfilled, ReadyForFulfillment, Failed * * @param dialogState

*

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

*

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: ElicitIntent, ConfirmIntent, ElicitSlot, * Fulfilled, ReadyForFulfillment, Failed * * @param dialogState

*

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

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

* * @return

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

*/ public String getSlotToElicit() { return slotToElicit; } /** *

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

* * @param slotToElicit

* If the dialogState 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 is ElicitSlot, returns the * name of the slot for which Amazon Lex is eliciting a value. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param slotToElicit

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

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withSlotToElicit(String slotToElicit) { this.slotToElicit = slotToElicit; return this; } /** *

* The audio version of the message to convey to the user. *

* * @return

* The audio version of the message to convey to the user. *

*/ public java.io.InputStream getAudioStream() { return audioStream; } /** *

* The audio version of the message to convey to the user. *

* * @param audioStream

* The audio version of the message to convey to the user. *

*/ public void setAudioStream(java.io.InputStream audioStream) { this.audioStream = audioStream; } /** *

* The audio version of the message to convey to the user. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param audioStream

* The audio version of the message to convey to the user. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withAudioStream(java.io.InputStream audioStream) { this.audioStream = audioStream; return this; } /** *

* A unique identifier for the session. *

* * @return

* A unique identifier for the session. *

*/ public String getSessionId() { return sessionId; } /** *

* 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. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param sessionId

* A unique identifier for the session. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withSessionId(String sessionId) { this.sessionId = sessionId; return this; } /** *

* A list of active contexts for the session. *

* * @return

* A list of active contexts for the session. *

*/ public String getActiveContexts() { return activeContexts; } /** *

* A list of active contexts for the session. *

* * @param activeContexts

* A list of active contexts for the session. *

*/ public void setActiveContexts(String activeContexts) { this.activeContexts = activeContexts; } /** *

* A list of active contexts for the session. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param activeContexts

* A list of active contexts for the session. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionResult withActiveContexts(String activeContexts) { this.activeContexts = activeContexts; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getContentType() != null) sb.append("contentType: " + getContentType() + ","); if (getIntentName() != null) sb.append("intentName: " + getIntentName() + ","); if (getSlots() != null) sb.append("slots: " + getSlots() + ","); if (getSessionAttributes() != null) sb.append("sessionAttributes: " + getSessionAttributes() + ","); if (getMessage() != null) sb.append("message: " + getMessage() + ","); if (getEncodedMessage() != null) sb.append("encodedMessage: " + getEncodedMessage() + ","); if (getMessageFormat() != null) sb.append("messageFormat: " + getMessageFormat() + ","); if (getDialogState() != null) sb.append("dialogState: " + getDialogState() + ","); if (getSlotToElicit() != null) sb.append("slotToElicit: " + getSlotToElicit() + ","); if (getAudioStream() != null) sb.append("audioStream: " + getAudioStream() + ","); if (getSessionId() != null) sb.append("sessionId: " + getSessionId() + ","); if (getActiveContexts() != null) sb.append("activeContexts: " + getActiveContexts()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode()); hashCode = prime * hashCode + ((getIntentName() == null) ? 0 : getIntentName().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 + ((getEncodedMessage() == null) ? 0 : getEncodedMessage().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 + ((getAudioStream() == null) ? 0 : getAudioStream().hashCode()); hashCode = prime * hashCode + ((getSessionId() == null) ? 0 : getSessionId().hashCode()); hashCode = prime * hashCode + ((getActiveContexts() == null) ? 0 : getActiveContexts().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PutSessionResult == false) return false; PutSessionResult other = (PutSessionResult) obj; if (other.getContentType() == null ^ this.getContentType() == null) return false; if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == false) return false; if (other.getIntentName() == null ^ this.getIntentName() == null) return false; if (other.getIntentName() != null && other.getIntentName().equals(this.getIntentName()) == 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.getEncodedMessage() == null ^ this.getEncodedMessage() == null) return false; if (other.getEncodedMessage() != null && other.getEncodedMessage().equals(this.getEncodedMessage()) == 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.getAudioStream() == null ^ this.getAudioStream() == null) return false; if (other.getAudioStream() != null && other.getAudioStream().equals(this.getAudioStream()) == 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.getActiveContexts() == null ^ this.getActiveContexts() == null) return false; if (other.getActiveContexts() != null && other.getActiveContexts().equals(this.getActiveContexts()) == false) return false; return true; } }