/* * 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; /** *

* Information about the overall results for a test execution result. *

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

* Indicates whether the conversation contains multiple turns or not. *

*/ private Boolean multiTurnConversation; /** *

* The total number of overall results in the result of the test execution. *

*/ private Integer totalResultCount; /** *

* The number of speech transcription results in the overall test. *

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

* The number of results that succeeded. *

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

* Indicates whether the conversation contains multiple turns or not. *

* * @param multiTurnConversation * Indicates whether the conversation contains multiple turns or not. */ public void setMultiTurnConversation(Boolean multiTurnConversation) { this.multiTurnConversation = multiTurnConversation; } /** *

* Indicates whether the conversation contains multiple turns or not. *

* * @return Indicates whether the conversation contains multiple turns or not. */ public Boolean getMultiTurnConversation() { return this.multiTurnConversation; } /** *

* Indicates whether the conversation contains multiple turns or not. *

* * @param multiTurnConversation * Indicates whether the conversation contains multiple turns or not. * @return Returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem withMultiTurnConversation(Boolean multiTurnConversation) { setMultiTurnConversation(multiTurnConversation); return this; } /** *

* Indicates whether the conversation contains multiple turns or not. *

* * @return Indicates whether the conversation contains multiple turns or not. */ public Boolean isMultiTurnConversation() { return this.multiTurnConversation; } /** *

* The total number of overall results in the result of the test execution. *

* * @param totalResultCount * The total number of overall results in the result of the test execution. */ public void setTotalResultCount(Integer totalResultCount) { this.totalResultCount = totalResultCount; } /** *

* The total number of overall results in the result of the test execution. *

* * @return The total number of overall results in the result of the test execution. */ public Integer getTotalResultCount() { return this.totalResultCount; } /** *

* The total number of overall results in the result of the test execution. *

* * @param totalResultCount * The total number of overall results in the result of the test execution. * @return Returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem withTotalResultCount(Integer totalResultCount) { setTotalResultCount(totalResultCount); return this; } /** *

* The number of speech transcription results in the overall test. *

* * @return The number of speech transcription results in the overall test. */ public java.util.Map getSpeechTranscriptionResultCounts() { return speechTranscriptionResultCounts; } /** *

* The number of speech transcription results in the overall test. *

* * @param speechTranscriptionResultCounts * The number of speech transcription results in the overall test. */ public void setSpeechTranscriptionResultCounts(java.util.Map speechTranscriptionResultCounts) { this.speechTranscriptionResultCounts = speechTranscriptionResultCounts; } /** *

* The number of speech transcription results in the overall test. *

* * @param speechTranscriptionResultCounts * The number of speech transcription results in the overall test. * @return Returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem withSpeechTranscriptionResultCounts(java.util.Map speechTranscriptionResultCounts) { setSpeechTranscriptionResultCounts(speechTranscriptionResultCounts); return this; } /** * Add a single SpeechTranscriptionResultCounts entry * * @see OverallTestResultItem#withSpeechTranscriptionResultCounts * @returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem addSpeechTranscriptionResultCountsEntry(String key, Integer value) { if (null == this.speechTranscriptionResultCounts) { this.speechTranscriptionResultCounts = new java.util.HashMap(); } if (this.speechTranscriptionResultCounts.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.speechTranscriptionResultCounts.put(key, value); return this; } /** * Removes all the entries added into SpeechTranscriptionResultCounts. * * @return Returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem clearSpeechTranscriptionResultCountsEntries() { this.speechTranscriptionResultCounts = null; return this; } /** *

* The number of results that succeeded. *

* * @return The number of results that succeeded. */ public java.util.Map getEndToEndResultCounts() { return endToEndResultCounts; } /** *

* The number of results that succeeded. *

* * @param endToEndResultCounts * The number of results that succeeded. */ public void setEndToEndResultCounts(java.util.Map endToEndResultCounts) { this.endToEndResultCounts = endToEndResultCounts; } /** *

* The number of results that succeeded. *

* * @param endToEndResultCounts * The number of results that succeeded. * @return Returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem withEndToEndResultCounts(java.util.Map endToEndResultCounts) { setEndToEndResultCounts(endToEndResultCounts); return this; } /** * Add a single EndToEndResultCounts entry * * @see OverallTestResultItem#withEndToEndResultCounts * @returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem addEndToEndResultCountsEntry(String key, Integer value) { if (null == this.endToEndResultCounts) { this.endToEndResultCounts = new java.util.HashMap(); } if (this.endToEndResultCounts.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.endToEndResultCounts.put(key, value); return this; } /** * Removes all the entries added into EndToEndResultCounts. * * @return Returns a reference to this object so that method calls can be chained together. */ public OverallTestResultItem clearEndToEndResultCountsEntries() { this.endToEndResultCounts = 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 (getMultiTurnConversation() != null) sb.append("MultiTurnConversation: ").append(getMultiTurnConversation()).append(","); if (getTotalResultCount() != null) sb.append("TotalResultCount: ").append(getTotalResultCount()).append(","); if (getSpeechTranscriptionResultCounts() != null) sb.append("SpeechTranscriptionResultCounts: ").append(getSpeechTranscriptionResultCounts()).append(","); if (getEndToEndResultCounts() != null) sb.append("EndToEndResultCounts: ").append(getEndToEndResultCounts()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OverallTestResultItem == false) return false; OverallTestResultItem other = (OverallTestResultItem) obj; if (other.getMultiTurnConversation() == null ^ this.getMultiTurnConversation() == null) return false; if (other.getMultiTurnConversation() != null && other.getMultiTurnConversation().equals(this.getMultiTurnConversation()) == false) return false; if (other.getTotalResultCount() == null ^ this.getTotalResultCount() == null) return false; if (other.getTotalResultCount() != null && other.getTotalResultCount().equals(this.getTotalResultCount()) == false) return false; if (other.getSpeechTranscriptionResultCounts() == null ^ this.getSpeechTranscriptionResultCounts() == null) return false; if (other.getSpeechTranscriptionResultCounts() != null && other.getSpeechTranscriptionResultCounts().equals(this.getSpeechTranscriptionResultCounts()) == false) return false; if (other.getEndToEndResultCounts() == null ^ this.getEndToEndResultCounts() == null) return false; if (other.getEndToEndResultCounts() != null && other.getEndToEndResultCounts().equals(this.getEndToEndResultCounts()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMultiTurnConversation() == null) ? 0 : getMultiTurnConversation().hashCode()); hashCode = prime * hashCode + ((getTotalResultCount() == null) ? 0 : getTotalResultCount().hashCode()); hashCode = prime * hashCode + ((getSpeechTranscriptionResultCounts() == null) ? 0 : getSpeechTranscriptionResultCounts().hashCode()); hashCode = prime * hashCode + ((getEndToEndResultCounts() == null) ? 0 : getEndToEndResultCounts().hashCode()); return hashCode; } @Override public OverallTestResultItem clone() { try { return (OverallTestResultItem) 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.OverallTestResultItemMarshaller.getInstance().marshall(this, protocolMarshaller); } }