Пример #1
0
        /// <summary>
        /// Updates a type provider. This method supports patch semantics.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/typeProviders/patch
        /// 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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="typeProvider">The name of the type provider for this request.</param>
        /// <param name="body">A valid Deploymentmanagerv2beta v2beta body.</param>
        /// <returns>OperationResponse</returns>
        public static Operation Patch(Deploymentmanagerv2betaService service, string project, string typeProvider, TypeProvider 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 (typeProvider == null)
                {
                    throw new ArgumentNullException(typeProvider);
                }

                // Make the request.
                return(service.TypeProviders.Patch(body, project, typeProvider).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request TypeProviders.Patch failed.", ex);
            }
        }
Пример #2
0
        /// <summary>
        /// Gets a type info for a type provided by a TypeProvider.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/typeProviders/getType
        /// 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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="typeProvider">The name of the type provider for this request.</param>
        /// <param name="type">The name of the type provider for this request.</param>
        /// <returns>TypeInfoResponse</returns>
        public static TypeInfo GetType(Deploymentmanagerv2betaService service, string project, string typeProvider, string type)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (typeProvider == null)
                {
                    throw new ArgumentNullException(typeProvider);
                }
                if (type == null)
                {
                    throw new ArgumentNullException(type);
                }

                // Make the request.
                return(service.TypeProviders.GetType(project, typeProvider, type).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request TypeProviders.GetType failed.", ex);
            }
        }
Пример #3
0
        /// <summary>
        /// Lists all the type info for a TypeProvider.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/typeProviders/listTypes
        /// 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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="typeProvider">The name of the type provider for this request.</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>TypeProvidersListTypesResponseResponse</returns>
        public static TypeProvidersListTypesResponse ListTypes(Deploymentmanagerv2betaService service, string project, string typeProvider, TypeProvidersListTypesOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (typeProvider == null)
                {
                    throw new ArgumentNullException(typeProvider);
                }

                // Building the initial request.
                var request = service.TypeProviders.ListTypes(project, typeProvider);

                // Applying optional parameters to the request.
                request = (TypeProvidersResource.ListTypesRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request TypeProviders.ListTypes failed.", ex);
            }
        }
        /// <summary>
        /// Lists all manifests for a given deployment.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/manifests/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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="deployment">The name of the deployment for this request.</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>ManifestsListResponseResponse</returns>
        public static ManifestsListResponse List(Deploymentmanagerv2betaService service, string project, string deployment, ManifestsListOptionalParms optional = null)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (deployment == null)
                {
                    throw new ArgumentNullException(deployment);
                }

                // Building the initial request.
                var request = service.Manifests.List(project, deployment);

                // Applying optional parameters to the request.
                request = (ManifestsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Manifests.List failed.", ex);
            }
        }
        /// <summary>
        /// Gets information about a specific manifest.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/manifests/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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="deployment">The name of the deployment for this request.</param>
        /// <param name="manifest">The name of the manifest for this request.</param>
        /// <returns>ManifestResponse</returns>
        public static Manifest Get(Deploymentmanagerv2betaService service, string project, string deployment, string manifest)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (deployment == null)
                {
                    throw new ArgumentNullException(deployment);
                }
                if (manifest == null)
                {
                    throw new ArgumentNullException(manifest);
                }

                // Make the request.
                return(service.Manifests.Get(project, deployment, manifest).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Manifests.Get failed.", ex);
            }
        }
Пример #6
0
        /// <summary>
        /// Cancels and removes the preview currently associated with the deployment.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/deployments/cancelPreview
        /// 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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="deployment">The name of the deployment for this request.</param>
        /// <param name="body">A valid Deploymentmanagerv2beta v2beta body.</param>
        /// <returns>OperationResponse</returns>
        public static Operation CancelPreview(Deploymentmanagerv2betaService service, string project, string deployment, DeploymentsCancelPreviewRequest 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 (deployment == null)
                {
                    throw new ArgumentNullException(deployment);
                }

                // Make the request.
                return(service.Deployments.CancelPreview(body, project, deployment).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Deployments.CancelPreview failed.", ex);
            }
        }
Пример #7
0
        /// <summary>
        /// Gets information about a specific operation.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/operations/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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="operation">The name of the operation for this request.</param>
        /// <returns>OperationResponse</returns>
        public static Operation Get(Deploymentmanagerv2betaService service, string project, string operation)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (operation == null)
                {
                    throw new ArgumentNullException(operation);
                }

                // Make the request.
                return(service.Operations.Get(project, operation).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Operations.Get failed.", ex);
            }
        }
Пример #8
0
        /// <summary>
        /// Returns permissions that a caller has on the specified resource.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/deployments/testIamPermissions
        /// 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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">Project ID for this request.</param>
        /// <param name="resource">Name of the resource for this request.</param>
        /// <param name="body">A valid Deploymentmanagerv2beta v2beta body.</param>
        /// <returns>TestPermissionsResponseResponse</returns>
        public static TestPermissionsResponse TestIamPermissions(Deploymentmanagerv2betaService service, string project, string resource, TestPermissionsRequest 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 (resource == null)
                {
                    throw new ArgumentNullException(resource);
                }

                // Make the request.
                return(service.Deployments.TestIamPermissions(body, project, resource).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Deployments.TestIamPermissions failed.", ex);
            }
        }
Пример #9
0
        /// <summary>
        /// Creates a deployment and all of the resources described by the deployment manifest.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/deployments/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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="body">A valid Deploymentmanagerv2beta v2beta body.</param>
        /// <param name="optional">Optional paramaters.</param>
        /// <returns>OperationResponse</returns>
        public static Operation Insert(Deploymentmanagerv2betaService service, string project, Deployment body, DeploymentsInsertOptionalParms 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);
                }

                // Building the initial request.
                var request = service.Deployments.Insert(body, project);

                // Applying optional parameters to the request.
                request = (DeploymentsResource.InsertRequest)SampleHelpers.ApplyOptionalParms(request, optional);

                // Requesting data.
                return(request.Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Deployments.Insert failed.", ex);
            }
        }
Пример #10
0
        /// <summary>
        /// Gets the access control policy for a resource. May be empty if no such policy or resource exists.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/deployments/getIamPolicy
        /// 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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">Project ID for this request.</param>
        /// <param name="resource">Name of the resource for this request.</param>
        /// <returns>PolicyResponse</returns>
        public static Policy GetIamPolicy(Deploymentmanagerv2betaService service, string project, string resource)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (resource == null)
                {
                    throw new ArgumentNullException(resource);
                }

                // Make the request.
                return(service.Deployments.GetIamPolicy(project, resource).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request Deployments.GetIamPolicy failed.", ex);
            }
        }
Пример #11
0
        /// <summary>
        /// Gets information about a specific composite type.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/compositeTypes/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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="compositeType">The name of the composite type for this request.</param>
        /// <returns>CompositeTypeResponse</returns>
        public static CompositeType Get(Deploymentmanagerv2betaService service, string project, string compositeType)
        {
            try
            {
                // Initial validation.
                if (service == null)
                {
                    throw new ArgumentNullException("service");
                }
                if (project == null)
                {
                    throw new ArgumentNullException(project);
                }
                if (compositeType == null)
                {
                    throw new ArgumentNullException(compositeType);
                }

                // Make the request.
                return(service.CompositeTypes.Get(project, compositeType).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request CompositeTypes.Get failed.", ex);
            }
        }
Пример #12
0
        /// <summary>
        /// Creates a composite type.
        /// Documentation https://developers.google.com/deploymentmanagerv2beta/v2beta/reference/compositeTypes/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 Deploymentmanagerv2beta service.</param>
        /// <param name="project">The project ID for this request.</param>
        /// <param name="body">A valid Deploymentmanagerv2beta v2beta body.</param>
        /// <returns>OperationResponse</returns>
        public static Operation Insert(Deploymentmanagerv2betaService service, string project, CompositeType 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);
                }

                // Make the request.
                return(service.CompositeTypes.Insert(body, project).Execute());
            }
            catch (Exception ex)
            {
                throw new Exception("Request CompositeTypes.Insert failed.", ex);
            }
        }