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

com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementApprovalWorkflowManualApprovalsStepArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementApprovalWorkflowManualApprovalsStepArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property approvalsNeeded How many users from the above list need to approve.
 * If there are not enough distinct users in the list above then the workflow
 * will indefinitely block. Should always be greater than 0. Currently 1 is the only
 * supported value.
 * @property approverEmailRecipients Optional. Additional email addresses to be notified when a grant is pending approval.
 * @property approvers The potential set of approvers in this step. This list should contain at only one entry.
 * Structure is documented below.
 */
public data class EntitlementApprovalWorkflowManualApprovalsStepArgs(
    public val approvalsNeeded: Output? = null,
    public val approverEmailRecipients: Output>? = null,
    public val approvers: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementApprovalWorkflowManualApprovalsStepArgs =
        com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementApprovalWorkflowManualApprovalsStepArgs.builder()
            .approvalsNeeded(approvalsNeeded?.applyValue({ args0 -> args0 }))
            .approverEmailRecipients(
                approverEmailRecipients?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            )
            .approvers(approvers.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [EntitlementApprovalWorkflowManualApprovalsStepArgs].
 */
@PulumiTagMarker
public class EntitlementApprovalWorkflowManualApprovalsStepArgsBuilder internal constructor() {
    private var approvalsNeeded: Output? = null

    private var approverEmailRecipients: Output>? = null

    private var approvers: Output? = null

    /**
     * @param value How many users from the above list need to approve.
     * If there are not enough distinct users in the list above then the workflow
     * will indefinitely block. Should always be greater than 0. Currently 1 is the only
     * supported value.
     */
    @JvmName("ohdouahllruiygji")
    public suspend fun approvalsNeeded(`value`: Output) {
        this.approvalsNeeded = value
    }

    /**
     * @param value Optional. Additional email addresses to be notified when a grant is pending approval.
     */
    @JvmName("cgpvbugjltgtmfdv")
    public suspend fun approverEmailRecipients(`value`: Output>) {
        this.approverEmailRecipients = value
    }

    @JvmName("ppbvmpbnxjdglpwc")
    public suspend fun approverEmailRecipients(vararg values: Output) {
        this.approverEmailRecipients = Output.all(values.asList())
    }

    /**
     * @param values Optional. Additional email addresses to be notified when a grant is pending approval.
     */
    @JvmName("pfudjaapivxapgfa")
    public suspend fun approverEmailRecipients(values: List>) {
        this.approverEmailRecipients = Output.all(values)
    }

    /**
     * @param value The potential set of approvers in this step. This list should contain at only one entry.
     * Structure is documented below.
     */
    @JvmName("jljeskovkwoouhnc")
    public suspend fun approvers(`value`: Output) {
        this.approvers = value
    }

    /**
     * @param value How many users from the above list need to approve.
     * If there are not enough distinct users in the list above then the workflow
     * will indefinitely block. Should always be greater than 0. Currently 1 is the only
     * supported value.
     */
    @JvmName("luhcgeaqysqocxll")
    public suspend fun approvalsNeeded(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approvalsNeeded = mapped
    }

    /**
     * @param value Optional. Additional email addresses to be notified when a grant is pending approval.
     */
    @JvmName("cawfkemltnrexfyv")
    public suspend fun approverEmailRecipients(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.approverEmailRecipients = mapped
    }

    /**
     * @param values Optional. Additional email addresses to be notified when a grant is pending approval.
     */
    @JvmName("yjlqpugcwtffhsob")
    public suspend fun approverEmailRecipients(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.approverEmailRecipients = mapped
    }

    /**
     * @param value The potential set of approvers in this step. This list should contain at only one entry.
     * Structure is documented below.
     */
    @JvmName("jnslijjpflonlxyb")
    public suspend fun approvers(`value`: EntitlementApprovalWorkflowManualApprovalsStepApproversArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.approvers = mapped
    }

    /**
     * @param argument The potential set of approvers in this step. This list should contain at only one entry.
     * Structure is documented below.
     */
    @JvmName("etogogcerscwadkp")
    public suspend fun approvers(argument: suspend EntitlementApprovalWorkflowManualApprovalsStepApproversArgsBuilder.() -> Unit) {
        val toBeMapped =
            EntitlementApprovalWorkflowManualApprovalsStepApproversArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.approvers = mapped
    }

    internal fun build(): EntitlementApprovalWorkflowManualApprovalsStepArgs =
        EntitlementApprovalWorkflowManualApprovalsStepArgs(
            approvalsNeeded = approvalsNeeded,
            approverEmailRecipients = approverEmailRecipients,
            approvers = approvers ?: throw PulumiNullFieldException("approvers"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy