Class DocumentIntelligenceAsyncClient
java.lang.Object
com.azure.ai.documentintelligence.DocumentIntelligenceAsyncClient
Initializes a new instance of the asynchronous DocumentIntelligenceClient type.
-
Method Summary
Modifier and TypeMethodDescriptioncom.azure.core.util.polling.PollerFlux<AnalyzeBatchResultOperation,
AnalyzeBatchResult> beginAnalyzeBatchDocuments
(String modelId) Analyzes batch documents with document model.com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,
com.azure.core.util.BinaryData> beginAnalyzeBatchDocuments
(String modelId, com.azure.core.http.rest.RequestOptions requestOptions) Analyzes batch documents with document model.com.azure.core.util.polling.PollerFlux<AnalyzeBatchResultOperation,
AnalyzeBatchResult> beginAnalyzeBatchDocuments
(String modelId, String pages, String locale, StringIndexType stringIndexType, List<DocumentAnalysisFeature> features, List<String> queryFields, ContentFormat outputContentFormat, List<AnalyzeOutputOption> output, AnalyzeBatchDocumentsRequest analyzeBatchRequest) Analyzes batch documents with document model.com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,
AnalyzeResult> beginAnalyzeDocument
(String modelId) Analyzes document with document model.com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,
com.azure.core.util.BinaryData> beginAnalyzeDocument
(String modelId, com.azure.core.http.rest.RequestOptions requestOptions) Analyzes document with document model.com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,
AnalyzeResult> beginAnalyzeDocument
(String modelId, String pages, String locale, StringIndexType stringIndexType, List<DocumentAnalysisFeature> features, List<String> queryFields, ContentFormat outputContentFormat, List<AnalyzeOutputOption> output, AnalyzeDocumentRequest analyzeRequest) Analyzes document with document model.com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,
AnalyzeResult> beginClassifyDocument
(String classifierId, ClassifyDocumentRequest classifyRequest) Classifies document with document classifier.com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,
AnalyzeResult> beginClassifyDocument
(String classifierId, ClassifyDocumentRequest classifyRequest, StringIndexType stringIndexType, SplitMode split, String pages) Classifies document with document classifier.com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,
com.azure.core.util.BinaryData> beginClassifyDocument
(String classifierId, com.azure.core.util.BinaryData classifyRequest, com.azure.core.http.rest.RequestOptions requestOptions) Classifies document with document classifier.Mono<com.azure.core.util.BinaryData>
getAnalyzeResultFigure
(String modelId, String resultId, String figureId) Gets the generated cropped image of specified figure from document analysis.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
getAnalyzeResultFigureWithResponse
(String modelId, String resultId, String figureId, com.azure.core.http.rest.RequestOptions requestOptions) Gets the generated cropped image of specified figure from document analysis.Mono<com.azure.core.util.BinaryData>
getAnalyzeResultPdf
(String modelId, String resultId) Gets the generated searchable PDF output from document analysis.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
getAnalyzeResultPdfWithResponse
(String modelId, String resultId, com.azure.core.http.rest.RequestOptions requestOptions) Gets the generated searchable PDF output from document analysis.
-
Method Details
-
beginAnalyzeDocument
public com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,com.azure.core.util.BinaryData> beginAnalyzeDocument(String modelId, com.azure.core.http.rest.RequestOptions requestOptions) Analyzes document with document model.Query Parameters
Query Parameters Name Type Required Description pages String No List of 1-based page numbers to analyze. Ex. "1-3,5,7-9" locale String No 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"). stringIndexType String No Method used to compute string offset and length. Allowed values: "textElements", "unicodeCodePoint", "utf16CodeUnit". features List<String> No List of optional analysis features. In the form of "," separated string. queryFields List<String> No List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber". In the form of "," separated string. outputContentFormat String No Format of the analyze result top-level content. Allowed values: "text", "markdown". output List<String> No Additional outputs to generate during analysis. In the form of "," separated string. RequestOptions.addQueryParam(java.lang.String, java.lang.String)
Request Body Schema
{ urlSource: String (Optional) base64Source: byte[] (Optional) }
- Parameters:
modelId
- Unique document model name.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
beginAnalyzeBatchDocuments
public com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,com.azure.core.util.BinaryData> beginAnalyzeBatchDocuments(String modelId, com.azure.core.http.rest.RequestOptions requestOptions) Analyzes batch documents with document model.Query Parameters
Query Parameters Name Type Required Description pages String No List of 1-based page numbers to analyze. Ex. "1-3,5,7-9" locale String No 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"). stringIndexType String No Method used to compute string offset and length. Allowed values: "textElements", "unicodeCodePoint", "utf16CodeUnit". features List<String> No List of optional analysis features. In the form of "," separated string. queryFields List<String> No List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber". In the form of "," separated string. outputContentFormat String No Format of the analyze result top-level content. Allowed values: "text", "markdown". output List<String> No Additional outputs to generate during analysis. In the form of "," separated string. RequestOptions.addQueryParam(java.lang.String, java.lang.String)
Request Body Schema
{ azureBlobSource (Optional): { containerUrl: String (Required) prefix: String (Optional) } azureBlobFileListSource (Optional): { containerUrl: String (Required) fileList: String (Required) } resultContainerUrl: String (Required) resultPrefix: String (Optional) overwriteExisting: Boolean (Optional) }
- Parameters:
modelId
- Unique document model name.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getAnalyzeResultPdfWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getAnalyzeResultPdfWithResponse(String modelId, String resultId, com.azure.core.http.rest.RequestOptions requestOptions) Gets the generated searchable PDF output from document analysis.Response Body Schema
BinaryData
- Parameters:
modelId
- Unique document model name.resultId
- Analyze operation result ID.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the generated searchable PDF output from document analysis along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getAnalyzeResultFigureWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getAnalyzeResultFigureWithResponse(String modelId, String resultId, String figureId, com.azure.core.http.rest.RequestOptions requestOptions) Gets the generated cropped image of specified figure from document analysis.Response Body Schema
BinaryData
- Parameters:
modelId
- Unique document model name.resultId
- Analyze operation result ID.figureId
- Figure ID.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the generated cropped image of specified figure from document analysis along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
beginClassifyDocument
public com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,com.azure.core.util.BinaryData> beginClassifyDocument(String classifierId, com.azure.core.util.BinaryData classifyRequest, com.azure.core.http.rest.RequestOptions requestOptions) Classifies document with document classifier.Query Parameters
Query Parameters Name Type Required Description stringIndexType String No Method used to compute string offset and length. Allowed values: "textElements", "unicodeCodePoint", "utf16CodeUnit". split String No Document splitting mode. Allowed values: "auto", "none", "perPage". pages String No List of 1-based page numbers to analyze. Ex. "1-3,5,7-9" RequestOptions.addQueryParam(java.lang.String, java.lang.String)
Request Body Schema
{ urlSource: String (Optional) base64Source: byte[] (Optional) }
- Parameters:
classifierId
- Unique document classifier name.classifyRequest
- Classify request parameters.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
beginAnalyzeDocument
public com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,AnalyzeResult> beginAnalyzeDocument(String modelId, String pages, String locale, StringIndexType stringIndexType, List<DocumentAnalysisFeature> features, List<String> queryFields, ContentFormat outputContentFormat, List<AnalyzeOutputOption> output, AnalyzeDocumentRequest analyzeRequest) Analyzes document with document model.- Parameters:
modelId
- Unique document model name.pages
- List of 1-based page numbers to analyze. Ex. "1-3,5,7-9".locale
- 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").stringIndexType
- Method used to compute string offset and length.features
- List of optional analysis features.queryFields
- List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber".outputContentFormat
- Format of the analyze result top-level content.output
- Additional outputs to generate during analysis.analyzeRequest
- Analyze request parameters.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginAnalyzeDocument
public com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,AnalyzeResult> beginAnalyzeDocument(String modelId) Analyzes document with document model.- Parameters:
modelId
- Unique document model name.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginAnalyzeBatchDocuments
public com.azure.core.util.polling.PollerFlux<AnalyzeBatchResultOperation,AnalyzeBatchResult> beginAnalyzeBatchDocuments(String modelId, String pages, String locale, StringIndexType stringIndexType, List<DocumentAnalysisFeature> features, List<String> queryFields, ContentFormat outputContentFormat, List<AnalyzeOutputOption> output, AnalyzeBatchDocumentsRequest analyzeBatchRequest) Analyzes batch documents with document model.- Parameters:
modelId
- Unique document model name.pages
- List of 1-based page numbers to analyze. Ex. "1-3,5,7-9".locale
- 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").stringIndexType
- Method used to compute string offset and length.features
- List of optional analysis features.queryFields
- List of additional fields to extract. Ex. "NumberOfGuests,StoreNumber".outputContentFormat
- Format of the analyze result top-level content.output
- Additional outputs to generate during analysis.analyzeBatchRequest
- Analyze batch request parameters.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginAnalyzeBatchDocuments
public com.azure.core.util.polling.PollerFlux<AnalyzeBatchResultOperation,AnalyzeBatchResult> beginAnalyzeBatchDocuments(String modelId) Analyzes batch documents with document model.- Parameters:
modelId
- Unique document model name.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getAnalyzeResultPdf
Gets the generated searchable PDF output from document analysis.- Parameters:
modelId
- Unique document model name.resultId
- Analyze operation result ID.- Returns:
- the generated searchable PDF output from document analysis on successful completion of
Mono
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
getAnalyzeResultFigure
public Mono<com.azure.core.util.BinaryData> getAnalyzeResultFigure(String modelId, String resultId, String figureId) Gets the generated cropped image of specified figure from document analysis.- Parameters:
modelId
- Unique document model name.resultId
- Analyze operation result ID.figureId
- Figure ID.- Returns:
- the generated cropped image of specified figure from document analysis on successful completion of
Mono
. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginClassifyDocument
public com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,AnalyzeResult> beginClassifyDocument(String classifierId, ClassifyDocumentRequest classifyRequest, StringIndexType stringIndexType, SplitMode split, String pages) Classifies document with document classifier.- Parameters:
classifierId
- Unique document classifier name.classifyRequest
- Classify request parameters.stringIndexType
- Method used to compute string offset and length.split
- Document splitting mode.pages
- List of 1-based page numbers to analyze. Ex. "1-3,5,7-9".- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-
beginClassifyDocument
public com.azure.core.util.polling.PollerFlux<AnalyzeResultOperation,AnalyzeResult> beginClassifyDocument(String classifierId, ClassifyDocumentRequest classifyRequest) Classifies document with document classifier.- Parameters:
classifierId
- Unique document classifier name.classifyRequest
- Classify request parameters.- Returns:
- the
PollerFlux
for polling of long-running operation. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.RuntimeException
- all other wrapped checked exceptions if the request fails to be sent.
-