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

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

/**
 * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy.
 * @property auditAnnotations auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
 * @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 spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.
 * failurePolicy does not define how validations that evaluate to false are handled.
 * When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
 * 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 rules, namespaceSelector, and objectSelector. 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 AdmissionPolicy 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 ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.
 * @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 ValidatingAdmissionPolicyBinding, the params variable will be null.
 * @property validations Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is 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 ValidatingAdmissionPolicySpecArgs(
    public val auditAnnotations: Output>? = null,
    public val failurePolicy: Output? = null,
    public val matchConditions: Output>? = null,
    public val matchConstraints: Output? = null,
    public val paramKind: Output? = null,
    public val validations: Output>? = null,
    public val variables: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.admissionregistration.v1.inputs.ValidatingAdmissionPolicySpecArgs =
        com.pulumi.kubernetes.admissionregistration.v1.inputs.ValidatingAdmissionPolicySpecArgs.builder()
            .auditAnnotations(
                auditAnnotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .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() }) }))
            .paramKind(paramKind?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .validations(
                validations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .variables(
                variables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var failurePolicy: Output? = null

    private var matchConditions: Output>? = null

    private var matchConstraints: Output? = null

    private var paramKind: Output? = null

    private var validations: Output>? = null

    private var variables: Output>? = null

    /**
     * @param value auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
     */
    @JvmName("ndggxjpxfymccscd")
    public suspend fun auditAnnotations(`value`: Output>) {
        this.auditAnnotations = value
    }

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

    /**
     * @param values auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
     */
    @JvmName("xofhcemyxxupsevp")
    public suspend fun auditAnnotations(values: List>) {
        this.auditAnnotations = 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 spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.
     * failurePolicy does not define how validations that evaluate to false are handled.
     * When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
     * Allowed values are Ignore or Fail. Defaults to Fail.
     */
    @JvmName("onxpwmmtchqavbie")
    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 rules, namespaceSelector, and objectSelector. 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("nwafkcqdpyvnsjcv")
    public suspend fun matchConditions(`value`: Output>) {
        this.matchConditions = value
    }

    @JvmName("eokurcixkhvprbvs")
    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 rules, namespaceSelector, and objectSelector. 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("qptrrgpqdcccjpqo")
    public suspend fun matchConditions(values: List>) {
        this.matchConditions = Output.all(values)
    }

    /**
     * @param value MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy 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 ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.
     */
    @JvmName("uupvltjbphukydrr")
    public suspend fun matchConstraints(`value`: Output) {
        this.matchConstraints = value
    }

    /**
     * @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 ValidatingAdmissionPolicyBinding, the params variable will be null.
     */
    @JvmName("nbjxumejedtbiegf")
    public suspend fun paramKind(`value`: Output) {
        this.paramKind = value
    }

    /**
     * @param value Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
     */
    @JvmName("vdhhjgpfytuslehw")
    public suspend fun validations(`value`: Output>) {
        this.validations = value
    }

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

    /**
     * @param values Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
     */
    @JvmName("qdixbbaeiuvjiike")
    public suspend fun validations(values: List>) {
        this.validations = Output.all(values)
    }

    /**
     * @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("cryxkaeefcyvsmej")
    public suspend fun variables(`value`: Output>) {
        this.variables = value
    }

    @JvmName("wdukqhqfxipgvlwd")
    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("eyvwohddvmjiblvj")
    public suspend fun variables(values: List>) {
        this.variables = Output.all(values)
    }

    /**
     * @param value auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
     */
    @JvmName("kkbhtomytnyfgick")
    public suspend fun auditAnnotations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.auditAnnotations = mapped
    }

    /**
     * @param argument auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
     */
    @JvmName("furgfyfninkycnqm")
    public suspend fun auditAnnotations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AuditAnnotationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.auditAnnotations = mapped
    }

    /**
     * @param argument auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
     */
    @JvmName("egerufxykgherfoa")
    public suspend fun auditAnnotations(vararg argument: suspend AuditAnnotationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AuditAnnotationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.auditAnnotations = mapped
    }

    /**
     * @param argument auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
     */
    @JvmName("egribqtvyaltpsee")
    public suspend fun auditAnnotations(argument: suspend AuditAnnotationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AuditAnnotationArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.auditAnnotations = mapped
    }

    /**
     * @param values auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required.
     */
    @JvmName("hiytbwaospqhbtbo")
    public suspend fun auditAnnotations(vararg values: AuditAnnotationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.auditAnnotations = mapped
    }

    /**
     * @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 spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource.
     * failurePolicy does not define how validations that evaluate to false are handled.
     * When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced.
     * Allowed values are Ignore or Fail. Defaults to Fail.
     */
    @JvmName("aldvwenqtghdiafa")
    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 rules, namespaceSelector, and objectSelector. 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("nlhpjverkvfuvffy")
    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 rules, namespaceSelector, and objectSelector. 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("cxjklhiodqnxjauh")
    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 rules, namespaceSelector, and objectSelector. 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("gsnigsggxsjnfmce")
    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 rules, namespaceSelector, and objectSelector. 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("xwlxymiamfwcctxo")
    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 rules, namespaceSelector, and objectSelector. 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("uvrwavxaoqgspiip")
    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 AdmissionPolicy 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 ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.
     */
    @JvmName("llmxymcbqeavjciv")
    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 AdmissionPolicy 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 ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required.
     */
    @JvmName("xugdrvytujkmfwiy")
    public suspend fun matchConstraints(argument: suspend MatchResourcesArgsBuilder.() -> Unit) {
        val toBeMapped = MatchResourcesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.matchConstraints = 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 ValidatingAdmissionPolicyBinding, the params variable will be null.
     */
    @JvmName("yvuixfayhyhvmtbb")
    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 ValidatingAdmissionPolicyBinding, the params variable will be null.
     */
    @JvmName("ggcriemcvqcqsndf")
    public suspend fun paramKind(argument: suspend ParamKindArgsBuilder.() -> Unit) {
        val toBeMapped = ParamKindArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.paramKind = mapped
    }

    /**
     * @param value Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
     */
    @JvmName("ddotihcdyapfisty")
    public suspend fun validations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validations = mapped
    }

    /**
     * @param argument Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
     */
    @JvmName("lxdojmsagrnswofm")
    public suspend fun validations(argument: List Unit>) {
        val toBeMapped = argument.toList().map { ValidationArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.validations = mapped
    }

    /**
     * @param argument Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
     */
    @JvmName("syvettcyfukfjwhk")
    public suspend fun validations(vararg argument: suspend ValidationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { ValidationArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.validations = mapped
    }

    /**
     * @param argument Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
     */
    @JvmName("sadqqijhulsuiflc")
    public suspend fun validations(argument: suspend ValidationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ValidationArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.validations = mapped
    }

    /**
     * @param values Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required.
     */
    @JvmName("xbkvrwjchvuovuxl")
    public suspend fun validations(vararg values: ValidationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.validations = 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("dldlqdaeltrwghpk")
    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("kiqgtugvouydqxka")
    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("koldtmdlwufucaiy")
    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("vunbinjajvokqytf")
    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("oivijrcaihqvpgjm")
    public suspend fun variables(vararg values: VariableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.variables = mapped
    }

    internal fun build(): ValidatingAdmissionPolicySpecArgs = ValidatingAdmissionPolicySpecArgs(
        auditAnnotations = auditAnnotations,
        failurePolicy = failurePolicy,
        matchConditions = matchConditions,
        matchConstraints = matchConstraints,
        paramKind = paramKind,
        validations = validations,
        variables = variables,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy