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

com.pulumi.azurenative.network.kotlin.inputs.BackendAddressPoolArgs.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.network.kotlin.inputs

import com.pulumi.azurenative.network.inputs.BackendAddressPoolArgs.builder
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Pool of backend IP addresses.
 * @property drainPeriodInSeconds Amount of seconds Load Balancer waits for before sending RESET to client and backend address.
 * @property id Resource ID.
 * @property loadBalancerBackendAddresses An array of backend addresses.
 * @property location The location of the backend address pool.
 * @property name The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource.
 * @property tunnelInterfaces An array of gateway load balancer tunnel interfaces.
 * @property virtualNetwork A reference to a virtual network.
 */
public data class BackendAddressPoolArgs(
    public val drainPeriodInSeconds: Output? = null,
    public val id: Output? = null,
    public val loadBalancerBackendAddresses: Output>? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val tunnelInterfaces: Output>? = null,
    public val virtualNetwork: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.network.inputs.BackendAddressPoolArgs =
        com.pulumi.azurenative.network.inputs.BackendAddressPoolArgs.builder()
            .drainPeriodInSeconds(drainPeriodInSeconds?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .loadBalancerBackendAddresses(
                loadBalancerBackendAddresses?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tunnelInterfaces(
                tunnelInterfaces?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .virtualNetwork(
                virtualNetwork?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [BackendAddressPoolArgs].
 */
@PulumiTagMarker
public class BackendAddressPoolArgsBuilder internal constructor() {
    private var drainPeriodInSeconds: Output? = null

    private var id: Output? = null

    private var loadBalancerBackendAddresses: Output>? = null

    private var location: Output? = null

    private var name: Output? = null

    private var tunnelInterfaces: Output>? = null

    private var virtualNetwork: Output? = null

    /**
     * @param value Amount of seconds Load Balancer waits for before sending RESET to client and backend address.
     */
    @JvmName("xahouxhxhfkyqxdw")
    public suspend fun drainPeriodInSeconds(`value`: Output) {
        this.drainPeriodInSeconds = value
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("hrkwlyiipjqjsdar")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value An array of backend addresses.
     */
    @JvmName("nrjyloqtqsxqrfvg")
    public suspend fun loadBalancerBackendAddresses(`value`: Output>) {
        this.loadBalancerBackendAddresses = value
    }

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

    /**
     * @param values An array of backend addresses.
     */
    @JvmName("iavtcvgtowuhqyyn")
    public suspend fun loadBalancerBackendAddresses(values: List>) {
        this.loadBalancerBackendAddresses = Output.all(values)
    }

    /**
     * @param value The location of the backend address pool.
     */
    @JvmName("aqjjwbbifdtuouxk")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource.
     */
    @JvmName("lgckajekkjsnvajq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An array of gateway load balancer tunnel interfaces.
     */
    @JvmName("ymxsijwcbtyqyadq")
    public suspend fun tunnelInterfaces(`value`: Output>) {
        this.tunnelInterfaces = value
    }

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

    /**
     * @param values An array of gateway load balancer tunnel interfaces.
     */
    @JvmName("hferecnpgdycdhvx")
    public suspend fun tunnelInterfaces(values: List>) {
        this.tunnelInterfaces = Output.all(values)
    }

    /**
     * @param value A reference to a virtual network.
     */
    @JvmName("nnjubggbgxitypom")
    public suspend fun virtualNetwork(`value`: Output) {
        this.virtualNetwork = value
    }

    /**
     * @param value Amount of seconds Load Balancer waits for before sending RESET to client and backend address.
     */
    @JvmName("kpaciofknhskokji")
    public suspend fun drainPeriodInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.drainPeriodInSeconds = mapped
    }

    /**
     * @param value Resource ID.
     */
    @JvmName("ffnccllryivxkehl")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value An array of backend addresses.
     */
    @JvmName("donywuwvmfdodllj")
    public suspend fun loadBalancerBackendAddresses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loadBalancerBackendAddresses = mapped
    }

    /**
     * @param argument An array of backend addresses.
     */
    @JvmName("fgusxxijyglcrjch")
    public suspend fun loadBalancerBackendAddresses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LoadBalancerBackendAddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.loadBalancerBackendAddresses = mapped
    }

    /**
     * @param argument An array of backend addresses.
     */
    @JvmName("veesmmrgeuupfbiw")
    public suspend fun loadBalancerBackendAddresses(vararg argument: suspend LoadBalancerBackendAddressArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LoadBalancerBackendAddressArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.loadBalancerBackendAddresses = mapped
    }

    /**
     * @param argument An array of backend addresses.
     */
    @JvmName("rvdcoekwaqwqqkeq")
    public suspend fun loadBalancerBackendAddresses(argument: suspend LoadBalancerBackendAddressArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LoadBalancerBackendAddressArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.loadBalancerBackendAddresses = mapped
    }

    /**
     * @param values An array of backend addresses.
     */
    @JvmName("fvcqffdgmkaemqva")
    public suspend fun loadBalancerBackendAddresses(vararg values: LoadBalancerBackendAddressArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.loadBalancerBackendAddresses = mapped
    }

    /**
     * @param value The location of the backend address pool.
     */
    @JvmName("cmtkxrqsdqqqqodg")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name of the resource that is unique within the set of backend address pools used by the load balancer. This name can be used to access the resource.
     */
    @JvmName("uyffrfcuqhmnrtxb")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value An array of gateway load balancer tunnel interfaces.
     */
    @JvmName("rkybygupbodjbptl")
    public suspend fun tunnelInterfaces(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tunnelInterfaces = mapped
    }

    /**
     * @param argument An array of gateway load balancer tunnel interfaces.
     */
    @JvmName("ohbgicxyubtnnmkq")
    public suspend fun tunnelInterfaces(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GatewayLoadBalancerTunnelInterfaceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tunnelInterfaces = mapped
    }

    /**
     * @param argument An array of gateway load balancer tunnel interfaces.
     */
    @JvmName("lwohwjvnsqncwktf")
    public suspend fun tunnelInterfaces(vararg argument: suspend GatewayLoadBalancerTunnelInterfaceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GatewayLoadBalancerTunnelInterfaceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tunnelInterfaces = mapped
    }

    /**
     * @param argument An array of gateway load balancer tunnel interfaces.
     */
    @JvmName("kamobysmanbvvsfi")
    public suspend fun tunnelInterfaces(argument: suspend GatewayLoadBalancerTunnelInterfaceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GatewayLoadBalancerTunnelInterfaceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.tunnelInterfaces = mapped
    }

    /**
     * @param values An array of gateway load balancer tunnel interfaces.
     */
    @JvmName("twhqgumpjgcvtkxy")
    public suspend fun tunnelInterfaces(vararg values: GatewayLoadBalancerTunnelInterfaceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tunnelInterfaces = mapped
    }

    /**
     * @param value A reference to a virtual network.
     */
    @JvmName("mullldyevcwfehvh")
    public suspend fun virtualNetwork(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualNetwork = mapped
    }

    /**
     * @param argument A reference to a virtual network.
     */
    @JvmName("itwwegrlxihsoenu")
    public suspend fun virtualNetwork(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.virtualNetwork = mapped
    }

    internal fun build(): BackendAddressPoolArgs = BackendAddressPoolArgs(
        drainPeriodInSeconds = drainPeriodInSeconds,
        id = id,
        loadBalancerBackendAddresses = loadBalancerBackendAddresses,
        location = location,
        name = name,
        tunnelInterfaces = tunnelInterfaces,
        virtualNetwork = virtualNetwork,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy