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

* The unique identifier of the test set execution. *

*/ private String testExecutionId; /** *

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

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

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

*/ private String testSetId; /** *

* The target bot for the test set execution. *

*/ private TestExecutionTarget target; /** *

* Indicates whether we use streaming or non-streaming APIs 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 are used. *

*/ private String apiMode; /** *

* Indicates whether audio or text is used. *

*/ private String testExecutionModality; /** *

* The unique identifier of the test set execution. *

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

* The unique identifier of the test set execution. *

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

* The unique identifier of the test set execution. *

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

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

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

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

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

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

* * @param creationDateTime * The 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 StartTestExecutionResult withCreationDateTime(java.util.Date creationDateTime) { setCreationDateTime(creationDateTime); 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 StartTestExecutionResult withTestSetId(String testSetId) { setTestSetId(testSetId); return this; } /** *

* The target bot for the test set execution. *

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

* The target bot for the test set execution. *

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

* The target bot for the test set execution. *

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

* Indicates whether we use streaming or non-streaming APIs 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 are used. *

* * @param apiMode * Indicates whether we use streaming or non-streaming APIs 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 are used. * @see TestExecutionApiMode */ public void setApiMode(String apiMode) { this.apiMode = apiMode; } /** *

* Indicates whether we use streaming or non-streaming APIs 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 are used. *

* * @return Indicates whether we use streaming or non-streaming APIs 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 are used. * @see TestExecutionApiMode */ public String getApiMode() { return this.apiMode; } /** *

* Indicates whether we use streaming or non-streaming APIs 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 are used. *

* * @param apiMode * Indicates whether we use streaming or non-streaming APIs 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 are used. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionApiMode */ public StartTestExecutionResult withApiMode(String apiMode) { setApiMode(apiMode); return this; } /** *

* Indicates whether we use streaming or non-streaming APIs 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 are used. *

* * @param apiMode * Indicates whether we use streaming or non-streaming APIs 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 are used. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionApiMode */ public StartTestExecutionResult withApiMode(TestExecutionApiMode apiMode) { this.apiMode = apiMode.toString(); return this; } /** *

* Indicates whether audio or text is used. *

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

* Indicates whether audio or text is used. *

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

* Indicates whether audio or text is used. *

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

* Indicates whether audio or text is used. *

* * @param testExecutionModality * Indicates whether audio or text is used. * @return Returns a reference to this object so that method calls can be chained together. * @see TestExecutionModality */ public StartTestExecutionResult withTestExecutionModality(TestExecutionModality testExecutionModality) { this.testExecutionModality = testExecutionModality.toString(); 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 (getTestSetId() != null) sb.append("TestSetId: ").append(getTestSetId()).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()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartTestExecutionResult == false) return false; StartTestExecutionResult other = (StartTestExecutionResult) 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.getTestSetId() == null ^ this.getTestSetId() == null) return false; if (other.getTestSetId() != null && other.getTestSetId().equals(this.getTestSetId()) == 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; 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 + ((getTestSetId() == null) ? 0 : getTestSetId().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()); return hashCode; } @Override public StartTestExecutionResult clone() { try { return (StartTestExecutionResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }