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

com.pulumi.nomad.kotlin.AclRoleArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.nomad.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.nomad.AclRoleArgs.builder
import com.pulumi.nomad.kotlin.inputs.AclRolePolicyArgs
import com.pulumi.nomad.kotlin.inputs.AclRolePolicyArgsBuilder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property description `(string: "")` - A description of the ACL Role.
 * @property name `(string: )` - A human-friendly name for this ACL Role.
 * @property policies `(set: )` - A set of policy names to associate with this
 * ACL Role. It may be used multiple times.
 */
public data class AclRoleArgs(
    public val description: Output? = null,
    public val name: Output? = null,
    public val policies: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.nomad.AclRoleArgs = com.pulumi.nomad.AclRoleArgs.builder()
        .description(description?.applyValue({ args0 -> args0 }))
        .name(name?.applyValue({ args0 -> args0 }))
        .policies(
            policies?.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                })
            }),
        ).build()
}

/**
 * Builder for [AclRoleArgs].
 */
@PulumiTagMarker
public class AclRoleArgsBuilder internal constructor() {
    private var description: Output? = null

    private var name: Output? = null

    private var policies: Output>? = null

    /**
     * @param value `(string: "")` - A description of the ACL Role.
     */
    @JvmName("qgwisicfjwrlxoak")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value `(string: )` - A human-friendly name for this ACL Role.
     */
    @JvmName("estpmjoyfwslbvaa")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value `(set: )` - A set of policy names to associate with this
     * ACL Role. It may be used multiple times.
     */
    @JvmName("ryfjstavvvydfxgp")
    public suspend fun policies(`value`: Output>) {
        this.policies = value
    }

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

    /**
     * @param values `(set: )` - A set of policy names to associate with this
     * ACL Role. It may be used multiple times.
     */
    @JvmName("npwcvubeytxjpsth")
    public suspend fun policies(values: List>) {
        this.policies = Output.all(values)
    }

    /**
     * @param value `(string: "")` - A description of the ACL Role.
     */
    @JvmName("ayvmesncrclseivg")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value `(string: )` - A human-friendly name for this ACL Role.
     */
    @JvmName("fxfblsvottejlgqj")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value `(set: )` - A set of policy names to associate with this
     * ACL Role. It may be used multiple times.
     */
    @JvmName("cswrtufeyqqnpigh")
    public suspend fun policies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policies = mapped
    }

    /**
     * @param argument `(set: )` - A set of policy names to associate with this
     * ACL Role. It may be used multiple times.
     */
    @JvmName("ikyaaffxhykxrmux")
    public suspend fun policies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AclRolePolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.policies = mapped
    }

    /**
     * @param argument `(set: )` - A set of policy names to associate with this
     * ACL Role. It may be used multiple times.
     */
    @JvmName("xxusugchvqplfysc")
    public suspend fun policies(vararg argument: suspend AclRolePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AclRolePolicyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.policies = mapped
    }

    /**
     * @param argument `(set: )` - A set of policy names to associate with this
     * ACL Role. It may be used multiple times.
     */
    @JvmName("waettnmavlhlgkjb")
    public suspend fun policies(argument: suspend AclRolePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AclRolePolicyArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.policies = mapped
    }

    /**
     * @param values `(set: )` - A set of policy names to associate with this
     * ACL Role. It may be used multiple times.
     */
    @JvmName("ixxmpouljibqdjsm")
    public suspend fun policies(vararg values: AclRolePolicyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.policies = mapped
    }

    internal fun build(): AclRoleArgs = AclRoleArgs(
        description = description,
        name = name,
        policies = policies,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy