/* * 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; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateBotResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The unique identifier of the bot that was updated. *

*/ private String botId; /** *

* The name of the bot after the update. *

*/ private String botName; /** *

* The description of the bot after the update. *

*/ private String description; /** *

* The Amazon Resource Name (ARN) of the IAM role used by the bot after the update. *

*/ private String roleArn; /** *

* The data privacy settings for the bot after the update. *

*/ private DataPrivacy dataPrivacy; /** *

* The session timeout, in seconds, for the bot after the update. *

*/ private Integer idleSessionTTLInSeconds; /** *

* Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read * for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. *

*/ private String botStatus; /** *

* A timestamp of the date and time that the bot was created. *

*/ private java.util.Date creationDateTime; /** *

* A timestamp of the date and time that the bot was last updated. *

*/ private java.util.Date lastUpdatedDateTime; /** *

* The type of the bot that was updated. *

*/ private String botType; /** *

* The list of bot members in the network that was updated. *

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

* The unique identifier of the bot that was updated. *

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

* The unique identifier of the bot that was updated. *

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

* The unique identifier of the bot that was updated. *

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

* The name of the bot after the update. *

* * @param botName * The name of the bot after the update. */ public void setBotName(String botName) { this.botName = botName; } /** *

* The name of the bot after the update. *

* * @return The name of the bot after the update. */ public String getBotName() { return this.botName; } /** *

* The name of the bot after the update. *

* * @param botName * The name of the bot after the update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withBotName(String botName) { setBotName(botName); return this; } /** *

* The description of the bot after the update. *

* * @param description * The description of the bot after the update. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the bot after the update. *

* * @return The description of the bot after the update. */ public String getDescription() { return this.description; } /** *

* The description of the bot after the update. *

* * @param description * The description of the bot after the update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withDescription(String description) { setDescription(description); return this; } /** *

* The Amazon Resource Name (ARN) of the IAM role used by the bot after the update. *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM role used by the bot after the update. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM role used by the bot after the update. *

* * @return The Amazon Resource Name (ARN) of the IAM role used by the bot after the update. */ public String getRoleArn() { return this.roleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM role used by the bot after the update. *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM role used by the bot after the update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* The data privacy settings for the bot after the update. *

* * @param dataPrivacy * The data privacy settings for the bot after the update. */ public void setDataPrivacy(DataPrivacy dataPrivacy) { this.dataPrivacy = dataPrivacy; } /** *

* The data privacy settings for the bot after the update. *

* * @return The data privacy settings for the bot after the update. */ public DataPrivacy getDataPrivacy() { return this.dataPrivacy; } /** *

* The data privacy settings for the bot after the update. *

* * @param dataPrivacy * The data privacy settings for the bot after the update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withDataPrivacy(DataPrivacy dataPrivacy) { setDataPrivacy(dataPrivacy); return this; } /** *

* The session timeout, in seconds, for the bot after the update. *

* * @param idleSessionTTLInSeconds * The session timeout, in seconds, for the bot after the update. */ public void setIdleSessionTTLInSeconds(Integer idleSessionTTLInSeconds) { this.idleSessionTTLInSeconds = idleSessionTTLInSeconds; } /** *

* The session timeout, in seconds, for the bot after the update. *

* * @return The session timeout, in seconds, for the bot after the update. */ public Integer getIdleSessionTTLInSeconds() { return this.idleSessionTTLInSeconds; } /** *

* The session timeout, in seconds, for the bot after the update. *

* * @param idleSessionTTLInSeconds * The session timeout, in seconds, for the bot after the update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withIdleSessionTTLInSeconds(Integer idleSessionTTLInSeconds) { setIdleSessionTTLInSeconds(idleSessionTTLInSeconds); return this; } /** *

* Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read * for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. *

* * @param botStatus * Shows the current status of the bot. The bot is first in the Creating status. Once the bot is * read for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. * @see BotStatus */ public void setBotStatus(String botStatus) { this.botStatus = botStatus; } /** *

* Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read * for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. *

* * @return Shows the current status of the bot. The bot is first in the Creating status. Once the bot * is read for use, it changes to the Available status. After the bot is created, you can use * the DRAFT version of the bot. * @see BotStatus */ public String getBotStatus() { return this.botStatus; } /** *

* Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read * for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. *

* * @param botStatus * Shows the current status of the bot. The bot is first in the Creating status. Once the bot is * read for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. * @return Returns a reference to this object so that method calls can be chained together. * @see BotStatus */ public UpdateBotResult withBotStatus(String botStatus) { setBotStatus(botStatus); return this; } /** *

* Shows the current status of the bot. The bot is first in the Creating status. Once the bot is read * for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. *

* * @param botStatus * Shows the current status of the bot. The bot is first in the Creating status. Once the bot is * read for use, it changes to the Available status. After the bot is created, you can use the * DRAFT version of the bot. * @return Returns a reference to this object so that method calls can be chained together. * @see BotStatus */ public UpdateBotResult withBotStatus(BotStatus botStatus) { this.botStatus = botStatus.toString(); return this; } /** *

* A timestamp of the date and time that the bot was created. *

* * @param creationDateTime * A timestamp of the date and time that the bot was created. */ public void setCreationDateTime(java.util.Date creationDateTime) { this.creationDateTime = creationDateTime; } /** *

* A timestamp of the date and time that the bot was created. *

* * @return A timestamp of the date and time that the bot was created. */ public java.util.Date getCreationDateTime() { return this.creationDateTime; } /** *

* A timestamp of the date and time that the bot was created. *

* * @param creationDateTime * A timestamp of the date and time that the bot was created. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withCreationDateTime(java.util.Date creationDateTime) { setCreationDateTime(creationDateTime); return this; } /** *

* A timestamp of the date and time that the bot was last updated. *

* * @param lastUpdatedDateTime * A timestamp of the date and time that the bot was last updated. */ public void setLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) { this.lastUpdatedDateTime = lastUpdatedDateTime; } /** *

* A timestamp of the date and time that the bot was last updated. *

* * @return A timestamp of the date and time that the bot was last updated. */ public java.util.Date getLastUpdatedDateTime() { return this.lastUpdatedDateTime; } /** *

* A timestamp of the date and time that the bot was last updated. *

* * @param lastUpdatedDateTime * A timestamp of the date and time that the bot was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) { setLastUpdatedDateTime(lastUpdatedDateTime); return this; } /** *

* The type of the bot that was updated. *

* * @param botType * The type of the bot that was updated. * @see BotType */ public void setBotType(String botType) { this.botType = botType; } /** *

* The type of the bot that was updated. *

* * @return The type of the bot that was updated. * @see BotType */ public String getBotType() { return this.botType; } /** *

* The type of the bot that was updated. *

* * @param botType * The type of the bot that was updated. * @return Returns a reference to this object so that method calls can be chained together. * @see BotType */ public UpdateBotResult withBotType(String botType) { setBotType(botType); return this; } /** *

* The type of the bot that was updated. *

* * @param botType * The type of the bot that was updated. * @return Returns a reference to this object so that method calls can be chained together. * @see BotType */ public UpdateBotResult withBotType(BotType botType) { this.botType = botType.toString(); return this; } /** *

* The list of bot members in the network that was updated. *

* * @return The list of bot members in the network that was updated. */ public java.util.List getBotMembers() { return botMembers; } /** *

* The list of bot members in the network that was updated. *

* * @param botMembers * The list of bot members in the network that was updated. */ public void setBotMembers(java.util.Collection botMembers) { if (botMembers == null) { this.botMembers = null; return; } this.botMembers = new java.util.ArrayList(botMembers); } /** *

* The list of bot members in the network that was updated. *

*

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

* * @param botMembers * The list of bot members in the network that was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withBotMembers(BotMember... botMembers) { if (this.botMembers == null) { setBotMembers(new java.util.ArrayList(botMembers.length)); } for (BotMember ele : botMembers) { this.botMembers.add(ele); } return this; } /** *

* The list of bot members in the network that was updated. *

* * @param botMembers * The list of bot members in the network that was updated. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateBotResult withBotMembers(java.util.Collection botMembers) { setBotMembers(botMembers); 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 (getBotId() != null) sb.append("BotId: ").append(getBotId()).append(","); if (getBotName() != null) sb.append("BotName: ").append(getBotName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getDataPrivacy() != null) sb.append("DataPrivacy: ").append(getDataPrivacy()).append(","); if (getIdleSessionTTLInSeconds() != null) sb.append("IdleSessionTTLInSeconds: ").append(getIdleSessionTTLInSeconds()).append(","); if (getBotStatus() != null) sb.append("BotStatus: ").append(getBotStatus()).append(","); if (getCreationDateTime() != null) sb.append("CreationDateTime: ").append(getCreationDateTime()).append(","); if (getLastUpdatedDateTime() != null) sb.append("LastUpdatedDateTime: ").append(getLastUpdatedDateTime()).append(","); if (getBotType() != null) sb.append("BotType: ").append(getBotType()).append(","); if (getBotMembers() != null) sb.append("BotMembers: ").append(getBotMembers()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateBotResult == false) return false; UpdateBotResult other = (UpdateBotResult) obj; if (other.getBotId() == null ^ this.getBotId() == null) return false; if (other.getBotId() != null && other.getBotId().equals(this.getBotId()) == false) return false; if (other.getBotName() == null ^ this.getBotName() == null) return false; if (other.getBotName() != null && other.getBotName().equals(this.getBotName()) == 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.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getDataPrivacy() == null ^ this.getDataPrivacy() == null) return false; if (other.getDataPrivacy() != null && other.getDataPrivacy().equals(this.getDataPrivacy()) == false) return false; if (other.getIdleSessionTTLInSeconds() == null ^ this.getIdleSessionTTLInSeconds() == null) return false; if (other.getIdleSessionTTLInSeconds() != null && other.getIdleSessionTTLInSeconds().equals(this.getIdleSessionTTLInSeconds()) == false) return false; if (other.getBotStatus() == null ^ this.getBotStatus() == null) return false; if (other.getBotStatus() != null && other.getBotStatus().equals(this.getBotStatus()) == false) return false; if (other.getCreationDateTime() == null ^ this.getCreationDateTime() == null) return false; if (other.getCreationDateTime() != null && other.getCreationDateTime().equals(this.getCreationDateTime()) == false) return false; if (other.getLastUpdatedDateTime() == null ^ this.getLastUpdatedDateTime() == null) return false; if (other.getLastUpdatedDateTime() != null && other.getLastUpdatedDateTime().equals(this.getLastUpdatedDateTime()) == false) return false; if (other.getBotType() == null ^ this.getBotType() == null) return false; if (other.getBotType() != null && other.getBotType().equals(this.getBotType()) == false) return false; if (other.getBotMembers() == null ^ this.getBotMembers() == null) return false; if (other.getBotMembers() != null && other.getBotMembers().equals(this.getBotMembers()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBotId() == null) ? 0 : getBotId().hashCode()); hashCode = prime * hashCode + ((getBotName() == null) ? 0 : getBotName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getDataPrivacy() == null) ? 0 : getDataPrivacy().hashCode()); hashCode = prime * hashCode + ((getIdleSessionTTLInSeconds() == null) ? 0 : getIdleSessionTTLInSeconds().hashCode()); hashCode = prime * hashCode + ((getBotStatus() == null) ? 0 : getBotStatus().hashCode()); hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedDateTime() == null) ? 0 : getLastUpdatedDateTime().hashCode()); hashCode = prime * hashCode + ((getBotType() == null) ? 0 : getBotType().hashCode()); hashCode = prime * hashCode + ((getBotMembers() == null) ? 0 : getBotMembers().hashCode()); return hashCode; } @Override public UpdateBotResult clone() { try { return (UpdateBotResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }