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

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

There is a newer version: 6.3.0
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.github.inputs.RepositoryEnvironmentDeploymentBranchPolicyArgs;
import com.pulumi.github.inputs.RepositoryEnvironmentReviewerArgs;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final RepositoryEnvironmentState Empty = new RepositoryEnvironmentState();

    /**
     * Can repository admins bypass the environment protections.  Defaults to `true`.
     * 
     */
    @Import(name="canAdminsBypass")
    private @Nullable Output canAdminsBypass;

    /**
     * @return Can repository admins bypass the environment protections.  Defaults to `true`.
     * 
     */
    public Optional> canAdminsBypass() {
        return Optional.ofNullable(this.canAdminsBypass);
    }

    /**
     * The deployment branch policy configuration
     * 
     */
    @Import(name="deploymentBranchPolicy")
    private @Nullable Output deploymentBranchPolicy;

    /**
     * @return The deployment branch policy configuration
     * 
     */
    public Optional> deploymentBranchPolicy() {
        return Optional.ofNullable(this.deploymentBranchPolicy);
    }

    /**
     * The name of the environment.
     * 
     */
    @Import(name="environment")
    private @Nullable Output environment;

    /**
     * @return The name of the environment.
     * 
     */
    public Optional> environment() {
        return Optional.ofNullable(this.environment);
    }

    /**
     * Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`.
     * 
     */
    @Import(name="preventSelfReview")
    private @Nullable Output preventSelfReview;

    /**
     * @return Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`.
     * 
     */
    public Optional> preventSelfReview() {
        return Optional.ofNullable(this.preventSelfReview);
    }

    /**
     * The repository of the environment.
     * 
     */
    @Import(name="repository")
    private @Nullable Output repository;

    /**
     * @return The repository of the environment.
     * 
     */
    public Optional> repository() {
        return Optional.ofNullable(this.repository);
    }

    /**
     * The environment reviewers configuration.
     * 
     */
    @Import(name="reviewers")
    private @Nullable Output> reviewers;

    /**
     * @return The environment reviewers configuration.
     * 
     */
    public Optional>> reviewers() {
        return Optional.ofNullable(this.reviewers);
    }

    /**
     * Amount of time to delay a job after the job is initially triggered.
     * 
     */
    @Import(name="waitTimer")
    private @Nullable Output waitTimer;

    /**
     * @return Amount of time to delay a job after the job is initially triggered.
     * 
     */
    public Optional> waitTimer() {
        return Optional.ofNullable(this.waitTimer);
    }

    private RepositoryEnvironmentState() {}

    private RepositoryEnvironmentState(RepositoryEnvironmentState $) {
        this.canAdminsBypass = $.canAdminsBypass;
        this.deploymentBranchPolicy = $.deploymentBranchPolicy;
        this.environment = $.environment;
        this.preventSelfReview = $.preventSelfReview;
        this.repository = $.repository;
        this.reviewers = $.reviewers;
        this.waitTimer = $.waitTimer;
    }

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

    public static final class Builder {
        private RepositoryEnvironmentState $;

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

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

        /**
         * @param canAdminsBypass Can repository admins bypass the environment protections.  Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder canAdminsBypass(@Nullable Output canAdminsBypass) {
            $.canAdminsBypass = canAdminsBypass;
            return this;
        }

        /**
         * @param canAdminsBypass Can repository admins bypass the environment protections.  Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder canAdminsBypass(Boolean canAdminsBypass) {
            return canAdminsBypass(Output.of(canAdminsBypass));
        }

        /**
         * @param deploymentBranchPolicy The deployment branch policy configuration
         * 
         * @return builder
         * 
         */
        public Builder deploymentBranchPolicy(@Nullable Output deploymentBranchPolicy) {
            $.deploymentBranchPolicy = deploymentBranchPolicy;
            return this;
        }

        /**
         * @param deploymentBranchPolicy The deployment branch policy configuration
         * 
         * @return builder
         * 
         */
        public Builder deploymentBranchPolicy(RepositoryEnvironmentDeploymentBranchPolicyArgs deploymentBranchPolicy) {
            return deploymentBranchPolicy(Output.of(deploymentBranchPolicy));
        }

        /**
         * @param environment The name of the environment.
         * 
         * @return builder
         * 
         */
        public Builder environment(@Nullable Output environment) {
            $.environment = environment;
            return this;
        }

        /**
         * @param environment The name of the environment.
         * 
         * @return builder
         * 
         */
        public Builder environment(String environment) {
            return environment(Output.of(environment));
        }

        /**
         * @param preventSelfReview Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder preventSelfReview(@Nullable Output preventSelfReview) {
            $.preventSelfReview = preventSelfReview;
            return this;
        }

        /**
         * @param preventSelfReview Whether or not a user who created the job is prevented from approving their own job. Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder preventSelfReview(Boolean preventSelfReview) {
            return preventSelfReview(Output.of(preventSelfReview));
        }

        /**
         * @param repository The repository of the environment.
         * 
         * @return builder
         * 
         */
        public Builder repository(@Nullable Output repository) {
            $.repository = repository;
            return this;
        }

        /**
         * @param repository The repository of the environment.
         * 
         * @return builder
         * 
         */
        public Builder repository(String repository) {
            return repository(Output.of(repository));
        }

        /**
         * @param reviewers The environment reviewers configuration.
         * 
         * @return builder
         * 
         */
        public Builder reviewers(@Nullable Output> reviewers) {
            $.reviewers = reviewers;
            return this;
        }

        /**
         * @param reviewers The environment reviewers configuration.
         * 
         * @return builder
         * 
         */
        public Builder reviewers(List reviewers) {
            return reviewers(Output.of(reviewers));
        }

        /**
         * @param reviewers The environment reviewers configuration.
         * 
         * @return builder
         * 
         */
        public Builder reviewers(RepositoryEnvironmentReviewerArgs... reviewers) {
            return reviewers(List.of(reviewers));
        }

        /**
         * @param waitTimer Amount of time to delay a job after the job is initially triggered.
         * 
         * @return builder
         * 
         */
        public Builder waitTimer(@Nullable Output waitTimer) {
            $.waitTimer = waitTimer;
            return this;
        }

        /**
         * @param waitTimer Amount of time to delay a job after the job is initially triggered.
         * 
         * @return builder
         * 
         */
        public Builder waitTimer(Integer waitTimer) {
            return waitTimer(Output.of(waitTimer));
        }

        public RepositoryEnvironmentState build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy