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

com.pulumi.kubernetes.admissionregistration.v1alpha1.kotlin.inputs.MutatingAdmissionPolicySpecArgs.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.admissionregistration.v1alpha1.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.admissionregistration.v1alpha1.inputs.MutatingAdmissionPolicySpecArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * MutatingAdmissionPolicySpec is the specification of the desired behavior of the admission policy.
 * @property failurePolicy failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
 * A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.
 * failurePolicy does not define how validations that evaluate to false are handled.
 * Allowed values are Ignore or Fail. Defaults to Fail.
 * @property matchConditions matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
 * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
 * The exact matching logic is (in order):
 *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
 *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
 *   3. If any matchCondition evaluates to an error (but none are FALSE):
 *      - If failurePolicy=Fail, reject the request
 *      - If failurePolicy=Ignore, the policy is skipped
 * @property matchConstraints matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed.  The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.
 * @property mutations mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
 * @property paramKind paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
 * @property reinvocationPolicy reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
 * Never: These mutations will not be called more than once per binding in a single admission evaluation.
 * IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies.  Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.
 * @property variables variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
 * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
 */
public data class MutatingAdmissionPolicySpecArgs(
    public val failurePolicy: Output? = null,
    public val matchConditions: Output>? = null,
    public val matchConstraints: Output? = null,
    public val mutations: Output>? = null,
    public val paramKind: Output? = null,
    public val reinvocationPolicy: Output? = null,
    public val variables: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.admissionregistration.v1alpha1.inputs.MutatingAdmissionPolicySpecArgs =
        com.pulumi.kubernetes.admissionregistration.v1alpha1.inputs.MutatingAdmissionPolicySpecArgs.builder()
            .failurePolicy(failurePolicy?.applyValue({ args0 -> args0 }))
            .matchConditions(
                matchConditions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .matchConstraints(matchConstraints?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .mutations(
                mutations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .paramKind(paramKind?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .reinvocationPolicy(reinvocationPolicy?.applyValue({ args0 -> args0 }))
            .variables(
                variables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [MutatingAdmissionPolicySpecArgs].
 */
@PulumiTagMarker
public class MutatingAdmissionPolicySpecArgsBuilder internal constructor() {
    private var failurePolicy: Output? = null

    private var matchConditions: Output>? = null

    private var matchConstraints: Output? = null

    private var mutations: Output>? = null

    private var paramKind: Output? = null

    private var reinvocationPolicy: Output? = null

    private var variables: Output>? = null

    /**
     * @param value failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
     * A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.
     * failurePolicy does not define how validations that evaluate to false are handled.
     * Allowed values are Ignore or Fail. Defaults to Fail.
     */
    @JvmName("lyiyqmdwkmlaucvs")
    public suspend fun failurePolicy(`value`: Output) {
        this.failurePolicy = value
    }

    /**
     * @param value matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
     * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
     * The exact matching logic is (in order):
     *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
     *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
     *   3. If any matchCondition evaluates to an error (but none are FALSE):
     *      - If failurePolicy=Fail, reject the request
     *      - If failurePolicy=Ignore, the policy is skipped
     */
    @JvmName("jctycdiuxdhvmosk")
    public suspend fun matchConditions(`value`: Output>) {
        this.matchConditions = value
    }

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

    /**
     * @param values matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
     * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
     * The exact matching logic is (in order):
     *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
     *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
     *   3. If any matchCondition evaluates to an error (but none are FALSE):
     *      - If failurePolicy=Fail, reject the request
     *      - If failurePolicy=Ignore, the policy is skipped
     */
    @JvmName("eswruofokhawkidq")
    public suspend fun matchConditions(values: List>) {
        this.matchConditions = Output.all(values)
    }

    /**
     * @param value matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed.  The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.
     */
    @JvmName("hqpeyydjopjypavt")
    public suspend fun matchConstraints(`value`: Output) {
        this.matchConstraints = value
    }

    /**
     * @param value mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
     */
    @JvmName("tdaftcjumocypcos")
    public suspend fun mutations(`value`: Output>) {
        this.mutations = value
    }

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

    /**
     * @param values mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
     */
    @JvmName("gkohxfyqnkpmbgno")
    public suspend fun mutations(values: List>) {
        this.mutations = Output.all(values)
    }

    /**
     * @param value paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
     */
    @JvmName("luxkkuqantvjtgax")
    public suspend fun paramKind(`value`: Output) {
        this.paramKind = value
    }

    /**
     * @param value reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
     * Never: These mutations will not be called more than once per binding in a single admission evaluation.
     * IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies.  Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.
     */
    @JvmName("giwpcshjunfmokfo")
    public suspend fun reinvocationPolicy(`value`: Output) {
        this.reinvocationPolicy = value
    }

    /**
     * @param value variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
     * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
     */
    @JvmName("rhiblmyvmxkktwop")
    public suspend fun variables(`value`: Output>) {
        this.variables = value
    }

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

    /**
     * @param values variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
     * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
     */
    @JvmName("lfspristafjkfksm")
    public suspend fun variables(values: List>) {
        this.variables = Output.all(values)
    }

    /**
     * @param value failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings.
     * A policy is invalid if paramKind refers to a non-existent Kind. A binding is invalid if paramRef.name refers to a non-existent resource.
     * failurePolicy does not define how validations that evaluate to false are handled.
     * Allowed values are Ignore or Fail. Defaults to Fail.
     */
    @JvmName("nospdyrcjrtqjtjy")
    public suspend fun failurePolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.failurePolicy = mapped
    }

    /**
     * @param value matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
     * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
     * The exact matching logic is (in order):
     *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
     *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
     *   3. If any matchCondition evaluates to an error (but none are FALSE):
     *      - If failurePolicy=Fail, reject the request
     *      - If failurePolicy=Ignore, the policy is skipped
     */
    @JvmName("jeifqtwjxpljldwx")
    public suspend fun matchConditions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchConditions = mapped
    }

    /**
     * @param argument matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
     * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
     * The exact matching logic is (in order):
     *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
     *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
     *   3. If any matchCondition evaluates to an error (but none are FALSE):
     *      - If failurePolicy=Fail, reject the request
     *      - If failurePolicy=Ignore, the policy is skipped
     */
    @JvmName("bfknbiwdjqodecod")
    public suspend fun matchConditions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MatchConditionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.matchConditions = mapped
    }

    /**
     * @param argument matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
     * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
     * The exact matching logic is (in order):
     *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
     *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
     *   3. If any matchCondition evaluates to an error (but none are FALSE):
     *      - If failurePolicy=Fail, reject the request
     *      - If failurePolicy=Ignore, the policy is skipped
     */
    @JvmName("ebirdbklsnqtlshw")
    public suspend fun matchConditions(vararg argument: suspend MatchConditionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MatchConditionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.matchConditions = mapped
    }

    /**
     * @param argument matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
     * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
     * The exact matching logic is (in order):
     *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
     *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
     *   3. If any matchCondition evaluates to an error (but none are FALSE):
     *      - If failurePolicy=Fail, reject the request
     *      - If failurePolicy=Ignore, the policy is skipped
     */
    @JvmName("dinpqhawcmcagejo")
    public suspend fun matchConditions(argument: suspend MatchConditionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(MatchConditionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.matchConditions = mapped
    }

    /**
     * @param values matchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the matchConstraints. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed.
     * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions.
     * The exact matching logic is (in order):
     *   1. If ANY matchCondition evaluates to FALSE, the policy is skipped.
     *   2. If ALL matchConditions evaluate to TRUE, the policy is evaluated.
     *   3. If any matchCondition evaluates to an error (but none are FALSE):
     *      - If failurePolicy=Fail, reject the request
     *      - If failurePolicy=Ignore, the policy is skipped
     */
    @JvmName("xnqlqbwwlxlqedhu")
    public suspend fun matchConditions(vararg values: MatchConditionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchConditions = mapped
    }

    /**
     * @param value matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed.  The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.
     */
    @JvmName("jnmhvllcnqutjuax")
    public suspend fun matchConstraints(`value`: MatchResourcesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchConstraints = mapped
    }

    /**
     * @param argument matchConstraints specifies what resources this policy is designed to validate. The MutatingAdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API MutatingAdmissionPolicy cannot match MutatingAdmissionPolicy and MutatingAdmissionPolicyBinding. The CREATE, UPDATE and CONNECT operations are allowed.  The DELETE operation may not be matched. '*' matches CREATE, UPDATE and CONNECT. Required.
     */
    @JvmName("whobdfuiobvuyewa")
    public suspend fun matchConstraints(argument: suspend MatchResourcesArgsBuilder.() -> Unit) {
        val toBeMapped = MatchResourcesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.matchConstraints = mapped
    }

    /**
     * @param value mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
     */
    @JvmName("urnfdmhjufsjmown")
    public suspend fun mutations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mutations = mapped
    }

    /**
     * @param argument mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
     */
    @JvmName("gewhbxkduhcfljen")
    public suspend fun mutations(argument: List Unit>) {
        val toBeMapped = argument.toList().map { MutationArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.mutations = mapped
    }

    /**
     * @param argument mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
     */
    @JvmName("cmkbtbqwauyaqwfb")
    public suspend fun mutations(vararg argument: suspend MutationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { MutationArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.mutations = mapped
    }

    /**
     * @param argument mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
     */
    @JvmName("kmmpmhhepyjbbefi")
    public suspend fun mutations(argument: suspend MutationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(MutationArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.mutations = mapped
    }

    /**
     * @param values mutations contain operations to perform on matching objects. mutations may not be empty; a minimum of one mutation is required. mutations are evaluated in order, and are reinvoked according to the reinvocationPolicy. The mutations of a policy are invoked for each binding of this policy and reinvocation of mutations occurs on a per binding basis.
     */
    @JvmName("awobaovbxrkvktvn")
    public suspend fun mutations(vararg values: MutationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mutations = mapped
    }

    /**
     * @param value paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
     */
    @JvmName("hiknsvwhdcputnwi")
    public suspend fun paramKind(`value`: ParamKindArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.paramKind = mapped
    }

    /**
     * @param argument paramKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If paramKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in MutatingAdmissionPolicyBinding, the params variable will be null.
     */
    @JvmName("rjkqijfyfukithxj")
    public suspend fun paramKind(argument: suspend ParamKindArgsBuilder.() -> Unit) {
        val toBeMapped = ParamKindArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.paramKind = mapped
    }

    /**
     * @param value reinvocationPolicy indicates whether mutations may be called multiple times per MutatingAdmissionPolicyBinding as part of a single admission evaluation. Allowed values are "Never" and "IfNeeded".
     * Never: These mutations will not be called more than once per binding in a single admission evaluation.
     * IfNeeded: These mutations may be invoked more than once per binding for a single admission request and there is no guarantee of order with respect to other admission plugins, admission webhooks, bindings of this policy and admission policies.  Mutations are only reinvoked when mutations change the object after this mutation is invoked. Required.
     */
    @JvmName("tbrubncjkunitrei")
    public suspend fun reinvocationPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reinvocationPolicy = mapped
    }

    /**
     * @param value variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
     * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
     */
    @JvmName("yjfdhtlfeknvyftg")
    public suspend fun variables(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.variables = mapped
    }

    /**
     * @param argument variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
     * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
     */
    @JvmName("svkgfgcthmyrwbhv")
    public suspend fun variables(argument: List Unit>) {
        val toBeMapped = argument.toList().map { VariableArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.variables = mapped
    }

    /**
     * @param argument variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
     * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
     */
    @JvmName("dvptbymawakdvyuy")
    public suspend fun variables(vararg argument: suspend VariableArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { VariableArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.variables = mapped
    }

    /**
     * @param argument variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
     * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
     */
    @JvmName("lrctiiphiutimxmg")
    public suspend fun variables(argument: suspend VariableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VariableArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.variables = mapped
    }

    /**
     * @param values variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except matchConditions because matchConditions are evaluated before the rest of the policy.
     * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, variables must be sorted by the order of first appearance and acyclic.
     */
    @JvmName("nfahmrtajbemffib")
    public suspend fun variables(vararg values: VariableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.variables = mapped
    }

    internal fun build(): MutatingAdmissionPolicySpecArgs = MutatingAdmissionPolicySpecArgs(
        failurePolicy = failurePolicy,
        matchConditions = matchConditions,
        matchConstraints = matchConstraints,
        mutations = mutations,
        paramKind = paramKind,
        reinvocationPolicy = reinvocationPolicy,
        variables = variables,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy