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

com.pulumi.gitlab.inputs.GroupProtectedEnvironmentApprovalRuleArgs Maven / Gradle / Ivy

There is a newer version: 8.7.0-alpha.1732772606
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.gitlab.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final GroupProtectedEnvironmentApprovalRuleArgs Empty = new GroupProtectedEnvironmentApprovalRuleArgs();

    /**
     * Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with `user_id` and `group_id`. Valid values are `developer`, `maintainer`.
     * 
     */
    @Import(name="accessLevel")
    private @Nullable Output accessLevel;

    /**
     * @return Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with `user_id` and `group_id`. Valid values are `developer`, `maintainer`.
     * 
     */
    public Optional> accessLevel() {
        return Optional.ofNullable(this.accessLevel);
    }

    /**
     * Readable description of level of access.
     * 
     */
    @Import(name="accessLevelDescription")
    private @Nullable Output accessLevelDescription;

    /**
     * @return Readable description of level of access.
     * 
     */
    public Optional> accessLevelDescription() {
        return Optional.ofNullable(this.accessLevelDescription);
    }

    /**
     * The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with `access_level` and `user_id`.
     * 
     */
    @Import(name="groupId")
    private @Nullable Output groupId;

    /**
     * @return The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with `access_level` and `user_id`.
     * 
     */
    public Optional> groupId() {
        return Optional.ofNullable(this.groupId);
    }

    /**
     * Group inheritance allows access rules to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
     * 
     */
    @Import(name="groupInheritanceType")
    private @Nullable Output groupInheritanceType;

    /**
     * @return Group inheritance allows access rules to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
     * 
     */
    public Optional> groupInheritanceType() {
        return Optional.ofNullable(this.groupInheritanceType);
    }

    /**
     * The unique ID of the Approval Rules object.
     * 
     */
    @Import(name="id")
    private @Nullable Output id;

    /**
     * @return The unique ID of the Approval Rules object.
     * 
     */
    public Optional> id() {
        return Optional.ofNullable(this.id);
    }

    /**
     * The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
     * 
     */
    @Import(name="requiredApprovals")
    private @Nullable Output requiredApprovals;

    /**
     * @return The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
     * 
     */
    public Optional> requiredApprovals() {
        return Optional.ofNullable(this.requiredApprovals);
    }

    /**
     * The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with `access_level` and `group_id`.
     * 
     */
    @Import(name="userId")
    private @Nullable Output userId;

    /**
     * @return The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with `access_level` and `group_id`.
     * 
     */
    public Optional> userId() {
        return Optional.ofNullable(this.userId);
    }

    private GroupProtectedEnvironmentApprovalRuleArgs() {}

    private GroupProtectedEnvironmentApprovalRuleArgs(GroupProtectedEnvironmentApprovalRuleArgs $) {
        this.accessLevel = $.accessLevel;
        this.accessLevelDescription = $.accessLevelDescription;
        this.groupId = $.groupId;
        this.groupInheritanceType = $.groupInheritanceType;
        this.id = $.id;
        this.requiredApprovals = $.requiredApprovals;
        this.userId = $.userId;
    }

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

    public static final class Builder {
        private GroupProtectedEnvironmentApprovalRuleArgs $;

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

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

        /**
         * @param accessLevel Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with `user_id` and `group_id`. Valid values are `developer`, `maintainer`.
         * 
         * @return builder
         * 
         */
        public Builder accessLevel(@Nullable Output accessLevel) {
            $.accessLevel = accessLevel;
            return this;
        }

        /**
         * @param accessLevel Levels of access allowed to approve a deployment to this protected environment. Mutually exclusive with `user_id` and `group_id`. Valid values are `developer`, `maintainer`.
         * 
         * @return builder
         * 
         */
        public Builder accessLevel(String accessLevel) {
            return accessLevel(Output.of(accessLevel));
        }

        /**
         * @param accessLevelDescription Readable description of level of access.
         * 
         * @return builder
         * 
         */
        public Builder accessLevelDescription(@Nullable Output accessLevelDescription) {
            $.accessLevelDescription = accessLevelDescription;
            return this;
        }

        /**
         * @param accessLevelDescription Readable description of level of access.
         * 
         * @return builder
         * 
         */
        public Builder accessLevelDescription(String accessLevelDescription) {
            return accessLevelDescription(Output.of(accessLevelDescription));
        }

        /**
         * @param groupId The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with `access_level` and `user_id`.
         * 
         * @return builder
         * 
         */
        public Builder groupId(@Nullable Output groupId) {
            $.groupId = groupId;
            return this;
        }

        /**
         * @param groupId The ID of the group allowed to approve a deployment to this protected environment. TThe group must be a sub-group under the given group. Mutually exclusive with `access_level` and `user_id`.
         * 
         * @return builder
         * 
         */
        public Builder groupId(Integer groupId) {
            return groupId(Output.of(groupId));
        }

        /**
         * @param groupInheritanceType Group inheritance allows access rules to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
         * 
         * @return builder
         * 
         */
        public Builder groupInheritanceType(@Nullable Output groupInheritanceType) {
            $.groupInheritanceType = groupInheritanceType;
            return this;
        }

        /**
         * @param groupInheritanceType Group inheritance allows access rules to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
         * 
         * @return builder
         * 
         */
        public Builder groupInheritanceType(Integer groupInheritanceType) {
            return groupInheritanceType(Output.of(groupInheritanceType));
        }

        /**
         * @param id The unique ID of the Approval Rules object.
         * 
         * @return builder
         * 
         */
        public Builder id(@Nullable Output id) {
            $.id = id;
            return this;
        }

        /**
         * @param id The unique ID of the Approval Rules object.
         * 
         * @return builder
         * 
         */
        public Builder id(Integer id) {
            return id(Output.of(id));
        }

        /**
         * @param requiredApprovals The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
         * 
         * @return builder
         * 
         */
        public Builder requiredApprovals(@Nullable Output requiredApprovals) {
            $.requiredApprovals = requiredApprovals;
            return this;
        }

        /**
         * @param requiredApprovals The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
         * 
         * @return builder
         * 
         */
        public Builder requiredApprovals(Integer requiredApprovals) {
            return requiredApprovals(Output.of(requiredApprovals));
        }

        /**
         * @param userId The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with `access_level` and `group_id`.
         * 
         * @return builder
         * 
         */
        public Builder userId(@Nullable Output userId) {
            $.userId = userId;
            return this;
        }

        /**
         * @param userId The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the group with Maintainer role or higher. Mutually exclusive with `access_level` and `group_id`.
         * 
         * @return builder
         * 
         */
        public Builder userId(Integer userId) {
            return userId(Output.of(userId));
        }

        public GroupProtectedEnvironmentApprovalRuleArgs build() {
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy