/// <summary>Snippet for ExpandIpCidrRange</summary> public void ExpandIpCidrRange() { // Snippet: ExpandIpCidrRange(string, string, string, SubnetworksExpandIpCidrRangeRequest, CallSettings) // Create client SubnetworksClient subnetworksClient = SubnetworksClient.Create(); // Initialize request argument(s) string project = ""; string region = ""; string subnetwork = ""; SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest(); // Make the request Operation response = subnetworksClient.ExpandIpCidrRange(project, region, subnetwork, subnetworksExpandIpCidrRangeRequestResource); // End snippet }
/// <summary>Snippet for ExpandIpCidrRangeAsync</summary> public async Task ExpandIpCidrRangeAsync() { // Snippet: ExpandIpCidrRangeAsync(string, string, string, SubnetworksExpandIpCidrRangeRequest, CallSettings) // Additional: ExpandIpCidrRangeAsync(string, string, string, SubnetworksExpandIpCidrRangeRequest, CancellationToken) // Create client SubnetworksClient subnetworksClient = await SubnetworksClient.CreateAsync(); // Initialize request argument(s) string project = ""; string region = ""; string subnetwork = ""; SubnetworksExpandIpCidrRangeRequest subnetworksExpandIpCidrRangeRequestResource = new SubnetworksExpandIpCidrRangeRequest(); // Make the request Operation response = await subnetworksClient.ExpandIpCidrRangeAsync(project, region, subnetwork, subnetworksExpandIpCidrRangeRequestResource); // End snippet }
/// <summary> /// Expands the IP CIDR range of the subnetwork to a specified value. /// Documentation https://developers.google.com/compute/beta/reference/subnetworks/expandIpCidrRange /// 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 compute service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="region">Name of the region scoping this request.</param> /// <param name="subnetwork">Name of the Subnetwork resource to update.</param> /// <param name="body">A valid compute beta body.</param> /// <returns>OperationResponse</returns> public static Operation ExpandIpCidrRange(computeService service, string project, string region, string subnetwork, SubnetworksExpandIpCidrRangeRequest 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 (region == null) { throw new ArgumentNullException(region); } if (subnetwork == null) { throw new ArgumentNullException(subnetwork); } // Make the request. return(service.Subnetworks.ExpandIpCidrRange(body, project, region, subnetwork).Execute()); } catch (Exception ex) { throw new Exception("Request Subnetworks.ExpandIpCidrRange failed.", ex); } }
/// <summary> /// Expands the IP CIDR range of the subnetwork to a specified value. /// Documentation https://developers.google.com/compute/v1/reference/subnetworks/expandIpCidrRange /// 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 Compute service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="region">Name of the region scoping this request.</param> /// <param name="subnetwork">Name of the Subnetwork resource to update.</param> /// <param name="body">A valid Compute v1 body.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>OperationResponse</returns> public static Operation ExpandIpCidrRange(ComputeService service, string project, string region, string subnetwork, SubnetworksExpandIpCidrRangeRequest body, SubnetworksExpandIpCidrRangeOptionalParms optional = null) { 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 (region == null) { throw new ArgumentNullException(region); } if (subnetwork == null) { throw new ArgumentNullException(subnetwork); } // Building the initial request. var request = service.Subnetworks.ExpandIpCidrRange(body, project, region, subnetwork); // Applying optional parameters to the request. request = (SubnetworksResource.ExpandIpCidrRangeRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Subnetworks.ExpandIpCidrRange failed.", ex); } }