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

com.pulumi.kubernetes.rbac.v1alpha1.kotlin.inputs.AggregationRulePatchArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.rbac.v1alpha1.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.LabelSelectorPatchArgs
import com.pulumi.kubernetes.meta.v1.kotlin.inputs.LabelSelectorPatchArgsBuilder
import com.pulumi.kubernetes.rbac.v1alpha1.inputs.AggregationRulePatchArgs.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 AggregationRulePatchArgs(
    public val clusterRoleSelectors: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.rbac.v1alpha1.inputs.AggregationRulePatchArgs =
        com.pulumi.kubernetes.rbac.v1alpha1.inputs.AggregationRulePatchArgs.builder()
            .clusterRoleSelectors(
                clusterRoleSelectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [AggregationRulePatchArgs].
 */
@PulumiTagMarker
public class AggregationRulePatchArgsBuilder 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("ovhfclfrxehbewpe")
    public suspend fun clusterRoleSelectors(`value`: Output>) {
        this.clusterRoleSelectors = value
    }

    @JvmName("nqcapqlelgkqrdct")
    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("tsqvogwfylbgrqnk")
    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("xbcotvfdsrxsrjhp")
    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("dwssrvcpdfemfiip")
    public suspend fun clusterRoleSelectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LabelSelectorPatchArgsBuilder().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("vosvnafthnxfhdes")
    public suspend fun clusterRoleSelectors(vararg argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LabelSelectorPatchArgsBuilder().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("maboshremqjuyfbi")
    public suspend fun clusterRoleSelectors(argument: suspend LabelSelectorPatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(LabelSelectorPatchArgsBuilder().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("llohjblnbblplkmx")
    public suspend fun clusterRoleSelectors(vararg values: LabelSelectorPatchArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clusterRoleSelectors = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy