/// <summary>Snippet for AddSignedUrlKey</summary>
 public void AddSignedUrlKey()
 {
     // Snippet: AddSignedUrlKey(string, string, SignedUrlKey, CallSettings)
     // Create client
     BackendServicesClient backendServicesClient = BackendServicesClient.Create();
     // Initialize request argument(s)
     string       project              = "";
     string       backendService       = "";
     SignedUrlKey signedUrlKeyResource = new SignedUrlKey();
     // Make the request
     Operation response = backendServicesClient.AddSignedUrlKey(project, backendService, signedUrlKeyResource);
     // End snippet
 }
        /// <summary>Snippet for AddSignedUrlKeyAsync</summary>
        public async Task AddSignedUrlKeyAsync()
        {
            // Snippet: AddSignedUrlKeyAsync(string, string, SignedUrlKey, CallSettings)
            // Additional: AddSignedUrlKeyAsync(string, string, SignedUrlKey, CancellationToken)
            // Create client
            BackendServicesClient backendServicesClient = await BackendServicesClient.CreateAsync();

            // Initialize request argument(s)
            string       project              = "";
            string       backendService       = "";
            SignedUrlKey signedUrlKeyResource = new SignedUrlKey();
            // Make the request
            Operation response = await backendServicesClient.AddSignedUrlKeyAsync(project, backendService, signedUrlKeyResource);

            // End snippet
        }
        /// <summary>
        /// Adds the given Signed URL Key to the backend bucket.
        /// Documentation https://developers.google.com/compute/alpha/reference/backendBuckets/addSignedUrlKey
        /// 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="backendBucket">Name of the BackendBucket resource to which the Signed URL Key should be added. The name should conform to RFC1035.</param>
        /// <param name="body">A valid Compute alpha body.</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>OperationResponse</returns>
        public static Operation AddSignedUrlKey(ComputeService service, string project, string backendBucket, SignedUrlKey body, BackendBucketsAddSignedUrlKeyOptionalParms 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 (backendBucket == null)
                {
                    throw new ArgumentNullException(backendBucket);
                }

                // Building the initial request.
                var request = service.BackendBuckets.AddSignedUrlKey(body, project, backendBucket);

                // Applying optional parameters to the request.
                request = (BackendBucketsResource.AddSignedUrlKeyRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request BackendBuckets.AddSignedUrlKey failed.", ex);
            }
        }