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

com.pulumi.gcp.diagflow.kotlin.inputs.CxFlowEventHandlerTriggerFulfillmentArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.diagflow.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.diagflow.inputs.CxFlowEventHandlerTriggerFulfillmentArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property conditionalCases Conditional cases for this fulfillment.
 * Structure is documented below.
 * @property messages The list of rich message responses to present to the user.
 * Structure is documented below.
 * @property returnPartialResponses Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
 * @property setParameterActions Set parameter values before executing the webhook.
 * Structure is documented below.
 * @property tag The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified.
 * @property webhook The webhook to call. Format: projects//locations//agents//webhooks/.
 */
public data class CxFlowEventHandlerTriggerFulfillmentArgs(
    public val conditionalCases: Output>? = null,
    public val messages: Output>? = null,
    public val returnPartialResponses: Output? = null,
    public val setParameterActions: Output>? = null,
    public val tag: Output? = null,
    public val webhook: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.diagflow.inputs.CxFlowEventHandlerTriggerFulfillmentArgs =
        com.pulumi.gcp.diagflow.inputs.CxFlowEventHandlerTriggerFulfillmentArgs.builder()
            .conditionalCases(
                conditionalCases?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .messages(
                messages?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .returnPartialResponses(returnPartialResponses?.applyValue({ args0 -> args0 }))
            .setParameterActions(
                setParameterActions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .tag(tag?.applyValue({ args0 -> args0 }))
            .webhook(webhook?.applyValue({ args0 -> args0 })).build()
}

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

    private var messages: Output>? = null

    private var returnPartialResponses: Output? = null

    private var setParameterActions:
        Output>? = null

    private var tag: Output? = null

    private var webhook: Output? = null

    /**
     * @param value Conditional cases for this fulfillment.
     * Structure is documented below.
     */
    @JvmName("otelhqhvqvjlflot")
    public suspend fun conditionalCases(`value`: Output>) {
        this.conditionalCases = value
    }

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

    /**
     * @param values Conditional cases for this fulfillment.
     * Structure is documented below.
     */
    @JvmName("hhsvvtnrxkyrvdjv")
    public suspend fun conditionalCases(values: List>) {
        this.conditionalCases = Output.all(values)
    }

    /**
     * @param value The list of rich message responses to present to the user.
     * Structure is documented below.
     */
    @JvmName("ssripppsjfsrksrg")
    public suspend fun messages(`value`: Output>) {
        this.messages = value
    }

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

    /**
     * @param values The list of rich message responses to present to the user.
     * Structure is documented below.
     */
    @JvmName("mrbjsyfhrouofurq")
    public suspend fun messages(values: List>) {
        this.messages = Output.all(values)
    }

    /**
     * @param value Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
     */
    @JvmName("eirtlpifuwamcpmf")
    public suspend fun returnPartialResponses(`value`: Output) {
        this.returnPartialResponses = value
    }

    /**
     * @param value Set parameter values before executing the webhook.
     * Structure is documented below.
     */
    @JvmName("inewtetvhthhacfk")
    public suspend fun setParameterActions(`value`: Output>) {
        this.setParameterActions = value
    }

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

    /**
     * @param values Set parameter values before executing the webhook.
     * Structure is documented below.
     */
    @JvmName("nlidnumhbqnbwxbo")
    public suspend fun setParameterActions(values: List>) {
        this.setParameterActions = Output.all(values)
    }

    /**
     * @param value The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified.
     */
    @JvmName("sgkalugiwwpkjlgw")
    public suspend fun tag(`value`: Output) {
        this.tag = value
    }

    /**
     * @param value The webhook to call. Format: projects//locations//agents//webhooks/.
     */
    @JvmName("mhlbymlkgxmpvcul")
    public suspend fun webhook(`value`: Output) {
        this.webhook = value
    }

    /**
     * @param value Conditional cases for this fulfillment.
     * Structure is documented below.
     */
    @JvmName("hwvymdjvgsnjriav")
    public suspend fun conditionalCases(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.conditionalCases = mapped
    }

    /**
     * @param argument Conditional cases for this fulfillment.
     * Structure is documented below.
     */
    @JvmName("pautixdjuklvwjan")
    public suspend fun conditionalCases(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CxFlowEventHandlerTriggerFulfillmentConditionalCaseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.conditionalCases = mapped
    }

    /**
     * @param argument Conditional cases for this fulfillment.
     * Structure is documented below.
     */
    @JvmName("ommsbsojgqbgricb")
    public suspend fun conditionalCases(vararg argument: suspend CxFlowEventHandlerTriggerFulfillmentConditionalCaseArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CxFlowEventHandlerTriggerFulfillmentConditionalCaseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.conditionalCases = mapped
    }

    /**
     * @param argument Conditional cases for this fulfillment.
     * Structure is documented below.
     */
    @JvmName("ewughwvqgntuhvpk")
    public suspend fun conditionalCases(argument: suspend CxFlowEventHandlerTriggerFulfillmentConditionalCaseArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                CxFlowEventHandlerTriggerFulfillmentConditionalCaseArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.conditionalCases = mapped
    }

    /**
     * @param values Conditional cases for this fulfillment.
     * Structure is documented below.
     */
    @JvmName("rflprlqvpgeriixn")
    public suspend fun conditionalCases(vararg values: CxFlowEventHandlerTriggerFulfillmentConditionalCaseArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conditionalCases = mapped
    }

    /**
     * @param value The list of rich message responses to present to the user.
     * Structure is documented below.
     */
    @JvmName("oypgxacnkesejjid")
    public suspend fun messages(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.messages = mapped
    }

    /**
     * @param argument The list of rich message responses to present to the user.
     * Structure is documented below.
     */
    @JvmName("wdbahusfpkwjngqo")
    public suspend fun messages(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CxFlowEventHandlerTriggerFulfillmentMessageArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.messages = mapped
    }

    /**
     * @param argument The list of rich message responses to present to the user.
     * Structure is documented below.
     */
    @JvmName("nnctndfvdlmjeevf")
    public suspend fun messages(vararg argument: suspend CxFlowEventHandlerTriggerFulfillmentMessageArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CxFlowEventHandlerTriggerFulfillmentMessageArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.messages = mapped
    }

    /**
     * @param argument The list of rich message responses to present to the user.
     * Structure is documented below.
     */
    @JvmName("vttmerfbyjknnqbs")
    public suspend fun messages(argument: suspend CxFlowEventHandlerTriggerFulfillmentMessageArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CxFlowEventHandlerTriggerFulfillmentMessageArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.messages = mapped
    }

    /**
     * @param values The list of rich message responses to present to the user.
     * Structure is documented below.
     */
    @JvmName("qxlyokqdcqfglvko")
    public suspend fun messages(vararg values: CxFlowEventHandlerTriggerFulfillmentMessageArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.messages = mapped
    }

    /**
     * @param value Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
     */
    @JvmName("nuhutqehilqkldxn")
    public suspend fun returnPartialResponses(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.returnPartialResponses = mapped
    }

    /**
     * @param value Set parameter values before executing the webhook.
     * Structure is documented below.
     */
    @JvmName("sjahlwmptnhelsda")
    public suspend fun setParameterActions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.setParameterActions = mapped
    }

    /**
     * @param argument Set parameter values before executing the webhook.
     * Structure is documented below.
     */
    @JvmName("ntqsfhvulktpexlw")
    public suspend fun setParameterActions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CxFlowEventHandlerTriggerFulfillmentSetParameterActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.setParameterActions = mapped
    }

    /**
     * @param argument Set parameter values before executing the webhook.
     * Structure is documented below.
     */
    @JvmName("bjoxhxfuvowbxjbm")
    public suspend fun setParameterActions(vararg argument: suspend CxFlowEventHandlerTriggerFulfillmentSetParameterActionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CxFlowEventHandlerTriggerFulfillmentSetParameterActionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.setParameterActions = mapped
    }

    /**
     * @param argument Set parameter values before executing the webhook.
     * Structure is documented below.
     */
    @JvmName("yjnrqsbffvgrfvam")
    public suspend fun setParameterActions(argument: suspend CxFlowEventHandlerTriggerFulfillmentSetParameterActionArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                CxFlowEventHandlerTriggerFulfillmentSetParameterActionArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.setParameterActions = mapped
    }

    /**
     * @param values Set parameter values before executing the webhook.
     * Structure is documented below.
     */
    @JvmName("rbyyomijwxstujms")
    public suspend fun setParameterActions(vararg values: CxFlowEventHandlerTriggerFulfillmentSetParameterActionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.setParameterActions = mapped
    }

    /**
     * @param value The tag used by the webhook to identify which fulfillment is being called. This field is required if webhook is specified.
     */
    @JvmName("hlwlbbjcfyxgjwtl")
    public suspend fun tag(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tag = mapped
    }

    /**
     * @param value The webhook to call. Format: projects//locations//agents//webhooks/.
     */
    @JvmName("ysqighdukslafcgf")
    public suspend fun webhook(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.webhook = mapped
    }

    internal fun build(): CxFlowEventHandlerTriggerFulfillmentArgs =
        CxFlowEventHandlerTriggerFulfillmentArgs(
            conditionalCases = conditionalCases,
            messages = messages,
            returnPartialResponses = returnPartialResponses,
            setParameterActions = setParameterActions,
            tag = tag,
            webhook = webhook,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy