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

com.pulumi.azurenative.authorization.kotlin.inputs.PolicyDefinitionReferenceArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.authorization.kotlin.inputs

import com.pulumi.azurenative.authorization.inputs.PolicyDefinitionReferenceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The policy definition reference.
 * @property definitionVersion The version of the policy definition to use.
 * @property groupNames The name of the groups that this policy definition reference belongs to.
 * @property parameters The parameter values for the referenced policy rule. The keys are the parameter names.
 * @property policyDefinitionId The ID of the policy definition or policy set definition.
 * @property policyDefinitionReferenceId A unique id (within the policy set definition) for this policy definition reference.
 */
public data class PolicyDefinitionReferenceArgs(
    public val definitionVersion: Output? = null,
    public val groupNames: Output>? = null,
    public val parameters: Output>? = null,
    public val policyDefinitionId: Output,
    public val policyDefinitionReferenceId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.authorization.inputs.PolicyDefinitionReferenceArgs =
        com.pulumi.azurenative.authorization.inputs.PolicyDefinitionReferenceArgs.builder()
            .definitionVersion(definitionVersion?.applyValue({ args0 -> args0 }))
            .groupNames(groupNames?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .policyDefinitionId(policyDefinitionId.applyValue({ args0 -> args0 }))
            .policyDefinitionReferenceId(policyDefinitionReferenceId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PolicyDefinitionReferenceArgs].
 */
@PulumiTagMarker
public class PolicyDefinitionReferenceArgsBuilder internal constructor() {
    private var definitionVersion: Output? = null

    private var groupNames: Output>? = null

    private var parameters: Output>? = null

    private var policyDefinitionId: Output? = null

    private var policyDefinitionReferenceId: Output? = null

    /**
     * @param value The version of the policy definition to use.
     */
    @JvmName("rbkqrpdahcxaiwls")
    public suspend fun definitionVersion(`value`: Output) {
        this.definitionVersion = value
    }

    /**
     * @param value The name of the groups that this policy definition reference belongs to.
     */
    @JvmName("eauptdwnnermalpt")
    public suspend fun groupNames(`value`: Output>) {
        this.groupNames = value
    }

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

    /**
     * @param values The name of the groups that this policy definition reference belongs to.
     */
    @JvmName("mbtasplaqiminnin")
    public suspend fun groupNames(values: List>) {
        this.groupNames = Output.all(values)
    }

    /**
     * @param value The parameter values for the referenced policy rule. The keys are the parameter names.
     */
    @JvmName("ofirkmjiintgkrrm")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value The ID of the policy definition or policy set definition.
     */
    @JvmName("gvvfhxjyggrradct")
    public suspend fun policyDefinitionId(`value`: Output) {
        this.policyDefinitionId = value
    }

    /**
     * @param value A unique id (within the policy set definition) for this policy definition reference.
     */
    @JvmName("rjasevthhtbvibyj")
    public suspend fun policyDefinitionReferenceId(`value`: Output) {
        this.policyDefinitionReferenceId = value
    }

    /**
     * @param value The version of the policy definition to use.
     */
    @JvmName("urxovbyrevbfknbt")
    public suspend fun definitionVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.definitionVersion = mapped
    }

    /**
     * @param value The name of the groups that this policy definition reference belongs to.
     */
    @JvmName("cxlukrbemjyfdxdw")
    public suspend fun groupNames(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.groupNames = mapped
    }

    /**
     * @param values The name of the groups that this policy definition reference belongs to.
     */
    @JvmName("qrwynuxehgtcqsoa")
    public suspend fun groupNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.groupNames = mapped
    }

    /**
     * @param value The parameter values for the referenced policy rule. The keys are the parameter names.
     */
    @JvmName("qslmwsbesixlccaa")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument The parameter values for the referenced policy rule. The keys are the parameter names.
     */
    @JvmName("gldccwtlukabqibi")
    public suspend fun parameters(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                ParameterValuesValueArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values The parameter values for the referenced policy rule. The keys are the parameter names.
     */
    @JvmName("wcrbuqjvkcuewnjl")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The ID of the policy definition or policy set definition.
     */
    @JvmName("idqbrteeensyignm")
    public suspend fun policyDefinitionId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policyDefinitionId = mapped
    }

    /**
     * @param value A unique id (within the policy set definition) for this policy definition reference.
     */
    @JvmName("vfqbbsfwpgxuehat")
    public suspend fun policyDefinitionReferenceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyDefinitionReferenceId = mapped
    }

    internal fun build(): PolicyDefinitionReferenceArgs = PolicyDefinitionReferenceArgs(
        definitionVersion = definitionVersion,
        groupNames = groupNames,
        parameters = parameters,
        policyDefinitionId = policyDefinitionId ?: throw PulumiNullFieldException("policyDefinitionId"),
        policyDefinitionReferenceId = policyDefinitionReferenceId,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy