All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.github.inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs Maven / Gradle / Ivy

There is a newer version: 6.4.0-alpha.1731735876
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.github.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.util.Objects;


public final class RepositoryEnvironmentDeploymentBranchPolicyArgs extends com.pulumi.resources.ResourceArgs {

    public static final RepositoryEnvironmentDeploymentBranchPolicyArgs Empty = new RepositoryEnvironmentDeploymentBranchPolicyArgs();

    /**
     * Whether only branches that match the specified name patterns can deploy to this environment.
     * 
     */
    @Import(name="customBranchPolicies", required=true)
    private Output customBranchPolicies;

    /**
     * @return Whether only branches that match the specified name patterns can deploy to this environment.
     * 
     */
    public Output customBranchPolicies() {
        return this.customBranchPolicies;
    }

    /**
     * Whether only branches with branch protection rules can deploy to this environment.
     * 
     */
    @Import(name="protectedBranches", required=true)
    private Output protectedBranches;

    /**
     * @return Whether only branches with branch protection rules can deploy to this environment.
     * 
     */
    public Output protectedBranches() {
        return this.protectedBranches;
    }

    private RepositoryEnvironmentDeploymentBranchPolicyArgs() {}

    private RepositoryEnvironmentDeploymentBranchPolicyArgs(RepositoryEnvironmentDeploymentBranchPolicyArgs $) {
        this.customBranchPolicies = $.customBranchPolicies;
        this.protectedBranches = $.protectedBranches;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(RepositoryEnvironmentDeploymentBranchPolicyArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private RepositoryEnvironmentDeploymentBranchPolicyArgs $;

        public Builder() {
            $ = new RepositoryEnvironmentDeploymentBranchPolicyArgs();
        }

        public Builder(RepositoryEnvironmentDeploymentBranchPolicyArgs defaults) {
            $ = new RepositoryEnvironmentDeploymentBranchPolicyArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param customBranchPolicies Whether only branches that match the specified name patterns can deploy to this environment.
         * 
         * @return builder
         * 
         */
        public Builder customBranchPolicies(Output customBranchPolicies) {
            $.customBranchPolicies = customBranchPolicies;
            return this;
        }

        /**
         * @param customBranchPolicies Whether only branches that match the specified name patterns can deploy to this environment.
         * 
         * @return builder
         * 
         */
        public Builder customBranchPolicies(Boolean customBranchPolicies) {
            return customBranchPolicies(Output.of(customBranchPolicies));
        }

        /**
         * @param protectedBranches Whether only branches with branch protection rules can deploy to this environment.
         * 
         * @return builder
         * 
         */
        public Builder protectedBranches(Output protectedBranches) {
            $.protectedBranches = protectedBranches;
            return this;
        }

        /**
         * @param protectedBranches Whether only branches with branch protection rules can deploy to this environment.
         * 
         * @return builder
         * 
         */
        public Builder protectedBranches(Boolean protectedBranches) {
            return protectedBranches(Output.of(protectedBranches));
        }

        public RepositoryEnvironmentDeploymentBranchPolicyArgs build() {
            if ($.customBranchPolicies == null) {
                throw new MissingRequiredPropertyException("RepositoryEnvironmentDeploymentBranchPolicyArgs", "customBranchPolicies");
            }
            if ($.protectedBranches == null) {
                throw new MissingRequiredPropertyException("RepositoryEnvironmentDeploymentBranchPolicyArgs", "protectedBranches");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy