/// <summary> /// List resource views. /// Documentation https://developers.google.com/resourceviews/v1beta2/reference/zoneViews/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated resourceviews service.</param> /// <param name="project">The project name of the resource view.</param> /// <param name="zone">The zone name of the resource view.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>ZoneViewsListResponse</returns> public static ZoneViewsList List(resourceviewsService service, string project, string zone, ZoneViewsListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (zone == null) { throw new ArgumentNullException(zone); } // Building the initial request. var request = service.ZoneViews.List(project, zone); // Applying optional parameters to the request. request = (ZoneViewsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request ZoneViews.List failed.", ex); } }
/// <summary> /// Add resources to the view. /// Documentation https://developers.google.com/resourceviews/v1beta2/reference/zoneViews/addResources /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated resourceviews service.</param> /// <param name="project">The project name of the resource view.</param> /// <param name="zone">The zone name of the resource view.</param> /// <param name="resourceView">The name of the resource view.</param> /// <param name="body">A valid resourceviews v1beta2 body.</param> /// <returns>OperationResponse</returns> public static Operation AddResources(resourceviewsService service, string project, string zone, string resourceView, ZoneViewsAddResourcesRequest body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (project == null) { throw new ArgumentNullException(project); } if (zone == null) { throw new ArgumentNullException(zone); } if (resourceView == null) { throw new ArgumentNullException(resourceView); } // Make the request. return(service.ZoneViews.AddResources(body, project, zone, resourceView).Execute()); } catch (Exception ex) { throw new Exception("Request ZoneViews.AddResources failed.", ex); } }
/// <summary> /// Add resources to the view. /// Documentation https://developers.google.com/resourceviews/v1beta1/reference/regionViews/addresources /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated resourceviews service.</param> /// <param name="projectName">The project name of the resource view.</param> /// <param name="region">The region name of the resource view.</param> /// <param name="resourceViewName">The name of the resource view.</param> /// <param name="body">A valid resourceviews v1beta1 body.</param> public static void Addresources(resourceviewsService service, string projectName, string region, string resourceViewName, RegionViewsAddResourcesRequest body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (projectName == null) { throw new ArgumentNullException(projectName); } if (region == null) { throw new ArgumentNullException(region); } if (resourceViewName == null) { throw new ArgumentNullException(resourceViewName); } // Make the request. return(service.RegionViews.Addresources(body, projectName, region, resourceViewName).Execute()); } catch (Exception ex) { throw new Exception("Request RegionViews.Addresources failed.", ex); } }
/// <summary> /// Create a resource view. /// Documentation https://developers.google.com/resourceviews/v1beta1/reference/zoneViews/insert /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated resourceviews service.</param> /// <param name="projectName">The project name of the resource view.</param> /// <param name="zone">The zone name of the resource view.</param> /// <param name="body">A valid resourceviews v1beta1 body.</param> /// <returns>ZoneViewsInsertResponseResponse</returns> public static ZoneViewsInsertResponse Insert(resourceviewsService service, string projectName, string zone, ResourceView body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (projectName == null) { throw new ArgumentNullException(projectName); } if (zone == null) { throw new ArgumentNullException(zone); } // Make the request. return(service.ZoneViews.Insert(body, projectName, zone).Execute()); } catch (Exception ex) { throw new Exception("Request ZoneViews.Insert failed.", ex); } }
/// <summary> /// Get the information of a zonal resource view. /// Documentation https://developers.google.com/resourceviews/v1beta1/reference/zoneViews/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated resourceviews service.</param> /// <param name="projectName">The project name of the resource view.</param> /// <param name="zone">The zone name of the resource view.</param> /// <param name="resourceViewName">The name of the resource view.</param> /// <returns>ResourceViewResponse</returns> public static ResourceView Get(resourceviewsService service, string projectName, string zone, string resourceViewName) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (projectName == null) { throw new ArgumentNullException(projectName); } if (zone == null) { throw new ArgumentNullException(zone); } if (resourceViewName == null) { throw new ArgumentNullException(resourceViewName); } // Make the request. return(service.ZoneViews.Get(projectName, zone, resourceViewName).Execute()); } catch (Exception ex) { throw new Exception("Request ZoneViews.Get failed.", ex); } }
/// <summary> /// Retrieves the specified zone-specific operation resource. /// Documentation https://developers.google.com/resourceviews/v1beta2/reference/zoneOperations/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated resourceviews service.</param> /// <param name="project">Name of the project scoping this request.</param> /// <param name="zone">Name of the zone scoping this request.</param> /// <param name="operation">Name of the operation resource to return.</param> /// <returns>OperationResponse</returns> public static Operation Get(resourceviewsService service, string project, string zone, string operation) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (zone == null) { throw new ArgumentNullException(zone); } if (operation == null) { throw new ArgumentNullException(operation); } // Make the request. return(service.ZoneOperations.Get(project, zone, operation).Execute()); } catch (Exception ex) { throw new Exception("Request ZoneOperations.Get failed.", ex); } }
/// <summary> /// List the resources in the view. /// Documentation https://developers.google.com/resourceviews/v1beta1/reference/regionViews/listresources /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated resourceviews service.</param> /// <param name="projectName">The project name of the resource view.</param> /// <param name="region">The region name of the resource view.</param> /// <param name="resourceViewName">The name of the resource view.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>RegionViewsListResourcesResponseResponse</returns> public static RegionViewsListResourcesResponse Listresources(resourceviewsService service, string projectName, string region, string resourceViewName, RegionViewsListresourcesOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (projectName == null) { throw new ArgumentNullException(projectName); } if (region == null) { throw new ArgumentNullException(region); } if (resourceViewName == null) { throw new ArgumentNullException(resourceViewName); } // Building the initial request. var request = service.RegionViews.Listresources(projectName, region, resourceViewName); // Applying optional parameters to the request. request = (RegionViewsResource.ListresourcesRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request RegionViews.Listresources failed.", ex); } }