/* * 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.lexmodelsv2.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateBotAliasRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The alias to create. The name must be unique for the bot. *

*/ private String botAliasName; /** *

* A description of the alias. Use this description to help identify the alias. *

*/ private String description; /** *

* The version of the bot that this alias points to. You can use the UpdateBotAlias operation * to change the bot version associated with the alias. *

*/ private String botVersion; /** *

* Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda * function to run different functions in different locales. *

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

* Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation * logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. * Audio logs store audio input in Amazon S3. *

*/ private ConversationLogSettings conversationLogSettings; private SentimentAnalysisSettings sentimentAnalysisSettings; /** *

* The unique identifier of the bot that the alias applies to. *

*/ private String botId; /** *

* A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the * UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the * TagResource operation. *

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

* The alias to create. The name must be unique for the bot. *

* * @param botAliasName * The alias to create. The name must be unique for the bot. */ public void setBotAliasName(String botAliasName) { this.botAliasName = botAliasName; } /** *

* The alias to create. The name must be unique for the bot. *

* * @return The alias to create. The name must be unique for the bot. */ public String getBotAliasName() { return this.botAliasName; } /** *

* The alias to create. The name must be unique for the bot. *

* * @param botAliasName * The alias to create. The name must be unique for the bot. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withBotAliasName(String botAliasName) { setBotAliasName(botAliasName); return this; } /** *

* A description of the alias. Use this description to help identify the alias. *

* * @param description * A description of the alias. Use this description to help identify the alias. */ public void setDescription(String description) { this.description = description; } /** *

* A description of the alias. Use this description to help identify the alias. *

* * @return A description of the alias. Use this description to help identify the alias. */ public String getDescription() { return this.description; } /** *

* A description of the alias. Use this description to help identify the alias. *

* * @param description * A description of the alias. Use this description to help identify the alias. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withDescription(String description) { setDescription(description); return this; } /** *

* The version of the bot that this alias points to. You can use the UpdateBotAlias operation * to change the bot version associated with the alias. *

* * @param botVersion * The version of the bot that this alias points to. You can use the UpdateBotAlias * operation to change the bot version associated with the alias. */ public void setBotVersion(String botVersion) { this.botVersion = botVersion; } /** *

* The version of the bot that this alias points to. You can use the UpdateBotAlias operation * to change the bot version associated with the alias. *

* * @return The version of the bot that this alias points to. You can use the UpdateBotAlias * operation to change the bot version associated with the alias. */ public String getBotVersion() { return this.botVersion; } /** *

* The version of the bot that this alias points to. You can use the UpdateBotAlias operation * to change the bot version associated with the alias. *

* * @param botVersion * The version of the bot that this alias points to. You can use the UpdateBotAlias * operation to change the bot version associated with the alias. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withBotVersion(String botVersion) { setBotVersion(botVersion); return this; } /** *

* Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda * function to run different functions in different locales. *

* * @return Maps configuration information to a specific locale. You can use this parameter to specify a specific * Lambda function to run different functions in different locales. */ public java.util.Map getBotAliasLocaleSettings() { return botAliasLocaleSettings; } /** *

* Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda * function to run different functions in different locales. *

* * @param botAliasLocaleSettings * Maps configuration information to a specific locale. You can use this parameter to specify a specific * Lambda function to run different functions in different locales. */ public void setBotAliasLocaleSettings(java.util.Map botAliasLocaleSettings) { this.botAliasLocaleSettings = botAliasLocaleSettings; } /** *

* Maps configuration information to a specific locale. You can use this parameter to specify a specific Lambda * function to run different functions in different locales. *

* * @param botAliasLocaleSettings * Maps configuration information to a specific locale. You can use this parameter to specify a specific * Lambda function to run different functions in different locales. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withBotAliasLocaleSettings(java.util.Map botAliasLocaleSettings) { setBotAliasLocaleSettings(botAliasLocaleSettings); return this; } /** * Add a single BotAliasLocaleSettings entry * * @see CreateBotAliasRequest#withBotAliasLocaleSettings * @returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest addBotAliasLocaleSettingsEntry(String key, BotAliasLocaleSettings value) { if (null == this.botAliasLocaleSettings) { this.botAliasLocaleSettings = new java.util.HashMap(); } if (this.botAliasLocaleSettings.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.botAliasLocaleSettings.put(key, value); return this; } /** * Removes all the entries added into BotAliasLocaleSettings. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest clearBotAliasLocaleSettingsEntries() { this.botAliasLocaleSettings = null; return this; } /** *

* Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation * logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. * Audio logs store audio input in Amazon S3. *

* * @param conversationLogSettings * Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable * conversation logs, text logs store text input, transcripts of audio input, and associated metadata in * Amazon CloudWatch Logs. Audio logs store audio input in Amazon S3. */ public void setConversationLogSettings(ConversationLogSettings conversationLogSettings) { this.conversationLogSettings = conversationLogSettings; } /** *

* Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation * logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. * Audio logs store audio input in Amazon S3. *

* * @return Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable * conversation logs, text logs store text input, transcripts of audio input, and associated metadata in * Amazon CloudWatch Logs. Audio logs store audio input in Amazon S3. */ public ConversationLogSettings getConversationLogSettings() { return this.conversationLogSettings; } /** *

* Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable conversation * logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch Logs. * Audio logs store audio input in Amazon S3. *

* * @param conversationLogSettings * Specifies whether Amazon Lex logs text and audio for a conversation with the bot. When you enable * conversation logs, text logs store text input, transcripts of audio input, and associated metadata in * Amazon CloudWatch Logs. Audio logs store audio input in Amazon S3. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withConversationLogSettings(ConversationLogSettings conversationLogSettings) { setConversationLogSettings(conversationLogSettings); return this; } /** * @param sentimentAnalysisSettings */ public void setSentimentAnalysisSettings(SentimentAnalysisSettings sentimentAnalysisSettings) { this.sentimentAnalysisSettings = sentimentAnalysisSettings; } /** * @return */ public SentimentAnalysisSettings getSentimentAnalysisSettings() { return this.sentimentAnalysisSettings; } /** * @param sentimentAnalysisSettings * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withSentimentAnalysisSettings(SentimentAnalysisSettings sentimentAnalysisSettings) { setSentimentAnalysisSettings(sentimentAnalysisSettings); return this; } /** *

* The unique identifier of the bot that the alias applies to. *

* * @param botId * The unique identifier of the bot that the alias applies to. */ public void setBotId(String botId) { this.botId = botId; } /** *

* The unique identifier of the bot that the alias applies to. *

* * @return The unique identifier of the bot that the alias applies to. */ public String getBotId() { return this.botId; } /** *

* The unique identifier of the bot that the alias applies to. *

* * @param botId * The unique identifier of the bot that the alias applies to. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withBotId(String botId) { setBotId(botId); return this; } /** *

* A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the * UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the * TagResource operation. *

* * @return A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the * UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the * TagResource operation. */ public java.util.Map getTags() { return tags; } /** *

* A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the * UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the * TagResource operation. *

* * @param tags * A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the * UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the * TagResource operation. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the * UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the * TagResource operation. *

* * @param tags * A list of tags to add to the bot alias. You can only add tags when you create an alias, you can't use the * UpdateBotAlias operation to update the tags on a bot alias. To update tags, use the * TagResource operation. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateBotAliasRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateBotAliasRequest clearTagsEntries() { this.tags = null; 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 (getBotAliasName() != null) sb.append("BotAliasName: ").append(getBotAliasName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getBotVersion() != null) sb.append("BotVersion: ").append(getBotVersion()).append(","); if (getBotAliasLocaleSettings() != null) sb.append("BotAliasLocaleSettings: ").append(getBotAliasLocaleSettings()).append(","); if (getConversationLogSettings() != null) sb.append("ConversationLogSettings: ").append(getConversationLogSettings()).append(","); if (getSentimentAnalysisSettings() != null) sb.append("SentimentAnalysisSettings: ").append(getSentimentAnalysisSettings()).append(","); if (getBotId() != null) sb.append("BotId: ").append(getBotId()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateBotAliasRequest == false) return false; CreateBotAliasRequest other = (CreateBotAliasRequest) obj; if (other.getBotAliasName() == null ^ this.getBotAliasName() == null) return false; if (other.getBotAliasName() != null && other.getBotAliasName().equals(this.getBotAliasName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.getBotAliasLocaleSettings() == null ^ this.getBotAliasLocaleSettings() == null) return false; if (other.getBotAliasLocaleSettings() != null && other.getBotAliasLocaleSettings().equals(this.getBotAliasLocaleSettings()) == false) return false; if (other.getConversationLogSettings() == null ^ this.getConversationLogSettings() == null) return false; if (other.getConversationLogSettings() != null && other.getConversationLogSettings().equals(this.getConversationLogSettings()) == false) return false; if (other.getSentimentAnalysisSettings() == null ^ this.getSentimentAnalysisSettings() == null) return false; if (other.getSentimentAnalysisSettings() != null && other.getSentimentAnalysisSettings().equals(this.getSentimentAnalysisSettings()) == false) return false; if (other.getBotId() == null ^ this.getBotId() == null) return false; if (other.getBotId() != null && other.getBotId().equals(this.getBotId()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBotAliasName() == null) ? 0 : getBotAliasName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getBotVersion() == null) ? 0 : getBotVersion().hashCode()); hashCode = prime * hashCode + ((getBotAliasLocaleSettings() == null) ? 0 : getBotAliasLocaleSettings().hashCode()); hashCode = prime * hashCode + ((getConversationLogSettings() == null) ? 0 : getConversationLogSettings().hashCode()); hashCode = prime * hashCode + ((getSentimentAnalysisSettings() == null) ? 0 : getSentimentAnalysisSettings().hashCode()); hashCode = prime * hashCode + ((getBotId() == null) ? 0 : getBotId().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateBotAliasRequest clone() { return (CreateBotAliasRequest) super.clone(); } }