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

com.amazonaws.services.comprehend.model.DocumentReaderConfig Maven / Gradle / Ivy

/*
 * Copyright 2017-2022 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;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The input properties for a topic detection job. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DocumentReaderConfig implements Serializable, Cloneable, StructuredPojo { /** *

* This enum field will start with two values which will apply to PDFs: *

*
    *
  • *

    * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per page. *

    *
  • *
  • *

    * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

    *
  • *
*/ private String documentReadAction; /** *

* This enum field provides two values: *

*
    *
  • *

    * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean using an * internal parser instead of Textract APIs *

    *
  • *
  • *

    * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including Digital * PDF. *

    *
  • *
*/ private String documentReadMode; /** *

* Specifies how the text in an input file should be processed: *

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

* This enum field will start with two values which will apply to PDFs: *

*
    *
  • *

    * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per page. *

    *
  • *
  • *

    * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

    *
  • *
* * @param documentReadAction * This enum field will start with two values which will apply to PDFs:

*
    *
  • *

    * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per * page. *

    *
  • *
  • *

    * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

    *
  • * @see DocumentReadAction */ public void setDocumentReadAction(String documentReadAction) { this.documentReadAction = documentReadAction; } /** *

    * This enum field will start with two values which will apply to PDFs: *

    *
      *
    • *

      * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per page. *

      *
    • *
    • *

      * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

      *
    • *
    * * @return This enum field will start with two values which will apply to PDFs:

    *
      *
    • *

      * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per * page. *

      *
    • *
    • *

      * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

      *
    • * @see DocumentReadAction */ public String getDocumentReadAction() { return this.documentReadAction; } /** *

      * This enum field will start with two values which will apply to PDFs: *

      *
        *
      • *

        * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per page. *

        *
      • *
      • *

        * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

        *
      • *
      * * @param documentReadAction * This enum field will start with two values which will apply to PDFs:

      *
        *
      • *

        * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per * page. *

        *
      • *
      • *

        * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentReadAction */ public DocumentReaderConfig withDocumentReadAction(String documentReadAction) { setDocumentReadAction(documentReadAction); return this; } /** *

        * This enum field will start with two values which will apply to PDFs: *

        *
          *
        • *

          * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per page. *

          *
        • *
        • *

          * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

          *
        • *
        * * @param documentReadAction * This enum field will start with two values which will apply to PDFs:

        *
          *
        • *

          * TEXTRACT_DETECT_DOCUMENT_TEXT - The service calls DetectDocumentText for PDF documents per * page. *

          *
        • *
        • *

          * TEXTRACT_ANALYZE_DOCUMENT - The service calls AnalyzeDocument for PDF documents per page. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentReadAction */ public DocumentReaderConfig withDocumentReadAction(DocumentReadAction documentReadAction) { this.documentReadAction = documentReadAction.toString(); return this; } /** *

          * This enum field provides two values: *

          *
            *
          • *

            * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean using an * internal parser instead of Textract APIs *

            *
          • *
          • *

            * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including Digital * PDF. *

            *
          • *
          * * @param documentReadMode * This enum field provides two values:

          *
            *
          • *

            * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean * using an internal parser instead of Textract APIs *

            *
          • *
          • *

            * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including * Digital PDF. *

            *
          • * @see DocumentReadMode */ public void setDocumentReadMode(String documentReadMode) { this.documentReadMode = documentReadMode; } /** *

            * This enum field provides two values: *

            *
              *
            • *

              * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean using an * internal parser instead of Textract APIs *

              *
            • *
            • *

              * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including Digital * PDF. *

              *
            • *
            * * @return This enum field provides two values:

            *
              *
            • *

              * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean * using an internal parser instead of Textract APIs *

              *
            • *
            • *

              * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including * Digital PDF. *

              *
            • * @see DocumentReadMode */ public String getDocumentReadMode() { return this.documentReadMode; } /** *

              * This enum field provides two values: *

              *
                *
              • *

                * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean using an * internal parser instead of Textract APIs *

                *
              • *
              • *

                * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including Digital * PDF. *

                *
              • *
              * * @param documentReadMode * This enum field provides two values:

              *
                *
              • *

                * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean * using an internal parser instead of Textract APIs *

                *
              • *
              • *

                * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including * Digital PDF. *

                *
              • * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentReadMode */ public DocumentReaderConfig withDocumentReadMode(String documentReadMode) { setDocumentReadMode(documentReadMode); return this; } /** *

                * This enum field provides two values: *

                *
                  *
                • *

                  * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean using an * internal parser instead of Textract APIs *

                  *
                • *
                • *

                  * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including Digital * PDF. *

                  *
                • *
                * * @param documentReadMode * This enum field provides two values:

                *
                  *
                • *

                  * SERVICE_DEFAULT - use service defaults for Document reading. For Digital PDF it would mean * using an internal parser instead of Textract APIs *

                  *
                • *
                • *

                  * FORCE_DOCUMENT_READ_ACTION - Always use specified action for DocumentReadAction, including * Digital PDF. *

                  *
                • * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentReadMode */ public DocumentReaderConfig withDocumentReadMode(DocumentReadMode documentReadMode) { this.documentReadMode = documentReadMode.toString(); return this; } /** *

                  * Specifies how the text in an input file should be processed: *

                  * * @return Specifies how the text in an input file should be processed: * @see DocumentReadFeatureTypes */ public java.util.List getFeatureTypes() { return featureTypes; } /** *

                  * Specifies how the text in an input file should be processed: *

                  * * @param featureTypes * Specifies how the text in an input file should be processed: * @see DocumentReadFeatureTypes */ public void setFeatureTypes(java.util.Collection featureTypes) { if (featureTypes == null) { this.featureTypes = null; return; } this.featureTypes = new java.util.ArrayList(featureTypes); } /** *

                  * Specifies how the text in an input file should be processed: *

                  *

                  * 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 * Specifies how the text in an input file should be processed: * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentReadFeatureTypes */ public DocumentReaderConfig withFeatureTypes(String... featureTypes) { if (this.featureTypes == null) { setFeatureTypes(new java.util.ArrayList(featureTypes.length)); } for (String ele : featureTypes) { this.featureTypes.add(ele); } return this; } /** *

                  * Specifies how the text in an input file should be processed: *

                  * * @param featureTypes * Specifies how the text in an input file should be processed: * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentReadFeatureTypes */ public DocumentReaderConfig withFeatureTypes(java.util.Collection featureTypes) { setFeatureTypes(featureTypes); return this; } /** *

                  * Specifies how the text in an input file should be processed: *

                  * * @param featureTypes * Specifies how the text in an input file should be processed: * @return Returns a reference to this object so that method calls can be chained together. * @see DocumentReadFeatureTypes */ public DocumentReaderConfig withFeatureTypes(DocumentReadFeatureTypes... featureTypes) { java.util.ArrayList featureTypesCopy = new java.util.ArrayList(featureTypes.length); for (DocumentReadFeatureTypes value : featureTypes) { featureTypesCopy.add(value.toString()); } if (getFeatureTypes() == null) { setFeatureTypes(featureTypesCopy); } else { getFeatureTypes().addAll(featureTypesCopy); } 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 (getDocumentReadAction() != null) sb.append("DocumentReadAction: ").append(getDocumentReadAction()).append(","); if (getDocumentReadMode() != null) sb.append("DocumentReadMode: ").append(getDocumentReadMode()).append(","); if (getFeatureTypes() != null) sb.append("FeatureTypes: ").append(getFeatureTypes()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DocumentReaderConfig == false) return false; DocumentReaderConfig other = (DocumentReaderConfig) obj; if (other.getDocumentReadAction() == null ^ this.getDocumentReadAction() == null) return false; if (other.getDocumentReadAction() != null && other.getDocumentReadAction().equals(this.getDocumentReadAction()) == false) return false; if (other.getDocumentReadMode() == null ^ this.getDocumentReadMode() == null) return false; if (other.getDocumentReadMode() != null && other.getDocumentReadMode().equals(this.getDocumentReadMode()) == false) return false; if (other.getFeatureTypes() == null ^ this.getFeatureTypes() == null) return false; if (other.getFeatureTypes() != null && other.getFeatureTypes().equals(this.getFeatureTypes()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDocumentReadAction() == null) ? 0 : getDocumentReadAction().hashCode()); hashCode = prime * hashCode + ((getDocumentReadMode() == null) ? 0 : getDocumentReadMode().hashCode()); hashCode = prime * hashCode + ((getFeatureTypes() == null) ? 0 : getFeatureTypes().hashCode()); return hashCode; } @Override public DocumentReaderConfig clone() { try { return (DocumentReaderConfig) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.comprehend.model.transform.DocumentReaderConfigMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy