/* * 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.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartTestSetGenerationRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

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

*/ private String testSetName; /** *

* The test set description for the test set generation request. *

*/ 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 to add to the test set. You can only add tags when you import/generate a new test set. You can't * use the UpdateTestSet operation to update tags. To update tags, use the TagResource * operation. *

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

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

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

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

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

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

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

* The test set description for the test set generation request. *

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

* The test set description for the test set generation request. *

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

* The test set description for the test set generation request. *

* * @param description * The test set description for the test set generation request. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationRequest 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 StartTestSetGenerationRequest 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 StartTestSetGenerationRequest 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 StartTestSetGenerationRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* A list of tags to add to the test set. You can only add tags when you import/generate a new test set. You can't * use the UpdateTestSet operation to update tags. To update tags, use the TagResource * operation. *

* * @return A list of tags to add to the test set. You can only add tags when you import/generate a new test set. You * can't use the UpdateTestSet operation to update tags. To update tags, use the * TagResource operation. */ public java.util.Map getTestSetTags() { return testSetTags; } /** *

* A list of tags to add to the test set. You can only add tags when you import/generate a new test set. You can't * use the UpdateTestSet operation to update tags. To update tags, use the TagResource * operation. *

* * @param testSetTags * A list of tags to add to the test set. You can only add tags when you import/generate a new test set. You * can't use the UpdateTestSet operation to update tags. To update tags, use the * TagResource operation. */ public void setTestSetTags(java.util.Map testSetTags) { this.testSetTags = testSetTags; } /** *

* A list of tags to add to the test set. You can only add tags when you import/generate a new test set. You can't * use the UpdateTestSet operation to update tags. To update tags, use the TagResource * operation. *

* * @param testSetTags * A list of tags to add to the test set. You can only add tags when you import/generate a new test set. You * can't use the UpdateTestSet operation to update tags. To update tags, use the * TagResource operation. * @return Returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationRequest withTestSetTags(java.util.Map testSetTags) { setTestSetTags(testSetTags); return this; } /** * Add a single TestSetTags entry * * @see StartTestSetGenerationRequest#withTestSetTags * @returns a reference to this object so that method calls can be chained together. */ public StartTestSetGenerationRequest 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 StartTestSetGenerationRequest 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 (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 StartTestSetGenerationRequest == false) return false; StartTestSetGenerationRequest other = (StartTestSetGenerationRequest) obj; 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 + ((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 StartTestSetGenerationRequest clone() { return (StartTestSetGenerationRequest) super.clone(); } }