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

com.pulumi.awsnative.lex.kotlin.inputs.BotImageResponseCardArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.lex.kotlin.inputs

import com.pulumi.awsnative.lex.inputs.BotImageResponseCardArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A message that defines a response card that the client application can show to the user.
 * @property buttons A list of buttons that should be displayed on the response card.
 * @property imageUrl The URL of an image to display on the response card.
 * @property subtitle The subtitle to display on the response card.
 * @property title The title to display on the response card.
 */
public data class BotImageResponseCardArgs(
    public val buttons: Output>? = null,
    public val imageUrl: Output? = null,
    public val subtitle: Output? = null,
    public val title: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lex.inputs.BotImageResponseCardArgs =
        com.pulumi.awsnative.lex.inputs.BotImageResponseCardArgs.builder()
            .buttons(
                buttons?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .imageUrl(imageUrl?.applyValue({ args0 -> args0 }))
            .subtitle(subtitle?.applyValue({ args0 -> args0 }))
            .title(title.applyValue({ args0 -> args0 })).build()
}

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

    private var imageUrl: Output? = null

    private var subtitle: Output? = null

    private var title: Output? = null

    /**
     * @param value A list of buttons that should be displayed on the response card.
     */
    @JvmName("ypidosbxjioqcidx")
    public suspend fun buttons(`value`: Output>) {
        this.buttons = value
    }

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

    /**
     * @param values A list of buttons that should be displayed on the response card.
     */
    @JvmName("eomohpijdjywners")
    public suspend fun buttons(values: List>) {
        this.buttons = Output.all(values)
    }

    /**
     * @param value The URL of an image to display on the response card.
     */
    @JvmName("xinroecdcrmcgmoo")
    public suspend fun imageUrl(`value`: Output) {
        this.imageUrl = value
    }

    /**
     * @param value The subtitle to display on the response card.
     */
    @JvmName("cunsqnkersqwoxqw")
    public suspend fun subtitle(`value`: Output) {
        this.subtitle = value
    }

    /**
     * @param value The title to display on the response card.
     */
    @JvmName("mxybtbkvlmukiyjf")
    public suspend fun title(`value`: Output) {
        this.title = value
    }

    /**
     * @param value A list of buttons that should be displayed on the response card.
     */
    @JvmName("yncljfseeqocnbor")
    public suspend fun buttons(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.buttons = mapped
    }

    /**
     * @param argument A list of buttons that should be displayed on the response card.
     */
    @JvmName("putubxvckhrewhsw")
    public suspend fun buttons(argument: List Unit>) {
        val toBeMapped = argument.toList().map { BotButtonArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.buttons = mapped
    }

    /**
     * @param argument A list of buttons that should be displayed on the response card.
     */
    @JvmName("esnewhhnwhpmrhkc")
    public suspend fun buttons(vararg argument: suspend BotButtonArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { BotButtonArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.buttons = mapped
    }

    /**
     * @param argument A list of buttons that should be displayed on the response card.
     */
    @JvmName("nufqixhpdrjuthyg")
    public suspend fun buttons(argument: suspend BotButtonArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BotButtonArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.buttons = mapped
    }

    /**
     * @param values A list of buttons that should be displayed on the response card.
     */
    @JvmName("wauwuewaqpamaqpa")
    public suspend fun buttons(vararg values: BotButtonArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.buttons = mapped
    }

    /**
     * @param value The URL of an image to display on the response card.
     */
    @JvmName("sbkdhmfnrhmqagly")
    public suspend fun imageUrl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageUrl = mapped
    }

    /**
     * @param value The subtitle to display on the response card.
     */
    @JvmName("rwkxfyclcutlynbb")
    public suspend fun subtitle(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subtitle = mapped
    }

    /**
     * @param value The title to display on the response card.
     */
    @JvmName("xcusyktuyjilbtcm")
    public suspend fun title(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.title = mapped
    }

    internal fun build(): BotImageResponseCardArgs = BotImageResponseCardArgs(
        buttons = buttons,
        imageUrl = imageUrl,
        subtitle = subtitle,
        title = title ?: throw PulumiNullFieldException("title"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy