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

com.pulumi.gcp.alloydb.kotlin.inputs.InstanceNetworkConfigArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.alloydb.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.alloydb.inputs.InstanceNetworkConfigArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property authorizedExternalNetworks A list of external networks authorized to access this instance. This
 * field is only allowed to be set when `enable_public_ip` is set to
 * true.
 * Structure is documented below.
 * @property enablePublicIp Enabling public ip for the instance. If a user wishes to disable this,
 * please also clear the list of the authorized external networks set on
 * the same instance.
 */
public data class InstanceNetworkConfigArgs(
    public val authorizedExternalNetworks: Output>? = null,
    public val enablePublicIp: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.alloydb.inputs.InstanceNetworkConfigArgs =
        com.pulumi.gcp.alloydb.inputs.InstanceNetworkConfigArgs.builder()
            .authorizedExternalNetworks(
                authorizedExternalNetworks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .enablePublicIp(enablePublicIp?.applyValue({ args0 -> args0 })).build()
}

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

    private var enablePublicIp: Output? = null

    /**
     * @param value A list of external networks authorized to access this instance. This
     * field is only allowed to be set when `enable_public_ip` is set to
     * true.
     * Structure is documented below.
     */
    @JvmName("pduusxktvxmdxsnk")
    public suspend fun authorizedExternalNetworks(`value`: Output>) {
        this.authorizedExternalNetworks = value
    }

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

    /**
     * @param values A list of external networks authorized to access this instance. This
     * field is only allowed to be set when `enable_public_ip` is set to
     * true.
     * Structure is documented below.
     */
    @JvmName("umspgsjfngsnydjb")
    public suspend fun authorizedExternalNetworks(values: List>) {
        this.authorizedExternalNetworks = Output.all(values)
    }

    /**
     * @param value Enabling public ip for the instance. If a user wishes to disable this,
     * please also clear the list of the authorized external networks set on
     * the same instance.
     */
    @JvmName("udyqgkpcdvghpirh")
    public suspend fun enablePublicIp(`value`: Output) {
        this.enablePublicIp = value
    }

    /**
     * @param value A list of external networks authorized to access this instance. This
     * field is only allowed to be set when `enable_public_ip` is set to
     * true.
     * Structure is documented below.
     */
    @JvmName("mipdfcbephyjchnn")
    public suspend fun authorizedExternalNetworks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.authorizedExternalNetworks = mapped
    }

    /**
     * @param argument A list of external networks authorized to access this instance. This
     * field is only allowed to be set when `enable_public_ip` is set to
     * true.
     * Structure is documented below.
     */
    @JvmName("wiivkvxledirtkjr")
    public suspend fun authorizedExternalNetworks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            InstanceNetworkConfigAuthorizedExternalNetworkArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.authorizedExternalNetworks = mapped
    }

    /**
     * @param argument A list of external networks authorized to access this instance. This
     * field is only allowed to be set when `enable_public_ip` is set to
     * true.
     * Structure is documented below.
     */
    @JvmName("flmbvwynhdtghcqj")
    public suspend fun authorizedExternalNetworks(vararg argument: suspend InstanceNetworkConfigAuthorizedExternalNetworkArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            InstanceNetworkConfigAuthorizedExternalNetworkArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.authorizedExternalNetworks = mapped
    }

    /**
     * @param argument A list of external networks authorized to access this instance. This
     * field is only allowed to be set when `enable_public_ip` is set to
     * true.
     * Structure is documented below.
     */
    @JvmName("sjwsvkvbsysbyptr")
    public suspend fun authorizedExternalNetworks(argument: suspend InstanceNetworkConfigAuthorizedExternalNetworkArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            InstanceNetworkConfigAuthorizedExternalNetworkArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.authorizedExternalNetworks = mapped
    }

    /**
     * @param values A list of external networks authorized to access this instance. This
     * field is only allowed to be set when `enable_public_ip` is set to
     * true.
     * Structure is documented below.
     */
    @JvmName("vmbniwjtdtalylbf")
    public suspend fun authorizedExternalNetworks(vararg values: InstanceNetworkConfigAuthorizedExternalNetworkArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.authorizedExternalNetworks = mapped
    }

    /**
     * @param value Enabling public ip for the instance. If a user wishes to disable this,
     * please also clear the list of the authorized external networks set on
     * the same instance.
     */
    @JvmName("qpwdssbxorpjxhvy")
    public suspend fun enablePublicIp(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enablePublicIp = mapped
    }

    internal fun build(): InstanceNetworkConfigArgs = InstanceNetworkConfigArgs(
        authorizedExternalNetworks = authorizedExternalNetworks,
        enablePublicIp = enablePublicIp,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy