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

com.pulumi.digitalocean.kotlin.inputs.LoadBalancerFirewallArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.digitalocean.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.LoadBalancerFirewallArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property allows A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
 * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
 * @property denies A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
 */
public data class LoadBalancerFirewallArgs(
    public val allows: Output>? = null,
    public val denies: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.digitalocean.inputs.LoadBalancerFirewallArgs =
        com.pulumi.digitalocean.inputs.LoadBalancerFirewallArgs.builder()
            .allows(allows?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .denies(denies?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var denies: Output>? = null

    /**
     * @param value A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
     * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
     */
    @JvmName("wgucrghhettutwjq")
    public suspend fun allows(`value`: Output>) {
        this.allows = value
    }

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

    /**
     * @param values A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
     * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
     */
    @JvmName("pptmlsdqyyjxyfxd")
    public suspend fun allows(values: List>) {
        this.allows = Output.all(values)
    }

    /**
     * @param value A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
     */
    @JvmName("yjexhjhdcqgpiwrr")
    public suspend fun denies(`value`: Output>) {
        this.denies = value
    }

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

    /**
     * @param values A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
     */
    @JvmName("hraoffycqvvrhkik")
    public suspend fun denies(values: List>) {
        this.denies = Output.all(values)
    }

    /**
     * @param value A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
     * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
     */
    @JvmName("jcmumspermtmnuds")
    public suspend fun allows(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allows = mapped
    }

    /**
     * @param values A list of strings describing allow rules. Must be colon delimited strings of the form `{type}:{source}`
     * * Ex. `deny = ["cidr:1.2.0.0/16", "ip:2.3.4.5"]` or `allow = ["ip:1.2.3.4", "cidr:2.3.4.0/24"]`
     */
    @JvmName("ccqyvtmmrrnmysgy")
    public suspend fun allows(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allows = mapped
    }

    /**
     * @param value A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
     */
    @JvmName("xamatjqegmwrcarc")
    public suspend fun denies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.denies = mapped
    }

    /**
     * @param values A list of strings describing deny rules. Must be colon delimited strings of the form `{type}:{source}`
     */
    @JvmName("mbxvagbkjpvqddpa")
    public suspend fun denies(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.denies = mapped
    }

    internal fun build(): LoadBalancerFirewallArgs = LoadBalancerFirewallArgs(
        allows = allows,
        denies = denies,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy