com.pulumi.gitlab.kotlin.ProjectApprovalRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gitlab-kotlin Show documentation
Show all versions of pulumi-gitlab-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gitlab.kotlin
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gitlab.ProjectApprovalRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* ## Example Usage
* ## Import
* GitLab project approval rules can be imported using a key composed of `:`, e.g.
* ```sh
* $ pulumi import gitlab:index/projectApprovalRule:ProjectApprovalRule example "12345:6"
* ```
* @property appliesToAllProtectedBranches Whether the rule is applied to all protected branches. If set to 'true', the value of `protected_branch_ids` is ignored. Default is 'false'.
* @property approvalsRequired The number of approvals required for this rule.
* @property disableImportingDefaultAnyApproverRuleOnCreate When this flag is set, the default `any_approver` rule will not be imported if present.
* @property groupIds A list of group IDs whose members can approve of the merge request.
* @property name The name of the approval rule.
* @property project The name or id of the project to add the approval rules.
* @property protectedBranchIds A list of protected branch IDs (not branch names) for which the rule applies.
* @property ruleType String, defaults to 'regular'. The type of rule. `any_approver` is a pre-configured default rule with `approvals_required` at `0`. Valid values are `regular`, `any_approver`.
* @property userIds A list of specific User IDs to add to the list of approvers.
*/
public data class ProjectApprovalRuleArgs(
public val appliesToAllProtectedBranches: Output? = null,
public val approvalsRequired: Output? = null,
public val disableImportingDefaultAnyApproverRuleOnCreate: Output? = null,
public val groupIds: Output>? = null,
public val name: Output? = null,
public val project: Output? = null,
public val protectedBranchIds: Output>? = null,
public val ruleType: Output? = null,
public val userIds: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gitlab.ProjectApprovalRuleArgs =
com.pulumi.gitlab.ProjectApprovalRuleArgs.builder()
.appliesToAllProtectedBranches(appliesToAllProtectedBranches?.applyValue({ args0 -> args0 }))
.approvalsRequired(approvalsRequired?.applyValue({ args0 -> args0 }))
.disableImportingDefaultAnyApproverRuleOnCreate(
disableImportingDefaultAnyApproverRuleOnCreate?.applyValue({ args0 ->
args0
}),
)
.groupIds(groupIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.name(name?.applyValue({ args0 -> args0 }))
.project(project?.applyValue({ args0 -> args0 }))
.protectedBranchIds(protectedBranchIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.ruleType(ruleType?.applyValue({ args0 -> args0 }))
.userIds(userIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}
/**
* Builder for [ProjectApprovalRuleArgs].
*/
@PulumiTagMarker
public class ProjectApprovalRuleArgsBuilder internal constructor() {
private var appliesToAllProtectedBranches: Output? = null
private var approvalsRequired: Output? = null
private var disableImportingDefaultAnyApproverRuleOnCreate: Output? = null
private var groupIds: Output>? = null
private var name: Output? = null
private var project: Output? = null
private var protectedBranchIds: Output>? = null
private var ruleType: Output? = null
private var userIds: Output>? = null
/**
* @param value Whether the rule is applied to all protected branches. If set to 'true', the value of `protected_branch_ids` is ignored. Default is 'false'.
*/
@JvmName("uknaptvjmxhbfgtp")
public suspend fun appliesToAllProtectedBranches(`value`: Output) {
this.appliesToAllProtectedBranches = value
}
/**
* @param value The number of approvals required for this rule.
*/
@JvmName("jmyqiygitaghqtxw")
public suspend fun approvalsRequired(`value`: Output) {
this.approvalsRequired = value
}
/**
* @param value When this flag is set, the default `any_approver` rule will not be imported if present.
*/
@JvmName("leurfvuxqqnomltp")
public suspend fun disableImportingDefaultAnyApproverRuleOnCreate(`value`: Output) {
this.disableImportingDefaultAnyApproverRuleOnCreate = value
}
/**
* @param value A list of group IDs whose members can approve of the merge request.
*/
@JvmName("lkysyipehgrmakml")
public suspend fun groupIds(`value`: Output>) {
this.groupIds = value
}
@JvmName("cgeubsxnckaxuoar")
public suspend fun groupIds(vararg values: Output) {
this.groupIds = Output.all(values.asList())
}
/**
* @param values A list of group IDs whose members can approve of the merge request.
*/
@JvmName("cxsvxdteahqaqnwl")
public suspend fun groupIds(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy