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

com.pulumi.gitlab.kotlin.inputs.ProjectProtectedEnvironmentApprovalRuleArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.4.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gitlab.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.inputs.ProjectProtectedEnvironmentApprovalRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property 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`.
 * @property accessLevelDescription Readable description of level of access.
 * @property groupId The ID of the group allowed to approve a deployment to this protected environment. The project must be shared with the group. Mutually exclusive with `access_level` and `user_id`.
 * @property groupInheritanceType Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
 * @property id The unique ID of the Approval Rules object.
 * @property requiredApprovals The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
 * @property userId The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the project. Mutually exclusive with `access_level` and `group_id`.
 */
public data class ProjectProtectedEnvironmentApprovalRuleArgs(
    public val accessLevel: Output? = null,
    public val accessLevelDescription: Output? = null,
    public val groupId: Output? = null,
    public val groupInheritanceType: Output? = null,
    public val id: Output? = null,
    public val requiredApprovals: Output? = null,
    public val userId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gitlab.inputs.ProjectProtectedEnvironmentApprovalRuleArgs =
        com.pulumi.gitlab.inputs.ProjectProtectedEnvironmentApprovalRuleArgs.builder()
            .accessLevel(accessLevel?.applyValue({ args0 -> args0 }))
            .accessLevelDescription(accessLevelDescription?.applyValue({ args0 -> args0 }))
            .groupId(groupId?.applyValue({ args0 -> args0 }))
            .groupInheritanceType(groupInheritanceType?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .requiredApprovals(requiredApprovals?.applyValue({ args0 -> args0 }))
            .userId(userId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ProjectProtectedEnvironmentApprovalRuleArgs].
 */
@PulumiTagMarker
public class ProjectProtectedEnvironmentApprovalRuleArgsBuilder internal constructor() {
    private var accessLevel: Output? = null

    private var accessLevelDescription: Output? = null

    private var groupId: Output? = null

    private var groupInheritanceType: Output? = null

    private var id: Output? = null

    private var requiredApprovals: Output? = null

    private var userId: Output? = null

    /**
     * @param value 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`.
     */
    @JvmName("ooeuyfgvnepnylmt")
    public suspend fun accessLevel(`value`: Output) {
        this.accessLevel = value
    }

    /**
     * @param value Readable description of level of access.
     */
    @JvmName("jnqsebikpueklydx")
    public suspend fun accessLevelDescription(`value`: Output) {
        this.accessLevelDescription = value
    }

    /**
     * @param value The ID of the group allowed to approve a deployment to this protected environment. The project must be shared with the group. Mutually exclusive with `access_level` and `user_id`.
     */
    @JvmName("xknpppobcbqcvige")
    public suspend fun groupId(`value`: Output) {
        this.groupId = value
    }

    /**
     * @param value Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
     */
    @JvmName("wdkpohopejkbeqbk")
    public suspend fun groupInheritanceType(`value`: Output) {
        this.groupInheritanceType = value
    }

    /**
     * @param value The unique ID of the Approval Rules object.
     */
    @JvmName("rtkptiherxnalmco")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
     */
    @JvmName("sdvyirsjdssuuvaa")
    public suspend fun requiredApprovals(`value`: Output) {
        this.requiredApprovals = value
    }

    /**
     * @param value The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the project. Mutually exclusive with `access_level` and `group_id`.
     */
    @JvmName("itealrxrncaywtlj")
    public suspend fun userId(`value`: Output) {
        this.userId = value
    }

    /**
     * @param value 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`.
     */
    @JvmName("hhuyrajxqriveoby")
    public suspend fun accessLevel(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessLevel = mapped
    }

    /**
     * @param value Readable description of level of access.
     */
    @JvmName("iulvbhcwmphohojp")
    public suspend fun accessLevelDescription(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.accessLevelDescription = mapped
    }

    /**
     * @param value The ID of the group allowed to approve a deployment to this protected environment. The project must be shared with the group. Mutually exclusive with `access_level` and `user_id`.
     */
    @JvmName("iyyvxdqaubywmxny")
    public suspend fun groupId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupId = mapped
    }

    /**
     * @param value Group inheritance allows deploy access levels to take inherited group membership into account. Valid values are `0`, `1`. `0` => Direct group membership only, `1` => All inherited groups. Default: `0`
     */
    @JvmName("vepdgfshkujtlvpn")
    public suspend fun groupInheritanceType(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupInheritanceType = mapped
    }

    /**
     * @param value The unique ID of the Approval Rules object.
     */
    @JvmName("wiiuwutnegvykrqe")
    public suspend fun id(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value The number of approval required to allow deployment to this protected environment. This is mutually exclusive with user_id.
     */
    @JvmName("usemmktgakbvhiaq")
    public suspend fun requiredApprovals(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requiredApprovals = mapped
    }

    /**
     * @param value The ID of the user allowed to approve a deployment to this protected environment. The user must be a member of the project. Mutually exclusive with `access_level` and `group_id`.
     */
    @JvmName("ijlfkyumvkpvjhdp")
    public suspend fun userId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userId = mapped
    }

    internal fun build(): ProjectProtectedEnvironmentApprovalRuleArgs =
        ProjectProtectedEnvironmentApprovalRuleArgs(
            accessLevel = accessLevel,
            accessLevelDescription = accessLevelDescription,
            groupId = groupId,
            groupInheritanceType = groupInheritanceType,
            id = id,
            requiredApprovals = requiredApprovals,
            userId = userId,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy