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

com.pulumi.azurenative.sql.kotlin.inputs.DatabaseIdentityArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.sql.kotlin.inputs

import com.pulumi.azurenative.sql.inputs.DatabaseIdentityArgs.builder
import com.pulumi.azurenative.sql.kotlin.enums.DatabaseIdentityType
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Azure Active Directory identity configuration for a resource.
 * @property type The identity type
 * @property userAssignedIdentities The resource ids of the user assigned identities to use
 */
public data class DatabaseIdentityArgs(
    public val type: Output>? = null,
    public val userAssignedIdentities: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.sql.inputs.DatabaseIdentityArgs =
        com.pulumi.azurenative.sql.inputs.DatabaseIdentityArgs.builder()
            .type(
                type?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .userAssignedIdentities(
                userAssignedIdentities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            ).build()
}

/**
 * Builder for [DatabaseIdentityArgs].
 */
@PulumiTagMarker
public class DatabaseIdentityArgsBuilder internal constructor() {
    private var type: Output>? = null

    private var userAssignedIdentities: Output>? = null

    /**
     * @param value The identity type
     */
    @JvmName("jqdefennhvqsmhiu")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value The resource ids of the user assigned identities to use
     */
    @JvmName("xdawroxqdwplcyql")
    public suspend fun userAssignedIdentities(`value`: Output>) {
        this.userAssignedIdentities = value
    }

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

    /**
     * @param values The resource ids of the user assigned identities to use
     */
    @JvmName("htnpendelfxgmtnq")
    public suspend fun userAssignedIdentities(values: List>) {
        this.userAssignedIdentities = Output.all(values)
    }

    /**
     * @param value The identity type
     */
    @JvmName("vwyngkaggdelmufn")
    public suspend fun type(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The identity type
     */
    @JvmName("wuqqmoergbkdtsae")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The identity type
     */
    @JvmName("eoonpehhchclvfrm")
    public fun type(`value`: DatabaseIdentityType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The resource ids of the user assigned identities to use
     */
    @JvmName("elyukjweylqivbsw")
    public suspend fun userAssignedIdentities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userAssignedIdentities = mapped
    }

    /**
     * @param values The resource ids of the user assigned identities to use
     */
    @JvmName("hapjeliiluphsauc")
    public suspend fun userAssignedIdentities(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userAssignedIdentities = mapped
    }

    internal fun build(): DatabaseIdentityArgs = DatabaseIdentityArgs(
        type = type,
        userAssignedIdentities = userAssignedIdentities,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy