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

com.pulumi.gcp.privilegedaccessmanager.kotlin.inputs.EntitlementPrivilegedAccessGcpIamAccessArgs.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.EntitlementPrivilegedAccessGcpIamAccessArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property resource Name of the resource.
 * @property resourceType The type of this resource.
 * @property roleBindings Role bindings to be created on successful grant.
 * Structure is documented below.
 */
public data class EntitlementPrivilegedAccessGcpIamAccessArgs(
    public val resource: Output,
    public val resourceType: Output,
    public val roleBindings: Output>,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementPrivilegedAccessGcpIamAccessArgs =
        com.pulumi.gcp.privilegedaccessmanager.inputs.EntitlementPrivilegedAccessGcpIamAccessArgs.builder()
            .resource(resource.applyValue({ args0 -> args0 }))
            .resourceType(resourceType.applyValue({ args0 -> args0 }))
            .roleBindings(
                roleBindings.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [EntitlementPrivilegedAccessGcpIamAccessArgs].
 */
@PulumiTagMarker
public class EntitlementPrivilegedAccessGcpIamAccessArgsBuilder internal constructor() {
    private var resource: Output? = null

    private var resourceType: Output? = null

    private var roleBindings: Output>? =
        null

    /**
     * @param value Name of the resource.
     */
    @JvmName("kvhwulhrmecpxmly")
    public suspend fun resource(`value`: Output) {
        this.resource = value
    }

    /**
     * @param value The type of this resource.
     */
    @JvmName("mualyvvjhnxbyedp")
    public suspend fun resourceType(`value`: Output) {
        this.resourceType = value
    }

    /**
     * @param value Role bindings to be created on successful grant.
     * Structure is documented below.
     */
    @JvmName("wrsidfdygkebcsyp")
    public suspend fun roleBindings(`value`: Output>) {
        this.roleBindings = value
    }

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

    /**
     * @param values Role bindings to be created on successful grant.
     * Structure is documented below.
     */
    @JvmName("sxwvtarptpnotisy")
    public suspend fun roleBindings(values: List>) {
        this.roleBindings = Output.all(values)
    }

    /**
     * @param value Name of the resource.
     */
    @JvmName("akttqxadvrejngfw")
    public suspend fun resource(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resource = mapped
    }

    /**
     * @param value The type of this resource.
     */
    @JvmName("qvnmrykrrvmfbejy")
    public suspend fun resourceType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceType = mapped
    }

    /**
     * @param value Role bindings to be created on successful grant.
     * Structure is documented below.
     */
    @JvmName("dsghtyxoivbmusvy")
    public suspend fun roleBindings(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roleBindings = mapped
    }

    /**
     * @param argument Role bindings to be created on successful grant.
     * Structure is documented below.
     */
    @JvmName("wugimndtoqioaofr")
    public suspend fun roleBindings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.roleBindings = mapped
    }

    /**
     * @param argument Role bindings to be created on successful grant.
     * Structure is documented below.
     */
    @JvmName("axuxqgrqfckolrai")
    public suspend fun roleBindings(vararg argument: suspend EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.roleBindings = mapped
    }

    /**
     * @param argument Role bindings to be created on successful grant.
     * Structure is documented below.
     */
    @JvmName("ihwxqjghlpjyoske")
    public suspend fun roleBindings(argument: suspend EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.roleBindings = mapped
    }

    /**
     * @param values Role bindings to be created on successful grant.
     * Structure is documented below.
     */
    @JvmName("xlpjdkbvpcgxtkdr")
    public suspend fun roleBindings(vararg values: EntitlementPrivilegedAccessGcpIamAccessRoleBindingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roleBindings = mapped
    }

    internal fun build(): EntitlementPrivilegedAccessGcpIamAccessArgs =
        EntitlementPrivilegedAccessGcpIamAccessArgs(
            resource = resource ?: throw PulumiNullFieldException("resource"),
            resourceType = resourceType ?: throw PulumiNullFieldException("resourceType"),
            roleBindings = roleBindings ?: throw PulumiNullFieldException("roleBindings"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy