/* * 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. You must provide either
* the Annotations
parameter or the EntityList
* parameter.
*
* The S3 location of the annotation documents for your custom entity * recognizer. *
*/ private DatasetEntityRecognizerAnnotations annotations; /** ** The format and location of the training documents for your custom entity * recognizer. *
*/ private DatasetEntityRecognizerDocuments documents; /** ** The S3 location of the entity list for your custom entity recognizer. *
*/ private DatasetEntityRecognizerEntityList entityList; /** ** The S3 location of the annotation documents for your custom entity * recognizer. *
* * @return* The S3 location of the annotation documents for your custom * entity recognizer. *
*/ public DatasetEntityRecognizerAnnotations getAnnotations() { return annotations; } /** ** The S3 location of the annotation documents for your custom entity * recognizer. *
* * @param annotations* The S3 location of the annotation documents for your custom * entity recognizer. *
*/ public void setAnnotations(DatasetEntityRecognizerAnnotations annotations) { this.annotations = annotations; } /** ** The S3 location of the annotation documents for your custom entity * recognizer. *
** Returns a reference to this object so that method calls can be chained * together. * * @param annotations
* The S3 location of the annotation documents for your custom * entity recognizer. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetEntityRecognizerInputDataConfig withAnnotations( DatasetEntityRecognizerAnnotations annotations) { this.annotations = annotations; return this; } /** ** The format and location of the training documents for your custom entity * recognizer. *
* * @return* The format and location of the training documents for your custom * entity recognizer. *
*/ public DatasetEntityRecognizerDocuments getDocuments() { return documents; } /** ** The format and location of the training documents for your custom entity * recognizer. *
* * @param documents* The format and location of the training documents for your * custom entity recognizer. *
*/ public void setDocuments(DatasetEntityRecognizerDocuments documents) { this.documents = documents; } /** ** The format and location of the training documents for your custom entity * recognizer. *
** Returns a reference to this object so that method calls can be chained * together. * * @param documents
* The format and location of the training documents for your * custom entity recognizer. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetEntityRecognizerInputDataConfig withDocuments( DatasetEntityRecognizerDocuments documents) { this.documents = documents; return this; } /** ** The S3 location of the entity list for your custom entity recognizer. *
* * @return* The S3 location of the entity list for your custom entity * recognizer. *
*/ public DatasetEntityRecognizerEntityList getEntityList() { return entityList; } /** ** The S3 location of the entity list for your custom entity recognizer. *
* * @param entityList* The S3 location of the entity list for your custom entity * recognizer. *
*/ public void setEntityList(DatasetEntityRecognizerEntityList entityList) { this.entityList = entityList; } /** ** The S3 location of the entity list for your custom entity recognizer. *
** Returns a reference to this object so that method calls can be chained * together. * * @param entityList
* The S3 location of the entity list for your custom entity * recognizer. *
* @return A reference to this updated object so that method calls can be * chained together. */ public DatasetEntityRecognizerInputDataConfig withEntityList( DatasetEntityRecognizerEntityList entityList) { this.entityList = entityList; 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 (getAnnotations() != null) sb.append("Annotations: " + getAnnotations() + ","); if (getDocuments() != null) sb.append("Documents: " + getDocuments() + ","); if (getEntityList() != null) sb.append("EntityList: " + getEntityList()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAnnotations() == null) ? 0 : getAnnotations().hashCode()); hashCode = prime * hashCode + ((getDocuments() == null) ? 0 : getDocuments().hashCode()); hashCode = prime * hashCode + ((getEntityList() == null) ? 0 : getEntityList().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DatasetEntityRecognizerInputDataConfig == false) return false; DatasetEntityRecognizerInputDataConfig other = (DatasetEntityRecognizerInputDataConfig) obj; if (other.getAnnotations() == null ^ this.getAnnotations() == null) return false; if (other.getAnnotations() != null && other.getAnnotations().equals(this.getAnnotations()) == false) return false; if (other.getDocuments() == null ^ this.getDocuments() == null) return false; if (other.getDocuments() != null && other.getDocuments().equals(this.getDocuments()) == false) return false; if (other.getEntityList() == null ^ this.getEntityList() == null) return false; if (other.getEntityList() != null && other.getEntityList().equals(this.getEntityList()) == false) return false; return true; } }