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

com.pulumi.kubernetes.rbac.v1beta1.kotlin.inputs.AggregationRuleArgs.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.rbac.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.meta.v1.kotlin.inputs.LabelSelectorArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorArgsBuilder
import com.pulumi.kubernetes.rbac.v1beta1.inputs.AggregationRuleArgs.builder
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * AggregationRule describes how to locate ClusterRoles to aggregate into the ClusterRole
 * @property clusterRoleSelectors ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
 */
public data class AggregationRuleArgs(
    public val clusterRoleSelectors: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.rbac.v1beta1.inputs.AggregationRuleArgs =
        com.pulumi.kubernetes.rbac.v1beta1.inputs.AggregationRuleArgs.builder()
            .clusterRoleSelectors(
                clusterRoleSelectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

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

    /**
     * @param value ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
     */
    @JvmName("mletejvfrhgxvbng")
    public suspend fun clusterRoleSelectors(`value`: Output>) {
        this.clusterRoleSelectors = value
    }

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

    /**
     * @param values ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
     */
    @JvmName("icontvxtcctiahut")
    public suspend fun clusterRoleSelectors(values: List>) {
        this.clusterRoleSelectors = Output.all(values)
    }

    /**
     * @param value ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
     */
    @JvmName("tekvrmiygysjigoe")
    public suspend fun clusterRoleSelectors(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterRoleSelectors = mapped
    }

    /**
     * @param argument ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
     */
    @JvmName("cxvybbarodnfbeku")
    public suspend fun clusterRoleSelectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LabelSelectorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.clusterRoleSelectors = mapped
    }

    /**
     * @param argument ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
     */
    @JvmName("frgdcvqlekekocxc")
    public suspend fun clusterRoleSelectors(vararg argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LabelSelectorArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.clusterRoleSelectors = mapped
    }

    /**
     * @param argument ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
     */
    @JvmName("fgfvvrjhwpnuirba")
    public suspend fun clusterRoleSelectors(argument: suspend LabelSelectorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(LabelSelectorArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.clusterRoleSelectors = mapped
    }

    /**
     * @param values ClusterRoleSelectors holds a list of selectors which will be used to find ClusterRoles and create the rules. If any of the selectors match, then the ClusterRole's permissions will be added
     */
    @JvmName("ttdhtvehikjqnsou")
    public suspend fun clusterRoleSelectors(vararg values: LabelSelectorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clusterRoleSelectors = mapped
    }

    internal fun build(): AggregationRuleArgs = AggregationRuleArgs(
        clusterRoleSelectors = clusterRoleSelectors,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy