/* * Copyright 2010-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.chimesdkidentity.model; import java.io.Serializable; /** *

* The configuration for an Amazon Lex V2 bot. *

*/ public class LexConfiguration implements Serializable { /** * *

* Deprecated. Use InvokedBy instead. *

*
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

*

* Constraints:
* Allowed Values: STANDARD_MESSAGES */ private String respondsTo; /** *

* Specifies the type of message that triggers a bot. *

*/ private InvokedBy invokedBy; /** *

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this format: * arn:aws:lex:REGION:ACCOUNT:bot-alias/MYBOTID/MYBOTALIAS *

*

* Constraints:
* Length: 15 - 2048
* Pattern: * arn:aws:lex:[a-z]{2}-[a-z]+-\d{1}:\d{12}:bot-alias/[A-Z0-9 * ]{10}/[A-Z0-9]{10}
*/ private String lexBotAliasArn; /** *

* Identifies the Amazon Lex V2 bot's language and locale. The string must * match one of the supported locales in Amazon Lex V2. All of the intents, * slot types, and slots used in the bot must have the same locale. For more * information, see Supported languages in the Amazon Lex V2 Developer Guide. *

*/ private String localeId; /** *

* The name of the welcome intent configured in the Amazon Lex V2 bot. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^([A-Za-z]_?)+$
*/ private String welcomeIntent; /** * *

* Deprecated. Use InvokedBy instead. *

* *

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

*

* Constraints:
* Allowed Values: STANDARD_MESSAGES * * @return *

* Deprecated. Use InvokedBy instead. *

* *

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

* @see RespondsTo */ public String getRespondsTo() { return respondsTo; } /** * *

* Deprecated. Use InvokedBy instead. *

*
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

*

* Constraints:
* Allowed Values: STANDARD_MESSAGES * * @param respondsTo *

* Deprecated. Use InvokedBy instead. *

* *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

* @see RespondsTo */ public void setRespondsTo(String respondsTo) { this.respondsTo = respondsTo; } /** * *

* Deprecated. Use InvokedBy instead. *

*
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

*

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

* Constraints:
* Allowed Values: STANDARD_MESSAGES * * @param respondsTo *

* Deprecated. Use InvokedBy instead. *

* *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

* @return A reference to this updated object so that method calls can be * chained together. * @see RespondsTo */ public LexConfiguration withRespondsTo(String respondsTo) { this.respondsTo = respondsTo; return this; } /** * *

* Deprecated. Use InvokedBy instead. *

*
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

*

* Constraints:
* Allowed Values: STANDARD_MESSAGES * * @param respondsTo *

* Deprecated. Use InvokedBy instead. *

* *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

* @see RespondsTo */ public void setRespondsTo(RespondsTo respondsTo) { this.respondsTo = respondsTo.toString(); } /** * *

* Deprecated. Use InvokedBy instead. *

*
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

*

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

* Constraints:
* Allowed Values: STANDARD_MESSAGES * * @param respondsTo *

* Deprecated. Use InvokedBy instead. *

* *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

* @return A reference to this updated object so that method calls can be * chained together. * @see RespondsTo */ public LexConfiguration withRespondsTo(RespondsTo respondsTo) { this.respondsTo = respondsTo.toString(); return this; } /** *

* Specifies the type of message that triggers a bot. *

* * @return

* Specifies the type of message that triggers a bot. *

*/ public InvokedBy getInvokedBy() { return invokedBy; } /** *

* Specifies the type of message that triggers a bot. *

* * @param invokedBy

* Specifies the type of message that triggers a bot. *

*/ public void setInvokedBy(InvokedBy invokedBy) { this.invokedBy = invokedBy; } /** *

* Specifies the type of message that triggers a bot. *

*

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

* Specifies the type of message that triggers a bot. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LexConfiguration withInvokedBy(InvokedBy invokedBy) { this.invokedBy = invokedBy; return this; } /** *

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this format: * arn:aws:lex:REGION:ACCOUNT:bot-alias/MYBOTID/MYBOTALIAS *

*

* Constraints:
* Length: 15 - 2048
* Pattern: * arn:aws:lex:[a-z]{2}-[a-z]+-\d{1}:\d{12}:bot-alias/[A-Z0-9 * ]{10}/[A-Z0-9]{10}
* * @return

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this * format: * arn:aws:lex:REGION:ACCOUNT:bot-alias/MYBOTID/MYBOTALIAS *

*/ public String getLexBotAliasArn() { return lexBotAliasArn; } /** *

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this format: * arn:aws:lex:REGION:ACCOUNT:bot-alias/MYBOTID/MYBOTALIAS *

*

* Constraints:
* Length: 15 - 2048
* Pattern: * arn:aws:lex:[a-z]{2}-[a-z]+-\d{1}:\d{12}:bot-alias/[A-Z0-9 * ]{10}/[A-Z0-9]{10}
* * @param lexBotAliasArn

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this * format: * arn:aws:lex:REGION:ACCOUNT:bot-alias/MYBOTID/MYBOTALIAS *

*/ public void setLexBotAliasArn(String lexBotAliasArn) { this.lexBotAliasArn = lexBotAliasArn; } /** *

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this format: * arn:aws:lex:REGION:ACCOUNT:bot-alias/MYBOTID/MYBOTALIAS *

*

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

* Constraints:
* Length: 15 - 2048
* Pattern: * arn:aws:lex:[a-z]{2}-[a-z]+-\d{1}:\d{12}:bot-alias/[A-Z0-9 * ]{10}/[A-Z0-9]{10}
* * @param lexBotAliasArn

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this * format: * arn:aws:lex:REGION:ACCOUNT:bot-alias/MYBOTID/MYBOTALIAS *

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

* Identifies the Amazon Lex V2 bot's language and locale. The string must * match one of the supported locales in Amazon Lex V2. All of the intents, * slot types, and slots used in the bot must have the same locale. For more * information, see Supported languages in the Amazon Lex V2 Developer Guide. *

* * @return

* Identifies the Amazon Lex V2 bot's language and locale. The * string must match one of the supported locales in Amazon Lex V2. * All of the intents, slot types, and slots used in the bot must * have the same locale. For more information, see Supported languages in the Amazon Lex V2 Developer * Guide. *

*/ public String getLocaleId() { return localeId; } /** *

* Identifies the Amazon Lex V2 bot's language and locale. The string must * match one of the supported locales in Amazon Lex V2. All of the intents, * slot types, and slots used in the bot must have the same locale. For more * information, see Supported languages in the Amazon Lex V2 Developer Guide. *

* * @param localeId

* Identifies the Amazon Lex V2 bot's language and locale. The * string must match one of the supported locales in Amazon Lex * V2. All of the intents, slot types, and slots used in the bot * must have the same locale. For more information, see Supported languages in the Amazon Lex V2 Developer * Guide. *

*/ public void setLocaleId(String localeId) { this.localeId = localeId; } /** *

* Identifies the Amazon Lex V2 bot's language and locale. The string must * match one of the supported locales in Amazon Lex V2. All of the intents, * slot types, and slots used in the bot must have the same locale. For more * information, see Supported languages in the Amazon Lex V2 Developer Guide. *

*

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

* Identifies the Amazon Lex V2 bot's language and locale. The * string must match one of the supported locales in Amazon Lex * V2. All of the intents, slot types, and slots used in the bot * must have the same locale. For more information, see Supported languages in the Amazon Lex V2 Developer * Guide. *

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

* The name of the welcome intent configured in the Amazon Lex V2 bot. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^([A-Za-z]_?)+$
* * @return

* The name of the welcome intent configured in the Amazon Lex V2 * bot. *

*/ public String getWelcomeIntent() { return welcomeIntent; } /** *

* The name of the welcome intent configured in the Amazon Lex V2 bot. *

*

* Constraints:
* Length: 1 - 100
* Pattern: ^([A-Za-z]_?)+$
* * @param welcomeIntent

* The name of the welcome intent configured in the Amazon Lex V2 * bot. *

*/ public void setWelcomeIntent(String welcomeIntent) { this.welcomeIntent = welcomeIntent; } /** *

* The name of the welcome intent configured in the Amazon Lex V2 bot. *

*

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

* Constraints:
* Length: 1 - 100
* Pattern: ^([A-Za-z]_?)+$
* * @param welcomeIntent

* The name of the welcome intent configured in the Amazon Lex V2 * bot. *

* @return A reference to this updated object so that method calls can be * chained together. */ public LexConfiguration withWelcomeIntent(String welcomeIntent) { this.welcomeIntent = welcomeIntent; 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 (getRespondsTo() != null) sb.append("RespondsTo: " + getRespondsTo() + ","); if (getInvokedBy() != null) sb.append("InvokedBy: " + getInvokedBy() + ","); if (getLexBotAliasArn() != null) sb.append("LexBotAliasArn: " + getLexBotAliasArn() + ","); if (getLocaleId() != null) sb.append("LocaleId: " + getLocaleId() + ","); if (getWelcomeIntent() != null) sb.append("WelcomeIntent: " + getWelcomeIntent()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRespondsTo() == null) ? 0 : getRespondsTo().hashCode()); hashCode = prime * hashCode + ((getInvokedBy() == null) ? 0 : getInvokedBy().hashCode()); hashCode = prime * hashCode + ((getLexBotAliasArn() == null) ? 0 : getLexBotAliasArn().hashCode()); hashCode = prime * hashCode + ((getLocaleId() == null) ? 0 : getLocaleId().hashCode()); hashCode = prime * hashCode + ((getWelcomeIntent() == null) ? 0 : getWelcomeIntent().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LexConfiguration == false) return false; LexConfiguration other = (LexConfiguration) obj; if (other.getRespondsTo() == null ^ this.getRespondsTo() == null) return false; if (other.getRespondsTo() != null && other.getRespondsTo().equals(this.getRespondsTo()) == false) return false; if (other.getInvokedBy() == null ^ this.getInvokedBy() == null) return false; if (other.getInvokedBy() != null && other.getInvokedBy().equals(this.getInvokedBy()) == false) return false; if (other.getLexBotAliasArn() == null ^ this.getLexBotAliasArn() == null) return false; if (other.getLexBotAliasArn() != null && other.getLexBotAliasArn().equals(this.getLexBotAliasArn()) == false) return false; if (other.getLocaleId() == null ^ this.getLocaleId() == null) return false; if (other.getLocaleId() != null && other.getLocaleId().equals(this.getLocaleId()) == false) return false; if (other.getWelcomeIntent() == null ^ this.getWelcomeIntent() == null) return false; if (other.getWelcomeIntent() != null && other.getWelcomeIntent().equals(this.getWelcomeIntent()) == false) return false; return true; } }