/* * 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.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Contains details about the errors in the test set discrepancy report *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class TestSetDiscrepancyErrors implements Serializable, Cloneable, StructuredPojo { /** *

* Contains information about discrepancies found for intents between the test set and the bot. *

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

* Contains information about discrepancies found for slots between the test set and the bot. *

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

* Contains information about discrepancies found for intents between the test set and the bot. *

* * @return Contains information about discrepancies found for intents between the test set and the bot. */ public java.util.List getIntentDiscrepancies() { return intentDiscrepancies; } /** *

* Contains information about discrepancies found for intents between the test set and the bot. *

* * @param intentDiscrepancies * Contains information about discrepancies found for intents between the test set and the bot. */ public void setIntentDiscrepancies(java.util.Collection intentDiscrepancies) { if (intentDiscrepancies == null) { this.intentDiscrepancies = null; return; } this.intentDiscrepancies = new java.util.ArrayList(intentDiscrepancies); } /** *

* Contains information about discrepancies found for intents between the test set and the bot. *

*

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

* * @param intentDiscrepancies * Contains information about discrepancies found for intents between the test set and the bot. * @return Returns a reference to this object so that method calls can be chained together. */ public TestSetDiscrepancyErrors withIntentDiscrepancies(TestSetIntentDiscrepancyItem... intentDiscrepancies) { if (this.intentDiscrepancies == null) { setIntentDiscrepancies(new java.util.ArrayList(intentDiscrepancies.length)); } for (TestSetIntentDiscrepancyItem ele : intentDiscrepancies) { this.intentDiscrepancies.add(ele); } return this; } /** *

* Contains information about discrepancies found for intents between the test set and the bot. *

* * @param intentDiscrepancies * Contains information about discrepancies found for intents between the test set and the bot. * @return Returns a reference to this object so that method calls can be chained together. */ public TestSetDiscrepancyErrors withIntentDiscrepancies(java.util.Collection intentDiscrepancies) { setIntentDiscrepancies(intentDiscrepancies); return this; } /** *

* Contains information about discrepancies found for slots between the test set and the bot. *

* * @return Contains information about discrepancies found for slots between the test set and the bot. */ public java.util.List getSlotDiscrepancies() { return slotDiscrepancies; } /** *

* Contains information about discrepancies found for slots between the test set and the bot. *

* * @param slotDiscrepancies * Contains information about discrepancies found for slots between the test set and the bot. */ public void setSlotDiscrepancies(java.util.Collection slotDiscrepancies) { if (slotDiscrepancies == null) { this.slotDiscrepancies = null; return; } this.slotDiscrepancies = new java.util.ArrayList(slotDiscrepancies); } /** *

* Contains information about discrepancies found for slots between the test set and the bot. *

*

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

* * @param slotDiscrepancies * Contains information about discrepancies found for slots between the test set and the bot. * @return Returns a reference to this object so that method calls can be chained together. */ public TestSetDiscrepancyErrors withSlotDiscrepancies(TestSetSlotDiscrepancyItem... slotDiscrepancies) { if (this.slotDiscrepancies == null) { setSlotDiscrepancies(new java.util.ArrayList(slotDiscrepancies.length)); } for (TestSetSlotDiscrepancyItem ele : slotDiscrepancies) { this.slotDiscrepancies.add(ele); } return this; } /** *

* Contains information about discrepancies found for slots between the test set and the bot. *

* * @param slotDiscrepancies * Contains information about discrepancies found for slots between the test set and the bot. * @return Returns a reference to this object so that method calls can be chained together. */ public TestSetDiscrepancyErrors withSlotDiscrepancies(java.util.Collection slotDiscrepancies) { setSlotDiscrepancies(slotDiscrepancies); 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 (getIntentDiscrepancies() != null) sb.append("IntentDiscrepancies: ").append(getIntentDiscrepancies()).append(","); if (getSlotDiscrepancies() != null) sb.append("SlotDiscrepancies: ").append(getSlotDiscrepancies()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TestSetDiscrepancyErrors == false) return false; TestSetDiscrepancyErrors other = (TestSetDiscrepancyErrors) obj; if (other.getIntentDiscrepancies() == null ^ this.getIntentDiscrepancies() == null) return false; if (other.getIntentDiscrepancies() != null && other.getIntentDiscrepancies().equals(this.getIntentDiscrepancies()) == false) return false; if (other.getSlotDiscrepancies() == null ^ this.getSlotDiscrepancies() == null) return false; if (other.getSlotDiscrepancies() != null && other.getSlotDiscrepancies().equals(this.getSlotDiscrepancies()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getIntentDiscrepancies() == null) ? 0 : getIntentDiscrepancies().hashCode()); hashCode = prime * hashCode + ((getSlotDiscrepancies() == null) ? 0 : getSlotDiscrepancies().hashCode()); return hashCode; } @Override public TestSetDiscrepancyErrors clone() { try { return (TestSetDiscrepancyErrors) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.lexmodelsv2.model.transform.TestSetDiscrepancyErrorsMarshaller.getInstance().marshall(this, protocolMarshaller); } }