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

com.pulumi.kubernetes.policy.v1beta1.kotlin.inputs.RuntimeClassStrategyOptionsArgs.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.policy.v1beta1.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.kubernetes.policy.v1beta1.inputs.RuntimeClassStrategyOptionsArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * RuntimeClassStrategyOptions define the strategy that will dictate the allowable RuntimeClasses for a pod.
 * @property allowedRuntimeClassNames allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.
 * @property defaultRuntimeClassName defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.
 */
public data class RuntimeClassStrategyOptionsArgs(
    public val allowedRuntimeClassNames: Output>,
    public val defaultRuntimeClassName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.policy.v1beta1.inputs.RuntimeClassStrategyOptionsArgs = com.pulumi.kubernetes.policy.v1beta1.inputs.RuntimeClassStrategyOptionsArgs.builder()
        .allowedRuntimeClassNames(
            allowedRuntimeClassNames.applyValue({ args0 ->
                args0.map({ args0 ->
                    args0
                })
            }),
        )
        .defaultRuntimeClassName(defaultRuntimeClassName?.applyValue({ args0 -> args0 })).build()
}

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

    private var defaultRuntimeClassName: Output? = null

    /**
     * @param value allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.
     */
    @JvmName("dsotefskksiltjmt")
    public suspend fun allowedRuntimeClassNames(`value`: Output>) {
        this.allowedRuntimeClassNames = value
    }

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

    /**
     * @param values allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.
     */
    @JvmName("clexligvmgrvdweo")
    public suspend fun allowedRuntimeClassNames(values: List>) {
        this.allowedRuntimeClassNames = Output.all(values)
    }

    /**
     * @param value defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.
     */
    @JvmName("wmlvmffbjjevlrej")
    public suspend fun defaultRuntimeClassName(`value`: Output) {
        this.defaultRuntimeClassName = value
    }

    /**
     * @param value allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.
     */
    @JvmName("skyvmuxaejsrjqke")
    public suspend fun allowedRuntimeClassNames(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedRuntimeClassNames = mapped
    }

    /**
     * @param values allowedRuntimeClassNames is a whitelist of RuntimeClass names that may be specified on a pod. A value of "*" means that any RuntimeClass name is allowed, and must be the only item in the list. An empty list requires the RuntimeClassName field to be unset.
     */
    @JvmName("slppbavomjbibrlj")
    public suspend fun allowedRuntimeClassNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedRuntimeClassNames = mapped
    }

    /**
     * @param value defaultRuntimeClassName is the default RuntimeClassName to set on the pod. The default MUST be allowed by the allowedRuntimeClassNames list. A value of nil does not mutate the Pod.
     */
    @JvmName("ujjlmrkqfcvrdvok")
    public suspend fun defaultRuntimeClassName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultRuntimeClassName = mapped
    }

    internal fun build(): RuntimeClassStrategyOptionsArgs = RuntimeClassStrategyOptionsArgs(
        allowedRuntimeClassNames = allowedRuntimeClassNames ?: throw
            PulumiNullFieldException("allowedRuntimeClassNames"),
        defaultRuntimeClassName = defaultRuntimeClassName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy