/// <summary>Snippet for List</summary> public void List() { // Snippet: List(string, CallSettings) // Create client InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.Create(); // Initialize request argument(s) string project = ""; // Make the request InstanceTemplateList response = instanceTemplatesClient.List(project); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListAsync() { // Snippet: ListAsync(string, CallSettings) // Additional: ListAsync(string, CancellationToken) // Create client InstanceTemplatesClient instanceTemplatesClient = await InstanceTemplatesClient.CreateAsync(); // Initialize request argument(s) string project = ""; // Make the request InstanceTemplateList response = await instanceTemplatesClient.ListAsync(project); // End snippet }
/// <summary> /// Gets a list of InstanceTemplates for a project. /// </summary> /// <returns> /// The InstanceTemplates of a project. /// </returns> private IEnumerable <InstanceTemplate> GetProjectTemplates() { InstanceTemplatesResource.ListRequest request = Service.InstanceTemplates.List(Project); do { InstanceTemplateList result = request.Execute(); if (result.Items != null) { foreach (InstanceTemplate template in result.Items) { yield return(template); } } request.PageToken = result.NextPageToken; } while (request.PageToken != null && !Stopping); }
/// <summary>Snippet for List</summary> public void ListRequestObject() { // Snippet: List(ListInstanceTemplatesRequest, CallSettings) // Create client InstanceTemplatesClient instanceTemplatesClient = InstanceTemplatesClient.Create(); // Initialize request argument(s) ListInstanceTemplatesRequest request = new ListInstanceTemplatesRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request InstanceTemplateList response = instanceTemplatesClient.List(request); // End snippet }
/// <summary>Snippet for ListAsync</summary> public async Task ListRequestObjectAsync() { // Snippet: ListAsync(ListInstanceTemplatesRequest, CallSettings) // Additional: ListAsync(ListInstanceTemplatesRequest, CancellationToken) // Create client InstanceTemplatesClient instanceTemplatesClient = await InstanceTemplatesClient.CreateAsync(); // Initialize request argument(s) ListInstanceTemplatesRequest request = new ListInstanceTemplatesRequest { PageToken = "", MaxResults = 0U, OrderBy = "", Project = "", Filter = "", ReturnPartialSuccess = false, }; // Make the request InstanceTemplateList response = await instanceTemplatesClient.ListAsync(request); // End snippet }