/// <summary>Snippet for AggregatedList</summary> public void AggregatedList() { // Snippet: AggregatedList(string, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.Create(); // Initialize request argument(s) string project = ""; // Make the request AcceleratorTypeAggregatedList response = acceleratorTypesClient.AggregatedList(project); // End snippet }
/// <summary>Snippet for List</summary> public void List() { // Snippet: List(string, string, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.Create(); // Initialize request argument(s) string project = ""; string zone = ""; // Make the request AcceleratorTypeList response = acceleratorTypesClient.List(project, zone); // End snippet }
/// <summary>Snippet for AggregatedListAsync</summary> public async Task AggregatedListRequestObjectAsync() { // Snippet: AggregatedListAsync(AggregatedListAcceleratorTypesRequest, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = await AcceleratorTypesClient.CreateAsync(); // Initialize request argument(s) AggregatedListAcceleratorTypesRequest request = new AggregatedListAcceleratorTypesRequest { OrderBy = "", Project = "", Filter = "", IncludeAllScopes = false, ReturnPartialSuccess = false, }; // Make the request PagedAsyncEnumerable <AcceleratorTypeAggregatedList, KeyValuePair <string, AcceleratorTypesScopedList> > response = acceleratorTypesClient.AggregatedListAsync(request); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((KeyValuePair <string, AcceleratorTypesScopedList> 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((AcceleratorTypeAggregatedList page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (KeyValuePair <string, AcceleratorTypesScopedList> 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 <KeyValuePair <string, AcceleratorTypesScopedList> > 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 (KeyValuePair <string, AcceleratorTypesScopedList> 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 List</summary> public void ListRequestObject() { // Snippet: List(ListAcceleratorTypesRequest, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.Create(); // Initialize request argument(s) ListAcceleratorTypesRequest request = new ListAcceleratorTypesRequest { Zone = "", OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request PagedEnumerable <AcceleratorTypeList, AcceleratorType> response = acceleratorTypesClient.List(request); // Iterate over all response items, lazily performing RPCs as required foreach (AcceleratorType 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 (AcceleratorTypeList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (AcceleratorType 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 <AcceleratorType> 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 (AcceleratorType 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 AggregatedListAsync</summary> public async Task AggregatedListAsync() { // Snippet: AggregatedListAsync(string, CallSettings) // Additional: AggregatedListAsync(string, CancellationToken) // Create client AcceleratorTypesClient acceleratorTypesClient = await AcceleratorTypesClient.CreateAsync(); // Initialize request argument(s) string project = ""; // Make the request AcceleratorTypeAggregatedList response = await acceleratorTypesClient.AggregatedListAsync(project); // End snippet }
/// <summary>Snippet for GetAsync</summary> public async Task GetAsync() { // Snippet: GetAsync(string, string, string, CallSettings) // Additional: GetAsync(string, string, string, CancellationToken) // Create client AcceleratorTypesClient acceleratorTypesClient = await AcceleratorTypesClient.CreateAsync(); // Initialize request argument(s) string project = ""; string zone = ""; string acceleratorType = ""; // Make the request AcceleratorType response = await acceleratorTypesClient.GetAsync(project, zone, acceleratorType); // End snippet }
/// <summary>Snippet for Get</summary> public void GetRequestObject() { // Snippet: Get(GetAcceleratorTypeRequest, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.Create(); // Initialize request argument(s) GetAcceleratorTypeRequest request = new GetAcceleratorTypeRequest { Zone = "", AcceleratorType = "", Project = "", }; // Make the request AcceleratorType response = acceleratorTypesClient.Get(request); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListAsync() { // Snippet: ListAsync(string, string, string, int?, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = await AcceleratorTypesClient.CreateAsync(); // Initialize request argument(s) string project = ""; string zone = ""; // Make the request PagedAsyncEnumerable <AcceleratorTypeList, AcceleratorType> response = acceleratorTypesClient.ListAsync(project, zone); // Iterate over all response items, lazily performing RPCs as required await response.ForEachAsync((AcceleratorType 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((AcceleratorTypeList page) => { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (AcceleratorType 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 <AcceleratorType> 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 (AcceleratorType 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 AggregatedList</summary> public void AggregatedList() { // Snippet: AggregatedList(string, string, int?, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.Create(); // Initialize request argument(s) string project = ""; // Make the request PagedEnumerable <AcceleratorTypeAggregatedList, KeyValuePair <string, AcceleratorTypesScopedList> > response = acceleratorTypesClient.AggregatedList(project); // Iterate over all response items, lazily performing RPCs as required foreach (KeyValuePair <string, AcceleratorTypesScopedList> 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 (AcceleratorTypeAggregatedList page in response.AsRawResponses()) { // Do something with each page of items Console.WriteLine("A page of results:"); foreach (KeyValuePair <string, AcceleratorTypesScopedList> 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 <KeyValuePair <string, AcceleratorTypesScopedList> > 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 (KeyValuePair <string, AcceleratorTypesScopedList> 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 GetAsync</summary> public async Task GetRequestObjectAsync() { // Snippet: GetAsync(GetAcceleratorTypeRequest, CallSettings) // Additional: GetAsync(GetAcceleratorTypeRequest, CancellationToken) // Create client AcceleratorTypesClient acceleratorTypesClient = await AcceleratorTypesClient.CreateAsync(); // Initialize request argument(s) GetAcceleratorTypeRequest request = new GetAcceleratorTypeRequest { Zone = "", AcceleratorType = "", Project = "", }; // Make the request AcceleratorType response = await acceleratorTypesClient.GetAsync(request); // End snippet }
/// <summary>Snippet for AggregatedList</summary> public void AggregatedListRequestObject() { // Snippet: AggregatedList(AggregatedListAcceleratorTypesRequest, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.Create(); // Initialize request argument(s) AggregatedListAcceleratorTypesRequest request = new AggregatedListAcceleratorTypesRequest { PageToken = "", MaxResults = 0U, Filter = "", IncludeAllScopes = false, OrderBy = "", Project = "", ReturnPartialSuccess = false, }; // Make the request AcceleratorTypeAggregatedList response = acceleratorTypesClient.AggregatedList(request); // End snippet }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListAcceleratorTypesRequest, CallSettings) // Create client AcceleratorTypesClient acceleratorTypesClient = AcceleratorTypesClient.Create(); // Initialize request argument(s) ListAcceleratorTypesRequest request = new ListAcceleratorTypesRequest { Zone = "", PageToken = "", MaxResults = 0U, Filter = "", OrderBy = "", Project = "", ReturnPartialSuccess = false, }; // Make the request AcceleratorTypeList response = acceleratorTypesClient.List(request); // End snippet }
/// <summary>Snippet for AggregatedListAsync</summary> public async Task AggregatedListRequestObjectAsync() { // Snippet: AggregatedListAsync(AggregatedListAcceleratorTypesRequest, CallSettings) // Additional: AggregatedListAsync(AggregatedListAcceleratorTypesRequest, CancellationToken) // Create client AcceleratorTypesClient acceleratorTypesClient = await AcceleratorTypesClient.CreateAsync(); // Initialize request argument(s) AggregatedListAcceleratorTypesRequest request = new AggregatedListAcceleratorTypesRequest { PageToken = "", MaxResults = 0U, Filter = "", IncludeAllScopes = false, OrderBy = "", Project = "", ReturnPartialSuccess = false, }; // Make the request AcceleratorTypeAggregatedList response = await acceleratorTypesClient.AggregatedListAsync(request); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListRequestObjectAsync() { // Snippet: ListAsync(ListAcceleratorTypesRequest, CallSettings) // Additional: ListAsync(ListAcceleratorTypesRequest, CancellationToken) // Create client AcceleratorTypesClient acceleratorTypesClient = await AcceleratorTypesClient.CreateAsync(); // Initialize request argument(s) ListAcceleratorTypesRequest request = new ListAcceleratorTypesRequest { Zone = "", PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request AcceleratorTypeList response = await acceleratorTypesClient.ListAsync(request); // End snippet }