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

* The unique identifier of the test set generation to describe. *

*/ private String testSetGenerationId; /** *

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

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

* The status for the test set generation. *

*/ private String testSetGenerationStatus; /** *

* The test set name used for the test set generation. *

*/ private String testSetName; /** *

* The description used for the test set generation. *

*/ private String description; /** *

* The Amazon S3 storage location for the test set generation. *

*/ private TestSetStorageLocation storageLocation; /** *

* The data source for the test set generation. *

*/ private TestSetGenerationDataSource generationDataSource; /** *

* The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. *

*/ private String roleArn; /** *

* A list of tags that was used for the test set that is being generated. *

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

* The unique identifier of the test set generation to describe. *

* * @param testSetGenerationId * The unique identifier of the test set generation to describe. */ public void setTestSetGenerationId(String testSetGenerationId) { this.testSetGenerationId = testSetGenerationId; } /** *

* The unique identifier of the test set generation to describe. *

* * @return The unique identifier of the test set generation to describe. */ public String getTestSetGenerationId() { return this.testSetGenerationId; } /** *

* The unique identifier of the test set generation to describe. *

* * @param testSetGenerationId * The unique identifier of the test set generation to describe. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult withTestSetGenerationId(String testSetGenerationId) { setTestSetGenerationId(testSetGenerationId); return this; } /** *

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

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

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

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

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

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

* The status for the test set generation. *

* * @param testSetGenerationStatus * The status for the test set generation. * @see TestSetGenerationStatus */ public void setTestSetGenerationStatus(String testSetGenerationStatus) { this.testSetGenerationStatus = testSetGenerationStatus; } /** *

* The status for the test set generation. *

* * @return The status for the test set generation. * @see TestSetGenerationStatus */ public String getTestSetGenerationStatus() { return this.testSetGenerationStatus; } /** *

* The status for the test set generation. *

* * @param testSetGenerationStatus * The status for the test set generation. * @return Returns a reference to this object so that method calls can be chained together. * @see TestSetGenerationStatus */ public StartTestSetGenerationResult withTestSetGenerationStatus(String testSetGenerationStatus) { setTestSetGenerationStatus(testSetGenerationStatus); return this; } /** *

* The status for the test set generation. *

* * @param testSetGenerationStatus * The status for the test set generation. * @return Returns a reference to this object so that method calls can be chained together. * @see TestSetGenerationStatus */ public StartTestSetGenerationResult withTestSetGenerationStatus(TestSetGenerationStatus testSetGenerationStatus) { this.testSetGenerationStatus = testSetGenerationStatus.toString(); return this; } /** *

* The test set name used for the test set generation. *

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

* The test set name used for the test set generation. *

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

* The test set name used for the test set generation. *

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

* The description used for the test set generation. *

* * @param description * The description used for the test set generation. */ public void setDescription(String description) { this.description = description; } /** *

* The description used for the test set generation. *

* * @return The description used for the test set generation. */ public String getDescription() { return this.description; } /** *

* The description used for the test set generation. *

* * @param description * The description used for the test set generation. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult withDescription(String description) { setDescription(description); return this; } /** *

* The Amazon S3 storage location for the test set generation. *

* * @param storageLocation * The Amazon S3 storage location for the test set generation. */ public void setStorageLocation(TestSetStorageLocation storageLocation) { this.storageLocation = storageLocation; } /** *

* The Amazon S3 storage location for the test set generation. *

* * @return The Amazon S3 storage location for the test set generation. */ public TestSetStorageLocation getStorageLocation() { return this.storageLocation; } /** *

* The Amazon S3 storage location for the test set generation. *

* * @param storageLocation * The Amazon S3 storage location for the test set generation. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult withStorageLocation(TestSetStorageLocation storageLocation) { setStorageLocation(storageLocation); return this; } /** *

* The data source for the test set generation. *

* * @param generationDataSource * The data source for the test set generation. */ public void setGenerationDataSource(TestSetGenerationDataSource generationDataSource) { this.generationDataSource = generationDataSource; } /** *

* The data source for the test set generation. *

* * @return The data source for the test set generation. */ public TestSetGenerationDataSource getGenerationDataSource() { return this.generationDataSource; } /** *

* The data source for the test set generation. *

* * @param generationDataSource * The data source for the test set generation. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult withGenerationDataSource(TestSetGenerationDataSource generationDataSource) { setGenerationDataSource(generationDataSource); return this; } /** *

* The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. *

* * @param roleArn * The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. *

* * @return The roleARN used for any operation in the test set to access resources in the Amazon Web Services * account. */ public String getRoleArn() { return this.roleArn; } /** *

* The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. *

* * @param roleArn * The roleARN used for any operation in the test set to access resources in the Amazon Web Services account. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* A list of tags that was used for the test set that is being generated. *

* * @return A list of tags that was used for the test set that is being generated. */ public java.util.Map getTestSetTags() { return testSetTags; } /** *

* A list of tags that was used for the test set that is being generated. *

* * @param testSetTags * A list of tags that was used for the test set that is being generated. */ public void setTestSetTags(java.util.Map testSetTags) { this.testSetTags = testSetTags; } /** *

* A list of tags that was used for the test set that is being generated. *

* * @param testSetTags * A list of tags that was used for the test set that is being generated. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult withTestSetTags(java.util.Map testSetTags) { setTestSetTags(testSetTags); return this; } /** * Add a single TestSetTags entry * * @see StartTestSetGenerationResult#withTestSetTags * @returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult addTestSetTagsEntry(String key, String value) { if (null == this.testSetTags) { this.testSetTags = new java.util.HashMap(); } if (this.testSetTags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.testSetTags.put(key, value); return this; } /** * Removes all the entries added into TestSetTags. * * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationResult clearTestSetTagsEntries() { this.testSetTags = 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 (getTestSetGenerationId() != null) sb.append("TestSetGenerationId: ").append(getTestSetGenerationId()).append(","); if (getCreationDateTime() != null) sb.append("CreationDateTime: ").append(getCreationDateTime()).append(","); if (getTestSetGenerationStatus() != null) sb.append("TestSetGenerationStatus: ").append(getTestSetGenerationStatus()).append(","); if (getTestSetName() != null) sb.append("TestSetName: ").append(getTestSetName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getStorageLocation() != null) sb.append("StorageLocation: ").append(getStorageLocation()).append(","); if (getGenerationDataSource() != null) sb.append("GenerationDataSource: ").append(getGenerationDataSource()).append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getTestSetTags() != null) sb.append("TestSetTags: ").append(getTestSetTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartTestSetGenerationResult == false) return false; StartTestSetGenerationResult other = (StartTestSetGenerationResult) obj; if (other.getTestSetGenerationId() == null ^ this.getTestSetGenerationId() == null) return false; if (other.getTestSetGenerationId() != null && other.getTestSetGenerationId().equals(this.getTestSetGenerationId()) == 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.getTestSetGenerationStatus() == null ^ this.getTestSetGenerationStatus() == null) return false; if (other.getTestSetGenerationStatus() != null && other.getTestSetGenerationStatus().equals(this.getTestSetGenerationStatus()) == 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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getStorageLocation() == null ^ this.getStorageLocation() == null) return false; if (other.getStorageLocation() != null && other.getStorageLocation().equals(this.getStorageLocation()) == false) return false; if (other.getGenerationDataSource() == null ^ this.getGenerationDataSource() == null) return false; if (other.getGenerationDataSource() != null && other.getGenerationDataSource().equals(this.getGenerationDataSource()) == false) return false; if (other.getRoleArn() == null ^ this.getRoleArn() == null) return false; if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false) return false; if (other.getTestSetTags() == null ^ this.getTestSetTags() == null) return false; if (other.getTestSetTags() != null && other.getTestSetTags().equals(this.getTestSetTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getTestSetGenerationId() == null) ? 0 : getTestSetGenerationId().hashCode()); hashCode = prime * hashCode + ((getCreationDateTime() == null) ? 0 : getCreationDateTime().hashCode()); hashCode = prime * hashCode + ((getTestSetGenerationStatus() == null) ? 0 : getTestSetGenerationStatus().hashCode()); hashCode = prime * hashCode + ((getTestSetName() == null) ? 0 : getTestSetName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getStorageLocation() == null) ? 0 : getStorageLocation().hashCode()); hashCode = prime * hashCode + ((getGenerationDataSource() == null) ? 0 : getGenerationDataSource().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getTestSetTags() == null) ? 0 : getTestSetTags().hashCode()); return hashCode; } @Override public StartTestSetGenerationResult clone() { try { return (StartTestSetGenerationResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }