/// <summary>Snippet for SetSslCertificates</summary> public void SetSslCertificates() { // Snippet: SetSslCertificates(string, string, TargetHttpsProxiesSetSslCertificatesRequest, CallSettings) // Create client TargetHttpsProxiesClient targetHttpsProxiesClient = TargetHttpsProxiesClient.Create(); // Initialize request argument(s) string project = ""; string targetHttpsProxy = ""; TargetHttpsProxiesSetSslCertificatesRequest targetHttpsProxiesSetSslCertificatesRequestResource = new TargetHttpsProxiesSetSslCertificatesRequest(); // Make the request Operation response = targetHttpsProxiesClient.SetSslCertificates(project, targetHttpsProxy, targetHttpsProxiesSetSslCertificatesRequestResource); // End snippet }
/// <summary>Snippet for SetSslCertificatesAsync</summary> public async Task SetSslCertificatesAsync() { // Snippet: SetSslCertificatesAsync(string, string, TargetHttpsProxiesSetSslCertificatesRequest, CallSettings) // Additional: SetSslCertificatesAsync(string, string, TargetHttpsProxiesSetSslCertificatesRequest, CancellationToken) // Create client TargetHttpsProxiesClient targetHttpsProxiesClient = await TargetHttpsProxiesClient.CreateAsync(); // Initialize request argument(s) string project = ""; string targetHttpsProxy = ""; TargetHttpsProxiesSetSslCertificatesRequest targetHttpsProxiesSetSslCertificatesRequestResource = new TargetHttpsProxiesSetSslCertificatesRequest(); // Make the request Operation response = await targetHttpsProxiesClient.SetSslCertificatesAsync(project, targetHttpsProxy, targetHttpsProxiesSetSslCertificatesRequestResource); // End snippet }
/// <summary> /// Replaces SslCertificates for TargetHttpsProxy. /// Documentation https://developers.google.com/compute/v1/reference/targetHttpsProxies/setSslCertificates /// 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="targetHttpsProxy">Name of the TargetHttpsProxy resource to set an SslCertificates resource for.</param> /// <param name="body">A valid Compute v1 body.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>OperationResponse</returns> public static Operation SetSslCertificates(ComputeService service, string project, string targetHttpsProxy, TargetHttpsProxiesSetSslCertificatesRequest body, TargetHttpsProxiesSetSslCertificatesOptionalParms 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 (targetHttpsProxy == null) { throw new ArgumentNullException(targetHttpsProxy); } // Building the initial request. var request = service.TargetHttpsProxies.SetSslCertificates(body, project, targetHttpsProxy); // Applying optional parameters to the request. request = (TargetHttpsProxiesResource.SetSslCertificatesRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request TargetHttpsProxies.SetSslCertificates failed.", ex); } }
/// <summary> /// Replaces SslCertificates for TargetHttpsProxy. /// Documentation https://developers.google.com/compute/v1/reference/targetHttpsProxies/setSslCertificates /// 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="targetHttpsProxy">Name of the TargetHttpsProxy resource to set an SslCertificates resource for.</param> /// <param name="body">A valid compute v1 body.</param> /// <returns>OperationResponse</returns> public static Operation SetSslCertificates(computeService service, string project, string targetHttpsProxy, TargetHttpsProxiesSetSslCertificatesRequest 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 (targetHttpsProxy == null) { throw new ArgumentNullException(targetHttpsProxy); } // Make the request. return(service.TargetHttpsProxies.SetSslCertificates(body, project, targetHttpsProxy).Execute()); } catch (Exception ex) { throw new Exception("Request TargetHttpsProxies.SetSslCertificates failed.", ex); } }