Partager via


DocumentIntelligenceAdministrationClient Class

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

public final class DocumentIntelligenceAdministrationClient

Initializes a new instance of the synchronous DocumentIntelligenceAdministrationClient type.

Method Summary

Modifier and Type Method and Description
ClassifierCopyAuthorization authorizeClassifierCopy(AuthorizeClassifierCopyOptions authorizeCopyRequest)

Generates authorization to copy a document classifier to this location with specified classifierId and optional description.

Response<BinaryData> authorizeClassifierCopyWithResponse(BinaryData authorizeCopyRequest, RequestOptions requestOptions)

Generates authorization to copy a document classifier to this location with specified classifierId and optional description.

ModelCopyAuthorization authorizeModelCopy(AuthorizeModelCopyOptions authorizeCopyRequest)

Generates authorization to copy a document model to this location with specified modelId and optional description.

Response<BinaryData> authorizeModelCopyWithResponse(BinaryData authorizeCopyRequest, RequestOptions requestOptions)

Generates authorization to copy a document model to this location with specified modelId and optional description.

SyncPoller<DocumentClassifierBuildOperationDetails,DocumentClassifierDetails> beginBuildClassifier(BuildDocumentClassifierOptions buildRequest)

Builds a custom document classifier.

SyncPoller<BinaryData,BinaryData> beginBuildClassifier(BinaryData buildRequest, RequestOptions requestOptions)

Builds a custom document classifier.

SyncPoller<DocumentModelBuildOperationDetails,DocumentModelDetails> beginBuildDocumentModel(BuildDocumentModelOptions buildRequest)

Builds a custom document analysis model.

SyncPoller<BinaryData,BinaryData> beginBuildDocumentModel(BinaryData buildRequest, RequestOptions requestOptions)

Builds a custom document analysis model.

SyncPoller<DocumentModelComposeOperationDetails,DocumentModelDetails> beginComposeModel(ComposeDocumentModelOptions composeRequest)

Creates a new document model from document types of existing document models.

SyncPoller<BinaryData,BinaryData> beginComposeModel(BinaryData composeRequest, RequestOptions requestOptions)

Creates a new document model from document types of existing document models.

SyncPoller<DocumentClassifierCopyToOperationDetails,DocumentClassifierDetails> beginCopyClassifierTo(String classifierId, ClassifierCopyAuthorization copyToRequest)

Copies document classifier to the target resource, region, and classifierId.

SyncPoller<BinaryData,BinaryData> beginCopyClassifierTo(String classifierId, BinaryData copyToRequest, RequestOptions requestOptions)

Copies document classifier to the target resource, region, and classifierId.

SyncPoller<DocumentModelCopyToOperationDetails,DocumentModelDetails> beginCopyModelTo(String modelId, ModelCopyAuthorization copyToRequest)

Copies document model to the target resource, region, and modelId.

SyncPoller<BinaryData,BinaryData> beginCopyModelTo(String modelId, BinaryData copyToRequest, RequestOptions requestOptions)

Copies document model to the target resource, region, and modelId.

void deleteClassifier(String classifierId)

Deletes document classifier.

Response<Void> deleteClassifierWithResponse(String classifierId, RequestOptions requestOptions)

Deletes document classifier.

void deleteModel(String modelId)

Deletes document model.

Response<Void> deleteModelWithResponse(String modelId, RequestOptions requestOptions)

Deletes document model.

DocumentClassifierDetails getClassifier(String classifierId)

Gets detailed document classifier information.

Response<BinaryData> getClassifierWithResponse(String classifierId, RequestOptions requestOptions)

Gets detailed document classifier information.

DocumentModelDetails getModel(String modelId)

Gets detailed document model information.

Response<BinaryData> getModelWithResponse(String modelId, RequestOptions requestOptions)

Gets detailed document model information.

DocumentIntelligenceOperationDetails getOperation(String operationId)

Gets operation info.

Response<BinaryData> getOperationWithResponse(String operationId, RequestOptions requestOptions)

Gets operation info.

DocumentIntelligenceResourceDetails getResourceDetails()

Return information about the current resource.

Response<BinaryData> getResourceDetailsWithResponse(RequestOptions requestOptions)

Return information about the current resource.

PagedIterable<DocumentClassifierDetails> listClassifiers()

List all document classifiers.

PagedIterable<BinaryData> listClassifiers(RequestOptions requestOptions)

List all document classifiers.

PagedIterable<DocumentModelDetails> listModels()

List all document models.

