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

* The execution Id for the test set execution. *

*/ private String testExecutionId; /** *

* The execution creation date and time for the test set execution. *

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

* The date and time of the last update for the execution. *

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

* The test execution status for the test execution. *

*/ private String testExecutionStatus; /** *

* The test set Id for the test set execution. *

*/ private String testSetId; /** *

* The test set name of the test set execution. *

*/ private String testSetName; /** *

* The target bot for the test set execution details. *

*/ private TestExecutionTarget target; /** *

* Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For streaming, * StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. *

*/ private String apiMode; /** *

* Indicates whether test set is audio or text. *

*/ private String testExecutionModality; /** *

* Reasons for the failure of the test set execution. *

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

* The execution Id for the test set execution. *

* * @param testExecutionId * The execution Id for the test set execution. */ public void setTestExecutionId(String testExecutionId) { this.testExecutionId = testExecutionId; } /** *

* The execution Id for the test set execution. *

* * @return The execution Id for the test set execution. */ public String getTestExecutionId() { return this.testExecutionId; } /** *

* The execution Id for the test set execution. *

* * @param testExecutionId * The execution Id for the test set execution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withTestExecutionId(String testExecutionId) { setTestExecutionId(testExecutionId); return this; } /** *

* The execution creation date and time for the test set execution. *

* * @param creationDateTime * The execution creation date and time for the test set execution. */ public void setCreationDateTime(java.util.Date creationDateTime) { this.creationDateTime = creationDateTime; } /** *

* The execution creation date and time for the test set execution. *

* * @return The execution creation date and time for the test set execution. */ public java.util.Date getCreationDateTime() { return this.creationDateTime; } /** *

* The execution creation date and time for the test set execution. *

* * @param creationDateTime * The execution creation date and time for the test set execution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withCreationDateTime(java.util.Date creationDateTime) { setCreationDateTime(creationDateTime); return this; } /** *

* The date and time of the last update for the execution. *

* * @param lastUpdatedDateTime * The date and time of the last update for the execution. */ public void setLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) { this.lastUpdatedDateTime = lastUpdatedDateTime; } /** *

* The date and time of the last update for the execution. *

* * @return The date and time of the last update for the execution. */ public java.util.Date getLastUpdatedDateTime() { return this.lastUpdatedDateTime; } /** *

* The date and time of the last update for the execution. *

* * @param lastUpdatedDateTime * The date and time of the last update for the execution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withLastUpdatedDateTime(java.util.Date lastUpdatedDateTime) { setLastUpdatedDateTime(lastUpdatedDateTime); return this; } /** *

* The test execution status for the test execution. *

* * @param testExecutionStatus * The test execution status for the test execution. * @see TestExecutionStatus */ public void setTestExecutionStatus(String testExecutionStatus) { this.testExecutionStatus = testExecutionStatus; } /** *

* The test execution status for the test execution. *

* * @return The test execution status for the test execution. * @see TestExecutionStatus */ public String getTestExecutionStatus() { return this.testExecutionStatus; } /** *

* The test execution status for the test execution. *

* * @param testExecutionStatus * The test execution status for the test execution. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionStatus */ public DescribeTestExecutionResult withTestExecutionStatus(String testExecutionStatus) { setTestExecutionStatus(testExecutionStatus); return this; } /** *

* The test execution status for the test execution. *

* * @param testExecutionStatus * The test execution status for the test execution. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionStatus */ public DescribeTestExecutionResult withTestExecutionStatus(TestExecutionStatus testExecutionStatus) { this.testExecutionStatus = testExecutionStatus.toString(); return this; } /** *

* The test set Id for the test set execution. *

* * @param testSetId * The test set Id for the test set execution. */ public void setTestSetId(String testSetId) { this.testSetId = testSetId; } /** *

* The test set Id for the test set execution. *

* * @return The test set Id for the test set execution. */ public String getTestSetId() { return this.testSetId; } /** *

* The test set Id for the test set execution. *

* * @param testSetId * The test set Id for the test set execution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withTestSetId(String testSetId) { setTestSetId(testSetId); return this; } /** *

* The test set name of the test set execution. *

* * @param testSetName * The test set name of the test set execution. */ public void setTestSetName(String testSetName) { this.testSetName = testSetName; } /** *

* The test set name of the test set execution. *

* * @return The test set name of the test set execution. */ public String getTestSetName() { return this.testSetName; } /** *

* The test set name of the test set execution. *

* * @param testSetName * The test set name of the test set execution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withTestSetName(String testSetName) { setTestSetName(testSetName); return this; } /** *

* The target bot for the test set execution details. *

* * @param target * The target bot for the test set execution details. */ public void setTarget(TestExecutionTarget target) { this.target = target; } /** *

* The target bot for the test set execution details. *

* * @return The target bot for the test set execution details. */ public TestExecutionTarget getTarget() { return this.target; } /** *

* The target bot for the test set execution details. *

* * @param target * The target bot for the test set execution details. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withTarget(TestExecutionTarget target) { setTarget(target); return this; } /** *

* Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For streaming, * StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. *

* * @param apiMode * Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For * streaming, StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. * @see TestExecutionApiMode */ public void setApiMode(String apiMode) { this.apiMode = apiMode; } /** *

* Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For streaming, * StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. *

* * @return Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For * streaming, StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. * @see TestExecutionApiMode */ public String getApiMode() { return this.apiMode; } /** *

* Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For streaming, * StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. *

* * @param apiMode * Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For * streaming, StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionApiMode */ public DescribeTestExecutionResult withApiMode(String apiMode) { setApiMode(apiMode); return this; } /** *

* Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For streaming, * StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. *

* * @param apiMode * Indicates whether we use streaming or non-streaming APIs are used for the test set execution. For * streaming, StartConversation Amazon Lex Runtime API is used. Whereas for non-streaming, * RecognizeUtterance and RecognizeText Amazon Lex Runtime API is used. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionApiMode */ public DescribeTestExecutionResult withApiMode(TestExecutionApiMode apiMode) { this.apiMode = apiMode.toString(); return this; } /** *

* Indicates whether test set is audio or text. *

* * @param testExecutionModality * Indicates whether test set is audio or text. * @see TestExecutionModality */ public void setTestExecutionModality(String testExecutionModality) { this.testExecutionModality = testExecutionModality; } /** *

* Indicates whether test set is audio or text. *

* * @return Indicates whether test set is audio or text. * @see TestExecutionModality */ public String getTestExecutionModality() { return this.testExecutionModality; } /** *

* Indicates whether test set is audio or text. *

* * @param testExecutionModality * Indicates whether test set is audio or text. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionModality */ public DescribeTestExecutionResult withTestExecutionModality(String testExecutionModality) { setTestExecutionModality(testExecutionModality); return this; } /** *

* Indicates whether test set is audio or text. *

* * @param testExecutionModality * Indicates whether test set is audio or text. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionModality */ public DescribeTestExecutionResult withTestExecutionModality(TestExecutionModality testExecutionModality) { this.testExecutionModality = testExecutionModality.toString(); return this; } /** *

* Reasons for the failure of the test set execution. *

* * @return Reasons for the failure of the test set execution. */ public java.util.List getFailureReasons() { return failureReasons; } /** *

* Reasons for the failure of the test set execution. *

* * @param failureReasons * Reasons for the failure of the test set execution. */ public void setFailureReasons(java.util.Collection failureReasons) { if (failureReasons == null) { this.failureReasons = null; return; } this.failureReasons = new java.util.ArrayList(failureReasons); } /** *

* Reasons for the failure of the test set execution. *

*

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

* * @param failureReasons * Reasons for the failure of the test set execution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withFailureReasons(String... failureReasons) { if (this.failureReasons == null) { setFailureReasons(new java.util.ArrayList(failureReasons.length)); } for (String ele : failureReasons) { this.failureReasons.add(ele); } return this; } /** *

* Reasons for the failure of the test set execution. *

* * @param failureReasons * Reasons for the failure of the test set execution. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeTestExecutionResult withFailureReasons(java.util.Collection failureReasons) { setFailureReasons(failureReasons); 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 (getTestExecutionId() != null) sb.append("TestExecutionId: ").append(getTestExecutionId()).append(","); if (getCreationDateTime() != null) sb.append("CreationDateTime: ").append(getCreationDateTime()).append(","); if (getLastUpdatedDateTime() != null) sb.append("LastUpdatedDateTime: ").append(getLastUpdatedDateTime()).append(","); if (getTestExecutionStatus() != null) sb.append("TestExecutionStatus: ").append(getTestExecutionStatus()).append(","); if (getTestSetId() != null) sb.append("TestSetId: ").append(getTestSetId()).append(","); if (getTestSetName() != null) sb.append("TestSetName: ").append(getTestSetName()).append(","); if (getTarget() != null) sb.append("Target: ").append(getTarget()).append(","); if (getApiMode() != null) sb.append("ApiMode: ").append(getApiMode()).append(","); if (getTestExecutionModality() != null) sb.append("TestExecutionModality: ").append(getTestExecutionModality()).append(","); if (getFailureReasons() != null) sb.append("FailureReasons: ").append(getFailureReasons()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeTestExecutionResult == false) return false; DescribeTestExecutionResult other = (DescribeTestExecutionResult) obj; if (other.getTestExecutionId() == null ^ this.getTestExecutionId() == null) return false; if (other.getTestExecutionId() != null && other.getTestExecutionId().equals(this.getTestExecutionId()) == 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.getTestExecutionStatus() == null ^ this.getTestExecutionStatus() == null) return false; if (other.getTestExecutionStatus() != null && other.getTestExecutionStatus().equals(this.getTestExecutionStatus()) == false) return false; if (other.getTestSetId() == null ^ this.getTestSetId() == null) return false; if (other.getTestSetId() != null && other.getTestSetId().equals(this.getTestSetId()) == false) return false; if (other.getTestSetName() == null ^ this.getTestSetName() == null) return false; if (other.getTestSetName() != null && other.getTestSetName().equals(this.getTestSetName()) == false) return false; if (other.getTarget() == null ^ this.getTarget() == null) return false; if (other.getTarget() != null && other.getTarget().equals(this.getTarget()) == false) return false; if (other.getApiMode() == null ^ this.getApiMode() == null) return false; if (other.getApiMode() != null && other.getApiMode().equals(this.getApiMode()) == false) return false; if (other.getTestExecutionModality() == null ^ this.getTestExecutionModality() == null) return false; if (other.getTestExecutionModality() != null && other.getTestExecutionModality().equals(this.getTestExecutionModality()) == false) return false; if (other.getFailureReasons() == null ^ this.getFailureReasons() == null) return false; if (other.getFailureReasons() != null && other.getFailureReasons().equals(this.getFailureReasons()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTestExecutionId() == null) ? 0 : getTestExecutionId().hashCode()); hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedDateTime() == null) ? 0 : getLastUpdatedDateTime().hashCode()); hashCode = prime * hashCode + ((getTestExecutionStatus() == null) ? 0 : getTestExecutionStatus().hashCode()); hashCode = prime * hashCode + ((getTestSetId() == null) ? 0 : getTestSetId().hashCode()); hashCode = prime * hashCode + ((getTestSetName() == null) ? 0 : getTestSetName().hashCode()); hashCode = prime * hashCode + ((getTarget() == null) ? 0 : getTarget().hashCode()); hashCode = prime * hashCode + ((getApiMode() == null) ? 0 : getApiMode().hashCode()); hashCode = prime * hashCode + ((getTestExecutionModality() == null) ? 0 : getTestExecutionModality().hashCode()); hashCode = prime * hashCode + ((getFailureReasons() == null) ? 0 : getFailureReasons().hashCode()); return hashCode; } @Override public DescribeTestExecutionResult clone() { try { return (DescribeTestExecutionResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }