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

com.pulumi.azurenative.keyvault.kotlin.inputs.NetworkRuleSetArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.keyvault.kotlin.inputs

import com.pulumi.azurenative.keyvault.inputs.NetworkRuleSetArgs.builder
import com.pulumi.azurenative.keyvault.kotlin.enums.NetworkRuleAction
import com.pulumi.azurenative.keyvault.kotlin.enums.NetworkRuleBypassOptions
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

/**
 * A set of rules governing the network accessibility of a vault.
 * @property bypass Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'.  If not specified the default is 'AzureServices'.
 * @property defaultAction The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
 * @property ipRules The list of IP address rules.
 * @property virtualNetworkRules The list of virtual network rules.
 */
public data class NetworkRuleSetArgs(
    public val bypass: Output>? = null,
    public val defaultAction: Output>? = null,
    public val ipRules: Output>? = null,
    public val virtualNetworkRules: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.keyvault.inputs.NetworkRuleSetArgs =
        com.pulumi.azurenative.keyvault.inputs.NetworkRuleSetArgs.builder()
            .bypass(
                bypass?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .defaultAction(
                defaultAction?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .ipRules(
                ipRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .virtualNetworkRules(
                virtualNetworkRules?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

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

    private var defaultAction: Output>? = null

    private var ipRules: Output>? = null

    private var virtualNetworkRules: Output>? = null

    /**
     * @param value Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'.  If not specified the default is 'AzureServices'.
     */
    @JvmName("vmtjouxiyqeqwkmp")
    public suspend fun bypass(`value`: Output>) {
        this.bypass = value
    }

    /**
     * @param value The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
     */
    @JvmName("nftdcwdakbxhquvd")
    public suspend fun defaultAction(`value`: Output>) {
        this.defaultAction = value
    }

    /**
     * @param value The list of IP address rules.
     */
    @JvmName("ebiieauykoqlqchn")
    public suspend fun ipRules(`value`: Output>) {
        this.ipRules = value
    }

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

    /**
     * @param values The list of IP address rules.
     */
    @JvmName("omafeeftodfivicf")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

    /**
     * @param value The list of virtual network rules.
     */
    @JvmName("uqoqsvpliscxcvvn")
    public suspend fun virtualNetworkRules(`value`: Output>) {
        this.virtualNetworkRules = value
    }

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

    /**
     * @param values The list of virtual network rules.
     */
    @JvmName("hsvddkyvuowmuqgy")
    public suspend fun virtualNetworkRules(values: List>) {
        this.virtualNetworkRules = Output.all(values)
    }

    /**
     * @param value Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'.  If not specified the default is 'AzureServices'.
     */
    @JvmName("akrxighfrjqyfawo")
    public suspend fun bypass(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bypass = mapped
    }

    /**
     * @param value Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'.  If not specified the default is 'AzureServices'.
     */
    @JvmName("sdnukvkluokhaxxt")
    public fun bypass(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.bypass = mapped
    }

    /**
     * @param value Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'.  If not specified the default is 'AzureServices'.
     */
    @JvmName("tjedeivqkelnjsfl")
    public fun bypass(`value`: NetworkRuleBypassOptions) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.bypass = mapped
    }

    /**
     * @param value The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
     */
    @JvmName("wgbcgmscgryryidk")
    public suspend fun defaultAction(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
     */
    @JvmName("phwgbnpnvjogychb")
    public fun defaultAction(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.
     */
    @JvmName("ojdettejtbymvasy")
    public fun defaultAction(`value`: NetworkRuleAction) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value The list of IP address rules.
     */
    @JvmName("qyyrscbxryddwhjj")
    public suspend fun ipRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param argument The list of IP address rules.
     */
    @JvmName("dxjdoralwirvjlko")
    public suspend fun ipRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map { IPRuleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument The list of IP address rules.
     */
    @JvmName("qyxignfersaehqwi")
    public suspend fun ipRules(vararg argument: suspend IPRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { IPRuleArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument The list of IP address rules.
     */
    @JvmName("pqjikqnoxcvaoxnv")
    public suspend fun ipRules(argument: suspend IPRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(IPRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param values The list of IP address rules.
     */
    @JvmName("kchreyuidqmxknlr")
    public suspend fun ipRules(vararg values: IPRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param value The list of virtual network rules.
     */
    @JvmName("pwrxjkbxnftgvmvt")
    public suspend fun virtualNetworkRules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument The list of virtual network rules.
     */
    @JvmName("jqpidghrugxgbnkn")
    public suspend fun virtualNetworkRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VirtualNetworkRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument The list of virtual network rules.
     */
    @JvmName("muhsyqyttgposgwp")
    public suspend fun virtualNetworkRules(vararg argument: suspend VirtualNetworkRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VirtualNetworkRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param argument The list of virtual network rules.
     */
    @JvmName("xnekjhcddotccjie")
    public suspend fun virtualNetworkRules(argument: suspend VirtualNetworkRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(VirtualNetworkRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.virtualNetworkRules = mapped
    }

    /**
     * @param values The list of virtual network rules.
     */
    @JvmName("tanlfyvxyijiatdi")
    public suspend fun virtualNetworkRules(vararg values: VirtualNetworkRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.virtualNetworkRules = mapped
    }

    internal fun build(): NetworkRuleSetArgs = NetworkRuleSetArgs(
        bypass = bypass,
        defaultAction = defaultAction,
        ipRules = ipRules,
        virtualNetworkRules = virtualNetworkRules,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy