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

com.pulumi.azure.stack.kotlin.inputs.HciLogicalNetworkSubnetArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.stack.kotlin.inputs

import com.pulumi.azure.stack.inputs.HciLogicalNetworkSubnetArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property addressPrefix The address prefix in CIDR notation. Changing this forces a new resource to be created.
 * @property ipAllocationMethod The IP address allocation method for the subnet. Possible values are `Dynamic` and `Static`. Changing this forces a new resource to be created.
 * @property ipPools One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
 * @property routes One or more `route` block as defined above. Changing this forces a new resource to be created.
 * @property vlanId The VLAN ID for the Logical Network. Changing this forces a new resource to be created.
 */
public data class HciLogicalNetworkSubnetArgs(
    public val addressPrefix: Output? = null,
    public val ipAllocationMethod: Output,
    public val ipPools: Output>? = null,
    public val routes: Output>? = null,
    public val vlanId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.stack.inputs.HciLogicalNetworkSubnetArgs =
        com.pulumi.azure.stack.inputs.HciLogicalNetworkSubnetArgs.builder()
            .addressPrefix(addressPrefix?.applyValue({ args0 -> args0 }))
            .ipAllocationMethod(ipAllocationMethod.applyValue({ args0 -> args0 }))
            .ipPools(
                ipPools?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .routes(routes?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .vlanId(vlanId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [HciLogicalNetworkSubnetArgs].
 */
@PulumiTagMarker
public class HciLogicalNetworkSubnetArgsBuilder internal constructor() {
    private var addressPrefix: Output? = null

    private var ipAllocationMethod: Output? = null

    private var ipPools: Output>? = null

    private var routes: Output>? = null

    private var vlanId: Output? = null

    /**
     * @param value The address prefix in CIDR notation. Changing this forces a new resource to be created.
     */
    @JvmName("cyisexratanpxaan")
    public suspend fun addressPrefix(`value`: Output) {
        this.addressPrefix = value
    }

    /**
     * @param value The IP address allocation method for the subnet. Possible values are `Dynamic` and `Static`. Changing this forces a new resource to be created.
     */
    @JvmName("gyjomeofilrdaasy")
    public suspend fun ipAllocationMethod(`value`: Output) {
        this.ipAllocationMethod = value
    }

    /**
     * @param value One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("wahmnojyfupwaoif")
    public suspend fun ipPools(`value`: Output>) {
        this.ipPools = value
    }

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

    /**
     * @param values One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("ibefprfmupuspfuj")
    public suspend fun ipPools(values: List>) {
        this.ipPools = Output.all(values)
    }

    /**
     * @param value One or more `route` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("ymgijhypdgbwwchc")
    public suspend fun routes(`value`: Output>) {
        this.routes = value
    }

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

    /**
     * @param values One or more `route` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("pkbkmrivqndcdxhf")
    public suspend fun routes(values: List>) {
        this.routes = Output.all(values)
    }

    /**
     * @param value The VLAN ID for the Logical Network. Changing this forces a new resource to be created.
     */
    @JvmName("afojmoocuamyardt")
    public suspend fun vlanId(`value`: Output) {
        this.vlanId = value
    }

    /**
     * @param value The address prefix in CIDR notation. Changing this forces a new resource to be created.
     */
    @JvmName("ygxcwrfjeeptenjp")
    public suspend fun addressPrefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.addressPrefix = mapped
    }

    /**
     * @param value The IP address allocation method for the subnet. Possible values are `Dynamic` and `Static`. Changing this forces a new resource to be created.
     */
    @JvmName("mvflwekilnqhlemm")
    public suspend fun ipAllocationMethod(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipAllocationMethod = mapped
    }

    /**
     * @param value One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("qvpgacbrskkfhhns")
    public suspend fun ipPools(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipPools = mapped
    }

    /**
     * @param argument One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("ejryxmjjedgnqedi")
    public suspend fun ipPools(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            HciLogicalNetworkSubnetIpPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipPools = mapped
    }

    /**
     * @param argument One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("gaytfvqytqieeoob")
    public suspend fun ipPools(vararg argument: suspend HciLogicalNetworkSubnetIpPoolArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            HciLogicalNetworkSubnetIpPoolArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipPools = mapped
    }

    /**
     * @param argument One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("pwucsfknbpqndsqi")
    public suspend fun ipPools(argument: suspend HciLogicalNetworkSubnetIpPoolArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            HciLogicalNetworkSubnetIpPoolArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipPools = mapped
    }

    /**
     * @param values One or more `ip_pool` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("eoxjavfkousifvws")
    public suspend fun ipPools(vararg values: HciLogicalNetworkSubnetIpPoolArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipPools = mapped
    }

    /**
     * @param value One or more `route` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("bkabbektlmwbeefn")
    public suspend fun routes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    /**
     * @param argument One or more `route` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("tqakwwvqtdolhdgy")
    public suspend fun routes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            HciLogicalNetworkSubnetRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument One or more `route` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("nvxtxddfjltyvrco")
    public suspend fun routes(vararg argument: suspend HciLogicalNetworkSubnetRouteArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            HciLogicalNetworkSubnetRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument One or more `route` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("lenqlqiuqcsujoah")
    public suspend fun routes(argument: suspend HciLogicalNetworkSubnetRouteArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            HciLogicalNetworkSubnetRouteArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param values One or more `route` block as defined above. Changing this forces a new resource to be created.
     */
    @JvmName("juuurcvecyycqgqc")
    public suspend fun routes(vararg values: HciLogicalNetworkSubnetRouteArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    /**
     * @param value The VLAN ID for the Logical Network. Changing this forces a new resource to be created.
     */
    @JvmName("mgemmajnjlpcqoyp")
    public suspend fun vlanId(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vlanId = mapped
    }

    internal fun build(): HciLogicalNetworkSubnetArgs = HciLogicalNetworkSubnetArgs(
        addressPrefix = addressPrefix,
        ipAllocationMethod = ipAllocationMethod ?: throw PulumiNullFieldException("ipAllocationMethod"),
        ipPools = ipPools,
        routes = routes,
        vlanId = vlanId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy