/// <summary>Snippet for List</summary> public void List() { // Snippet: List(string, CallSettings) // Create client FirewallsClient firewallsClient = FirewallsClient.Create(); // Initialize request argument(s) string project = ""; // Make the request FirewallList response = firewallsClient.List(project); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListAsync() { // Snippet: ListAsync(string, CallSettings) // Additional: ListAsync(string, CancellationToken) // Create client FirewallsClient firewallsClient = await FirewallsClient.CreateAsync(); // Initialize request argument(s) string project = ""; // Make the request FirewallList response = await firewallsClient.ListAsync(project); // End snippet }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListFirewallsRequest, CallSettings) // Create client FirewallsClient firewallsClient = FirewallsClient.Create(); // Initialize request argument(s) ListFirewallsRequest request = new ListFirewallsRequest { PageToken = "", MaxResults = 0U, Filter = "", OrderBy = "", Project = "", ReturnPartialSuccess = false, }; // Make the request FirewallList response = firewallsClient.List(request); // End snippet }
private IEnumerable <Firewall> GetProjectFirewalls() { string pageToken = null; do { ListRequest request = Service.Firewalls.List(Project); request.PageToken = pageToken; FirewallList response = request.Execute(); if (response.Items != null) { foreach (Firewall firewall in response.Items) { yield return(firewall); } } pageToken = response.NextPageToken; } while (pageToken != null); }
/// <summary>Snippet for ListAsync</summary> public async Task ListRequestObjectAsync() { // Snippet: ListAsync(ListFirewallsRequest, CallSettings) // Additional: ListAsync(ListFirewallsRequest, CancellationToken) // Create client FirewallsClient firewallsClient = await FirewallsClient.CreateAsync(); // Initialize request argument(s) ListFirewallsRequest request = new ListFirewallsRequest { PageToken = "", MaxResults = 0U, Filter = "", OrderBy = "", Project = "", ReturnPartialSuccess = false, }; // Make the request FirewallList response = await firewallsClient.ListAsync(request); // End snippet }