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 Summary
ConstructorsConstructorDescriptionAnalyzeDocumentOptions
(byte[] bytesSource) Creates an instance of AnalyzeDocumentOptions with the specified bytes of the document.AnalyzeDocumentOptions
(com.azure.core.util.BinaryData binaryData) Creates an instance of AnalyzeDocumentOptions with the specified BinaryData source.AnalyzeDocumentOptions
(String urlSource) Creates an instance of AnalyzeDocumentOptions with the specified URL source. -
Method Summary
Modifier and TypeMethodDescriptionstatic AnalyzeDocumentOptions
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of AnalyzeDocumentOptions from the JsonReader.byte[]
Get the bytesSource property: Base64 encoding of the document to analyze.Get the list of optional analysis features.Get the locale hint for text recognition and document analysis.Gets the list of output formats.Gets the output content format.getPages()
Get the custom page numbers for multipage documents(PDF/TIFF).Gets the list of additional fields to include in the result.Gets the string index type.Get the urlSource property: Document URL to analyze.setDocumentAnalysisFeatures
(DocumentAnalysisFeature... documentAnalysisFeatures) Set optional analysis features.setDocumentAnalysisFeatures
(List<DocumentAnalysisFeature> documentAnalysisFeatures) Set the list of optional analysis features.Set the locale value.setOutput
(List<AnalyzeOutputFormat> output) Sets the list of output formats.setOutputContentFormat
(DocumentContentFormat outputContentFormat) Sets the output content format.Set the custom page numbers for multipage documents(PDF/TIFF).setQueryFields
(List<String> queryFields) Sets the list of additional fields to include in the result.setStringIndexType
(StringIndexType stringIndexType) Sets the string index type.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
AnalyzeDocumentOptions
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
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
- Specified by:
toJson
in interfacecom.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
Gets the list of additional fields to include in the result.- Returns:
- the list of additional fields to include in the result.
-
setQueryFields
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
Gets the output content format.- Returns:
- the output content format.
-
setOutputContentFormat
Sets the output content format.- Parameters:
outputContentFormat
- the output content format to set.- Returns:
- the updated
AnalyzeDocumentOptions
value.
-
getOutput
Gets the list of output formats.- Returns:
- the list of output formats.
-
setOutput
Sets the list of output formats.- Parameters:
output
- the list of output formats to set.- Returns:
- the updated
AnalyzeDocumentOptions
value.
-
getStringIndexType
Gets the string index type.- Returns:
- the string index type.
-
setStringIndexType
Sets the string index type.- Parameters:
stringIndexType
- the string index type to set.- Returns:
- the updated
AnalyzeDocumentOptions
value.
-
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
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
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
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
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.
-