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

com.pulumi.azurenative.iotoperations.kotlin.inputs.VolumeClaimSpecSelectorArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.iotoperations.kotlin.inputs

import com.pulumi.azurenative.iotoperations.inputs.VolumeClaimSpecSelectorArgs.builder
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 kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * VolumeClaimSpecSelector properties
 * @property matchExpressions MatchExpressions is a list of label selector requirements. The requirements are ANDed.
 * @property matchLabels MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
 */
public data class VolumeClaimSpecSelectorArgs(
    public val matchExpressions: Output>? = null,
    public val matchLabels: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.iotoperations.inputs.VolumeClaimSpecSelectorArgs =
        com.pulumi.azurenative.iotoperations.inputs.VolumeClaimSpecSelectorArgs.builder()
            .matchExpressions(
                matchExpressions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .matchLabels(
                matchLabels?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var matchLabels: Output>? = null

    /**
     * @param value MatchExpressions is a list of label selector requirements. The requirements are ANDed.
     */
    @JvmName("hwyhfhpbqvygelsh")
    public suspend fun matchExpressions(`value`: Output>) {
        this.matchExpressions = value
    }

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

    /**
     * @param values MatchExpressions is a list of label selector requirements. The requirements are ANDed.
     */
    @JvmName("nofrnrbspwwyyjjx")
    public suspend fun matchExpressions(values: List>) {
        this.matchExpressions = Output.all(values)
    }

    /**
     * @param value MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
     */
    @JvmName("dfbuylprtdjbayqf")
    public suspend fun matchLabels(`value`: Output>) {
        this.matchLabels = value
    }

    /**
     * @param value MatchExpressions is a list of label selector requirements. The requirements are ANDed.
     */
    @JvmName("vvbchycbnqsmxath")
    public suspend fun matchExpressions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchExpressions = mapped
    }

    /**
     * @param argument MatchExpressions is a list of label selector requirements. The requirements are ANDed.
     */
    @JvmName("mjivfdbupigbdubp")
    public suspend fun matchExpressions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VolumeClaimSpecSelectorMatchExpressionsArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.matchExpressions = mapped
    }

    /**
     * @param argument MatchExpressions is a list of label selector requirements. The requirements are ANDed.
     */
    @JvmName("cdmhhmcrsjxmfigf")
    public suspend fun matchExpressions(vararg argument: suspend VolumeClaimSpecSelectorMatchExpressionsArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VolumeClaimSpecSelectorMatchExpressionsArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.matchExpressions = mapped
    }

    /**
     * @param argument MatchExpressions is a list of label selector requirements. The requirements are ANDed.
     */
    @JvmName("waikgwnpjtoieyda")
    public suspend fun matchExpressions(argument: suspend VolumeClaimSpecSelectorMatchExpressionsArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VolumeClaimSpecSelectorMatchExpressionsArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.matchExpressions = mapped
    }

    /**
     * @param values MatchExpressions is a list of label selector requirements. The requirements are ANDed.
     */
    @JvmName("rwcqbmvejqgcxfop")
    public suspend fun matchExpressions(vararg values: VolumeClaimSpecSelectorMatchExpressionsArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchExpressions = mapped
    }

    /**
     * @param value MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
     */
    @JvmName("rnvnxnnrwkwywpxx")
    public suspend fun matchLabels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchLabels = mapped
    }

    /**
     * @param values MatchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
     */
    @JvmName("jjgkqvdxvduabuas")
    public fun matchLabels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchLabels = mapped
    }

    internal fun build(): VolumeClaimSpecSelectorArgs = VolumeClaimSpecSelectorArgs(
        matchExpressions = matchExpressions,
        matchLabels = matchLabels,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy