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

com.pulumi.azurenative.devices.kotlin.inputs.NetworkRuleSetPropertiesArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.devices.kotlin.inputs

import com.pulumi.azurenative.devices.inputs.NetworkRuleSetPropertiesArgs.builder
import com.pulumi.azurenative.devices.kotlin.enums.DefaultAction
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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Network Rule Set Properties of IotHub
 * @property applyToBuiltInEventHubEndpoint If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub
 * @property defaultAction Default Action for Network Rule Set
 * @property ipRules List of IP Rules
 */
public data class NetworkRuleSetPropertiesArgs(
    public val applyToBuiltInEventHubEndpoint: Output,
    public val defaultAction: Output>? = null,
    public val ipRules: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devices.inputs.NetworkRuleSetPropertiesArgs =
        com.pulumi.azurenative.devices.inputs.NetworkRuleSetPropertiesArgs.builder()
            .applyToBuiltInEventHubEndpoint(applyToBuiltInEventHubEndpoint.applyValue({ args0 -> args0 }))
            .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()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [NetworkRuleSetPropertiesArgs].
 */
@PulumiTagMarker
public class NetworkRuleSetPropertiesArgsBuilder internal constructor() {
    private var applyToBuiltInEventHubEndpoint: Output? = null

    private var defaultAction: Output>? = null

    private var ipRules: Output>? = null

    /**
     * @param value If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub
     */
    @JvmName("wjhiaquymhlfllie")
    public suspend fun applyToBuiltInEventHubEndpoint(`value`: Output) {
        this.applyToBuiltInEventHubEndpoint = value
    }

    /**
     * @param value Default Action for Network Rule Set
     */
    @JvmName("fhpngcwnstmsaoyy")
    public suspend fun defaultAction(`value`: Output>) {
        this.defaultAction = value
    }

    /**
     * @param value List of IP Rules
     */
    @JvmName("baxyyeqgghkdnnfy")
    public suspend fun ipRules(`value`: Output>) {
        this.ipRules = value
    }

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

    /**
     * @param values List of IP Rules
     */
    @JvmName("mkwdxymvfahyqclo")
    public suspend fun ipRules(values: List>) {
        this.ipRules = Output.all(values)
    }

    /**
     * @param value If True, then Network Rule Set is also applied to BuiltIn EventHub EndPoint of IotHub
     */
    @JvmName("hxbuofjpugxkdfnq")
    public suspend fun applyToBuiltInEventHubEndpoint(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.applyToBuiltInEventHubEndpoint = mapped
    }

    /**
     * @param value Default Action for Network Rule Set
     */
    @JvmName("cqeoctdsrvxikjup")
    public suspend fun defaultAction(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value Default Action for Network Rule Set
     */
    @JvmName("movwtqtjpdokjbxa")
    public fun defaultAction(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value Default Action for Network Rule Set
     */
    @JvmName("tbtacbkbremmvyfx")
    public fun defaultAction(`value`: DefaultAction) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.defaultAction = mapped
    }

    /**
     * @param value List of IP Rules
     */
    @JvmName("rvtvtehqhbduoiog")
    public suspend fun ipRules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    /**
     * @param argument List of IP Rules
     */
    @JvmName("swnumjakgptfsssa")
    public suspend fun ipRules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            NetworkRuleSetIpRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument List of IP Rules
     */
    @JvmName("ooircnqnjvgirmrt")
    public suspend fun ipRules(vararg argument: suspend NetworkRuleSetIpRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            NetworkRuleSetIpRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param argument List of IP Rules
     */
    @JvmName("ikbwxbyvgcpltpct")
    public suspend fun ipRules(argument: suspend NetworkRuleSetIpRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(NetworkRuleSetIpRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ipRules = mapped
    }

    /**
     * @param values List of IP Rules
     */
    @JvmName("uyrtjpagtfkvnmjf")
    public suspend fun ipRules(vararg values: NetworkRuleSetIpRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipRules = mapped
    }

    internal fun build(): NetworkRuleSetPropertiesArgs = NetworkRuleSetPropertiesArgs(
        applyToBuiltInEventHubEndpoint = applyToBuiltInEventHubEndpoint ?: throw
            PulumiNullFieldException("applyToBuiltInEventHubEndpoint"),
        defaultAction = defaultAction,
        ipRules = ipRules ?: throw PulumiNullFieldException("ipRules"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy