/// <summary>Snippet for BatchProcessDocuments</summary>
        public void BatchProcessDocumentsRequestObject()
        {
            // Snippet: BatchProcessDocuments(BatchProcessDocumentsRequest, CallSettings)
            // Create client
            DocumentUnderstandingServiceClient documentUnderstandingServiceClient = DocumentUnderstandingServiceClient.Create();
            // Initialize request argument(s)
            BatchProcessDocumentsRequest request = new BatchProcessDocumentsRequest
            {
                Requests =
                {
                    new ProcessDocumentRequest(),
                },
                Parent = "",
            };
            // Make the request
            Operation <BatchProcessDocumentsResponse, OperationMetadata> response = documentUnderstandingServiceClient.BatchProcessDocuments(request);

            // Poll until the returned long-running operation is complete
            Operation <BatchProcessDocumentsResponse, OperationMetadata> completedResponse = response.PollUntilCompleted();
            // Retrieve the operation result
            BatchProcessDocumentsResponse 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 <BatchProcessDocumentsResponse, OperationMetadata> retrievedResponse = documentUnderstandingServiceClient.PollOnceBatchProcessDocuments(operationName);

            // Check if the retrieved long-running operation has completed
            if (retrievedResponse.IsCompleted)
            {
                // If it has completed, then access the result
                BatchProcessDocumentsResponse retrievedResult = retrievedResponse.Result;
            }
            // End snippet
        }
Ejemplo n.º 2
0
 /// <summary>
 /// LRO endpoint to batch process many documents. The output is written
 /// to Cloud Storage as JSON in the [Document] format.
 /// </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 stt::Task <lro::Operation <BatchProcessDocumentsResponse, OperationMetadata> > BatchProcessDocumentsAsync(BatchProcessDocumentsRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_BatchProcessDocumentsRequest(ref request, ref callSettings);
     return(new lro::Operation <BatchProcessDocumentsResponse, OperationMetadata>(await _callBatchProcessDocuments.Async(request, callSettings).ConfigureAwait(false), BatchProcessDocumentsOperationsClient));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// LRO endpoint to batch process many documents. The output is written
 /// to Cloud Storage as JSON in the [Document] format.
 /// </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 lro::Operation <BatchProcessDocumentsResponse, OperationMetadata> BatchProcessDocuments(BatchProcessDocumentsRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_BatchProcessDocumentsRequest(ref request, ref callSettings);
     return(new lro::Operation <BatchProcessDocumentsResponse, OperationMetadata>(_callBatchProcessDocuments.Sync(request, callSettings), BatchProcessDocumentsOperationsClient));
 }
Ejemplo n.º 4
0
 partial void Modify_BatchProcessDocumentsRequest(ref BatchProcessDocumentsRequest request, ref gaxgrpc::CallSettings settings);
Ejemplo n.º 5
0
 /// <summary>
 /// LRO endpoint to batch process many documents. The output is written
 /// to Cloud Storage as JSON in the [Document] format.
 /// </summary>
 /// <param name="request">The request object containing all of the parameters for the API call.</param>
 /// <param name="cancellationToken">A <see cref="st::CancellationToken"/> to use for this RPC.</param>
 /// <returns>A Task containing the RPC response.</returns>
 public virtual stt::Task <lro::Operation <BatchProcessDocumentsResponse, OperationMetadata> > BatchProcessDocumentsAsync(BatchProcessDocumentsRequest request, st::CancellationToken cancellationToken) =>
 BatchProcessDocumentsAsync(request, gaxgrpc::CallSettings.FromCancellationToken(cancellationToken));
Ejemplo n.º 6
0
 /// <summary>
 /// LRO endpoint to batch process many documents. The output is written
 /// to Cloud Storage as JSON in the [Document] format.
 /// </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 <BatchProcessDocumentsResponse, OperationMetadata> > BatchProcessDocumentsAsync(BatchProcessDocumentsRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();