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

com.pulumi.kubernetes.auditregistration.v1alpha1.kotlin.inputs.WebhookArgs.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: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.auditregistration.v1alpha1.kotlin.inputs

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 com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.WebhookArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Webhook holds the configuration of the webhook
 * @property clientConfig ClientConfig holds the connection parameters for the webhook required
 * @property throttle Throttle holds the options for throttling the webhook
 */
public data class WebhookArgs(
    public val clientConfig: Output,
    public val throttle: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.WebhookArgs =
        com.pulumi.kubernetes.auditregistration.v1alpha1.inputs.WebhookArgs.builder()
            .clientConfig(clientConfig.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .throttle(throttle?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [WebhookArgs].
 */
@PulumiTagMarker
public class WebhookArgsBuilder internal constructor() {
    private var clientConfig: Output? = null

    private var throttle: Output? = null

    /**
     * @param value ClientConfig holds the connection parameters for the webhook required
     */
    @JvmName("lckaxdrpqsnatjyq")
    public suspend fun clientConfig(`value`: Output) {
        this.clientConfig = value
    }

    /**
     * @param value Throttle holds the options for throttling the webhook
     */
    @JvmName("kuxmduhcpcigebfj")
    public suspend fun throttle(`value`: Output) {
        this.throttle = value
    }

    /**
     * @param value ClientConfig holds the connection parameters for the webhook required
     */
    @JvmName("cvhxwpylwekmugfx")
    public suspend fun clientConfig(`value`: WebhookClientConfigArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clientConfig = mapped
    }

    /**
     * @param argument ClientConfig holds the connection parameters for the webhook required
     */
    @JvmName("rwykkuroochdawuj")
    public suspend fun clientConfig(argument: suspend WebhookClientConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WebhookClientConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.clientConfig = mapped
    }

    /**
     * @param value Throttle holds the options for throttling the webhook
     */
    @JvmName("qmgnvnejbpsafwro")
    public suspend fun throttle(`value`: WebhookThrottleConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.throttle = mapped
    }

    /**
     * @param argument Throttle holds the options for throttling the webhook
     */
    @JvmName("vnncxttqjsmyvfuw")
    public suspend fun throttle(argument: suspend WebhookThrottleConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WebhookThrottleConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.throttle = mapped
    }

    internal fun build(): WebhookArgs = WebhookArgs(
        clientConfig = clientConfig ?: throw PulumiNullFieldException("clientConfig"),
        throttle = throttle,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy