示例#1
0
        /// <summary>Snippet for GetStageExecutionDetailsAsync</summary>
        public async Task GetStageExecutionDetailsRequestObjectAsync()
        {
            // Snippet: GetStageExecutionDetailsAsync(GetStageExecutionDetailsRequest, CallSettings)
            // Create client
            MetricsV1Beta3Client metricsV1Beta3Client = await MetricsV1Beta3Client.CreateAsync();

            // Initialize request argument(s)
            GetStageExecutionDetailsRequest request = new GetStageExecutionDetailsRequest
            {
                ProjectId = "",
                JobId     = "",
                Location  = "",
                StageId   = "",
                StartTime = new Timestamp(),
                EndTime   = new Timestamp(),
            };
            // Make the request
            PagedAsyncEnumerable <StageExecutionDetails, WorkerDetails> response = metricsV1Beta3Client.GetStageExecutionDetailsAsync(request);

            // Iterate over all response items, lazily performing RPCs as required
            await response.ForEachAsync((WorkerDetails item) =>
            {
                // Do something with each item
                Console.WriteLine(item);
            });

            // Or iterate over pages (of server-defined size), performing one RPC per page
            await response.AsRawResponses().ForEachAsync((StageExecutionDetails page) =>
            {
                // Do something with each page of items
                Console.WriteLine("A page of results:");
                foreach (WorkerDetails item in page)
                {
                    // Do something with each item
                    Console.WriteLine(item);
                }
            });

            // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
            int pageSize = 10;
            Page <WorkerDetails> singlePage = await response.ReadPageAsync(pageSize);

            // Do something with the page of items
            Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
            foreach (WorkerDetails item in singlePage)
            {
                // Do something with each item
                Console.WriteLine(item);
            }
            // Store the pageToken, for when the next page is required.
            string nextPageToken = singlePage.NextPageToken;
            // End snippet
        }
 partial void Modify_GetStageExecutionDetailsRequest(ref GetStageExecutionDetailsRequest request, ref gaxgrpc::CallSettings settings);
 /// <summary>
 /// Request detailed information about the execution status of a stage of the
 /// job.
 ///
 /// EXPERIMENTAL.  This API is subject to change or removal without notice.
 /// </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 pageable asynchronous sequence of <see cref="WorkerDetails"/> resources.</returns>
 public override gax::PagedAsyncEnumerable <StageExecutionDetails, WorkerDetails> GetStageExecutionDetailsAsync(GetStageExecutionDetailsRequest request, gaxgrpc::CallSettings callSettings = null)
 {
     Modify_GetStageExecutionDetailsRequest(ref request, ref callSettings);
     return(new gaxgrpc::GrpcPagedAsyncEnumerable <GetStageExecutionDetailsRequest, StageExecutionDetails, WorkerDetails>(_callGetStageExecutionDetails, request, callSettings));
 }
 /// <summary>
 /// Request detailed information about the execution status of a stage of the
 /// job.
 ///
 /// EXPERIMENTAL.  This API is subject to change or removal without notice.
 /// </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 pageable asynchronous sequence of <see cref="WorkerDetails"/> resources.</returns>
 public virtual gax::PagedAsyncEnumerable <StageExecutionDetails, WorkerDetails> GetStageExecutionDetailsAsync(GetStageExecutionDetailsRequest request, gaxgrpc::CallSettings callSettings = null) =>
 throw new sys::NotImplementedException();