/// <summary>Snippet for ListAuthorizedCertificatesAsync</summary> public async Task ListAuthorizedCertificatesRequestObjectAsync() { // Snippet: ListAuthorizedCertificatesAsync(ListAuthorizedCertificatesRequest, CallSettings) // Create client AuthorizedCertificatesClient authorizedCertificatesClient = await AuthorizedCertificatesClient.CreateAsync(); // Initialize request argument(s) ListAuthorizedCertificatesRequest request = new ListAuthorizedCertificatesRequest { Parent = "", View = AuthorizedCertificateView.BasicCertificate, }; // Make the request PagedAsyncEnumerable <ListAuthorizedCertificatesResponse, AuthorizedCertificate> response = authorizedCertificatesClient.ListAuthorizedCertificatesAsync(request); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((AuthorizedCertificate 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((ListAuthorizedCertificatesResponse page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (AuthorizedCertificate 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 <AuthorizedCertificate> 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 (AuthorizedCertificate 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 }
/// <summary>Snippet for ListAuthorizedCertificates</summary> /// <remarks> /// This snippet has been automatically generated for illustrative purposes only. /// It may require modifications to work in your environment. /// </remarks> public void ListAuthorizedCertificatesRequestObject() { // Create client AuthorizedCertificatesClient authorizedCertificatesClient = AuthorizedCertificatesClient.Create(); // Initialize request argument(s) ListAuthorizedCertificatesRequest request = new ListAuthorizedCertificatesRequest { Parent = "", View = AuthorizedCertificateView.BasicCertificate, }; // Make the request PagedEnumerable <ListAuthorizedCertificatesResponse, AuthorizedCertificate> response = authorizedCertificatesClient.ListAuthorizedCertificates(request); // Iterate over all response items, lazily performing RPCs as required foreach (AuthorizedCertificate item in response) { // Do something with each item Console.WriteLine(item); } // Or iterate over pages (of server-defined size), performing one RPC per page foreach (ListAuthorizedCertificatesResponse page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (AuthorizedCertificate 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 <AuthorizedCertificate> singlePage = response.ReadPage(pageSize); // Do something with the page of items Console.WriteLine($"A page of {pageSize} results (unless it's the final page):"); foreach (AuthorizedCertificate 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; }
/// <summary> /// Lists all SSL certificates the user is authorized to administer. /// </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="AuthorizedCertificate"/> resources.</returns> public override gax::PagedAsyncEnumerable <ListAuthorizedCertificatesResponse, AuthorizedCertificate> ListAuthorizedCertificatesAsync(ListAuthorizedCertificatesRequest request, gaxgrpc::CallSettings callSettings = null) { Modify_ListAuthorizedCertificatesRequest(ref request, ref callSettings); return(new gaxgrpc::GrpcPagedAsyncEnumerable <ListAuthorizedCertificatesRequest, ListAuthorizedCertificatesResponse, AuthorizedCertificate>(_callListAuthorizedCertificates, request, callSettings)); }
partial void Modify_ListAuthorizedCertificatesRequest(ref ListAuthorizedCertificatesRequest request, ref gaxgrpc::CallSettings settings);
/// <summary> /// Lists all SSL certificates the user is authorized to administer. /// </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="AuthorizedCertificate"/> resources.</returns> public virtual gax::PagedAsyncEnumerable <ListAuthorizedCertificatesResponse, AuthorizedCertificate> ListAuthorizedCertificatesAsync(ListAuthorizedCertificatesRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();