PagedIterable<BinaryData> listModels(RequestOptions requestOptions)

List all document models.

PagedIterable<DocumentIntelligenceOperationDetails> listOperations()

Lists all operations.

PagedIterable<BinaryData> listOperations(RequestOptions requestOptions)

Lists all operations.

Methods inherited from java.lang.Object

Method Details

authorizeClassifierCopy

public ClassifierCopyAuthorization authorizeClassifierCopy(AuthorizeClassifierCopyOptions authorizeCopyRequest)

Generates authorization to copy a document classifier to this location with specified classifierId and optional description.

Parameters:

authorizeCopyRequest - Authorize copy request parameters.

Returns:

authorization to copy a document classifier to the specified target resource and classifierId.

authorizeClassifierCopyWithResponse

public Response authorizeClassifierCopyWithResponse(BinaryData authorizeCopyRequest, RequestOptions requestOptions)

Generates authorization to copy a document classifier to this location with specified classifierId and optional description.

Request Body Schema

{
     classifierId: String (Required)
     description: String (Optional)
     tags (Optional): {
         String: String (Required)
     }
 }

Response Body Schema

{
     targetResourceId: String (Required)
     targetResourceRegion: String (Required)
     targetClassifierId: String (Required)
     targetClassifierLocation: String (Required)
     accessToken: String (Required)
     expirationDateTime: OffsetDateTime (Required)
 }

Parameters:

authorizeCopyRequest - Authorize copy request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

authorization to copy a document classifier to the specified target resource and classifierId along with Response<T>.

authorizeModelCopy

public ModelCopyAuthorization authorizeModelCopy(AuthorizeModelCopyOptions authorizeCopyRequest)

Generates authorization to copy a document model to this location with specified modelId and optional description.

Parameters:

authorizeCopyRequest - Authorize copy request parameters.

Returns:

authorization to copy a document model to the specified target resource and modelId.

authorizeModelCopyWithResponse

public Response authorizeModelCopyWithResponse(BinaryData authorizeCopyRequest, RequestOptions requestOptions)

Generates authorization to copy a document model to this location with specified modelId and optional description.

Request Body Schema

{
     modelId: String (Required)
     description: String (Optional)
     tags (Optional): {
         String: String (Required)
     }
 }

Response Body Schema

{
     targetResourceId: String (Required)
     targetResourceRegion: String (Required)
     targetModelId: String (Required)
     targetModelLocation: String (Required)
     accessToken: String (Required)
     expirationDateTime: OffsetDateTime (Required)
 }

Parameters:

authorizeCopyRequest - Authorize copy request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

authorization to copy a document model to the specified target resource and modelId along with Response<T>.

beginBuildClassifier

public SyncPoller beginBuildClassifier(BuildDocumentClassifierOptions buildRequest)

Builds a custom document classifier.

Parameters:

buildRequest - Build request parameters.

Returns:

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

beginBuildClassifier

public SyncPoller beginBuildClassifier(BinaryData buildRequest, RequestOptions requestOptions)

Builds a custom document classifier.

Request Body Schema

{
     classifierId: String (Required)
     description: String (Optional)
     baseClassifierId: String (Optional)
     docTypes (Required): {
         String (Required): {
             sourceKind: String(url/base64/azureBlob/azureBlobFileList) (Optional)
             azureBlobSource (Optional): {
                 containerUrl: String (Required)
                 prefix: String (Optional)
             }
             azureBlobFileListSource (Optional): {
                 containerUrl: String (Required)
                 fileList: String (Required)
             }
         }
     }
     allowOverwrite: Boolean (Optional)
 }

Parameters:

buildRequest - Build request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

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

beginBuildDocumentModel

public SyncPoller beginBuildDocumentModel(BuildDocumentModelOptions buildRequest)

Builds a custom document analysis model.

Parameters:

buildRequest - Build request parameters.

Returns:

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

beginBuildDocumentModel

public SyncPoller beginBuildDocumentModel(BinaryData buildRequest, RequestOptions requestOptions)

Builds a custom document analysis model.

Request Body Schema

{
     modelId: String (Required)
     description: String (Optional)
     buildMode: String(template/neural) (Required)
     azureBlobSource (Optional): {
         containerUrl: String (Required)
         prefix: String (Optional)
     }
     azureBlobFileListSource (Optional): {
         containerUrl: String (Required)
         fileList: String (Required)
     }
     tags (Optional): {
         String: String (Required)
     }
     maxTrainingHours: Double (Optional)
     allowOverwrite: Boolean (Optional)
 }

Parameters:

buildRequest - Build request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

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

beginComposeModel

public SyncPoller beginComposeModel(ComposeDocumentModelOptions composeRequest)

Creates a new document model from document types of existing document models.

Parameters:

composeRequest - Compose request parameters.

Returns:

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

beginComposeModel

public SyncPoller beginComposeModel(BinaryData composeRequest, RequestOptions requestOptions)

Creates a new document model from document types of existing document models.

Request Body Schema

{
     modelId: String (Required)
     description: String (Optional)
     classifierId: String (Required)
     split: String(auto/none/perPage) (Optional)
     docTypes (Required): {
         String (Required): {
             description: String (Optional)
             buildMode: String(template/neural) (Optional)
             fieldSchema (Optional): {
                 String (Required): {
                     type: String(string/date/time/phoneNumber/number/integer/selectionMark/countryRegion/signature/array/object/currency/address/boolean/selectionGroup) (Required)
                     description: String (Optional)
                     example: String (Optional)
                     items (Optional): (recursive schema, see items above)
                     properties (Optional): {
                         String (Required): (recursive schema, see String above)
                     }
                 }
             }
             fieldConfidence (Optional): {
                 String: double (Required)
             }
             modelId: String (Optional)
             confidenceThreshold: Double (Optional)
             features (Optional): [
                 String(ocrHighResolution/languages/barcodes/formulas/keyValuePairs/styleFont/queryFields) (Optional)
             ]
             queryFields (Optional): [
                 String (Optional)
             ]
             maxDocumentsToAnalyze: Integer (Optional)
         }
     }
     tags (Optional): {
         String: String (Required)
     }
 }

Parameters:

composeRequest - Compose request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

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

beginCopyClassifierTo

public SyncPoller beginCopyClassifierTo(String classifierId, ClassifierCopyAuthorization copyToRequest)

Copies document classifier to the target resource, region, and classifierId.

Parameters:

classifierId - Unique document classifier name.
copyToRequest - Copy to request parameters.

Returns:

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

beginCopyClassifierTo

public SyncPoller beginCopyClassifierTo(String classifierId, BinaryData copyToRequest, RequestOptions requestOptions)

Copies document classifier to the target resource, region, and classifierId.

Request Body Schema

{
     targetResourceId: String (Required)
     targetResourceRegion: String (Required)
     targetClassifierId: String (Required)
     targetClassifierLocation: String (Required)
     accessToken: String (Required)
     expirationDateTime: OffsetDateTime (Required)
 }

Parameters:

classifierId - Unique document classifier name.
copyToRequest - Copy to request parameters.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

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

beginCopyModelTo

public SyncPoller beginCopyModelTo(String modelId, ModelCopyAuthorization copyToRequest)

Copies document model to the target resource, region, and modelId.

Parameters:

modelId - Unique document model name.
copyToRequest - Copy to request parameters.

Returns:

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

beginCopyModelTo

public SyncPoller beginCopyModelTo(String modelId, BinaryData copyToRequest, RequestOptions requestOptions)

Copies document model to the target resource, region, and modelId.

Request Body Schema

{
     targetResourceId: String (Required)
     targetResourceRegion: String (Required)
     targetModelId: String (Required)
     targetModelLocation: String (Required)
     accessToken: String (Required)
     expirationDateTime: OffsetDateTime (Required)
 }

Parameters:

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

Returns:

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

deleteClassifier

public void deleteClassifier(String classifierId)

Deletes document classifier.

Parameters:

classifierId - Unique document classifier name.

deleteClassifierWithResponse

public Response deleteClassifierWithResponse(String classifierId, RequestOptions requestOptions)

Deletes document classifier.

Parameters:

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

Returns:

deleteModel

public void deleteModel(String modelId)

Deletes document model.

Parameters:

modelId - Unique document model name.

deleteModelWithResponse

public Response deleteModelWithResponse(String modelId, RequestOptions requestOptions)

Deletes document model.

Parameters:

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

Returns:

getClassifier

public DocumentClassifierDetails getClassifier(String classifierId)

Gets detailed document classifier information.

Parameters:

classifierId - Unique document classifier name.

Returns:

detailed document classifier information.

getClassifierWithResponse

public Response getClassifierWithResponse(String classifierId, RequestOptions requestOptions)

Gets detailed document classifier information.

Response Body Schema

{
     classifierId: String (Required)
     description: String (Optional)
     createdDateTime: OffsetDateTime (Required)
     expirationDateTime: OffsetDateTime (Optional)
     modifiedDateTime: OffsetDateTime (Optional)
     apiVersion: String (Required)
     baseClassifierId: String (Optional)
     docTypes (Required): {
         String (Required): {
             sourceKind: String(url/base64/azureBlob/azureBlobFileList) (Optional)
             azureBlobSource (Optional): {
                 containerUrl: String (Required)
                 prefix: String (Optional)
             }
             azureBlobFileListSource (Optional): {
                 containerUrl: String (Required)
                 fileList: String (Required)
             }
         }
     }
     warnings (Optional): [
          (Optional){
             code: String (Required)
             message: String (Required)
             target: String (Optional)
         }
     ]
 }

Parameters:

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

Returns:

detailed document classifier information along with Response<T>.

getModel

public DocumentModelDetails getModel(String modelId)

Gets detailed document model information.

Parameters:

modelId - Unique document model name.

Returns:

detailed document model information.

getModelWithResponse

public Response getModelWithResponse(String modelId, RequestOptions requestOptions)

Gets detailed document model information.

Response Body Schema

{
     modelId: String (Required)
     description: String (Optional)
     createdDateTime: OffsetDateTime (Required)
     expirationDateTime: OffsetDateTime (Optional)
     modifiedDateTime: OffsetDateTime (Optional)
     apiVersion: String (Optional)
     tags (Optional): {
         String: String (Required)
     }
     buildMode: String(template/neural) (Optional)
     azureBlobSource (Optional): {
         containerUrl: String (Required)
         prefix: String (Optional)
     }
     azureBlobFileListSource (Optional): {
         containerUrl: String (Required)
         fileList: String (Required)
     }
     classifierId: String (Optional)
     split: String(auto/none/perPage) (Optional)
     docTypes (Optional): {
         String (Required): {
             description: String (Optional)
             buildMode: String(template/neural) (Optional)
             fieldSchema (Optional): {
                 String (Required): {
                     type: String(string/date/time/phoneNumber/number/integer/selectionMark/countryRegion/signature/array/object/currency/address/boolean/selectionGroup) (Required)
                     description: String (Optional)
                     example: String (Optional)
                     items (Optional): (recursive schema, see items above)
                     properties (Optional): {
                         String (Required): (recursive schema, see String above)
                     }
                 }
             }
             fieldConfidence (Optional): {
                 String: double (Required)
             }
             modelId: String (Optional)
             confidenceThreshold: Double (Optional)
             features (Optional): [
                 String(ocrHighResolution/languages/barcodes/formulas/keyValuePairs/styleFont/queryFields) (Optional)
             ]
             queryFields (Optional): [
                 String (Optional)
             ]
             maxDocumentsToAnalyze: Integer (Optional)
         }
     }
     warnings (Optional): [
          (Optional){
             code: String (Required)
             message: String (Required)
             target: String (Optional)
         }
     ]
     trainingHours: Double (Optional)
 }

Parameters:

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

Returns:

detailed document model information along with Response<T>.

getOperation

public DocumentIntelligenceOperationDetails getOperation(String operationId)

Gets operation info.

Parameters:

operationId - Operation ID.

Returns:

operation info.

getOperationWithResponse

public Response getOperationWithResponse(String operationId, RequestOptions requestOptions)

Gets operation info.

Response Body Schema

{
     kind: String(documentModelBuild/documentModelCompose/documentModelCopyTo/documentClassifierCopyTo/documentClassifierBuild) (Required)
     operationId: String (Required)
     status: String(notStarted/running/failed/succeeded/canceled/skipped) (Required)
     percentCompleted: Integer (Optional)
     createdDateTime: OffsetDateTime (Required)
     lastUpdatedDateTime: OffsetDateTime (Required)
     resourceLocation: String (Required)
     apiVersion: String (Optional)
     tags (Optional): {
         String: String (Required)
     }
     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)
         }
     }
 }

Parameters:

operationId - Operation ID.
requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

operation info along with Response<T>.

getResourceDetails

public DocumentIntelligenceResourceDetails getResourceDetails()

Return information about the current resource.

Returns:

general information regarding the current resource.

getResourceDetailsWithResponse

public Response getResourceDetailsWithResponse(RequestOptions requestOptions)

Return information about the current resource.

Response Body Schema

