Class AnalyzeDocumentOptions

java.lang.Object
com.azure.ai.documentintelligence.models.AnalyzeDocumentOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<AnalyzeDocumentOptions>

public final class AnalyzeDocumentOptions extends Object implements com.azure.json.JsonSerializable<AnalyzeDocumentOptions>
Document analysis parameters.
  • Constructor Details

    • AnalyzeDocumentOptions

      public AnalyzeDocumentOptions(String urlSource)
      Creates an instance of AnalyzeDocumentOptions with the specified URL source.
      Parameters:
      urlSource - the URL of the document to analyze.
    • AnalyzeDocumentOptions

      public AnalyzeDocumentOptions(byte[] bytesSource)
      Creates an instance of AnalyzeDocumentOptions with the specified bytes of the document.
      Parameters:
      bytesSource - the bytes of the document to analyze.
    • AnalyzeDocumentOptions

      public AnalyzeDocumentOptions(com.azure.core.util.BinaryData binaryData)
      Creates an instance of AnalyzeDocumentOptions with the specified BinaryData source.
      Parameters:
      binaryData - the document to analyze.
  • Method Details

    • getUrlSource

      public String getUrlSource()
      Get the urlSource property: Document URL to analyze. Either urlSource or base64Source must be specified.
      Returns:
      the urlSource value.
    • getBytesSource

      public byte[] getBytesSource()
      Get the bytesSource property: Base64 encoding of the document to analyze. Either urlSource or base64Source must be specified.
      Returns:
      the bytesSource value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<AnalyzeDocumentOptions>
      Throws:
      IOException
    • fromJson

      public static AnalyzeDocumentOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AnalyzeDocumentOptions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AnalyzeDocumentOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the AnalyzeDocumentOptions.
    • getQueryFields

      public List<String> getQueryFields()
      Gets the list of additional fields to include in the result.
      Returns:
      the list of additional fields to include in the result.
    • setQueryFields

      public AnalyzeDocumentOptions setQueryFields(List<String> queryFields)
      Sets the list of additional fields to include in the result.
      Parameters:
      queryFields - the list of additional fields to include in the result.
      Returns:
      the updated AnalyzeDocumentOptions value.
    • getOutputContentFormat

      public DocumentContentFormat getOutputContentFormat()
      Gets the output content format.
      Returns:
      the output content format.
    • setOutputContentFormat

      public AnalyzeDocumentOptions setOutputContentFormat(DocumentContentFormat outputContentFormat)
      Sets the output content format.
      Parameters:
      outputContentFormat - the output content format to set.
      Returns:
      the updated AnalyzeDocumentOptions value.
    • getOutput

      public List<AnalyzeOutputFormat> getOutput()
      Gets the list of output formats.
      Returns:
      the list of output formats.
    • setOutput

      public AnalyzeDocumentOptions setOutput(List<AnalyzeOutputFormat> output)
      Sets the list of output formats.
      Parameters:
      output - the list of output formats to set.
      Returns:
      the updated AnalyzeDocumentOptions value.
    • getStringIndexType

      public StringIndexType getStringIndexType()
      Gets the string index type.
      Returns:
      the string index type.
    • setStringIndexType

      public AnalyzeDocumentOptions setStringIndexType(StringIndexType stringIndexType)
      Sets the string index type.
      Parameters:
      stringIndexType - the string index type to set.
      Returns:
      the updated AnalyzeDocumentOptions value.
    • getPages

      public List<String> getPages()
      Get the custom page numbers for multipage documents(PDF/TIFF). Input the number of the pages you want to get the recognized result for.

      For a range of pages, use a hyphen, ex - ["1-3"]. Separate each page or a page range with a comma, ex - ["1-3", 4].

      Returns:
      the list of custom page numbers for a multipage document.
    • setPages

      public AnalyzeDocumentOptions setPages(List<String> pages)
      Set the custom page numbers for multipage documents(PDF/TIFF). Input the number of the pages you want to get the recognized result for.

      For a range of pages, use a hyphen, ex - ["1-3"]. Separate each page or a page range with a comma, ex - ["1-3", 4].

      Parameters:
      pages - the custom page numbers value to set.
      Returns:
      the updated AnalyzeDocumentOptions value.
    • getLocale

      public String getLocale()
      Get the locale hint for text recognition and document analysis. Value may contain only the language code (ex. \"en\", \"fr\") or BCP 47 language tag (ex. \"en-US\").
      Returns:
      the locale value.
    • setLocale

      public AnalyzeDocumentOptions setLocale(String locale)
      Set the locale value. Supported locales include: en-AU, en-CA, en-GB, en-IN, en-US.
      Parameters:
      locale - the locale value to set.
      Returns:
      the updated AnalyzeDocumentOptions value.
    • getDocumentAnalysisFeatures

      public List<DocumentAnalysisFeature> getDocumentAnalysisFeatures()
      Get the list of optional analysis features.
      Returns:
      List of optional analysis features.
    • setDocumentAnalysisFeatures

      public AnalyzeDocumentOptions setDocumentAnalysisFeatures(List<DocumentAnalysisFeature> documentAnalysisFeatures)
      Set the list of optional analysis features.
      Parameters:
      documentAnalysisFeatures - List of optional analysis features.
      Returns:
      the updated AnalyzeDocumentOptions value.
    • setDocumentAnalysisFeatures

      public AnalyzeDocumentOptions setDocumentAnalysisFeatures(DocumentAnalysisFeature... documentAnalysisFeatures)
      Set optional analysis features.
      Parameters:
      documentAnalysisFeatures - List of optional analysis features.
      Returns:
      the updated AnalyzeDocumentOptions value.