/* * 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 BatchUpdateCustomVocabularyItemResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The identifier of the bot associated with this custom vocabulary. *

*/ private String botId; /** *

* The identifier of the version of the bot associated with this custom vocabulary. *

*/ private String botVersion; /** *

* The identifier of the language and locale where this custom vocabulary is used. The string must match one of the * supported locales. For more information, see Supported Languages . *

*/ private String localeId; /** *

* A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. *

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

* A list of custom vocabulary items that were successfully updated during the operation. *

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

* The identifier of the bot associated with this custom vocabulary. *

* * @param botId * The identifier of the bot associated with this custom vocabulary. */ public void setBotId(String botId) { this.botId = botId; } /** *

* The identifier of the bot associated with this custom vocabulary. *

* * @return The identifier of the bot associated with this custom vocabulary. */ public String getBotId() { return this.botId; } /** *

* The identifier of the bot associated with this custom vocabulary. *

* * @param botId * The identifier of the bot associated with this custom vocabulary. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchUpdateCustomVocabularyItemResult withBotId(String botId) { setBotId(botId); return this; } /** *

* The identifier of the version of the bot associated with this custom vocabulary. *

* * @param botVersion * The identifier of the version of the bot associated with this custom vocabulary. */ public void setBotVersion(String botVersion) { this.botVersion = botVersion; } /** *

* The identifier of the version of the bot associated with this custom vocabulary. *

* * @return The identifier of the version of the bot associated with this custom vocabulary. */ public String getBotVersion() { return this.botVersion; } /** *

* The identifier of the version of the bot associated with this custom vocabulary. *

* * @param botVersion * The identifier of the version of the bot associated with this custom vocabulary. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchUpdateCustomVocabularyItemResult withBotVersion(String botVersion) { setBotVersion(botVersion); return this; } /** *

* The identifier of the language and locale where this custom vocabulary is used. The string must match one of the * supported locales. For more information, see Supported Languages . *

* * @param localeId * The identifier of the language and locale where this custom vocabulary is used. The string must match one * of the supported locales. For more information, see Supported Languages . */ public void setLocaleId(String localeId) { this.localeId = localeId; } /** *

* The identifier of the language and locale where this custom vocabulary is used. The string must match one of the * supported locales. For more information, see Supported Languages . *

* * @return The identifier of the language and locale where this custom vocabulary is used. The string must match one * of the supported locales. For more information, see Supported Languages . */ public String getLocaleId() { return this.localeId; } /** *

* The identifier of the language and locale where this custom vocabulary is used. The string must match one of the * supported locales. For more information, see Supported Languages . *

* * @param localeId * The identifier of the language and locale where this custom vocabulary is used. The string must match one * of the supported locales. For more information, see Supported Languages . * @return Returns a reference to this object so that method calls can be chained together. */ public BatchUpdateCustomVocabularyItemResult withLocaleId(String localeId) { setLocaleId(localeId); return this; } /** *

* A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. *

* * @return A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. */ public java.util.List getErrors() { return errors; } /** *

* A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. *

* * @param errors * A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. */ public void setErrors(java.util.Collection errors) { if (errors == null) { this.errors = null; return; } this.errors = new java.util.ArrayList(errors); } /** *

* A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. *

*

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

* * @param errors * A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchUpdateCustomVocabularyItemResult withErrors(FailedCustomVocabularyItem... errors) { if (this.errors == null) { setErrors(new java.util.ArrayList(errors.length)); } for (FailedCustomVocabularyItem ele : errors) { this.errors.add(ele); } return this; } /** *

* A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. *

* * @param errors * A list of custom vocabulary items that failed to update during the operation. The reason for the error is * contained within each error object. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchUpdateCustomVocabularyItemResult withErrors(java.util.Collection errors) { setErrors(errors); return this; } /** *

* A list of custom vocabulary items that were successfully updated during the operation. *

* * @return A list of custom vocabulary items that were successfully updated during the operation. */ public java.util.List getResources() { return resources; } /** *

* A list of custom vocabulary items that were successfully updated during the operation. *

* * @param resources * A list of custom vocabulary items that were successfully updated during the operation. */ public void setResources(java.util.Collection resources) { if (resources == null) { this.resources = null; return; } this.resources = new java.util.ArrayList(resources); } /** *

* A list of custom vocabulary items that were successfully updated during the operation. *

*

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

* * @param resources * A list of custom vocabulary items that were successfully updated during the operation. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchUpdateCustomVocabularyItemResult withResources(CustomVocabularyItem... resources) { if (this.resources == null) { setResources(new java.util.ArrayList(resources.length)); } for (CustomVocabularyItem ele : resources) { this.resources.add(ele); } return this; } /** *

* A list of custom vocabulary items that were successfully updated during the operation. *

* * @param resources * A list of custom vocabulary items that were successfully updated during the operation. * @return Returns a reference to this object so that method calls can be chained together. */ public BatchUpdateCustomVocabularyItemResult withResources(java.util.Collection resources) { setResources(resources); 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 (getBotVersion() != null) sb.append("BotVersion: ").append(getBotVersion()).append(","); if (getLocaleId() != null) sb.append("LocaleId: ").append(getLocaleId()).append(","); if (getErrors() != null) sb.append("Errors: ").append(getErrors()).append(","); if (getResources() != null) sb.append("Resources: ").append(getResources()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BatchUpdateCustomVocabularyItemResult == false) return false; BatchUpdateCustomVocabularyItemResult other = (BatchUpdateCustomVocabularyItemResult) obj; if (other.getBotId() == null ^ this.getBotId() == null) return false; if (other.getBotId() != null && other.getBotId().equals(this.getBotId()) == 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.getLocaleId() == null ^ this.getLocaleId() == null) return false; if (other.getLocaleId() != null && other.getLocaleId().equals(this.getLocaleId()) == false) return false; if (other.getErrors() == null ^ this.getErrors() == null) return false; if (other.getErrors() != null && other.getErrors().equals(this.getErrors()) == false) return false; if (other.getResources() == null ^ this.getResources() == null) return false; if (other.getResources() != null && other.getResources().equals(this.getResources()) == 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 + ((getBotVersion() == null) ? 0 : getBotVersion().hashCode()); hashCode = prime * hashCode + ((getLocaleId() == null) ? 0 : getLocaleId().hashCode()); hashCode = prime * hashCode + ((getErrors() == null) ? 0 : getErrors().hashCode()); hashCode = prime * hashCode + ((getResources() == null) ? 0 : getResources().hashCode()); return hashCode; } @Override public BatchUpdateCustomVocabularyItemResult clone() { try { return (BatchUpdateCustomVocabularyItemResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }