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

com.pulumi.azurenative.containerservice.kotlin.inputs.LabelSelectorRequirementArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.containerservice.kotlin.inputs

import com.pulumi.azurenative.containerservice.inputs.LabelSelectorRequirementArgs.builder
import com.pulumi.azurenative.containerservice.kotlin.enums.Operator
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
 * @property key key is the label key that the selector applies to.
 * @property operator operator represents a key's relationship to a set of values. Valid operators are In and NotIn
 * @property values values is an array of string values, the values array must be non-empty.
 */
public data class LabelSelectorRequirementArgs(
    public val key: Output? = null,
    public val `operator`: Output>? = null,
    public val values: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.containerservice.inputs.LabelSelectorRequirementArgs = com.pulumi.azurenative.containerservice.inputs.LabelSelectorRequirementArgs.builder()
        .key(key?.applyValue({ args0 -> args0 }))
        .`operator`(
            `operator`?.applyValue({ args0 ->
                args0.transform({ args0 -> args0 }, { args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .values(values?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [LabelSelectorRequirementArgs].
 */
@PulumiTagMarker
public class LabelSelectorRequirementArgsBuilder internal constructor() {
    private var key: Output? = null

    private var `operator`: Output>? = null

    private var values: Output>? = null

    /**
     * @param value key is the label key that the selector applies to.
     */
    @JvmName("sygfymkurivmobgd")
    public suspend fun key(`value`: Output) {
        this.key = value
    }

    /**
     * @param value operator represents a key's relationship to a set of values. Valid operators are In and NotIn
     */
    @JvmName("popilnppmodshbqs")
    public suspend fun `operator`(`value`: Output>) {
        this.`operator` = value
    }

    /**
     * @param value values is an array of string values, the values array must be non-empty.
     */
    @JvmName("vsmdkatyksbnqhnl")
    public suspend fun values(`value`: Output>) {
        this.values = value
    }

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

    /**
     * @param values values is an array of string values, the values array must be non-empty.
     */
    @JvmName("cnwjpyqyehrwjksl")
    public suspend fun values(values: List>) {
        this.values = Output.all(values)
    }

    /**
     * @param value key is the label key that the selector applies to.
     */
    @JvmName("spsbamrixwurtxbo")
    public suspend fun key(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.key = mapped
    }

    /**
     * @param value operator represents a key's relationship to a set of values. Valid operators are In and NotIn
     */
    @JvmName("essomqxjjkxlcrso")
    public suspend fun `operator`(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value operator represents a key's relationship to a set of values. Valid operators are In and NotIn
     */
    @JvmName("kajhlsmociohnvug")
    public fun `operator`(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value operator represents a key's relationship to a set of values. Valid operators are In and NotIn
     */
    @JvmName("adpwkxysptrfvxmr")
    public fun `operator`(`value`: Operator) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`operator` = mapped
    }

    /**
     * @param value values is an array of string values, the values array must be non-empty.
     */
    @JvmName("hvcqxykjeoywdqjr")
    public suspend fun values(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.values = mapped
    }

    /**
     * @param values values is an array of string values, the values array must be non-empty.
     */
    @JvmName("ynyvajdmpvcwaijk")
    public suspend fun values(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.values = mapped
    }

    internal fun build(): LabelSelectorRequirementArgs = LabelSelectorRequirementArgs(
        key = key,
        `operator` = `operator`,
        values = values,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy