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

com.pulumi.azurenative.authorization.kotlin.inputs.OverrideArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.authorization.kotlin.inputs

import com.pulumi.azurenative.authorization.inputs.OverrideArgs.builder
import com.pulumi.azurenative.authorization.kotlin.enums.OverrideKind
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 com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The policy property value override.
 * @property kind The override kind.
 * @property selectors The list of the selector expressions.
 * @property value The value to override the policy property.
 */
public data class OverrideArgs(
    public val kind: Output>? = null,
    public val selectors: Output>? = null,
    public val `value`: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.authorization.inputs.OverrideArgs =
        com.pulumi.azurenative.authorization.inputs.OverrideArgs.builder()
            .kind(
                kind?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .selectors(
                selectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .`value`(`value`?.applyValue({ args0 -> args0 })).build()
}

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

    private var selectors: Output>? = null

    private var `value`: Output? = null

    /**
     * @param value The override kind.
     */
    @JvmName("vbeeduuorjytoofr")
    public suspend fun kind(`value`: Output>) {
        this.kind = value
    }

    /**
     * @param value The list of the selector expressions.
     */
    @JvmName("ovtpxcximkocdsah")
    public suspend fun selectors(`value`: Output>) {
        this.selectors = value
    }

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

    /**
     * @param values The list of the selector expressions.
     */
    @JvmName("fxirmwwwqcnsjves")
    public suspend fun selectors(values: List>) {
        this.selectors = Output.all(values)
    }

    /**
     * @param value The value to override the policy property.
     */
    @JvmName("irlfmxrjapggjoab")
    public suspend fun `value`(`value`: Output) {
        this.`value` = value
    }

    /**
     * @param value The override kind.
     */
    @JvmName("qdwtlmkjljfjwblq")
    public suspend fun kind(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value The override kind.
     */
    @JvmName("mksgibxmkcbtdfss")
    public fun kind(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value The override kind.
     */
    @JvmName("qlsdsmwewkdanlaj")
    public fun kind(`value`: OverrideKind) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value The list of the selector expressions.
     */
    @JvmName("itsqckkhuuvrkoow")
    public suspend fun selectors(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selectors = mapped
    }

    /**
     * @param argument The list of the selector expressions.
     */
    @JvmName("pevxoaetfbcrhvph")
    public suspend fun selectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map { SelectorArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.selectors = mapped
    }

    /**
     * @param argument The list of the selector expressions.
     */
    @JvmName("ipmlawvbxlkbtujp")
    public suspend fun selectors(vararg argument: suspend SelectorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { SelectorArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.selectors = mapped
    }

    /**
     * @param argument The list of the selector expressions.
     */
    @JvmName("uhuakksvytfxvmly")
    public suspend fun selectors(argument: suspend SelectorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SelectorArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.selectors = mapped
    }

    /**
     * @param values The list of the selector expressions.
     */
    @JvmName("eagqkpvuabffpqto")
    public suspend fun selectors(vararg values: SelectorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectors = mapped
    }

    /**
     * @param value The value to override the policy property.
     */
    @JvmName("ttrqwrhfsujuhoow")
    public suspend fun `value`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`value` = mapped
    }

    internal fun build(): OverrideArgs = OverrideArgs(
        kind = kind,
        selectors = selectors,
        `value` = `value`,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy