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

com.pulumi.azurenative.compute.kotlin.inputs.VirtualMachineNetworkInterfaceConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.compute.kotlin.inputs

import com.pulumi.azurenative.compute.inputs.VirtualMachineNetworkInterfaceConfigurationArgs.builder
import com.pulumi.azurenative.compute.kotlin.enums.DeleteOptions
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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Describes a virtual machine network interface configurations.
 * @property deleteOption Specify what happens to the network interface when the VM is deleted
 * @property disableTcpStateTracking Specifies whether the network interface is disabled for tcp state tracking.
 * @property dnsSettings The dns settings to be applied on the network interfaces.
 * @property dscpConfiguration
 * @property enableAcceleratedNetworking Specifies whether the network interface is accelerated networking-enabled.
 * @property enableFpga Specifies whether the network interface is FPGA networking-enabled.
 * @property enableIPForwarding Whether IP forwarding enabled on this NIC.
 * @property ipConfigurations Specifies the IP configurations of the network interface.
 * @property name The network interface configuration name.
 * @property networkSecurityGroup The network security group.
 * @property primary Specifies the primary network interface in case the virtual machine has more than 1 network interface.
 */
public data class VirtualMachineNetworkInterfaceConfigurationArgs(
    public val deleteOption: Output>? = null,
    public val disableTcpStateTracking: Output? = null,
    public val dnsSettings: Output? =
        null,
    public val dscpConfiguration: Output? = null,
    public val enableAcceleratedNetworking: Output? = null,
    public val enableFpga: Output? = null,
    public val enableIPForwarding: Output? = null,
    public val ipConfigurations: Output>,
    public val name: Output,
    public val networkSecurityGroup: Output? = null,
    public val primary: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.compute.inputs.VirtualMachineNetworkInterfaceConfigurationArgs =
        com.pulumi.azurenative.compute.inputs.VirtualMachineNetworkInterfaceConfigurationArgs.builder()
            .deleteOption(
                deleteOption?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .disableTcpStateTracking(disableTcpStateTracking?.applyValue({ args0 -> args0 }))
            .dnsSettings(dnsSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dscpConfiguration(dscpConfiguration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enableAcceleratedNetworking(enableAcceleratedNetworking?.applyValue({ args0 -> args0 }))
            .enableFpga(enableFpga?.applyValue({ args0 -> args0 }))
            .enableIPForwarding(enableIPForwarding?.applyValue({ args0 -> args0 }))
            .ipConfigurations(
                ipConfigurations.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .networkSecurityGroup(
                networkSecurityGroup?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .primary(primary?.applyValue({ args0 -> args0 })).build()
}

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

    private var disableTcpStateTracking: Output? = null

    private var dnsSettings: Output? =
        null

    private var dscpConfiguration: Output? = null

    private var enableAcceleratedNetworking: Output? = null

    private var enableFpga: Output? = null

    private var enableIPForwarding: Output? = null

    private var ipConfigurations: Output>? =
        null

    private var name: Output? = null

    private var networkSecurityGroup: Output? = null

    private var primary: Output? = null

    /**
     * @param value Specify what happens to the network interface when the VM is deleted
     */
    @JvmName("xfvtouvmcgnibptg")
    public suspend fun deleteOption(`value`: Output>) {
        this.deleteOption = value
    }

    /**
     * @param value Specifies whether the network interface is disabled for tcp state tracking.
     */
    @JvmName("dwrirpvlkkkhwkcp")
    public suspend fun disableTcpStateTracking(`value`: Output) {
        this.disableTcpStateTracking = value
    }

    /**
     * @param value The dns settings to be applied on the network interfaces.
     */
    @JvmName("qgyhncjajdsudpth")
    public suspend fun dnsSettings(`value`: Output) {
        this.dnsSettings = value
    }

    /**
     * @param value
     */
    @JvmName("okwljopxaiipvwdk")
    public suspend fun dscpConfiguration(`value`: Output) {
        this.dscpConfiguration = value
    }

    /**
     * @param value Specifies whether the network interface is accelerated networking-enabled.
     */
    @JvmName("msykxqlyucpuircf")
    public suspend fun enableAcceleratedNetworking(`value`: Output) {
        this.enableAcceleratedNetworking = value
    }

    /**
     * @param value Specifies whether the network interface is FPGA networking-enabled.
     */
    @JvmName("bqfavtjbwhyypfon")
    public suspend fun enableFpga(`value`: Output) {
        this.enableFpga = value
    }

    /**
     * @param value Whether IP forwarding enabled on this NIC.
     */
    @JvmName("bbmfeoiakdwysohq")
    public suspend fun enableIPForwarding(`value`: Output) {
        this.enableIPForwarding = value
    }

    /**
     * @param value Specifies the IP configurations of the network interface.
     */
    @JvmName("wijkdgkuyextsxgx")
    public suspend fun ipConfigurations(`value`: Output>) {
        this.ipConfigurations = value
    }

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

    /**
     * @param values Specifies the IP configurations of the network interface.
     */
    @JvmName("wielnljaqaslukvl")
    public suspend fun ipConfigurations(values: List>) {
        this.ipConfigurations = Output.all(values)
    }

    /**
     * @param value The network interface configuration name.
     */
    @JvmName("xmdlglmcuejuscmv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The network security group.
     */
    @JvmName("fhfdkqkmwkbykmxu")
    public suspend fun networkSecurityGroup(`value`: Output) {
        this.networkSecurityGroup = value
    }

    /**
     * @param value Specifies the primary network interface in case the virtual machine has more than 1 network interface.
     */
    @JvmName("prjgagylrbohdoyk")
    public suspend fun primary(`value`: Output) {
        this.primary = value
    }

    /**
     * @param value Specify what happens to the network interface when the VM is deleted
     */
    @JvmName("hrxjixfciyjtuwfm")
    public suspend fun deleteOption(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteOption = mapped
    }

    /**
     * @param value Specify what happens to the network interface when the VM is deleted
     */
    @JvmName("lblrvkwfobopxkrs")
    public fun deleteOption(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deleteOption = mapped
    }

    /**
     * @param value Specify what happens to the network interface when the VM is deleted
     */
    @JvmName("rhijmeivvgduemhm")
    public fun deleteOption(`value`: DeleteOptions) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deleteOption = mapped
    }

    /**
     * @param value Specifies whether the network interface is disabled for tcp state tracking.
     */
    @JvmName("eaghtwinmxgjnkcc")
    public suspend fun disableTcpStateTracking(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableTcpStateTracking = mapped
    }

    /**
     * @param value The dns settings to be applied on the network interfaces.
     */
    @JvmName("qmakfgpxkdomkhmh")
    public suspend fun dnsSettings(`value`: VirtualMachineNetworkInterfaceDnsSettingsConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsSettings = mapped
    }

    /**
     * @param argument The dns settings to be applied on the network interfaces.
     */
    @JvmName("uggwmmsriqoyntvo")
    public suspend fun dnsSettings(argument: suspend VirtualMachineNetworkInterfaceDnsSettingsConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped =
            VirtualMachineNetworkInterfaceDnsSettingsConfigurationArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.dnsSettings = mapped
    }

    /**
     * @param value
     */
    @JvmName("mavamushgmurarug")
    public suspend fun dscpConfiguration(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dscpConfiguration = mapped
    }

    /**
     * @param argument
     */
    @JvmName("abratjvoelhuqlpm")
    public suspend fun dscpConfiguration(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dscpConfiguration = mapped
    }

    /**
     * @param value Specifies whether the network interface is accelerated networking-enabled.
     */
    @JvmName("dnyauhnphplmtcqp")
    public suspend fun enableAcceleratedNetworking(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableAcceleratedNetworking = mapped
    }

    /**
     * @param value Specifies whether the network interface is FPGA networking-enabled.
     */
    @JvmName("kvlxwtaxkeijixpy")
    public suspend fun enableFpga(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableFpga = mapped
    }

    /**
     * @param value Whether IP forwarding enabled on this NIC.
     */
    @JvmName("veqxnjyxisllvbhd")
    public suspend fun enableIPForwarding(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableIPForwarding = mapped
    }

    /**
     * @param value Specifies the IP configurations of the network interface.
     */
    @JvmName("lhefdrxjcyotsten")
    public suspend fun ipConfigurations(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipConfigurations = mapped
    }

    /**
     * @param argument Specifies the IP configurations of the network interface.
     */
    @JvmName("tnynwxakxiccotbl")
    public suspend fun ipConfigurations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VirtualMachineNetworkInterfaceIPConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param argument Specifies the IP configurations of the network interface.
     */
    @JvmName("nwglxnhvbvkonayy")
    public suspend fun ipConfigurations(vararg argument: suspend VirtualMachineNetworkInterfaceIPConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VirtualMachineNetworkInterfaceIPConfigurationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param argument Specifies the IP configurations of the network interface.
     */
    @JvmName("rrkjxrxkuidnxckh")
    public suspend fun ipConfigurations(argument: suspend VirtualMachineNetworkInterfaceIPConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VirtualMachineNetworkInterfaceIPConfigurationArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.ipConfigurations = mapped
    }

    /**
     * @param values Specifies the IP configurations of the network interface.
     */
    @JvmName("schkcrtjngdfupao")
    public suspend fun ipConfigurations(vararg values: VirtualMachineNetworkInterfaceIPConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ipConfigurations = mapped
    }

    /**
     * @param value The network interface configuration name.
     */
    @JvmName("qvjgrbeuglesncmt")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The network security group.
     */
    @JvmName("cbwxthbgvglvceyk")
    public suspend fun networkSecurityGroup(`value`: SubResourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkSecurityGroup = mapped
    }

    /**
     * @param argument The network security group.
     */
    @JvmName("blquhbackjudspye")
    public suspend fun networkSecurityGroup(argument: suspend SubResourceArgsBuilder.() -> Unit) {
        val toBeMapped = SubResourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkSecurityGroup = mapped
    }

    /**
     * @param value Specifies the primary network interface in case the virtual machine has more than 1 network interface.
     */
    @JvmName("atbqvbcxoaxsyjvo")
    public suspend fun primary(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primary = mapped
    }

    internal fun build(): VirtualMachineNetworkInterfaceConfigurationArgs =
        VirtualMachineNetworkInterfaceConfigurationArgs(
            deleteOption = deleteOption,
            disableTcpStateTracking = disableTcpStateTracking,
            dnsSettings = dnsSettings,
            dscpConfiguration = dscpConfiguration,
            enableAcceleratedNetworking = enableAcceleratedNetworking,
            enableFpga = enableFpga,
            enableIPForwarding = enableIPForwarding,
            ipConfigurations = ipConfigurations ?: throw PulumiNullFieldException("ipConfigurations"),
            name = name ?: throw PulumiNullFieldException("name"),
            networkSecurityGroup = networkSecurityGroup,
            primary = primary,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy