4
4
5
5
package com .azure .ai .formrecognizer .documentanalysis .dpg ;
6
6
7
- import com .azure .ai .formrecognizer .documentanalysis .dpg .implementation .FormRecognizerClientImpl ;
7
+ import com .azure .ai .formrecognizer .documentanalysis .dpg .implementation .DocumentModelsImpl ;
8
8
import com .azure .core .annotation .Generated ;
9
9
import com .azure .core .annotation .ReturnType ;
10
10
import com .azure .core .annotation .ServiceClient ;
23
23
/**
24
24
* Initializes a new instance of the asynchronous FormRecognizerClient type.
25
25
*/
26
- @ ServiceClient (builder = FormRecognizerClientBuilder .class , isAsync = true )
27
- public final class FormRecognizerAsyncClient {
26
+ @ ServiceClient (builder = DocumentModelsClientBuilder .class , isAsync = true )
27
+ public final class DocumentModelsAsyncClient {
28
28
@ Generated
29
- private final FormRecognizerClientImpl serviceClient ;
29
+ private final DocumentModelsImpl serviceClient ;
30
30
31
31
/**
32
- * Initializes an instance of FormRecognizerAsyncClient class.
32
+ * Initializes an instance of DocumentModelsAsyncClient class.
33
33
*
34
34
* @param serviceClient the service client implementation.
35
35
*/
36
36
@ Generated
37
- FormRecognizerAsyncClient ( FormRecognizerClientImpl serviceClient ) {
37
+ DocumentModelsAsyncClient ( DocumentModelsImpl serviceClient ) {
38
38
this .serviceClient = serviceClient ;
39
39
}
40
40
41
41
/**
42
- * Analyze document
43
- *
44
42
* Analyzes document with document model.
45
43
* <p><strong>Query Parameters</strong></p>
46
44
* <table border="1">
@@ -78,8 +76,6 @@ public PollerFlux<BinaryData, BinaryData> beginAnalyzeDocument(String modelId, S
78
76
}
79
77
80
78
/**
81
- * Get analyze result
82
- *
83
79
* Gets the result of document analysis.
84
80
* <p><strong>Response Body Schema</strong></p>
85
81
*
@@ -299,14 +295,12 @@ public PollerFlux<BinaryData, BinaryData> beginAnalyzeDocument(String modelId, S
299
295
*/
300
296
@ Generated
301
297
@ ServiceMethod (returns = ReturnType .SINGLE )
302
- public Mono <Response <BinaryData >> getAnalyzeDocumentResultWithResponse (String modelId , String resultId ,
298
+ public Mono <Response <BinaryData >> getAnalyzeResultWithResponse (String modelId , String resultId ,
303
299
RequestOptions requestOptions ) {
304
- return this .serviceClient .getAnalyzeDocumentResultWithResponseAsync (modelId , resultId , requestOptions );
300
+ return this .serviceClient .getAnalyzeResultWithResponseAsync (modelId , resultId , requestOptions );
305
301
}
306
302
307
303
/**
308
- * Build document model
309
- *
310
304
* Builds a custom document analysis model.
311
305
* <p><strong>Request Body Schema</strong></p>
312
306
*
@@ -335,14 +329,11 @@ public Mono<Response<BinaryData>> getAnalyzeDocumentResultWithResponse(String mo
335
329
*/
336
330
@ Generated
337
331
@ ServiceMethod (returns = ReturnType .LONG_RUNNING_OPERATION )
338
- public PollerFlux <BinaryData , BinaryData > beginBuildDocumentModel (BinaryData buildRequest ,
339
- RequestOptions requestOptions ) {
340
- return this .serviceClient .beginBuildDocumentModelAsync (buildRequest , requestOptions );
332
+ public PollerFlux <BinaryData , BinaryData > beginBuildModel (BinaryData buildRequest , RequestOptions requestOptions ) {
333
+ return this .serviceClient .beginBuildModelAsync (buildRequest , requestOptions );
341
334
}
342
335
343
336
/**
344
- * Compose document model
345
- *
346
337
* Creates a new document model from document types of existing document models.
347
338
* <p><strong>Request Body Schema</strong></p>
348
339
*
@@ -371,14 +362,12 @@ public PollerFlux<BinaryData, BinaryData> beginBuildDocumentModel(BinaryData bui
371
362
*/
372
363
@ Generated
373
364
@ ServiceMethod (returns = ReturnType .LONG_RUNNING_OPERATION )
374
- public PollerFlux <BinaryData , BinaryData > beginComposeDocumentModel (BinaryData composeRequest ,
365
+ public PollerFlux <BinaryData , BinaryData > beginComposeModel (BinaryData composeRequest ,
375
366
RequestOptions requestOptions ) {
376
- return this .serviceClient .beginComposeDocumentModelAsync (composeRequest , requestOptions );
367
+ return this .serviceClient .beginComposeModelAsync (composeRequest , requestOptions );
377
368
}
378
369
379
370
/**
380
- * Generate copy authorization
381
- *
382
371
* Generates authorization to copy a document model to this location with specified modelId and optional
383
372
* description.
384
373
* <p><strong>Request Body Schema</strong></p>
@@ -417,14 +406,12 @@ public PollerFlux<BinaryData, BinaryData> beginComposeDocumentModel(BinaryData c
417
406
*/
418
407
@ Generated
419
408
@ ServiceMethod (returns = ReturnType .SINGLE )
420
- public Mono <Response <BinaryData >> authorizeCopyDocumentModelWithResponse (BinaryData authorizeCopyRequest ,
409
+ public Mono <Response <BinaryData >> authorizeModelCopyWithResponse (BinaryData authorizeCopyRequest ,
421
410
RequestOptions requestOptions ) {
422
- return this .serviceClient .authorizeCopyDocumentModelWithResponseAsync (authorizeCopyRequest , requestOptions );
411
+ return this .serviceClient .authorizeModelCopyWithResponseAsync (authorizeCopyRequest , requestOptions );
423
412
}
424
413
425
414
/**
426
- * Copy document model
427
- *
428
415
* Copies document model to the target resource, region, and modelId.
429
416
* <p><strong>Request Body Schema</strong></p>
430
417
*
@@ -450,98 +437,12 @@ public Mono<Response<BinaryData>> authorizeCopyDocumentModelWithResponse(BinaryD
450
437
*/
451
438
@ Generated
452
439
@ ServiceMethod (returns = ReturnType .LONG_RUNNING_OPERATION )
453
- public PollerFlux <BinaryData , BinaryData > beginCopyDocumentModelTo (String modelId , BinaryData copyToRequest ,
440
+ public PollerFlux <BinaryData , BinaryData > beginCopyModelTo (String modelId , BinaryData copyToRequest ,
454
441
RequestOptions requestOptions ) {
455
- return this .serviceClient .beginCopyDocumentModelToAsync (modelId , copyToRequest , requestOptions );
442
+ return this .serviceClient .beginCopyModelToAsync (modelId , copyToRequest , requestOptions );
456
443
}
457
444
458
445
/**
459
- * List operations
460
- *
461
- * Lists all operations.
462
- * <p><strong>Response Body Schema</strong></p>
463
- *
464
- * <pre>{@code
465
- * {
466
- * operationId: String (Required)
467
- * status: String(notStarted/running/failed/succeeded/canceled) (Required)
468
- * percentCompleted: Integer (Optional)
469
- * createdDateTime: OffsetDateTime (Required)
470
- * lastUpdatedDateTime: OffsetDateTime (Required)
471
- * kind: String(documentModelBuild/documentModelCompose/documentModelCopyTo) (Required)
472
- * resourceLocation: String (Required)
473
- * apiVersion: String (Optional)
474
- * tags (Optional): {
475
- * String: String (Required)
476
- * }
477
- * }
478
- * }</pre>
479
- *
480
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
481
- * @throws HttpResponseException thrown if the request is rejected by server.
482
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
483
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
484
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
485
- * @return list Operations response object as paginated response with {@link PagedFlux}.
486
- */
487
- @ Generated
488
- @ ServiceMethod (returns = ReturnType .COLLECTION )
489
- public PagedFlux <BinaryData > getOperations (RequestOptions requestOptions ) {
490
- return this .serviceClient .getOperationsAsync (requestOptions );
491
- }
492
-
493
- /**
494
- * Get operation
495
- *
496
- * Gets operation info.
497
- * <p><strong>Response Body Schema</strong></p>
498
- *
499
- * <pre>{@code
500
- * {
501
- * kind: String (Required)
502
- * operationId: String (Required)
503
- * status: String(notStarted/running/failed/succeeded/canceled) (Required)
504
- * percentCompleted: Integer (Optional)
505
- * createdDateTime: OffsetDateTime (Required)
506
- * lastUpdatedDateTime: OffsetDateTime (Required)
507
- * resourceLocation: String (Required)
508
- * apiVersion: String (Optional)
509
- * tags (Optional): {
510
- * String: String (Required)
511
- * }
512
- * error (Optional): {
513
- * code: String (Required)
514
- * message: String (Required)
515
- * target: String (Optional)
516
- * details (Optional): [
517
- * (recursive schema, see above)
518
- * ]
519
- * innererror (Optional): {
520
- * code: String (Required)
521
- * message: String (Optional)
522
- * innererror (Optional): (recursive schema, see innererror above)
523
- * }
524
- * }
525
- * }
526
- * }</pre>
527
- *
528
- * @param operationId Unique operation ID.
529
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
530
- * @throws HttpResponseException thrown if the request is rejected by server.
531
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
532
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
533
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
534
- * @return operation info along with {@link Response} on successful completion of {@link Mono}.
535
- */
536
- @ Generated
537
- @ ServiceMethod (returns = ReturnType .SINGLE )
538
- public Mono <Response <BinaryData >> getOperationWithResponse (String operationId , RequestOptions requestOptions ) {
539
- return this .serviceClient .getOperationWithResponseAsync (operationId , requestOptions );
540
- }
541
-
542
- /**
543
- * List document models
544
- *
545
446
* List all document models.
546
447
* <p><strong>Response Body Schema</strong></p>
547
448
*
@@ -566,13 +467,11 @@ public Mono<Response<BinaryData>> getOperationWithResponse(String operationId, R
566
467
*/
567
468
@ Generated
568
469
@ ServiceMethod (returns = ReturnType .COLLECTION )
569
- public PagedFlux <BinaryData > getDocumentModels (RequestOptions requestOptions ) {
570
- return this .serviceClient .getDocumentModelsAsync (requestOptions );
470
+ public PagedFlux <BinaryData > listModels (RequestOptions requestOptions ) {
471
+ return this .serviceClient .listModelsAsync (requestOptions );
571
472
}
572
473
573
474
/**
574
- * Get document model
575
- *
576
475
* Gets detailed document model information.
577
476
* <p><strong>Response Body Schema</strong></p>
578
477
*
@@ -618,13 +517,11 @@ public PagedFlux<BinaryData> getDocumentModels(RequestOptions requestOptions) {
618
517
*/
619
518
@ Generated
620
519
@ ServiceMethod (returns = ReturnType .SINGLE )
621
- public Mono <Response <BinaryData >> getDocumentModelWithResponse (String modelId , RequestOptions requestOptions ) {
622
- return this .serviceClient .getDocumentModelWithResponseAsync (modelId , requestOptions );
520
+ public Mono <Response <BinaryData >> getModelWithResponse (String modelId , RequestOptions requestOptions ) {
521
+ return this .serviceClient .getModelWithResponseAsync (modelId , requestOptions );
623
522
}
624
523
625
524
/**
626
- * Delete document model
627
- *
628
525
* Deletes document model.
629
526
*
630
527
* @param modelId Unique document model name.
@@ -637,36 +534,7 @@ public Mono<Response<BinaryData>> getDocumentModelWithResponse(String modelId, R
637
534
*/
638
535
@ Generated
639
536
@ ServiceMethod (returns = ReturnType .SINGLE )
640
- public Mono <Response <Void >> deleteDocumentModelWithResponse (String modelId , RequestOptions requestOptions ) {
641
- return this .serviceClient .deleteDocumentModelWithResponseAsync (modelId , requestOptions );
642
- }
643
-
644
- /**
645
- * Get resource info
646
- *
647
- * Return information about the current resource.
648
- * <p><strong>Response Body Schema</strong></p>
649
- *
650
- * <pre>{@code
651
- * {
652
- * customDocumentModels (Required): {
653
- * count: int (Required)
654
- * limit: int (Required)
655
- * }
656
- * }
657
- * }</pre>
658
- *
659
- * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
660
- * @throws HttpResponseException thrown if the request is rejected by server.
661
- * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
662
- * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
663
- * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
664
- * @return general information regarding the current resource along with {@link Response} on successful completion
665
- * of {@link Mono}.
666
- */
667
- @ Generated
668
- @ ServiceMethod (returns = ReturnType .SINGLE )
669
- public Mono <Response <BinaryData >> getResourceDetailsWithResponse (RequestOptions requestOptions ) {
670
- return this .serviceClient .getResourceDetailsWithResponseAsync (requestOptions );
537
+ public Mono <Response <Void >> deleteModelWithResponse (String modelId , RequestOptions requestOptions ) {
538
+ return this .serviceClient .deleteModelWithResponseAsync (modelId , requestOptions );
671
539
}
672
540
}
0 commit comments