/* * Copyright 2010-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.comprehend.model; import java.io.Serializable; /** *

* Specifies the format and location of the input data for the dataset. *

*/ public class DatasetInputDataConfig implements Serializable { /** *

* A list of augmented manifest files that provide training data for your * custom model. An augmented manifest file is a labeled dataset that is * produced by Amazon SageMaker Ground Truth. *

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

* COMPREHEND_CSV: The data format is a two-column CSV file, * where the first column contains labels and the second column contains * documents. *

*

* AUGMENTED_MANIFEST: The data format *

*

* Constraints:
* Allowed Values: COMPREHEND_CSV, AUGMENTED_MANIFEST */ private String dataFormat; /** *

* The input properties for training a document classifier model. *

*

* For more information on how the input file is formatted, see Preparing training data in the Comprehend Developer Guide. *

*/ private DatasetDocumentClassifierInputDataConfig documentClassifierInputDataConfig; /** *

* The input properties for training an entity recognizer model. *

*/ private DatasetEntityRecognizerInputDataConfig entityRecognizerInputDataConfig; /** *

* A list of augmented manifest files that provide training data for your * custom model. An augmented manifest file is a labeled dataset that is * produced by Amazon SageMaker Ground Truth. *

* * @return

* A list of augmented manifest files that provide training data for * your custom model. An augmented manifest file is a labeled * dataset that is produced by Amazon SageMaker Ground Truth. *

*/ public java.util.List getAugmentedManifests() { return augmentedManifests; } /** *

* A list of augmented manifest files that provide training data for your * custom model. An augmented manifest file is a labeled dataset that is * produced by Amazon SageMaker Ground Truth. *

* * @param augmentedManifests

* A list of augmented manifest files that provide training data * for your custom model. An augmented manifest file is a labeled * dataset that is produced by Amazon SageMaker Ground Truth. *

*/ public void setAugmentedManifests( java.util.Collection augmentedManifests) { if (augmentedManifests == null) { this.augmentedManifests = null; return; } this.augmentedManifests = new java.util.ArrayList( augmentedManifests); } /** *

* A list of augmented manifest files that provide training data for your * custom model. An augmented manifest file is a labeled dataset that is * produced by Amazon SageMaker Ground Truth. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param augmentedManifests

* A list of augmented manifest files that provide training data * for your custom model. An augmented manifest file is a labeled * dataset that is produced by Amazon SageMaker Ground Truth. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetInputDataConfig withAugmentedManifests( DatasetAugmentedManifestsListItem... augmentedManifests) { if (getAugmentedManifests() == null) { this.augmentedManifests = new java.util.ArrayList( augmentedManifests.length); } for (DatasetAugmentedManifestsListItem value : augmentedManifests) { this.augmentedManifests.add(value); } return this; } /** *

* A list of augmented manifest files that provide training data for your * custom model. An augmented manifest file is a labeled dataset that is * produced by Amazon SageMaker Ground Truth. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param augmentedManifests

* A list of augmented manifest files that provide training data * for your custom model. An augmented manifest file is a labeled * dataset that is produced by Amazon SageMaker Ground Truth. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetInputDataConfig withAugmentedManifests( java.util.Collection augmentedManifests) { setAugmentedManifests(augmentedManifests); return this; } /** *

* COMPREHEND_CSV: The data format is a two-column CSV file, * where the first column contains labels and the second column contains * documents. *

*

* AUGMENTED_MANIFEST: The data format *

*

* Constraints:
* Allowed Values: COMPREHEND_CSV, AUGMENTED_MANIFEST * * @return

* COMPREHEND_CSV: The data format is a two-column CSV * file, where the first column contains labels and the second * column contains documents. *

*

* AUGMENTED_MANIFEST: The data format *

* @see DatasetDataFormat */ public String getDataFormat() { return dataFormat; } /** *

* COMPREHEND_CSV: The data format is a two-column CSV file, * where the first column contains labels and the second column contains * documents. *

*

* AUGMENTED_MANIFEST: The data format *

*

* Constraints:
* Allowed Values: COMPREHEND_CSV, AUGMENTED_MANIFEST * * @param dataFormat

* COMPREHEND_CSV: The data format is a two-column * CSV file, where the first column contains labels and the * second column contains documents. *

*

* AUGMENTED_MANIFEST: The data format *

* @see DatasetDataFormat */ public void setDataFormat(String dataFormat) { this.dataFormat = dataFormat; } /** *

* COMPREHEND_CSV: The data format is a two-column CSV file, * where the first column contains labels and the second column contains * documents. *

*

* AUGMENTED_MANIFEST: The data format *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: COMPREHEND_CSV, AUGMENTED_MANIFEST * * @param dataFormat

* COMPREHEND_CSV: The data format is a two-column * CSV file, where the first column contains labels and the * second column contains documents. *

*

* AUGMENTED_MANIFEST: The data format *

* @return A reference to this updated object so that method calls can be * chained together. * @see DatasetDataFormat */ public DatasetInputDataConfig withDataFormat(String dataFormat) { this.dataFormat = dataFormat; return this; } /** *

* COMPREHEND_CSV: The data format is a two-column CSV file, * where the first column contains labels and the second column contains * documents. *

*

* AUGMENTED_MANIFEST: The data format *

*

* Constraints:
* Allowed Values: COMPREHEND_CSV, AUGMENTED_MANIFEST * * @param dataFormat

* COMPREHEND_CSV: The data format is a two-column * CSV file, where the first column contains labels and the * second column contains documents. *

*

* AUGMENTED_MANIFEST: The data format *

* @see DatasetDataFormat */ public void setDataFormat(DatasetDataFormat dataFormat) { this.dataFormat = dataFormat.toString(); } /** *

* COMPREHEND_CSV: The data format is a two-column CSV file, * where the first column contains labels and the second column contains * documents. *

*

* AUGMENTED_MANIFEST: The data format *

*

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: COMPREHEND_CSV, AUGMENTED_MANIFEST * * @param dataFormat

* COMPREHEND_CSV: The data format is a two-column * CSV file, where the first column contains labels and the * second column contains documents. *

*

* AUGMENTED_MANIFEST: The data format *

* @return A reference to this updated object so that method calls can be * chained together. * @see DatasetDataFormat */ public DatasetInputDataConfig withDataFormat(DatasetDataFormat dataFormat) { this.dataFormat = dataFormat.toString(); return this; } /** *

* The input properties for training a document classifier model. *

*

* For more information on how the input file is formatted, see Preparing training data in the Comprehend Developer Guide. *

* * @return

* The input properties for training a document classifier model. *

*

* For more information on how the input file is formatted, see Preparing training data in the Comprehend Developer Guide. *

*/ public DatasetDocumentClassifierInputDataConfig getDocumentClassifierInputDataConfig() { return documentClassifierInputDataConfig; } /** *

* The input properties for training a document classifier model. *

*

* For more information on how the input file is formatted, see Preparing training data in the Comprehend Developer Guide. *

* * @param documentClassifierInputDataConfig

* The input properties for training a document classifier model. *

*

* For more information on how the input file is formatted, see * Preparing training data in the Comprehend Developer * Guide. *

*/ public void setDocumentClassifierInputDataConfig( DatasetDocumentClassifierInputDataConfig documentClassifierInputDataConfig) { this.documentClassifierInputDataConfig = documentClassifierInputDataConfig; } /** *

* The input properties for training a document classifier model. *

*

* For more information on how the input file is formatted, see Preparing training data in the Comprehend Developer Guide. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param documentClassifierInputDataConfig

* The input properties for training a document classifier model. *

*

* For more information on how the input file is formatted, see * Preparing training data in the Comprehend Developer * Guide. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetInputDataConfig withDocumentClassifierInputDataConfig( DatasetDocumentClassifierInputDataConfig documentClassifierInputDataConfig) { this.documentClassifierInputDataConfig = documentClassifierInputDataConfig; return this; } /** *

* The input properties for training an entity recognizer model. *

* * @return

* The input properties for training an entity recognizer model. *

*/ public DatasetEntityRecognizerInputDataConfig getEntityRecognizerInputDataConfig() { return entityRecognizerInputDataConfig; } /** *

* The input properties for training an entity recognizer model. *

* * @param entityRecognizerInputDataConfig

* The input properties for training an entity recognizer model. *

*/ public void setEntityRecognizerInputDataConfig( DatasetEntityRecognizerInputDataConfig entityRecognizerInputDataConfig) { this.entityRecognizerInputDataConfig = entityRecognizerInputDataConfig; } /** *

* The input properties for training an entity recognizer model. *

*

* Returns a reference to this object so that method calls can be chained * together. * * @param entityRecognizerInputDataConfig

* The input properties for training an entity recognizer model. *

* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetInputDataConfig withEntityRecognizerInputDataConfig( DatasetEntityRecognizerInputDataConfig entityRecognizerInputDataConfig) { this.entityRecognizerInputDataConfig = entityRecognizerInputDataConfig; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAugmentedManifests() != null) sb.append("AugmentedManifests: " + getAugmentedManifests() + ","); if (getDataFormat() != null) sb.append("DataFormat: " + getDataFormat() + ","); if (getDocumentClassifierInputDataConfig() != null) sb.append("DocumentClassifierInputDataConfig: " + getDocumentClassifierInputDataConfig() + ","); if (getEntityRecognizerInputDataConfig() != null) sb.append("EntityRecognizerInputDataConfig: " + getEntityRecognizerInputDataConfig()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAugmentedManifests() == null) ? 0 : getAugmentedManifests().hashCode()); hashCode = prime * hashCode + ((getDataFormat() == null) ? 0 : getDataFormat().hashCode()); hashCode = prime * hashCode + ((getDocumentClassifierInputDataConfig() == null) ? 0 : getDocumentClassifierInputDataConfig().hashCode()); hashCode = prime * hashCode + ((getEntityRecognizerInputDataConfig() == null) ? 0 : getEntityRecognizerInputDataConfig().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DatasetInputDataConfig == false) return false; DatasetInputDataConfig other = (DatasetInputDataConfig) obj; if (other.getAugmentedManifests() == null ^ this.getAugmentedManifests() == null) return false; if (other.getAugmentedManifests() != null && other.getAugmentedManifests().equals(this.getAugmentedManifests()) == false) return false; if (other.getDataFormat() == null ^ this.getDataFormat() == null) return false; if (other.getDataFormat() != null && other.getDataFormat().equals(this.getDataFormat()) == false) return false; if (other.getDocumentClassifierInputDataConfig() == null ^ this.getDocumentClassifierInputDataConfig() == null) return false; if (other.getDocumentClassifierInputDataConfig() != null && other.getDocumentClassifierInputDataConfig().equals( this.getDocumentClassifierInputDataConfig()) == false) return false; if (other.getEntityRecognizerInputDataConfig() == null ^ this.getEntityRecognizerInputDataConfig() == null) return false; if (other.getEntityRecognizerInputDataConfig() != null && other.getEntityRecognizerInputDataConfig().equals( this.getEntityRecognizerInputDataConfig()) == false) return false; return true; } }