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

com.pulumi.kubernetes.batch.v1.kotlin.inputs.PodFailurePolicyPatchArgs.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.batch.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.batch.v1.inputs.PodFailurePolicyPatchArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * PodFailurePolicy describes how failed pods influence the backoffLimit.
 * @property rules A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
 */
public data class PodFailurePolicyPatchArgs(
    public val rules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.batch.v1.inputs.PodFailurePolicyPatchArgs =
        com.pulumi.kubernetes.batch.v1.inputs.PodFailurePolicyPatchArgs.builder()
            .rules(
                rules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    /**
     * @param value A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
     */
    @JvmName("ctmchlwvtuxjdpri")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
     */
    @JvmName("oyktftqriodmwdhl")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
     */
    @JvmName("kuhvndwymnwkivpi")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
     */
    @JvmName("jsgkwmjdxscavsaa")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PodFailurePolicyRulePatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
     */
    @JvmName("telwkqbjulxsbrnc")
    public suspend fun rules(vararg argument: suspend PodFailurePolicyRulePatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PodFailurePolicyRulePatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
     */
    @JvmName("atesbmgfvyuxoosw")
    public suspend fun rules(argument: suspend PodFailurePolicyRulePatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PodFailurePolicyRulePatchArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values A list of pod failure policy rules. The rules are evaluated in order. Once a rule matches a Pod failure, the remaining of the rules are ignored. When no rule matches the Pod failure, the default handling applies - the counter of pod failures is incremented and it is checked against the backoffLimit. At most 20 elements are allowed.
     */
    @JvmName("qsddohxgotvxxfot")
    public suspend fun rules(vararg values: PodFailurePolicyRulePatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): PodFailurePolicyPatchArgs = PodFailurePolicyPatchArgs(
        rules = rules,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy