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

com.pulumi.kubernetes.apiextensions.v1.kotlin.inputs.WebhookConversionArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.apiextensions.v1.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.apiextensions.v1.inputs.WebhookConversionArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * WebhookConversion describes how to call a conversion webhook
 * @property clientConfig clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
 * @property conversionReviewVersions conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
 */
public data class WebhookConversionArgs(
    public val clientConfig: Output? = null,
    public val conversionReviewVersions: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apiextensions.v1.inputs.WebhookConversionArgs =
        com.pulumi.kubernetes.apiextensions.v1.inputs.WebhookConversionArgs.builder()
            .clientConfig(clientConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .conversionReviewVersions(
                conversionReviewVersions.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            ).build()
}

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

    private var conversionReviewVersions: Output>? = null

    /**
     * @param value clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
     */
    @JvmName("dpscxswawbkbyrto")
    public suspend fun clientConfig(`value`: Output) {
        this.clientConfig = value
    }

    /**
     * @param value conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
     */
    @JvmName("gqidvwbwhiobfnmt")
    public suspend fun conversionReviewVersions(`value`: Output>) {
        this.conversionReviewVersions = value
    }

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

    /**
     * @param values conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
     */
    @JvmName("rwivigyccahtweih")
    public suspend fun conversionReviewVersions(values: List>) {
        this.conversionReviewVersions = Output.all(values)
    }

    /**
     * @param value clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
     */
    @JvmName("fncxmmcqkehcbuvp")
    public suspend fun clientConfig(`value`: WebhookClientConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clientConfig = mapped
    }

    /**
     * @param argument clientConfig is the instructions for how to call the webhook if strategy is `Webhook`.
     */
    @JvmName("kfjndonppwwjoxgo")
    public suspend fun clientConfig(argument: suspend WebhookClientConfigArgsBuilder.() -> Unit) {
        val toBeMapped = WebhookClientConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.clientConfig = mapped
    }

    /**
     * @param value conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
     */
    @JvmName("gysvhgpqfhpnoxjm")
    public suspend fun conversionReviewVersions(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conversionReviewVersions = mapped
    }

    /**
     * @param values conversionReviewVersions is an ordered list of preferred `ConversionReview` versions the Webhook expects. The API server will use the first version in the list which it supports. If none of the versions specified in this list are supported by API server, conversion will fail for the custom resource. If a persisted Webhook configuration specifies allowed versions and does not include any versions known to the API Server, calls to the webhook will fail.
     */
    @JvmName("qriwuwjanbshrpww")
    public suspend fun conversionReviewVersions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.conversionReviewVersions = mapped
    }

    internal fun build(): WebhookConversionArgs = WebhookConversionArgs(
        clientConfig = clientConfig,
        conversionReviewVersions = conversionReviewVersions ?: throw
            PulumiNullFieldException("conversionReviewVersions"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy