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

com.pulumi.azurenative.notificationhubs.kotlin.inputs.IpRuleArgs.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.notificationhubs.kotlin.inputs

import com.pulumi.azurenative.notificationhubs.inputs.IpRuleArgs.builder
import com.pulumi.azurenative.notificationhubs.kotlin.enums.AccessRights
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 kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A network authorization rule that filters traffic based on IP address.
 * @property ipMask IP mask.
 * @property rights List of access rights.
 */
public data class IpRuleArgs(
    public val ipMask: Output,
    public val rights: Output>>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.notificationhubs.inputs.IpRuleArgs =
        com.pulumi.azurenative.notificationhubs.inputs.IpRuleArgs.builder()
            .ipMask(ipMask.applyValue({ args0 -> args0 }))
            .rights(
                rights.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.transform(
                            { args0 -> args0 },
                            { args0 -> args0.let({ args0 -> args0.toJava() }) },
                        )
                    })
                }),
            ).build()
}

/**
 * Builder for [IpRuleArgs].
 */
@PulumiTagMarker
public class IpRuleArgsBuilder internal constructor() {
    private var ipMask: Output? = null

    private var rights: Output>>? = null

    /**
     * @param value IP mask.
     */
    @JvmName("jcsmqytfbpgpkkdt")
    public suspend fun ipMask(`value`: Output) {
        this.ipMask = value
    }

    /**
     * @param value List of access rights.
     */
    @JvmName("yrtitsgesbwxevpe")
    public suspend fun rights(`value`: Output>>) {
        this.rights = value
    }

    @JvmName("tfwltmfbcpqfikod")
    public suspend fun rights(vararg values: Output>) {
        this.rights = Output.all(values.asList())
    }

    /**
     * @param values List of access rights.
     */
    @JvmName("gbldfjlrtdmdwtrs")
    public suspend fun rights(values: List>>) {
        this.rights = Output.all(values)
    }

    /**
     * @param value IP mask.
     */
    @JvmName("mgggtdlltgyystpc")
    public suspend fun ipMask(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipMask = mapped
    }

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

    /**
     * @param values List of access rights.
     */
    @JvmName("jxepoxlduebbubmw")
    public suspend fun rights(vararg values: Either) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rights = mapped
    }

    internal fun build(): IpRuleArgs = IpRuleArgs(
        ipMask = ipMask ?: throw PulumiNullFieldException("ipMask"),
        rights = rights ?: throw PulumiNullFieldException("rights"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy