/// <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 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 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 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 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 }