/// <summary>Snippet for AsyncBatchAnnotateFiles</summary>
        public void AsyncBatchAnnotateFilesRequestObject()
        {
            // Snippet: AsyncBatchAnnotateFiles(AsyncBatchAnnotateFilesRequest, CallSettings)
            // Create client
            ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.Create();
            // Initialize request argument(s)
            AsyncBatchAnnotateFilesRequest request = new AsyncBatchAnnotateFilesRequest
            {
                Requests =
                {
                    new AsyncAnnotateFileRequest(),
                },
                Parent = "",
            };
            // Make the request
            Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata> response = imageAnnotatorClient.AsyncBatchAnnotateFiles(request);

            // Poll until the returned long-running operation is complete
            Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            AsyncBatchAnnotateFilesResponse result = completedResponse.Result;

            // Or get the name of the operation
            string operationName = response.Name;
            // This name can be stored, then the long-running operation retrieved later by name
            Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata> retrievedResponse = imageAnnotatorClient.PollOnceAsyncBatchAnnotateFiles(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                AsyncBatchAnnotateFilesResponse retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
 /// <summary>
 /// Run async image detection and annotation for a list of generic files (e.g.
 /// PDF) 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).
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// The RPC response.
 /// </returns>
 public override Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata> AsyncBatchAnnotateFiles(
     AsyncBatchAnnotateFilesRequest request,
     CallSettings callSettings = null)
 {
     Modify_AsyncBatchAnnotateFilesRequest(ref request, ref callSettings);
     return(new Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata>(
                _callAsyncBatchAnnotateFiles.Sync(request, callSettings), AsyncBatchAnnotateFilesOperationsClient));
 }
 /// <summary>
 /// Run async image detection and annotation for a list of generic files (e.g.
 /// PDF) 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).
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// A Task containing the RPC response.
 /// </returns>
 public override async Task <Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata> > AsyncBatchAnnotateFilesAsync(
     AsyncBatchAnnotateFilesRequest request,
     CallSettings callSettings = null)
 {
     Modify_AsyncBatchAnnotateFilesRequest(ref request, ref callSettings);
     return(new Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata>(
                await _callAsyncBatchAnnotateFiles.Async(request, callSettings).ConfigureAwait(false), AsyncBatchAnnotateFilesOperationsClient));
 }
 partial void Modify_AsyncBatchAnnotateFilesRequest(ref AsyncBatchAnnotateFilesRequest request, ref CallSettings settings);
 /// <summary>
 /// Run async image detection and annotation for a list of generic files (e.g.
 /// PDF) 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).
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// The RPC response.
 /// </returns>
 public virtual Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata> AsyncBatchAnnotateFiles(
     AsyncBatchAnnotateFilesRequest request,
     CallSettings callSettings = null)
 {
     throw new NotImplementedException();
 }
Example #6
0
 /// <summary>
 /// 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).
 /// </summary>
 /// <param name="request">
 /// The request object containing all of the parameters for the API call.
 /// </param>
 /// <param name="callSettings">
 /// If not null, applies overrides to this RPC call.
 /// </param>
 /// <returns>
 /// A Task containing the RPC response.
 /// </returns>
 public virtual stt::Task <lro::Operation <AsyncBatchAnnotateFilesResponse, OperationMetadata> > AsyncBatchAnnotateFilesAsync(
     AsyncBatchAnnotateFilesRequest request,
     gaxgrpc::CallSettings callSettings = null)
 {
     throw new sys::NotImplementedException();
 }