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

com.pulumi.awsnative.connect.kotlin.User.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.connect.kotlin

import com.pulumi.awsnative.connect.kotlin.outputs.UserIdentityInfo
import com.pulumi.awsnative.connect.kotlin.outputs.UserPhoneConfig
import com.pulumi.awsnative.connect.kotlin.outputs.UserProficiency
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.connect.kotlin.outputs.UserIdentityInfo.Companion.toKotlin as userIdentityInfoToKotlin
import com.pulumi.awsnative.connect.kotlin.outputs.UserPhoneConfig.Companion.toKotlin as userPhoneConfigToKotlin
import com.pulumi.awsnative.connect.kotlin.outputs.UserProficiency.Companion.toKotlin as userProficiencyToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

/**
 * Builder for [User].
 */
@PulumiTagMarker
public class UserResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: UserArgs = UserArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend UserArgsBuilder.() -> Unit) {
        val builder = UserArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): User {
        val builtJavaResource = com.pulumi.awsnative.connect.User(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return User(builtJavaResource)
    }
}

/**
 * Resource Type definition for AWS::Connect::User
 */
public class User internal constructor(
    override val javaResource: com.pulumi.awsnative.connect.User,
) : KotlinCustomResource(javaResource, UserMapper) {
    /**
     * The identifier of the user account in the directory used for identity management.
     */
    public val directoryUserId: Output?
        get() = javaResource.directoryUserId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The identifier of the hierarchy group for the user.
     */
    public val hierarchyGroupArn: Output?
        get() = javaResource.hierarchyGroupArn().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The information about the identity of the user.
     */
    public val identityInfo: Output?
        get() = javaResource.identityInfo().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    userIdentityInfoToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The identifier of the Amazon Connect instance.
     */
    public val instanceArn: Output
        get() = javaResource.instanceArn().applyValue({ args0 -> args0 })

    /**
     * The password for the user account. A password is required if you are using Amazon Connect for identity management. Otherwise, it is an error to include a password.
     */
    public val password: Output?
        get() = javaResource.password().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The phone settings for the user.
     */
    public val phoneConfig: Output
        get() = javaResource.phoneConfig().applyValue({ args0 ->
            args0.let({ args0 ->
                userPhoneConfigToKotlin(args0)
            })
        })

    /**
     * The identifier of the routing profile for the user.
     */
    public val routingProfileArn: Output
        get() = javaResource.routingProfileArn().applyValue({ args0 -> args0 })

    /**
     * One or more security profile arns for the user
     */
    public val securityProfileArns: Output>
        get() = javaResource.securityProfileArns().applyValue({ args0 -> args0.map({ args0 -> args0 }) })

    /**
     * One or more tags.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The Amazon Resource Name (ARN) for the user.
     */
    public val userArn: Output
        get() = javaResource.userArn().applyValue({ args0 -> args0 })

    /**
     * One or more predefined attributes assigned to a user, with a level that indicates how skilled they are.
     */
    public val userProficiencies: Output>?
        get() = javaResource.userProficiencies().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0.let({ args0 -> userProficiencyToKotlin(args0) }) })
            }).orElse(null)
        })

    /**
     * The user name for the account.
     */
    public val username: Output
        get() = javaResource.username().applyValue({ args0 -> args0 })
}

public object UserMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.connect.User::class == javaResource::class

    override fun map(javaResource: Resource): User = User(
        javaResource as
            com.pulumi.awsnative.connect.User,
    )
}

/**
 * @see [User].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [User].
 */
public suspend fun user(name: String, block: suspend UserResourceBuilder.() -> Unit): User {
    val builder = UserResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [User].
 * @param name The _unique_ name of the resulting resource.
 */
public fun user(name: String): User {
    val builder = UserResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy