All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.textract.model.StartDocumentAnalysisRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Textract module holds the client classes that are used for communicating with Amazon Textract Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2014-2019 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.textract.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 StartDocumentAnalysisRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* The location of the document to be processed. *

*/ private DocumentLocation documentLocation; /** *

* A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that * are detected in the input document. Add FORMS to return detected fields and the associated text. To perform both * types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements ( * SELECTION_ELEMENT) that are detected are returned, whatever the value of FeatureTypes. *

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

* The idempotent token that you use to identify the start request. If you use the same token with multiple * StartDocumentAnalysis requests, the same JobId is returned. Use * ClientRequestToken to prevent the same job from being accidentally started more than once. *

*/ private String clientRequestToken; /** *

* An identifier you specify that's included in the completion notification that's published to the Amazon SNS * topic. For example, you can use JobTag to identify the type of document, such as a tax form or a * receipt, that the completion notification corresponds to. *

*/ private String jobTag; /** *

* The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to. *

*/ private NotificationChannel notificationChannel; /** *

* The location of the document to be processed. *

* * @param documentLocation * The location of the document to be processed. */ public void setDocumentLocation(DocumentLocation documentLocation) { this.documentLocation = documentLocation; } /** *

* The location of the document to be processed. *

* * @return The location of the document to be processed. */ public DocumentLocation getDocumentLocation() { return this.documentLocation; } /** *

* The location of the document to be processed. *

* * @param documentLocation * The location of the document to be processed. * @return Returns a reference to this object so that method calls can be chained together. */ public StartDocumentAnalysisRequest withDocumentLocation(DocumentLocation documentLocation) { setDocumentLocation(documentLocation); return this; } /** *

* A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that * are detected in the input document. Add FORMS to return detected fields and the associated text. To perform both * types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements ( * SELECTION_ELEMENT) that are detected are returned, whatever the value of FeatureTypes. *

* * @return A list of the types of analysis to perform. Add TABLES to the list to return information about the tables * that are detected in the input document. Add FORMS to return detected fields and the associated text. To * perform both types of analysis, add TABLES and FORMS to FeatureTypes. All selectable * elements (SELECTION_ELEMENT) that are detected are returned, whatever the value of * FeatureTypes. * @see FeatureType */ public java.util.List getFeatureTypes() { return featureTypes; } /** *

* A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that * are detected in the input document. Add FORMS to return detected fields and the associated text. To perform both * types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements ( * SELECTION_ELEMENT) that are detected are returned, whatever the value of FeatureTypes. *

* * @param featureTypes * A list of the types of analysis to perform. Add TABLES to the list to return information about the tables * that are detected in the input document. Add FORMS to return detected fields and the associated text. To * perform both types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements * (SELECTION_ELEMENT) that are detected are returned, whatever the value of * FeatureTypes. * @see FeatureType */ public void setFeatureTypes(java.util.Collection featureTypes) { if (featureTypes == null) { this.featureTypes = null; return; } this.featureTypes = new java.util.ArrayList(featureTypes); } /** *

* A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that * are detected in the input document. Add FORMS to return detected fields and the associated text. To perform both * types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements ( * SELECTION_ELEMENT) that are detected are returned, whatever the value of FeatureTypes. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setFeatureTypes(java.util.Collection)} or {@link #withFeatureTypes(java.util.Collection)} if you want to * override the existing values. *

* * @param featureTypes * A list of the types of analysis to perform. Add TABLES to the list to return information about the tables * that are detected in the input document. Add FORMS to return detected fields and the associated text. To * perform both types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements * (SELECTION_ELEMENT) that are detected are returned, whatever the value of * FeatureTypes. * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureType */ public StartDocumentAnalysisRequest withFeatureTypes(String... featureTypes) { if (this.featureTypes == null) { setFeatureTypes(new java.util.ArrayList(featureTypes.length)); } for (String ele : featureTypes) { this.featureTypes.add(ele); } return this; } /** *

* A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that * are detected in the input document. Add FORMS to return detected fields and the associated text. To perform both * types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements ( * SELECTION_ELEMENT) that are detected are returned, whatever the value of FeatureTypes. *

* * @param featureTypes * A list of the types of analysis to perform. Add TABLES to the list to return information about the tables * that are detected in the input document. Add FORMS to return detected fields and the associated text. To * perform both types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements * (SELECTION_ELEMENT) that are detected are returned, whatever the value of * FeatureTypes. * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureType */ public StartDocumentAnalysisRequest withFeatureTypes(java.util.Collection featureTypes) { setFeatureTypes(featureTypes); return this; } /** *

* A list of the types of analysis to perform. Add TABLES to the list to return information about the tables that * are detected in the input document. Add FORMS to return detected fields and the associated text. To perform both * types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements ( * SELECTION_ELEMENT) that are detected are returned, whatever the value of FeatureTypes. *

* * @param featureTypes * A list of the types of analysis to perform. Add TABLES to the list to return information about the tables * that are detected in the input document. Add FORMS to return detected fields and the associated text. To * perform both types of analysis, add TABLES and FORMS to FeatureTypes. All selectable elements * (SELECTION_ELEMENT) that are detected are returned, whatever the value of * FeatureTypes. * @return Returns a reference to this object so that method calls can be chained together. * @see FeatureType */ public StartDocumentAnalysisRequest withFeatureTypes(FeatureType... featureTypes) { java.util.ArrayList featureTypesCopy = new java.util.ArrayList(featureTypes.length); for (FeatureType value : featureTypes) { featureTypesCopy.add(value.toString()); } if (getFeatureTypes() == null) { setFeatureTypes(featureTypesCopy); } else { getFeatureTypes().addAll(featureTypesCopy); } return this; } /** *

* The idempotent token that you use to identify the start request. If you use the same token with multiple * StartDocumentAnalysis requests, the same JobId is returned. Use * ClientRequestToken to prevent the same job from being accidentally started more than once. *

* * @param clientRequestToken * The idempotent token that you use to identify the start request. If you use the same token with multiple * StartDocumentAnalysis requests, the same JobId is returned. Use * ClientRequestToken to prevent the same job from being accidentally started more than once. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *

* The idempotent token that you use to identify the start request. If you use the same token with multiple * StartDocumentAnalysis requests, the same JobId is returned. Use * ClientRequestToken to prevent the same job from being accidentally started more than once. *

* * @return The idempotent token that you use to identify the start request. If you use the same token with multiple * StartDocumentAnalysis requests, the same JobId is returned. Use * ClientRequestToken to prevent the same job from being accidentally started more than once. */ public String getClientRequestToken() { return this.clientRequestToken; } /** *

* The idempotent token that you use to identify the start request. If you use the same token with multiple * StartDocumentAnalysis requests, the same JobId is returned. Use * ClientRequestToken to prevent the same job from being accidentally started more than once. *

* * @param clientRequestToken * The idempotent token that you use to identify the start request. If you use the same token with multiple * StartDocumentAnalysis requests, the same JobId is returned. Use * ClientRequestToken to prevent the same job from being accidentally started more than once. * @return Returns a reference to this object so that method calls can be chained together. */ public StartDocumentAnalysisRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

