/// <summary>Snippet for SetSslCertificates</summary> public void SetSslCertificates() { // Snippet: SetSslCertificates(string, string, TargetSslProxiesSetSslCertificatesRequest, CallSettings) // Create client TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.Create(); // Initialize request argument(s) string project = ""; string targetSslProxy = ""; TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = new TargetSslProxiesSetSslCertificatesRequest(); // Make the request Operation response = targetSslProxiesClient.SetSslCertificates(project, targetSslProxy, targetSslProxiesSetSslCertificatesRequestResource); // End snippet }
/// <summary>Snippet for SetSslCertificatesAsync</summary> public async Task SetSslCertificatesAsync() { // Snippet: SetSslCertificatesAsync(string, string, TargetSslProxiesSetSslCertificatesRequest, CallSettings) // Additional: SetSslCertificatesAsync(string, string, TargetSslProxiesSetSslCertificatesRequest, CancellationToken) // Create client TargetSslProxiesClient targetSslProxiesClient = await TargetSslProxiesClient.CreateAsync(); // Initialize request argument(s) string project = ""; string targetSslProxy = ""; TargetSslProxiesSetSslCertificatesRequest targetSslProxiesSetSslCertificatesRequestResource = new TargetSslProxiesSetSslCertificatesRequest(); // Make the request Operation response = await targetSslProxiesClient.SetSslCertificatesAsync(project, targetSslProxy, targetSslProxiesSetSslCertificatesRequestResource); // End snippet }
/// <summary> /// Changes SslCertificates for TargetSslProxy. /// Documentation https://developers.google.com/compute/v1/reference/targetSslProxies/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="targetSslProxy">Name of the TargetSslProxy resource whose SslCertificate resource is to be set.</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 targetSslProxy, TargetSslProxiesSetSslCertificatesRequest body, TargetSslProxiesSetSslCertificatesOptionalParms 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 (targetSslProxy == null) { throw new ArgumentNullException(targetSslProxy); } // Building the initial request. var request = service.TargetSslProxies.SetSslCertificates(body, project, targetSslProxy); // Applying optional parameters to the request. request = (TargetSslProxiesResource.SetSslCertificatesRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request TargetSslProxies.SetSslCertificates failed.", ex); } }
/// <summary> /// Changes SslCertificates for TargetSslProxy. /// Documentation https://developers.google.com/compute/alpha/reference/targetSslProxies/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="targetSslProxy">Name of the TargetSslProxy resource whose SslCertificate resource is to be set.</param> /// <param name="body">A valid compute alpha body.</param> /// <returns>OperationResponse</returns> public static Operation SetSslCertificates(computeService service, string project, string targetSslProxy, TargetSslProxiesSetSslCertificatesRequest 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 (targetSslProxy == null) { throw new ArgumentNullException(targetSslProxy); } // Make the request. return(service.TargetSslProxies.SetSslCertificates(body, project, targetSslProxy).Execute()); } catch (Exception ex) { throw new Exception("Request TargetSslProxies.SetSslCertificates failed.", ex); } }