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

com.pulumi.azure.network.kotlin.inputs.FirewallNatRuleCollectionRuleArgs.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.network.kotlin.inputs

import com.pulumi.azure.network.inputs.FirewallNatRuleCollectionRuleArgs.builder
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

/**
 *
 * @property description Specifies a description for the rule.
 * @property destinationAddresses A list of destination IP addresses and/or IP ranges.
 * @property destinationPorts A list of destination ports.
 * @property name Specifies the name of the rule.
 * @property protocols A list of protocols. Possible values are `Any`, `ICMP`, `TCP` and `UDP`. If `action` is `Dnat`, protocols can only be `TCP` and `UDP`.
 * @property sourceAddresses A list of source IP addresses and/or IP ranges.
 * @property sourceIpGroups A list of source IP Group IDs for the rule.
 * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
 * @property translatedAddress The address of the service behind the Firewall.
 * @property translatedPort The port of the service behind the Firewall.
 */
public data class FirewallNatRuleCollectionRuleArgs(
    public val description: Output? = null,
    public val destinationAddresses: Output>,
    public val destinationPorts: Output>,
    public val name: Output,
    public val protocols: Output>,
    public val sourceAddresses: Output>? = null,
    public val sourceIpGroups: Output>? = null,
    public val translatedAddress: Output,
    public val translatedPort: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.network.inputs.FirewallNatRuleCollectionRuleArgs =
        com.pulumi.azure.network.inputs.FirewallNatRuleCollectionRuleArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .destinationAddresses(destinationAddresses.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .destinationPorts(destinationPorts.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name.applyValue({ args0 -> args0 }))
            .protocols(protocols.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .sourceAddresses(sourceAddresses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .sourceIpGroups(sourceIpGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .translatedAddress(translatedAddress.applyValue({ args0 -> args0 }))
            .translatedPort(translatedPort.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FirewallNatRuleCollectionRuleArgs].
 */
@PulumiTagMarker
public class FirewallNatRuleCollectionRuleArgsBuilder internal constructor() {
    private var description: Output? = null

    private var destinationAddresses: Output>? = null

    private var destinationPorts: Output>? = null

    private var name: Output? = null

    private var protocols: Output>? = null

    private var sourceAddresses: Output>? = null

    private var sourceIpGroups: Output>? = null

    private var translatedAddress: Output? = null

    private var translatedPort: Output? = null

    /**
     * @param value Specifies a description for the rule.
     */
    @JvmName("rdnhespedeelyhjn")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value A list of destination IP addresses and/or IP ranges.
     */
    @JvmName("xmfegrjmktyfiecy")
    public suspend fun destinationAddresses(`value`: Output>) {
        this.destinationAddresses = value
    }

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

    /**
     * @param values A list of destination IP addresses and/or IP ranges.
     */
    @JvmName("qplphuduthnagmxn")
    public suspend fun destinationAddresses(values: List>) {
        this.destinationAddresses = Output.all(values)
    }

    /**
     * @param value A list of destination ports.
     */
    @JvmName("ihqtsutanfxpksih")
    public suspend fun destinationPorts(`value`: Output>) {
        this.destinationPorts = value
    }

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

    /**
     * @param values A list of destination ports.
     */
    @JvmName("qvmyajkovyomqygv")
    public suspend fun destinationPorts(values: List>) {
        this.destinationPorts = Output.all(values)
    }

    /**
     * @param value Specifies the name of the rule.
     */
    @JvmName("ufqsrxshudceylpe")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A list of protocols. Possible values are `Any`, `ICMP`, `TCP` and `UDP`. If `action` is `Dnat`, protocols can only be `TCP` and `UDP`.
     */
    @JvmName("jjbybhhvrjssfvka")
    public suspend fun protocols(`value`: Output>) {
        this.protocols = value
    }

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

    /**
     * @param values A list of protocols. Possible values are `Any`, `ICMP`, `TCP` and `UDP`. If `action` is `Dnat`, protocols can only be `TCP` and `UDP`.
     */
    @JvmName("vvomvyjdriftrxfe")
    public suspend fun protocols(values: List>) {
        this.protocols = Output.all(values)
    }

    /**
     * @param value A list of source IP addresses and/or IP ranges.
     */
    @JvmName("lmjihqoeejkvhpdf")
    public suspend fun sourceAddresses(`value`: Output>) {
        this.sourceAddresses = value
    }

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

    /**
     * @param values A list of source IP addresses and/or IP ranges.
     */
    @JvmName("gcxuosfaqjnbumwu")
    public suspend fun sourceAddresses(values: List>) {
        this.sourceAddresses = Output.all(values)
    }

    /**
     * @param value A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("oxvkrcpbsucfbgeu")
    public suspend fun sourceIpGroups(`value`: Output>) {
        this.sourceIpGroups = value
    }

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

    /**
     * @param values A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("pwykciadbqngxpqq")
    public suspend fun sourceIpGroups(values: List>) {
        this.sourceIpGroups = Output.all(values)
    }

    /**
     * @param value The address of the service behind the Firewall.
     */
    @JvmName("owodxxyffldlajts")
    public suspend fun translatedAddress(`value`: Output) {
        this.translatedAddress = value
    }

    /**
     * @param value The port of the service behind the Firewall.
     */
    @JvmName("kfahuxgmvmuchlpy")
    public suspend fun translatedPort(`value`: Output) {
        this.translatedPort = value
    }

    /**
     * @param value Specifies a description for the rule.
     */
    @JvmName("rpfqwwfuicsdroyo")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value A list of destination IP addresses and/or IP ranges.
     */
    @JvmName("qgekyofstiqxvlyo")
    public suspend fun destinationAddresses(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationAddresses = mapped
    }

    /**
     * @param values A list of destination IP addresses and/or IP ranges.
     */
    @JvmName("lxuegssacsgnivke")
    public suspend fun destinationAddresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationAddresses = mapped
    }

    /**
     * @param value A list of destination ports.
     */
    @JvmName("mxnwwalmlhsuyeyk")
    public suspend fun destinationPorts(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationPorts = mapped
    }

    /**
     * @param values A list of destination ports.
     */
    @JvmName("bifpppwtrfnwkgrc")
    public suspend fun destinationPorts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationPorts = mapped
    }

    /**
     * @param value Specifies the name of the rule.
     */
    @JvmName("ybvoqqwutpkmiyyr")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A list of protocols. Possible values are `Any`, `ICMP`, `TCP` and `UDP`. If `action` is `Dnat`, protocols can only be `TCP` and `UDP`.
     */
    @JvmName("guywxspusfjnjhyr")
    public suspend fun protocols(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param values A list of protocols. Possible values are `Any`, `ICMP`, `TCP` and `UDP`. If `action` is `Dnat`, protocols can only be `TCP` and `UDP`.
     */
    @JvmName("pwhehqxogvcqoflw")
    public suspend fun protocols(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocols = mapped
    }

    /**
     * @param value A list of source IP addresses and/or IP ranges.
     */
    @JvmName("ribtdfrcniyjyejm")
    public suspend fun sourceAddresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceAddresses = mapped
    }

    /**
     * @param values A list of source IP addresses and/or IP ranges.
     */
    @JvmName("moormfjeibxvvrdb")
    public suspend fun sourceAddresses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceAddresses = mapped
    }

    /**
     * @param value A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("oyyedtrvgjtmysel")
    public suspend fun sourceIpGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceIpGroups = mapped
    }

    /**
     * @param values A list of source IP Group IDs for the rule.
     * > **NOTE** At least one of `source_addresses` and `source_ip_groups` must be specified for a rule.
     */
    @JvmName("nnbinhpkebpwdrwi")
    public suspend fun sourceIpGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceIpGroups = mapped
    }

    /**
     * @param value The address of the service behind the Firewall.
     */
    @JvmName("kxddqfxhndlhnqsn")
    public suspend fun translatedAddress(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.translatedAddress = mapped
    }

    /**
     * @param value The port of the service behind the Firewall.
     */
    @JvmName("ndssjepguqbvhlfh")
    public suspend fun translatedPort(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.translatedPort = mapped
    }

    internal fun build(): FirewallNatRuleCollectionRuleArgs = FirewallNatRuleCollectionRuleArgs(
        description = description,
        destinationAddresses = destinationAddresses ?: throw
            PulumiNullFieldException("destinationAddresses"),
        destinationPorts = destinationPorts ?: throw PulumiNullFieldException("destinationPorts"),
        name = name ?: throw PulumiNullFieldException("name"),
        protocols = protocols ?: throw PulumiNullFieldException("protocols"),
        sourceAddresses = sourceAddresses,
        sourceIpGroups = sourceIpGroups,
        translatedAddress = translatedAddress ?: throw PulumiNullFieldException("translatedAddress"),
        translatedPort = translatedPort ?: throw PulumiNullFieldException("translatedPort"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy