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

com.pulumi.kubernetes.flowcontrol.v1beta1.kotlin.inputs.FlowSchemaSpecPatchArgs.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.flowcontrol.v1beta1.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.flowcontrol.v1beta1.inputs.FlowSchemaSpecPatchArgs.builder
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * FlowSchemaSpec describes how the FlowSchema's specification looks like.
 * @property distinguisherMethod `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
 * @property matchingPrecedence `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence.  Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.
 * @property priorityLevelConfiguration `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.
 * @property rules `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
 */
public data class FlowSchemaSpecPatchArgs(
    public val distinguisherMethod: Output? = null,
    public val matchingPrecedence: Output? = null,
    public val priorityLevelConfiguration: Output? =
        null,
    public val rules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.FlowSchemaSpecPatchArgs =
        com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.FlowSchemaSpecPatchArgs.builder()
            .distinguisherMethod(
                distinguisherMethod?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .matchingPrecedence(matchingPrecedence?.applyValue({ args0 -> args0 }))
            .priorityLevelConfiguration(
                priorityLevelConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .rules(
                rules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [FlowSchemaSpecPatchArgs].
 */
@PulumiTagMarker
public class FlowSchemaSpecPatchArgsBuilder internal constructor() {
    private var distinguisherMethod: Output? = null

    private var matchingPrecedence: Output? = null

    private var priorityLevelConfiguration: Output? =
        null

    private var rules: Output>? = null

    /**
     * @param value `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
     */
    @JvmName("qwbegdovqkvmcamt")
    public suspend fun distinguisherMethod(`value`: Output) {
        this.distinguisherMethod = value
    }

    /**
     * @param value `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence.  Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.
     */
    @JvmName("hviuovllatbxefee")
    public suspend fun matchingPrecedence(`value`: Output) {
        this.matchingPrecedence = value
    }

    /**
     * @param value `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.
     */
    @JvmName("sfgbahphudskhikv")
    public suspend fun priorityLevelConfiguration(`value`: Output) {
        this.priorityLevelConfiguration = value
    }

    /**
     * @param value `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
     */
    @JvmName("qycgxtsualregxre")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
     */
    @JvmName("avhurapdguujwnhs")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
     */
    @JvmName("vuxkfjhpbjrfereb")
    public suspend fun distinguisherMethod(`value`: FlowDistinguisherMethodPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.distinguisherMethod = mapped
    }

    /**
     * @param argument `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string.
     */
    @JvmName("odxeeerjyxdjyngx")
    public suspend fun distinguisherMethod(argument: suspend FlowDistinguisherMethodPatchArgsBuilder.() -> Unit) {
        val toBeMapped = FlowDistinguisherMethodPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.distinguisherMethod = mapped
    }

    /**
     * @param value `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence.  Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default.
     */
    @JvmName("ruydxsxyrudhiudc")
    public suspend fun matchingPrecedence(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchingPrecedence = mapped
    }

    /**
     * @param value `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.
     */
    @JvmName("metebdqdmagqvqpb")
    public suspend fun priorityLevelConfiguration(`value`: PriorityLevelConfigurationReferencePatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priorityLevelConfiguration = mapped
    }

    /**
     * @param argument `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required.
     */
    @JvmName("mquuloqlnnwcqguh")
    public suspend fun priorityLevelConfiguration(argument: suspend PriorityLevelConfigurationReferencePatchArgsBuilder.() -> Unit) {
        val toBeMapped = PriorityLevelConfigurationReferencePatchArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.priorityLevelConfiguration = mapped
    }

    /**
     * @param value `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
     */
    @JvmName("rostppfekuwppdjb")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
     */
    @JvmName("yfjfshskfhlfvpsp")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PolicyRulesWithSubjectsPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
     */
    @JvmName("swjtskonmyxpfwmd")
    public suspend fun rules(vararg argument: suspend PolicyRulesWithSubjectsPatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PolicyRulesWithSubjectsPatchArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
     */
    @JvmName("prmcasremkdnhobj")
    public suspend fun rules(argument: suspend PolicyRulesWithSubjectsPatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PolicyRulesWithSubjectsPatchArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema.
     */
    @JvmName("oprwivevbriyuejo")
    public suspend fun rules(vararg values: PolicyRulesWithSubjectsPatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): FlowSchemaSpecPatchArgs = FlowSchemaSpecPatchArgs(
        distinguisherMethod = distinguisherMethod,
        matchingPrecedence = matchingPrecedence,
        priorityLevelConfiguration = priorityLevelConfiguration,
        rules = rules,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy