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

com.pulumi.awsnative.bedrock.kotlin.PromptArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.bedrock.kotlin

import com.pulumi.awsnative.bedrock.PromptArgs.builder
import com.pulumi.awsnative.bedrock.kotlin.inputs.PromptVariantArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.PromptVariantArgsBuilder
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 kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Definition of AWS::Bedrock::Prompt Resource Type
 * @property customerEncryptionKeyArn A KMS key ARN
 * @property defaultVariant Name for a variant.
 * @property description Name for a prompt resource.
 * @property name Name for a prompt resource.
 * @property tags Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
 * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
 * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
 * @property variants List of prompt variants
 */
public data class PromptArgs(
    public val customerEncryptionKeyArn: Output? = null,
    public val defaultVariant: Output? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
    public val variants: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.bedrock.PromptArgs =
        com.pulumi.awsnative.bedrock.PromptArgs.builder()
            .customerEncryptionKeyArn(customerEncryptionKeyArn?.applyValue({ args0 -> args0 }))
            .defaultVariant(defaultVariant?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .variants(
                variants?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [PromptArgs].
 */
@PulumiTagMarker
public class PromptArgsBuilder internal constructor() {
    private var customerEncryptionKeyArn: Output? = null

    private var defaultVariant: Output? = null

    private var description: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    private var variants: Output>? = null

    /**
     * @param value A KMS key ARN
     */
    @JvmName("xmthwjeglwsjeuou")
    public suspend fun customerEncryptionKeyArn(`value`: Output) {
        this.customerEncryptionKeyArn = value
    }

    /**
     * @param value Name for a variant.
     */
    @JvmName("iwjtaynmpurwnnup")
    public suspend fun defaultVariant(`value`: Output) {
        this.defaultVariant = value
    }

    /**
     * @param value Name for a prompt resource.
     */
    @JvmName("isqwqjrmgwgegnmq")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Name for a prompt resource.
     */
    @JvmName("iecoyknkrljlfnni")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("fglbykasunoatnym")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value List of prompt variants
     */
    @JvmName("axwcwtulohekiuqo")
    public suspend fun variants(`value`: Output>) {
        this.variants = value
    }

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

    /**
     * @param values List of prompt variants
     */
    @JvmName("rmoqrqjmtpvimqht")
    public suspend fun variants(values: List>) {
        this.variants = Output.all(values)
    }

    /**
     * @param value A KMS key ARN
     */
    @JvmName("srsbohpyrqxscvlh")
    public suspend fun customerEncryptionKeyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customerEncryptionKeyArn = mapped
    }

    /**
     * @param value Name for a variant.
     */
    @JvmName("qosgkpuqbhrmjgvx")
    public suspend fun defaultVariant(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultVariant = mapped
    }

    /**
     * @param value Name for a prompt resource.
     */
    @JvmName("nqsbcwmwxiraqoll")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Name for a prompt resource.
     */
    @JvmName("rketxixlfggkfseb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("lomoxuwnvnphtntc")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:
     * - [Tag naming limits and requirements](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-conventions)
     * - [Tagging best practices](https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html#tag-best-practices)
     */
    @JvmName("isiklenhscqbxynq")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value List of prompt variants
     */
    @JvmName("qoqxlhcgqmfiuvot")
    public suspend fun variants(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.variants = mapped
    }

    /**
     * @param argument List of prompt variants
     */
    @JvmName("xnkldlyfmdofaggb")
    public suspend fun variants(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PromptVariantArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.variants = mapped
    }

    /**
     * @param argument List of prompt variants
     */
    @JvmName("oljbyndrldxnxqiy")
    public suspend fun variants(vararg argument: suspend PromptVariantArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PromptVariantArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.variants = mapped
    }

    /**
     * @param argument List of prompt variants
     */
    @JvmName("esuqjgelqjnaeics")
    public suspend fun variants(argument: suspend PromptVariantArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(PromptVariantArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.variants = mapped
    }

    /**
     * @param values List of prompt variants
     */
    @JvmName("nchmtaikxkliknrq")
    public suspend fun variants(vararg values: PromptVariantArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.variants = mapped
    }

    internal fun build(): PromptArgs = PromptArgs(
        customerEncryptionKeyArn = customerEncryptionKeyArn,
        defaultVariant = defaultVariant,
        description = description,
        name = name,
        tags = tags,
        variants = variants,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy