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

com.pulumi.googlenative.dialogflow.v3beta1.kotlin.inputs.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceArgs.kt Maven / Gradle / Ivy

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

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

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.dialogflow.v3beta1.inputs.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceArgs.builder
import com.pulumi.googlenative.dialogflow.v3beta1.kotlin.enums.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceHttpMethod
import com.pulumi.googlenative.dialogflow.v3beta1.kotlin.enums.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceWebhookType
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Represents configuration for a generic web service.
 * @property allowedCaCerts Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") ```
 * @property httpMethod Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
 * @property parameterMapping Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
 * @property password The password for HTTP Basic authentication.
 * @property requestBody Optional. Defines a custom JSON object as request body to send to flexible webhook.
 * @property requestHeaders The HTTP request headers to send together with webhook requests.
 * @property uri The webhook URI for receiving POST requests. It must use https protocol.
 * @property username The user name for HTTP Basic authentication.
 * @property webhookType Optional. Type of the webhook.
 */
public data class GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceArgs(
    public val allowedCaCerts: Output>? = null,
    public val httpMethod: Output? =
        null,
    public val parameterMapping: Output>? = null,
    public val password: Output? = null,
    public val requestBody: Output? = null,
    public val requestHeaders: Output>? = null,
    public val uri: Output,
    public val username: Output? = null,
    public val webhookType: Output? =
        null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.dialogflow.v3beta1.inputs.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceArgs =
        com.pulumi.googlenative.dialogflow.v3beta1.inputs.GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceArgs.builder()
            .allowedCaCerts(allowedCaCerts?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .httpMethod(httpMethod?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .parameterMapping(
                parameterMapping?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .password(password?.applyValue({ args0 -> args0 }))
            .requestBody(requestBody?.applyValue({ args0 -> args0 }))
            .requestHeaders(
                requestHeaders?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .uri(uri.applyValue({ args0 -> args0 }))
            .username(username?.applyValue({ args0 -> args0 }))
            .webhookType(webhookType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var httpMethod: Output? =
        null

    private var parameterMapping: Output>? = null

    private var password: Output? = null

    private var requestBody: Output? = null

    private var requestHeaders: Output>? = null

    private var uri: Output? = null

    private var username: Output? = null

    private var webhookType:
        Output? = null

    /**
     * @param value Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") ```
     */
    @JvmName("rauckkwvmxdekbjh")
    public suspend fun allowedCaCerts(`value`: Output>) {
        this.allowedCaCerts = value
    }

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

    /**
     * @param values Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") ```
     */
    @JvmName("pdsyhvlmgtiujgvg")
    public suspend fun allowedCaCerts(values: List>) {
        this.allowedCaCerts = Output.all(values)
    }

    /**
     * @param value Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
     */
    @JvmName("ndxrrqjxegquxfuu")
    public suspend fun httpMethod(`value`: Output) {
        this.httpMethod = value
    }

    /**
     * @param value Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
     */
    @JvmName("oapbvwtcyicmvowr")
    public suspend fun parameterMapping(`value`: Output>) {
        this.parameterMapping = value
    }

    /**
     * @param value The password for HTTP Basic authentication.
     */
    @JvmName("jsahfwlgvdfufgii")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value Optional. Defines a custom JSON object as request body to send to flexible webhook.
     */
    @JvmName("bckidxuophyrskau")
    public suspend fun requestBody(`value`: Output) {
        this.requestBody = value
    }

    /**
     * @param value The HTTP request headers to send together with webhook requests.
     */
    @JvmName("wexgrluhwjnkoemj")
    public suspend fun requestHeaders(`value`: Output>) {
        this.requestHeaders = value
    }

    /**
     * @param value The webhook URI for receiving POST requests. It must use https protocol.
     */
    @JvmName("oxlmaxpoagihrcqh")
    public suspend fun uri(`value`: Output) {
        this.uri = value
    }

    /**
     * @param value The user name for HTTP Basic authentication.
     */
    @JvmName("xchyjoouvolwfiqq")
    public suspend fun username(`value`: Output) {
        this.username = value
    }

    /**
     * @param value Optional. Type of the webhook.
     */
    @JvmName("qdxhbiwvmqqdcsak")
    public suspend fun webhookType(`value`: Output) {
        this.webhookType = value
    }

    /**
     * @param value Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") ```
     */
    @JvmName("bvlrlioeobwmfhuh")
    public suspend fun allowedCaCerts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedCaCerts = mapped
    }

    /**
     * @param values Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with "subject alt name". For instance a certificate can be self-signed using the following command, ``` openssl x509 -req -days 200 -in example.com.csr \ -signkey example.com.key \ -out example.com.crt \ -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") ```
     */
    @JvmName("onmsllbhjymuyvpq")
    public suspend fun allowedCaCerts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedCaCerts = mapped
    }

    /**
     * @param value Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
     */
    @JvmName("pxlyoaitxxxhxjho")
    public suspend fun httpMethod(`value`: GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceHttpMethod?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpMethod = mapped
    }

    /**
     * @param value Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
     */
    @JvmName("vjqdrmyakwqyafof")
    public suspend fun parameterMapping(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameterMapping = mapped
    }

    /**
     * @param values Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
     */
    @JvmName("noocpueyqvwvdptl")
    public fun parameterMapping(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameterMapping = mapped
    }

    /**
     * @param value The password for HTTP Basic authentication.
     */
    @JvmName("hljuyhqktirbnynn")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

    /**
     * @param value Optional. Defines a custom JSON object as request body to send to flexible webhook.
     */
    @JvmName("urqapmjncrctvprw")
    public suspend fun requestBody(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestBody = mapped
    }

    /**
     * @param value The HTTP request headers to send together with webhook requests.
     */
    @JvmName("ampdkrbbdppplkov")
    public suspend fun requestHeaders(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requestHeaders = mapped
    }

    /**
     * @param values The HTTP request headers to send together with webhook requests.
     */
    @JvmName("quarynonkmsrhskx")
    public fun requestHeaders(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.requestHeaders = mapped
    }

    /**
     * @param value The webhook URI for receiving POST requests. It must use https protocol.
     */
    @JvmName("lxuyifhjkbyjcigk")
    public suspend fun uri(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.uri = mapped
    }

    /**
     * @param value The user name for HTTP Basic authentication.
     */
    @JvmName("mrpkbyqprfkwcget")
    public suspend fun username(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.username = mapped
    }

    /**
     * @param value Optional. Type of the webhook.
     */
    @JvmName("qvobpfjjjqfxksnl")
    public suspend fun webhookType(`value`: GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceWebhookType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.webhookType = mapped
    }

    internal fun build(): GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceArgs =
        GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceArgs(
            allowedCaCerts = allowedCaCerts,
            httpMethod = httpMethod,
            parameterMapping = parameterMapping,
            password = password,
            requestBody = requestBody,
            requestHeaders = requestHeaders,
            uri = uri ?: throw PulumiNullFieldException("uri"),
            username = username,
            webhookType = webhookType,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy