/* * 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; import com.amazonaws.AmazonWebServiceRequest; /** *

* Creates a new session or modifies an existing session with an Amazon Lex bot. * Use this operation to enable your application to set the state of the bot. *

*

* For more information, see Managing Sessions. *

*/ public class PutSessionRequest extends AmazonWebServiceRequest implements Serializable { /** *

* The name of the bot that contains the session data. *

*/ private String botName; /** *

* The alias in use for the bot that contains the session data. *

*/ private String botAlias; /** *

* The ID of the client application user. Amazon Lex uses this to identify a * user's conversation with your bot. *

*

* Constraints:
* Length: 2 - 100
* Pattern: [0-9a-zA-Z._:-]+
*/ private String userId; /** *

* Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *

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

* Sets the next action that the bot should take to fulfill the * conversation. *

*/ private DialogAction dialogAction; /** *

* A summary of the recent intents for the bot. You can use the intent * summary view to set a checkpoint label on an intent and modify attributes * of intents. You can also use it to remove or add intent summary objects * to the list. *

*

* An intent that you modify or add to the list must make sense for the bot. * For example, the intent name must be valid for the bot. You must provide * valid values for: *

* *

* If you send the recentIntentSummaryView parameter in a * PutSession request, the contents of the new summary view * replaces the old summary view. For example, if a GetSession * request returns three intents in the summary view and you call * PutSession with one intent in the summary view, the next * call to GetSession will only return one intent. *

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

* The message that Amazon Lex returns in the response can be either text or * speech based depending on the value of this field. *

* */ private String accept; /** *

* A list of contexts active for the request. A context can be activated * when a previous intent is fulfilled, or by including the context in the * request, *

*

* If you don't specify a list of contexts, Amazon Lex will use the current * list of contexts for the session. If you specify an empty list, all * contexts for the session are cleared. *

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

* The name of the bot that contains the session data. *

* * @return

* The name of the bot that contains the session data. *

*/ public String getBotName() { return botName; } /** *

* The name of the bot that contains the session data. *

* * @param botName

* The name of the bot that contains the session data. *

*/ public void setBotName(String botName) { this.botName = botName; } /** *

* The name of the bot that contains the session data. *

*

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

* The name of the bot that contains the session data. *

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

* The alias in use for the bot that contains the session data. *

* * @return

* The alias in use for the bot that contains the session data. *

*/ public String getBotAlias() { return botAlias; } /** *

* The alias in use for the bot that contains the session data. *

* * @param botAlias

* The alias in use for the bot that contains the session data. *

*/ public void setBotAlias(String botAlias) { this.botAlias = botAlias; } /** *

* The alias in use for the bot that contains the session data. *

*

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

* The alias in use for the bot that contains the session data. *

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

* The ID of the client application user. Amazon Lex uses this to identify a * user's conversation with your bot. *

*

* Constraints:
* Length: 2 - 100
* Pattern: [0-9a-zA-Z._:-]+
* * @return

* The ID of the client application user. Amazon Lex uses this to * identify a user's conversation with your bot. *

*/ public String getUserId() { return userId; } /** *

* The ID of the client application user. Amazon Lex uses this to identify a * user's conversation with your bot. *

*

* Constraints:
* Length: 2 - 100
* Pattern: [0-9a-zA-Z._:-]+
* * @param userId

* The ID of the client application user. Amazon Lex uses this to * identify a user's conversation with your bot. *

*/ public void setUserId(String userId) { this.userId = userId; } /** *

* The ID of the client application user. Amazon Lex uses this to identify a * user's conversation with your bot. *

*

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

* Constraints:
* Length: 2 - 100
* Pattern: [0-9a-zA-Z._:-]+
* * @param userId

* The ID of the client application user. Amazon Lex uses this to * identify a user's conversation with your bot. *

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

* Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *

* * @return

* Map of key/value pairs representing the session-specific context * information. It contains application information passed between * Amazon Lex and a client application. *

*/ public java.util.Map getSessionAttributes() { return sessionAttributes; } /** *

* Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *

* * @param sessionAttributes

* Map of key/value pairs representing the session-specific * context information. It contains application information * passed between Amazon Lex and a client application. *

*/ public void setSessionAttributes(java.util.Map sessionAttributes) { this.sessionAttributes = sessionAttributes; } /** *

* Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *

*

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

* Map of key/value pairs representing the session-specific * context information. It contains application information * passed between Amazon Lex and a client application. *

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

* Map of key/value pairs representing the session-specific context * information. It contains application information passed between Amazon * Lex and a client application. *

*

* The method adds a new key-value pair into sessionAttributes parameter, * and returns a reference to this object so that method calls can be * chained together. * * @param key The key of the entry to be added into sessionAttributes. * @param value The corresponding value of the entry to be added into * sessionAttributes. * @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest 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. *

* Returns a reference to this object so that method calls can be chained * together. */ public PutSessionRequest clearsessionAttributesEntries() { this.sessionAttributes = null; return this; } /** *

* Sets the next action that the bot should take to fulfill the * conversation. *

* * @return

* Sets the next action that the bot should take to fulfill the * conversation. *

*/ public DialogAction getDialogAction() { return dialogAction; } /** *

* Sets the next action that the bot should take to fulfill the * conversation. *

* * @param dialogAction

* Sets the next action that the bot should take to fulfill the * conversation. *

*/ public void setDialogAction(DialogAction dialogAction) { this.dialogAction = dialogAction; } /** *

* Sets the next action that the bot should take to fulfill the * conversation. *

*

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

* Sets the next action that the bot should take to fulfill the * conversation. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withDialogAction(DialogAction dialogAction) { this.dialogAction = dialogAction; return this; } /** *

* A summary of the recent intents for the bot. You can use the intent * summary view to set a checkpoint label on an intent and modify attributes * of intents. You can also use it to remove or add intent summary objects * to the list. *

*

* An intent that you modify or add to the list must make sense for the bot. * For example, the intent name must be valid for the bot. You must provide * valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter in a * PutSession request, the contents of the new summary view * replaces the old summary view. For example, if a GetSession * request returns three intents in the summary view and you call * PutSession with one intent in the summary view, the next * call to GetSession will only return one intent. *

* * @return

* A summary of the recent intents for the bot. You can use the * intent summary view to set a checkpoint label on an intent and * modify attributes of intents. You can also use it to remove or * add intent summary objects to the list. *

*

* An intent that you modify or add to the list must make sense for * the bot. For example, the intent name must be valid for the bot. * You must provide valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter in * a PutSession request, the contents of the new * summary view replaces the old summary view. For example, if a * GetSession request returns three intents in the * summary view and you call PutSession with one intent * in the summary view, the next call to GetSession * will only return one intent. *

*/ public java.util.List getRecentIntentSummaryView() { return recentIntentSummaryView; } /** *

* A summary of the recent intents for the bot. You can use the intent * summary view to set a checkpoint label on an intent and modify attributes * of intents. You can also use it to remove or add intent summary objects * to the list. *

*

* An intent that you modify or add to the list must make sense for the bot. * For example, the intent name must be valid for the bot. You must provide * valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter in a * PutSession request, the contents of the new summary view * replaces the old summary view. For example, if a GetSession * request returns three intents in the summary view and you call * PutSession with one intent in the summary view, the next * call to GetSession will only return one intent. *

* * @param recentIntentSummaryView

* A summary of the recent intents for the bot. You can use the * intent summary view to set a checkpoint label on an intent and * modify attributes of intents. You can also use it to remove or * add intent summary objects to the list. *

*

* An intent that you modify or add to the list must make sense * for the bot. For example, the intent name must be valid for * the bot. You must provide valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter * in a PutSession request, the contents of the new * summary view replaces the old summary view. For example, if a * GetSession request returns three intents in the * summary view and you call PutSession with one * intent in the summary view, the next call to * GetSession will only return one intent. *

*/ public void setRecentIntentSummaryView( java.util.Collection recentIntentSummaryView) { if (recentIntentSummaryView == null) { this.recentIntentSummaryView = null; return; } this.recentIntentSummaryView = new java.util.ArrayList( recentIntentSummaryView); } /** *

* A summary of the recent intents for the bot. You can use the intent * summary view to set a checkpoint label on an intent and modify attributes * of intents. You can also use it to remove or add intent summary objects * to the list. *

*

* An intent that you modify or add to the list must make sense for the bot. * For example, the intent name must be valid for the bot. You must provide * valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter in a * PutSession request, the contents of the new summary view * replaces the old summary view. For example, if a GetSession * request returns three intents in the summary view and you call * PutSession with one intent in the summary view, the next * call to GetSession will only return one intent. *

*

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

* A summary of the recent intents for the bot. You can use the * intent summary view to set a checkpoint label on an intent and * modify attributes of intents. You can also use it to remove or * add intent summary objects to the list. *

*

* An intent that you modify or add to the list must make sense * for the bot. For example, the intent name must be valid for * the bot. You must provide valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter * in a PutSession request, the contents of the new * summary view replaces the old summary view. For example, if a * GetSession request returns three intents in the * summary view and you call PutSession with one * intent in the summary view, the next call to * GetSession will only return one intent. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withRecentIntentSummaryView(IntentSummary... recentIntentSummaryView) { if (getRecentIntentSummaryView() == null) { this.recentIntentSummaryView = new java.util.ArrayList( recentIntentSummaryView.length); } for (IntentSummary value : recentIntentSummaryView) { this.recentIntentSummaryView.add(value); } return this; } /** *

* A summary of the recent intents for the bot. You can use the intent * summary view to set a checkpoint label on an intent and modify attributes * of intents. You can also use it to remove or add intent summary objects * to the list. *

*

* An intent that you modify or add to the list must make sense for the bot. * For example, the intent name must be valid for the bot. You must provide * valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter in a * PutSession request, the contents of the new summary view * replaces the old summary view. For example, if a GetSession * request returns three intents in the summary view and you call * PutSession with one intent in the summary view, the next * call to GetSession will only return one intent. *

*

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

* A summary of the recent intents for the bot. You can use the * intent summary view to set a checkpoint label on an intent and * modify attributes of intents. You can also use it to remove or * add intent summary objects to the list. *

*

* An intent that you modify or add to the list must make sense * for the bot. For example, the intent name must be valid for * the bot. You must provide valid values for: *

*
    *
  • *

    * intentName *

    *
  • *
  • *

    * slot names *

    *
  • *
  • *

    * slotToElict *

    *
  • *
*

* If you send the recentIntentSummaryView parameter * in a PutSession request, the contents of the new * summary view replaces the old summary view. For example, if a * GetSession request returns three intents in the * summary view and you call PutSession with one * intent in the summary view, the next call to * GetSession will only return one intent. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withRecentIntentSummaryView( java.util.Collection recentIntentSummaryView) { setRecentIntentSummaryView(recentIntentSummaryView); return this; } /** *

* The message that Amazon Lex returns in the response can be either text or * speech based depending on the value of this field. *

*
    *
  • *

    * If the value is text/plain; charset=utf-8, Amazon Lex * returns text in the response. *

    *
  • *
  • *

    * If the value begins with audio/, Amazon Lex returns speech * in the response. Amazon Lex uses Amazon Polly to generate the speech in * the configuration that you specify. For example, if you specify * audio/mpeg as the value, Amazon Lex returns speech in the * MPEG format. *

    *
  • *
  • *

    * If the value is audio/pcm, the speech is returned as * audio/pcm in 16-bit, little endian format. *

    *
  • *
  • *

    * The following are the accepted values: *

    *
      *
    • *

      * audio/mpeg *

      *
    • *
    • *

      * audio/ogg *

      *
    • *
    • *

      * audio/pcm *

      *
    • *
    • *

      * audio/* (defaults to mpeg) *

      *
    • *
    • *

      * text/plain; charset=utf-8 *

      *
    • *
    *
  • *
* * @return

* The message that Amazon Lex returns in the response can be either * text or speech based depending on the value of this field. *

*
    *
  • *

    * If the value is text/plain; charset=utf-8, Amazon * Lex returns text in the response. *

    *
  • *
  • *

    * If the value begins with audio/, Amazon Lex returns * speech in the response. Amazon Lex uses Amazon Polly to generate * the speech in the configuration that you specify. For example, if * you specify audio/mpeg as the value, Amazon Lex * returns speech in the MPEG format. *

    *
  • *
  • *

    * If the value is audio/pcm, the speech is returned as * audio/pcm in 16-bit, little endian format. *

    *
  • *
  • *

    * The following are the accepted values: *

    *
      *
    • *

      * audio/mpeg *

      *
    • *
    • *

      * audio/ogg *

      *
    • *
    • *

      * audio/pcm *

      *
    • *
    • *

      * audio/* (defaults to mpeg) *

      *
    • *
    • *

      * text/plain; charset=utf-8 *

      *
    • *
    *
  • *
*/ public String getAccept() { return accept; } /** *

* The message that Amazon Lex returns in the response can be either text or * speech based depending on the value of this field. *

*
    *
  • *

    * If the value is text/plain; charset=utf-8, Amazon Lex * returns text in the response. *

    *
  • *
  • *

    * If the value begins with audio/, Amazon Lex returns speech * in the response. Amazon Lex uses Amazon Polly to generate the speech in * the configuration that you specify. For example, if you specify * audio/mpeg as the value, Amazon Lex returns speech in the * MPEG format. *

    *
  • *
  • *

    * If the value is audio/pcm, the speech is returned as * audio/pcm in 16-bit, little endian format. *

    *
  • *
  • *

    * The following are the accepted values: *

    *
      *
    • *

      * audio/mpeg *

      *
    • *
    • *

      * audio/ogg *

      *
    • *
    • *

      * audio/pcm *

      *
    • *
    • *

      * audio/* (defaults to mpeg) *

      *
    • *
    • *

      * text/plain; charset=utf-8 *

      *
    • *
    *
  • *
* * @param accept

* The message that Amazon Lex returns in the response can be * either text or speech based depending on the value of this * field. *

*
    *
  • *

    * If the value is text/plain; charset=utf-8, Amazon * Lex returns text in the response. *

    *
  • *
  • *

    * If the value begins with audio/, Amazon Lex * returns speech in the response. Amazon Lex uses Amazon Polly * to generate the speech in the configuration that you specify. * For example, if you specify audio/mpeg as the * value, Amazon Lex returns speech in the MPEG format. *

    *
  • *
  • *

    * If the value is audio/pcm, the speech is returned * as audio/pcm in 16-bit, little endian format. *

    *
  • *
  • *

    * The following are the accepted values: *

    *
      *
    • *

      * audio/mpeg *

      *
    • *
    • *

      * audio/ogg *

      *
    • *
    • *

      * audio/pcm *

      *
    • *
    • *

      * audio/* (defaults to mpeg) *

      *
    • *
    • *

      * text/plain; charset=utf-8 *

      *
    • *
    *
  • *
*/ public void setAccept(String accept) { this.accept = accept; } /** *

* The message that Amazon Lex returns in the response can be either text or * speech based depending on the value of this field. *

*
    *
  • *

    * If the value is text/plain; charset=utf-8, Amazon Lex * returns text in the response. *

    *
  • *
  • *

    * If the value begins with audio/, Amazon Lex returns speech * in the response. Amazon Lex uses Amazon Polly to generate the speech in * the configuration that you specify. For example, if you specify * audio/mpeg as the value, Amazon Lex returns speech in the * MPEG format. *

    *
  • *
  • *

    * If the value is audio/pcm, the speech is returned as * audio/pcm in 16-bit, little endian format. *

    *
  • *
  • *

    * The following are the accepted values: *

    *
      *
    • *

      * audio/mpeg *

      *
    • *
    • *

      * audio/ogg *

      *
    • *
    • *

      * audio/pcm *

      *
    • *
    • *

      * audio/* (defaults to mpeg) *

      *
    • *
    • *

      * text/plain; charset=utf-8 *

      *
    • *
    *
  • *
*

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

* The message that Amazon Lex returns in the response can be * either text or speech based depending on the value of this * field. *

*
    *
  • *

    * If the value is text/plain; charset=utf-8, Amazon * Lex returns text in the response. *

    *
  • *
  • *

    * If the value begins with audio/, Amazon Lex * returns speech in the response. Amazon Lex uses Amazon Polly * to generate the speech in the configuration that you specify. * For example, if you specify audio/mpeg as the * value, Amazon Lex returns speech in the MPEG format. *

    *
  • *
  • *

    * If the value is audio/pcm, the speech is returned * as audio/pcm in 16-bit, little endian format. *

    *
  • *
  • *

    * The following are the accepted values: *

    *
      *
    • *

      * audio/mpeg *

      *
    • *
    • *

      * audio/ogg *

      *
    • *
    • *

      * audio/pcm *

      *
    • *
    • *

      * audio/* (defaults to mpeg) *

      *
    • *
    • *

      * text/plain; charset=utf-8 *

      *
    • *
    *
  • *
* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withAccept(String accept) { this.accept = accept; return this; } /** *

* A list of contexts active for the request. A context can be activated * when a previous intent is fulfilled, or by including the context in the * request, *

*

* If you don't specify a list of contexts, Amazon Lex will use the current * list of contexts for the session. If you specify an empty list, all * contexts for the session are cleared. *

* * @return

* A list of contexts active for the request. A context can be * activated when a previous intent is fulfilled, or by including * the context in the request, *

*

* If you don't specify a list of contexts, Amazon Lex will use the * current list of contexts for the session. If you specify an empty * list, all contexts for the session are cleared. *

*/ public java.util.List getActiveContexts() { return activeContexts; } /** *

* A list of contexts active for the request. A context can be activated * when a previous intent is fulfilled, or by including the context in the * request, *

*

* If you don't specify a list of contexts, Amazon Lex will use the current * list of contexts for the session. If you specify an empty list, all * contexts for the session are cleared. *

* * @param activeContexts

* A list of contexts active for the request. A context can be * activated when a previous intent is fulfilled, or by including * the context in the request, *

*

* If you don't specify a list of contexts, Amazon Lex will use * the current list of contexts for the session. If you specify * an empty list, all contexts for the session are cleared. *

*/ public void setActiveContexts(java.util.Collection activeContexts) { if (activeContexts == null) { this.activeContexts = null; return; } this.activeContexts = new java.util.ArrayList(activeContexts); } /** *

* A list of contexts active for the request. A context can be activated * when a previous intent is fulfilled, or by including the context in the * request, *

*

* If you don't specify a list of contexts, Amazon Lex will use the current * list of contexts for the session. If you specify an empty list, all * contexts for the session are cleared. *

*

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

* A list of contexts active for the request. A context can be * activated when a previous intent is fulfilled, or by including * the context in the request, *

*

* If you don't specify a list of contexts, Amazon Lex will use * the current list of contexts for the session. If you specify * an empty list, all contexts for the session are cleared. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withActiveContexts(ActiveContext... activeContexts) { if (getActiveContexts() == null) { this.activeContexts = new java.util.ArrayList(activeContexts.length); } for (ActiveContext value : activeContexts) { this.activeContexts.add(value); } return this; } /** *

* A list of contexts active for the request. A context can be activated * when a previous intent is fulfilled, or by including the context in the * request, *

*

* If you don't specify a list of contexts, Amazon Lex will use the current * list of contexts for the session. If you specify an empty list, all * contexts for the session are cleared. *

*

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

* A list of contexts active for the request. A context can be * activated when a previous intent is fulfilled, or by including * the context in the request, *

*

* If you don't specify a list of contexts, Amazon Lex will use * the current list of contexts for the session. If you specify * an empty list, all contexts for the session are cleared. *

* @return A reference to this updated object so that method calls can be * chained together. */ public PutSessionRequest withActiveContexts(java.util.Collection activeContexts) { setActiveContexts(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 (getBotName() != null) sb.append("botName: " + getBotName() + ","); if (getBotAlias() != null) sb.append("botAlias: " + getBotAlias() + ","); if (getUserId() != null) sb.append("userId: " + getUserId() + ","); if (getSessionAttributes() != null) sb.append("sessionAttributes: " + getSessionAttributes() + ","); if (getDialogAction() != null) sb.append("dialogAction: " + getDialogAction() + ","); if (getRecentIntentSummaryView() != null) sb.append("recentIntentSummaryView: " + getRecentIntentSummaryView() + ","); if (getAccept() != null) sb.append("accept: " + getAccept() + ","); 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 + ((getBotName() == null) ? 0 : getBotName().hashCode()); hashCode = prime * hashCode + ((getBotAlias() == null) ? 0 : getBotAlias().hashCode()); hashCode = prime * hashCode + ((getUserId() == null) ? 0 : getUserId().hashCode()); hashCode = prime * hashCode + ((getSessionAttributes() == null) ? 0 : getSessionAttributes().hashCode()); hashCode = prime * hashCode + ((getDialogAction() == null) ? 0 : getDialogAction().hashCode()); hashCode = prime * hashCode + ((getRecentIntentSummaryView() == null) ? 0 : getRecentIntentSummaryView() .hashCode()); hashCode = prime * hashCode + ((getAccept() == null) ? 0 : getAccept().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 PutSessionRequest == false) return false; PutSessionRequest other = (PutSessionRequest) obj; if (other.getBotName() == null ^ this.getBotName() == null) return false; if (other.getBotName() != null && other.getBotName().equals(this.getBotName()) == false) return false; if (other.getBotAlias() == null ^ this.getBotAlias() == null) return false; if (other.getBotAlias() != null && other.getBotAlias().equals(this.getBotAlias()) == false) return false; if (other.getUserId() == null ^ this.getUserId() == null) return false; if (other.getUserId() != null && other.getUserId().equals(this.getUserId()) == 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.getDialogAction() == null ^ this.getDialogAction() == null) return false; if (other.getDialogAction() != null && other.getDialogAction().equals(this.getDialogAction()) == false) return false; if (other.getRecentIntentSummaryView() == null ^ this.getRecentIntentSummaryView() == null) return false; if (other.getRecentIntentSummaryView() != null && other.getRecentIntentSummaryView().equals(this.getRecentIntentSummaryView()) == false) return false; if (other.getAccept() == null ^ this.getAccept() == null) return false; if (other.getAccept() != null && other.getAccept().equals(this.getAccept()) == 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; } }