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

com.pulumi.googlenative.dialogflow.v2beta1.kotlin.inputs.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponsesArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.dialogflow.v2beta1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.dialogflow.v2beta1.inputs.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponsesArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The collection of simple response candidates. This message in `QueryResult.fulfillment_messages` and `WebhookResponse.fulfillment_messages` should contain only one `SimpleResponse`.
 * @property simpleResponses The list of simple responses.
 */
public data class GoogleCloudDialogflowV2beta1IntentMessageSimpleResponsesArgs(
    public val simpleResponses: Output>,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.dialogflow.v2beta1.inputs.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponsesArgs =
        com.pulumi.googlenative.dialogflow.v2beta1.inputs.GoogleCloudDialogflowV2beta1IntentMessageSimpleResponsesArgs.builder()
            .simpleResponses(
                simpleResponses.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    /**
     * @param value The list of simple responses.
     */
    @JvmName("ypacdskwsahaosre")
    public suspend fun simpleResponses(`value`: Output>) {
        this.simpleResponses = value
    }

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

    /**
     * @param values The list of simple responses.
     */
    @JvmName("qrxueatuoyjwahkg")
    public suspend fun simpleResponses(values: List>) {
        this.simpleResponses = Output.all(values)
    }

    /**
     * @param value The list of simple responses.
     */
    @JvmName("npsoskftrwltrjtp")
    public suspend fun simpleResponses(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.simpleResponses = mapped
    }

    /**
     * @param argument The list of simple responses.
     */
    @JvmName("spvapqkcwcruogjk")
    public suspend fun simpleResponses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GoogleCloudDialogflowV2beta1IntentMessageSimpleResponseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.simpleResponses = mapped
    }

    /**
     * @param argument The list of simple responses.
     */
    @JvmName("emdbjafbgtkdbrjm")
    public suspend fun simpleResponses(vararg argument: suspend GoogleCloudDialogflowV2beta1IntentMessageSimpleResponseArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GoogleCloudDialogflowV2beta1IntentMessageSimpleResponseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.simpleResponses = mapped
    }

    /**
     * @param argument The list of simple responses.
     */
    @JvmName("ppgmtvaubeuwtpjp")
    public suspend fun simpleResponses(argument: suspend GoogleCloudDialogflowV2beta1IntentMessageSimpleResponseArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                GoogleCloudDialogflowV2beta1IntentMessageSimpleResponseArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.simpleResponses = mapped
    }

    /**
     * @param values The list of simple responses.
     */
    @JvmName("mdfuuboevxwqdhkw")
    public suspend fun simpleResponses(vararg values: GoogleCloudDialogflowV2beta1IntentMessageSimpleResponseArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.simpleResponses = mapped
    }

    internal fun build(): GoogleCloudDialogflowV2beta1IntentMessageSimpleResponsesArgs =
        GoogleCloudDialogflowV2beta1IntentMessageSimpleResponsesArgs(
            simpleResponses = simpleResponses ?: throw PulumiNullFieldException("simpleResponses"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy