/** * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, * which may contain multiple pages and multiple images per page. Progress and results can be * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` * (results). * * <p>Sample code: * * <pre><code> * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { * List<AsyncAnnotateFileRequest> requests = new ArrayList<>(); * AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() * .addAllRequests(requests) * .build(); * AsyncBatchAnnotateFilesResponse response = imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); * } * </code></pre> * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<AsyncBatchAnnotateFilesResponse, OperationMetadata> asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { return asyncBatchAnnotateFilesOperationCallable().futureCall(request); }
/** * Run asynchronous image detection and annotation for a list of generic files, such as PDF files, * which may contain multiple pages and multiple images per page. Progress and results can be * retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains * `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` * (results). * * <p>Sample code: * * <pre><code> * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { * List<AsyncAnnotateFileRequest> requests = new ArrayList<>(); * AsyncBatchAnnotateFilesRequest request = AsyncBatchAnnotateFilesRequest.newBuilder() * .addAllRequests(requests) * .build(); * AsyncBatchAnnotateFilesResponse response = imageAnnotatorClient.asyncBatchAnnotateFilesAsync(request).get(); * } * </code></pre> * * @param request The request object containing all of the parameters for the API call. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<AsyncBatchAnnotateFilesResponse, OperationMetadata> asyncBatchAnnotateFilesAsync(AsyncBatchAnnotateFilesRequest request) { return asyncBatchAnnotateFilesOperationCallable().futureCall(request); }