* An identifier you specify that's included in the completion notification that's published to the Amazon SNS * topic. For example, you can use JobTag to identify the type of document, such as a tax form or a * receipt, that the completion notification corresponds to. *

* * @param jobTag * An identifier you specify that's included in the completion notification that's published to the Amazon * SNS topic. For example, you can use JobTag to identify the type of document, such as a tax * form or a receipt, that the completion notification corresponds to. */ public void setJobTag(String jobTag) { this.jobTag = jobTag; } /** *

* An identifier you specify that's included in the completion notification that's published to the Amazon SNS * topic. For example, you can use JobTag to identify the type of document, such as a tax form or a * receipt, that the completion notification corresponds to. *

* * @return An identifier you specify that's included in the completion notification that's published to the Amazon * SNS topic. For example, you can use JobTag to identify the type of document, such as a tax * form or a receipt, that the completion notification corresponds to. */ public String getJobTag() { return this.jobTag; } /** *

* An identifier you specify that's included in the completion notification that's published to the Amazon SNS * topic. For example, you can use JobTag to identify the type of document, such as a tax form or a * receipt, that the completion notification corresponds to. *

* * @param jobTag * An identifier you specify that's included in the completion notification that's published to the Amazon * SNS topic. For example, you can use JobTag to identify the type of document, such as a tax * form or a receipt, that the completion notification corresponds to. * @return Returns a reference to this object so that method calls can be chained together. */ public StartDocumentAnalysisRequest withJobTag(String jobTag) { setJobTag(jobTag); return this; } /** *

* The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to. *

* * @param notificationChannel * The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation * to. */ public void setNotificationChannel(NotificationChannel notificationChannel) { this.notificationChannel = notificationChannel; } /** *

* The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to. *

* * @return The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation * to. */ public NotificationChannel getNotificationChannel() { return this.notificationChannel; } /** *

* The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation to. *

* * @param notificationChannel * The Amazon SNS topic ARN that you want Amazon Textract to publish the completion status of the operation * to. * @return Returns a reference to this object so that method calls can be chained together. */ public StartDocumentAnalysisRequest withNotificationChannel(NotificationChannel notificationChannel) { setNotificationChannel(notificationChannel); 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 (getDocumentLocation() != null) sb.append("DocumentLocation: ").append(getDocumentLocation()).append(","); if (getFeatureTypes() != null) sb.append("FeatureTypes: ").append(getFeatureTypes()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getJobTag() != null) sb.append("JobTag: ").append(getJobTag()).append(","); if (getNotificationChannel() != null) sb.append("NotificationChannel: ").append(getNotificationChannel()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartDocumentAnalysisRequest == false) return false; StartDocumentAnalysisRequest other = (StartDocumentAnalysisRequest) obj; if (other.getDocumentLocation() == null ^ this.getDocumentLocation() == null) return false; if (other.getDocumentLocation() != null && other.getDocumentLocation().equals(this.getDocumentLocation()) == false) return false; if (other.getFeatureTypes() == null ^ this.getFeatureTypes() == null) return false; if (other.getFeatureTypes() != null && other.getFeatureTypes().equals(this.getFeatureTypes()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getJobTag() == null ^ this.getJobTag() == null) return false; if (other.getJobTag() != null && other.getJobTag().equals(this.getJobTag()) == false) return false; if (other.getNotificationChannel() == null ^ this.getNotificationChannel() == null) return false; if (other.getNotificationChannel() != null && other.getNotificationChannel().equals(this.getNotificationChannel()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDocumentLocation() == null) ? 0 : getDocumentLocation().hashCode()); hashCode = prime * hashCode + ((getFeatureTypes() == null) ? 0 : getFeatureTypes().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getJobTag() == null) ? 0 : getJobTag().hashCode()); hashCode = prime * hashCode + ((getNotificationChannel() == null) ? 0 : getNotificationChannel().hashCode()); return hashCode; } @Override public StartDocumentAnalysisRequest clone() { return (StartDocumentAnalysisRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy