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

com.pulumi.azurenative.dbforpostgresql.kotlin.inputs.UserAssignedIdentityArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.dbforpostgresql.kotlin.inputs

import com.pulumi.azurenative.dbforpostgresql.inputs.UserAssignedIdentityArgs.builder
import com.pulumi.azurenative.dbforpostgresql.kotlin.enums.IdentityType
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.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.Map
import kotlin.jvm.JvmName

/**
 * Information describing the identities associated with this application.
 * @property type the types of identities associated with this resource; currently restricted to 'None and UserAssigned'
 * @property userAssignedIdentities represents user assigned identities map.
 */
public data class UserAssignedIdentityArgs(
    public val type: Output>,
    public val userAssignedIdentities: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.dbforpostgresql.inputs.UserAssignedIdentityArgs =
        com.pulumi.azurenative.dbforpostgresql.inputs.UserAssignedIdentityArgs.builder()
            .type(
                type.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .userAssignedIdentities(
                userAssignedIdentities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            ).build()
}

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

    private var userAssignedIdentities: Output>? = null

    /**
     * @param value the types of identities associated with this resource; currently restricted to 'None and UserAssigned'
     */
    @JvmName("xsgkaboctnwjcfby")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value represents user assigned identities map.
     */
    @JvmName("vxuwjfxexsdnjboe")
    public suspend fun userAssignedIdentities(`value`: Output>) {
        this.userAssignedIdentities = value
    }

    /**
     * @param value the types of identities associated with this resource; currently restricted to 'None and UserAssigned'
     */
    @JvmName("yyooxldnpdnbbtbj")
    public suspend fun type(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value the types of identities associated with this resource; currently restricted to 'None and UserAssigned'
     */
    @JvmName("sqlbrlilwerxwiik")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value the types of identities associated with this resource; currently restricted to 'None and UserAssigned'
     */
    @JvmName("otvgqukyottchyoi")
    public fun type(`value`: IdentityType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value represents user assigned identities map.
     */
    @JvmName("sjyohakbsolmxylg")
    public suspend fun userAssignedIdentities(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userAssignedIdentities = mapped
    }

    /**
     * @param argument represents user assigned identities map.
     */
    @JvmName("kwtjmpcnngiqydnv")
    public suspend fun userAssignedIdentities(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                UserIdentityArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.userAssignedIdentities = mapped
    }

    /**
     * @param values represents user assigned identities map.
     */
    @JvmName("cytxpycxmhtywtwr")
    public fun userAssignedIdentities(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userAssignedIdentities = mapped
    }

    internal fun build(): UserAssignedIdentityArgs = UserAssignedIdentityArgs(
        type = type ?: throw PulumiNullFieldException("type"),
        userAssignedIdentities = userAssignedIdentities,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy