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

com.pulumi.awsnative.lightsail.kotlin.inputs.InstanceNetworkingArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.lightsail.kotlin.inputs

import com.pulumi.awsnative.lightsail.inputs.InstanceNetworkingArgs.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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Networking of the Instance.
 * @property monthlyTransfer The monthly amount of data transfer, in GB, allocated for the instance
 * @property ports Ports to the Instance.
 */
public data class InstanceNetworkingArgs(
    public val monthlyTransfer: Output? = null,
    public val ports: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lightsail.inputs.InstanceNetworkingArgs =
        com.pulumi.awsnative.lightsail.inputs.InstanceNetworkingArgs.builder()
            .monthlyTransfer(monthlyTransfer?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ports(
                ports.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [InstanceNetworkingArgs].
 */
@PulumiTagMarker
public class InstanceNetworkingArgsBuilder internal constructor() {
    private var monthlyTransfer: Output? = null

    private var ports: Output>? = null

    /**
     * @param value The monthly amount of data transfer, in GB, allocated for the instance
     */
    @JvmName("jsjussajqhqncsmu")
    public suspend fun monthlyTransfer(`value`: Output) {
        this.monthlyTransfer = value
    }

    /**
     * @param value Ports to the Instance.
     */
    @JvmName("bhskximhypkuwlny")
    public suspend fun ports(`value`: Output>) {
        this.ports = value
    }

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

    /**
     * @param values Ports to the Instance.
     */
    @JvmName("mtyjvftdjidexmdb")
    public suspend fun ports(values: List>) {
        this.ports = Output.all(values)
    }

    /**
     * @param value The monthly amount of data transfer, in GB, allocated for the instance
     */
    @JvmName("sbkjxwscxrpsrxgb")
    public suspend fun monthlyTransfer(`value`: InstanceMonthlyTransferArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monthlyTransfer = mapped
    }

    /**
     * @param argument The monthly amount of data transfer, in GB, allocated for the instance
     */
    @JvmName("pgevfsnrvxhincyw")
    public suspend fun monthlyTransfer(argument: suspend InstanceMonthlyTransferArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceMonthlyTransferArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.monthlyTransfer = mapped
    }

    /**
     * @param value Ports to the Instance.
     */
    @JvmName("olmukumyxfbovtmx")
    public suspend fun ports(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param argument Ports to the Instance.
     */
    @JvmName("nmmkrbaaanqnasmd")
    public suspend fun ports(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstancePortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument Ports to the Instance.
     */
    @JvmName("fjubkxqtgsmwbojp")
    public suspend fun ports(vararg argument: suspend InstancePortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstancePortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument Ports to the Instance.
     */
    @JvmName("nenabgriinjwbeil")
    public suspend fun ports(argument: suspend InstancePortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(InstancePortArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param values Ports to the Instance.
     */
    @JvmName("qqmrhbgaqujfqcmn")
    public suspend fun ports(vararg values: InstancePortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    internal fun build(): InstanceNetworkingArgs = InstanceNetworkingArgs(
        monthlyTransfer = monthlyTransfer,
        ports = ports ?: throw PulumiNullFieldException("ports"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy