/// <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> /// Add resources to the view. /// Documentation https://developers.google.com/resourceviews/v1beta1/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="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> /// <param name="body">A valid Resourceviews v1beta1 body.</param> public static void Addresources(ResourceviewsService service, string projectName, string zone, string resourceViewName, ZoneViewsAddResourcesRequest 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); } if (resourceViewName == null) { throw new ArgumentNullException(resourceViewName); } // Make the request. service.ZoneViews.Addresources(body, projectName, zone, resourceViewName).Execute(); } catch (Exception ex) { throw new Exception("Request ZoneViews.Addresources failed.", ex); } }
/// <summary> /// Retrieves the list of operation resources contained within the specified zone. /// Documentation https://developers.google.com/resourceviews/v1beta2/reference/zoneOperations/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">Name of the project scoping this request.</param> /// <param name="zone">Name of the zone scoping this request.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>OperationListResponse</returns> public static OperationList List(ResourceviewsService service, string project, string zone, ZoneOperationsListOptionalParms 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.ZoneOperations.List(project, zone); // Applying optional parameters to the request. request = (ZoneOperationsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request ZoneOperations.List 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> /// Remove resources from the view. /// Documentation https://developers.google.com/resourceviews/v1beta1/reference/regionViews/removeresources /// 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 Removeresources(ResourceviewsService service, string projectName, string region, string resourceViewName, RegionViewsRemoveResourcesRequest 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. service.RegionViews.Removeresources(body, projectName, region, resourceViewName).Execute(); } catch (Exception ex) { throw new Exception("Request RegionViews.Removeresources failed.", ex); } }
/// <summary> /// List resource views. /// Documentation https://developers.google.com/resourceviews/v1beta1/reference/regionViews/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="projectName">The project name of the resource view.</param> /// <param name="region">The region name of the resource view.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>RegionViewsListResponseResponse</returns> public static RegionViewsListResponse List(ResourceviewsService service, string projectName, string region, RegionViewsListOptionalParms 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); } // Building the initial request. var request = service.RegionViews.List(projectName, region); // Applying optional parameters to the request. request = (RegionViewsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request RegionViews.List failed.", ex); } }
/// <summary> /// Update the service information of a resource view or a resource. /// Documentation https://developers.google.com/resourceviews/v1beta2/reference/zoneViews/setService /// 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 SetService(ResourceviewsService service, string project, string zone, string resourceView, ZoneViewsSetServiceRequest 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.SetService(body, project, zone, resourceView).Execute()); } catch (Exception ex) { throw new Exception("Request ZoneViews.SetService failed.", ex); } }