{
     customDocumentModels (Required): {
         count: int (Required)
         limit: int (Required)
     }
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

general information regarding the current resource along with Response<T>.

listClassifiers

public PagedIterable listClassifiers()

List all document classifiers.

Returns:

paged collection of DocumentClassifierDetails items as paginated response with PagedIterable<T>.

listClassifiers

public PagedIterable listClassifiers(RequestOptions requestOptions)

List all document classifiers.

Response Body Schema

{
     classifierId: String (Required)
     description: String (Optional)
     createdDateTime: OffsetDateTime (Required)
     expirationDateTime: OffsetDateTime (Optional)
     modifiedDateTime: OffsetDateTime (Optional)
     apiVersion: String (Required)
     baseClassifierId: String (Optional)
     docTypes (Required): {
         String (Required): {
             sourceKind: String(url/base64/azureBlob/azureBlobFileList) (Optional)
             azureBlobSource (Optional): {
                 containerUrl: String (Required)
                 prefix: String (Optional)
             }
             azureBlobFileListSource (Optional): {
                 containerUrl: String (Required)
                 fileList: String (Required)
             }
         }
     }
     warnings (Optional): [
          (Optional){
             code: String (Required)
             message: String (Required)
             target: String (Optional)
         }
     ]
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

paged collection of DocumentClassifierDetails items as paginated response with PagedIterable<T>.

listModels

public PagedIterable listModels()

List all document models.

Returns:

paged collection of DocumentModelDetails items as paginated response with PagedIterable<T>.

listModels

public PagedIterable listModels(RequestOptions requestOptions)

List all document models.

Response Body Schema

{
     modelId: String (Required)
     description: String (Optional)
     createdDateTime: OffsetDateTime (Required)
     expirationDateTime: OffsetDateTime (Optional)
     modifiedDateTime: OffsetDateTime (Optional)
     apiVersion: String (Optional)
     tags (Optional): {
         String: String (Required)
     }
     buildMode: String(template/neural) (Optional)
     azureBlobSource (Optional): {
         containerUrl: String (Required)
         prefix: String (Optional)
     }
     azureBlobFileListSource (Optional): {
         containerUrl: String (Required)
         fileList: String (Required)
     }
     classifierId: String (Optional)
     split: String(auto/none/perPage) (Optional)
     docTypes (Optional): {
         String (Required): {
             description: String (Optional)
             buildMode: String(template/neural) (Optional)
             fieldSchema (Optional): {
                 String (Required): {
                     type: String(string/date/time/phoneNumber/number/integer/selectionMark/countryRegion/signature/array/object/currency/address/boolean/selectionGroup) (Required)
                     description: String (Optional)
                     example: String (Optional)
                     items (Optional): (recursive schema, see items above)
                     properties (Optional): {
                         String (Required): (recursive schema, see String above)
                     }
                 }
             }
             fieldConfidence (Optional): {
                 String: double (Required)
             }
             modelId: String (Optional)
             confidenceThreshold: Double (Optional)
             features (Optional): [
                 String(ocrHighResolution/languages/barcodes/formulas/keyValuePairs/styleFont/queryFields) (Optional)
             ]
             queryFields (Optional): [
                 String (Optional)
             ]
             maxDocumentsToAnalyze: Integer (Optional)
         }
     }
     warnings (Optional): [
          (Optional){
             code: String (Required)
             message: String (Required)
             target: String (Optional)
         }
     ]
     trainingHours: Double (Optional)
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

paged collection of DocumentModelDetails items as paginated response with PagedIterable<T>.

listOperations

public PagedIterable listOperations()

Lists all operations.

Returns:

paged collection of DocumentIntelligenceOperationDetails items as paginated response with PagedIterable<T>.

listOperations

public PagedIterable listOperations(RequestOptions requestOptions)

Lists all operations.

Response Body Schema

{
     kind: String(documentModelBuild/documentModelCompose/documentModelCopyTo/documentClassifierCopyTo/documentClassifierBuild) (Required)
     operationId: String (Required)
     status: String(notStarted/running/failed/succeeded/canceled/skipped) (Required)
     percentCompleted: Integer (Optional)
     createdDateTime: OffsetDateTime (Required)
     lastUpdatedDateTime: OffsetDateTime (Required)
     resourceLocation: String (Required)
     apiVersion: String (Optional)
     tags (Optional): {
         String: String (Required)
     }
     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)
         }
     }
 }

Parameters:

requestOptions - The options to configure the HTTP request before HTTP client sends it.

Returns:

paged collection of DocumentIntelligenceOperationDetails items as paginated response with PagedIterable<T>.

Applies to