Partilhar via


DocumentIntelligenceAsyncClient Class

  • java.lang.Object
    • com.azure.ai.documentintelligence.DocumentIntelligenceAsyncClient

public final class DocumentIntelligenceAsyncClient

Initializes a new instance of the asynchronous DocumentIntelligenceClient type.

Method Summary

Modifier and Type Method and Description
PollerFlux<AnalyzeBatchOperationDetails,AnalyzeBatchResult> beginAnalyzeBatchDocuments(String modelId, AnalyzeBatchDocumentsOptions analyzeBatchDocumentOptions)

/** Analyzes batch documents with document model.

PollerFlux<BinaryData,BinaryData> beginAnalyzeBatchDocuments(String modelId, BinaryData analyzeBatchRequest, RequestOptions requestOptions)

Analyzes batch documents with document model.

PollerFlux<AnalyzeOperationDetails,AnalyzeResult> beginAnalyzeDocument(String modelId, AnalyzeDocumentOptions analyzeDocumentOptions)

/** Analyzes document with document model.

PollerFlux<BinaryData,BinaryData> beginAnalyzeDocument(String modelId, BinaryData analyzeRequest, RequestOptions requestOptions)

Analyzes document with document model.

PollerFlux<AnalyzeOperationDetails,AnalyzeResult> beginClassifyDocument(String classifierId, ClassifyDocumentOptions classifyDocumentOptions)

/** Classifies document with document classifier.

PollerFlux<BinaryData,BinaryData> beginClassifyDocument(String classifierId, BinaryData classifyRequest, RequestOptions requestOptions)

Classifies document with document classifier.

Mono<Void> deleteAnalyzeBatchResult(String modelId, String resultId)

Mark the batch document analysis result for deletion.

Mono<Response<Void>> deleteAnalyzeBatchResultWithResponse(String modelId, String resultId, RequestOptions requestOptions)

Mark the batch document analysis result for deletion.

Mono<Void> deleteAnalyzeResult(String modelId, String resultId)

Mark the result of document analysis for deletion.

Mono<Response<Void>> deleteAnalyzeResultWithResponse(String modelId, String resultId, RequestOptions requestOptions)

Mark the result of document analysis for deletion.

Mono<AnalyzeBatchOperationDetails> getAnalyzeBatchResult(String modelId, String resultId)

Gets the result of batch document analysis.

Mono<Response<BinaryData>> getAnalyzeBatchResultWithResponse(String modelId, String resultId, RequestOptions requestOptions)

Gets the result of batch document analysis.

Mono<BinaryData> getAnalyzeResultFigure(String modelId, String resultId, String figureId)

Gets the generated cropped image of specified figure from document analysis.

Mono<Response<BinaryData>> getAnalyzeResultFigureWithResponse(String modelId, String resultId, String figureId, RequestOptions requestOptions)

Gets the generated cropped image of specified figure from document analysis.

Mono<BinaryData> getAnalyzeResultPdf(String modelId, String resultId)

Gets the generated searchable PDF output from document analysis.

Mono<Response<BinaryData>> getAnalyzeResultPdfWithResponse(String modelId, String resultId, RequestOptions requestOptions)

Gets the generated searchable PDF output from document analysis.

PagedFlux<AnalyzeBatchOperationDetails> listAnalyzeBatchResults(String modelId)

List batch document analysis results.

PagedFlux<BinaryData> listAnalyzeBatchResults(String modelId, RequestOptions requestOptions)

List batch document analysis results.

Methods inherited from java.lang.Object

Method Details

beginAnalyzeBatchDocuments

public PollerFlux beginAnalyzeBatchDocuments(String modelId, AnalyzeBatchDocumentsOptions analyzeBatchDocumentOptions)

/** Analyzes batch documents with document model.

Parameters:

modelId - Unique document model name.
analyzeBatchDocumentOptions - Analyze batch request parameters.

Returns:

the SyncPoller<T,U> for polling of long-running operation. /

beginAnalyzeBatchDocuments

public PollerFlux beginAnalyzeBatchDocuments(String modelId, BinaryData analyzeBatchRequest, RequestOptions requestOptions)

Analyzes batch documents with document model.

Query Parameters

| ------------------- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                | Type         | Required | Description                                                                                                                                             |
| pages               | String       | No       | 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.                                                                    |

You can add these to a request with RequestOptions#addQueryParam

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.
analyzeBatchRequest - Analyze batch request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the PollerFlux<T,U> for polling of long-running operation.

beginAnalyzeDocument

public PollerFlux beginAnalyzeDocument(String modelId, AnalyzeDocumentOptions analyzeDocumentOptions)

/** Analyzes document with document model.

Parameters:

modelId - Unique document model name.
analyzeDocumentOptions - Analyze request parameters.

Returns:

the SyncPoller<T,U> for polling of long-running operation. /

beginAnalyzeDocument

public PollerFlux beginAnalyzeDocument(String modelId, BinaryData analyzeRequest, RequestOptions requestOptions)

Analyzes document with document model.

Query Parameters

| ------------------- | ------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                | Type         | Required | Description                                                                                                                                             |
| pages               | String       | No       | 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.                                                                    |

You can add these to a request with RequestOptions#addQueryParam

Request Body Schema

{
     urlSource: String (Optional)
     base64Source: byte[] (Optional)
 }

Parameters:

modelId - Unique document model name.
analyzeRequest - Analyze request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the PollerFlux<T,U> for polling of long-running operation.

beginClassifyDocument

public PollerFlux beginClassifyDocument(String classifierId, ClassifyDocumentOptions classifyDocumentOptions)

/** Classifies document with document classifier.

Parameters:

classifierId - Unique document classifier name.
classifyDocumentOptions - Classify request parameters.

Returns:

the SyncPoller<T,U> for polling of long-running operation. /

beginClassifyDocument

public PollerFlux beginClassifyDocument(String classifierId, BinaryData classifyRequest, RequestOptions requestOptions)

Classifies document with document classifier.

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       | 1-based page numbers to analyze. Ex. "1-3,5,7-9"                                                                      |

You can add these to a request with RequestOptions#addQueryParam

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<T,U> for polling of long-running operation.

deleteAnalyzeBatchResult

public Mono deleteAnalyzeBatchResult(String modelId, String resultId)

Mark the batch document analysis result for deletion.

Parameters:

modelId - Unique document model name.
resultId - Analyze batch operation result ID.

Returns:

A Mono that completes when a successful response is received.

deleteAnalyzeBatchResultWithResponse

public Mono> deleteAnalyzeBatchResultWithResponse(String modelId, String resultId, RequestOptions requestOptions)

Mark the batch document analysis result for deletion.

Parameters:

modelId - Unique document model name.
resultId - Analyze batch operation result ID.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the Response<T> on successful completion of Mono.

deleteAnalyzeResult

public Mono deleteAnalyzeResult(String modelId, String resultId)

Mark the result of document analysis for deletion.

Parameters:

modelId - Unique document model name.
resultId - Analyze operation result ID.

Returns:

A Mono that completes when a successful response is received.

deleteAnalyzeResultWithResponse

public Mono> deleteAnalyzeResultWithResponse(String modelId, String resultId, RequestOptions requestOptions)

Mark the result of document analysis for deletion.

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 Response<T> on successful completion of Mono.

getAnalyzeBatchResult

public Mono getAnalyzeBatchResult(String modelId, String resultId)

Gets the result of batch document analysis.

Parameters:

modelId - Unique document model name.
resultId - Analyze batch operation result ID.

Returns:

the result of batch document analysis on successful completion of Mono.

getAnalyzeBatchResultWithResponse

public Mono> getAnalyzeBatchResultWithResponse(String modelId, String resultId, RequestOptions requestOptions)

Gets the result of batch document analysis.

Response Body Schema

{
     resultId: String (Optional)
     status: String(notStarted/running/failed/succeeded/canceled/skipped) (Required)
     createdDateTime: OffsetDateTime (Required)
     lastUpdatedDateTime: OffsetDateTime (Required)
     percentCompleted: Integer (Optional)
     error (Optional): {
         code: String (Required)
         message: String (Required)
         target: String (Optional)
         details (Optional): [
             (recursive schema, see above)
         ]
         innererror (Optional): {
             code: String (Optional)
             message: String (Optional)
             innererror (Optional): (recursive schema, see innererror above)
         }
     }
     result (Optional): {
         succeededCount: int (Required)
         failedCount: int (Required)
         skippedCount: int (Required)
         details (Optional): [
              (Optional){
                 status: String(notStarted/running/failed/succeeded/canceled/skipped) (Required)
                 sourceUrl: String (Required)
                 resultUrl: String (Optional)
                 error (Optional): (recursive schema, see error above)
             }
         ]
     }
 }

Parameters:

modelId - Unique document model name.
resultId - Analyze batch operation result ID.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

the result of batch document analysis along with Response<T> on successful completion of Mono.

getAnalyzeResultFigure

public Mono 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.

getAnalyzeResultFigureWithResponse

public Mono> getAnalyzeResultFigureWithResponse(String modelId, String resultId, String figureId, 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<T> on successful completion of Mono.

getAnalyzeResultPdf

public Mono getAnalyzeResultPdf(String modelId, String resultId)

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.

getAnalyzeResultPdfWithResponse

public Mono> getAnalyzeResultPdfWithResponse(String modelId, String resultId, 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<T> on successful completion of Mono.

listAnalyzeBatchResults

public PagedFlux listAnalyzeBatchResults(String modelId)

List batch document analysis results.

Parameters:

modelId - Unique document model name.

Returns:

paged collection of AnalyzeBatchOperation items as paginated response with PagedFlux<T>.

listAnalyzeBatchResults

public PagedFlux listAnalyzeBatchResults(String modelId, RequestOptions requestOptions)

List batch document analysis results.

Response Body Schema

{
     resultId: String (Optional)
     status: String(notStarted/running/failed/succeeded/canceled/skipped) (Required)
     createdDateTime: OffsetDateTime (Required)
     lastUpdatedDateTime: OffsetDateTime (Required)
     percentCompleted: Integer (Optional)
     error (Optional): {
         code: String (Required)
         message: String (Required)
         target: String (Optional)
         details (Optional): [
             (recursive schema, see above)
         ]
         innererror (Optional): {
             code: String (Optional)
             message: String (Optional)
             innererror (Optional): (recursive schema, see innererror above)
         }
     }
     result (Optional): {
         succeededCount: int (Required)
         failedCount: int (Required)
         skippedCount: int (Required)
         details (Optional): [
              (Optional){
                 status: String(notStarted/running/failed/succeeded/canceled/skipped) (Required)
                 sourceUrl: String (Required)
                 resultUrl: String (Optional)
                 error (Optional): (recursive schema, see error above)
             }
         ]
     }
 }

Parameters:

modelId - Unique document model name.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

paged collection of AnalyzeBatchOperation items as paginated response with PagedFlux<T>.

Applies to