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

com.pulumi.gcp.compute.kotlin.inputs.PerInstanceConfigPreservedStateArgs.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.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.PerInstanceConfigPreservedStateArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property disks Stateful disks for the instance.
 * Structure is documented below.
 * @property externalIps Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
 * Structure is documented below.
 * @property internalIps Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
 * Structure is documented below.
 * @property metadata Preserved metadata defined for this instance. This is a list of key->value pairs.
 */
public data class PerInstanceConfigPreservedStateArgs(
    public val disks: Output>? = null,
    public val externalIps: Output>? = null,
    public val internalIps: Output>? = null,
    public val metadata: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.PerInstanceConfigPreservedStateArgs =
        com.pulumi.gcp.compute.inputs.PerInstanceConfigPreservedStateArgs.builder()
            .disks(disks?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .externalIps(
                externalIps?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .internalIps(
                internalIps?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var externalIps: Output>? = null

    private var internalIps: Output>? = null

    private var metadata: Output>? = null

    /**
     * @param value Stateful disks for the instance.
     * Structure is documented below.
     */
    @JvmName("gmyhdwcdsieexhvf")
    public suspend fun disks(`value`: Output>) {
        this.disks = value
    }

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

    /**
     * @param values Stateful disks for the instance.
     * Structure is documented below.
     */
    @JvmName("lcekfadrtyxvcotn")
    public suspend fun disks(values: List>) {
        this.disks = Output.all(values)
    }

    /**
     * @param value Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("hqkddlhrfanrgbqi")
    public suspend fun externalIps(`value`: Output>) {
        this.externalIps = value
    }

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

    /**
     * @param values Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("xftaqvdhoaadxvyb")
    public suspend fun externalIps(values: List>) {
        this.externalIps = Output.all(values)
    }

    /**
     * @param value Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("mgobpbyncybxivlw")
    public suspend fun internalIps(`value`: Output>) {
        this.internalIps = value
    }

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

    /**
     * @param values Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("gmcdatrexvdqjlxg")
    public suspend fun internalIps(values: List>) {
        this.internalIps = Output.all(values)
    }

    /**
     * @param value Preserved metadata defined for this instance. This is a list of key->value pairs.
     */
    @JvmName("lptkgysnxnouulwm")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value Stateful disks for the instance.
     * Structure is documented below.
     */
    @JvmName("cmrjbvpwhlyhalme")
    public suspend fun disks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disks = mapped
    }

    /**
     * @param argument Stateful disks for the instance.
     * Structure is documented below.
     */
    @JvmName("iwiqoxbudfdywdgu")
    public suspend fun disks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PerInstanceConfigPreservedStateDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.disks = mapped
    }

    /**
     * @param argument Stateful disks for the instance.
     * Structure is documented below.
     */
    @JvmName("xolphcvsqcxovabj")
    public suspend fun disks(vararg argument: suspend PerInstanceConfigPreservedStateDiskArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PerInstanceConfigPreservedStateDiskArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.disks = mapped
    }

    /**
     * @param argument Stateful disks for the instance.
     * Structure is documented below.
     */
    @JvmName("lgfupxhxwenshhrk")
    public suspend fun disks(argument: suspend PerInstanceConfigPreservedStateDiskArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PerInstanceConfigPreservedStateDiskArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.disks = mapped
    }

    /**
     * @param values Stateful disks for the instance.
     * Structure is documented below.
     */
    @JvmName("uhyjkpbypdbimuhv")
    public suspend fun disks(vararg values: PerInstanceConfigPreservedStateDiskArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.disks = mapped
    }

    /**
     * @param value Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("mbwdwrorkvjcviyg")
    public suspend fun externalIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.externalIps = mapped
    }

    /**
     * @param argument Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("mwybeicrtukgttoi")
    public suspend fun externalIps(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PerInstanceConfigPreservedStateExternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.externalIps = mapped
    }

    /**
     * @param argument Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("bcqexccidxtixfae")
    public suspend fun externalIps(vararg argument: suspend PerInstanceConfigPreservedStateExternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PerInstanceConfigPreservedStateExternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.externalIps = mapped
    }

    /**
     * @param argument Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("khuhchkxdsfiuwyt")
    public suspend fun externalIps(argument: suspend PerInstanceConfigPreservedStateExternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PerInstanceConfigPreservedStateExternalIpArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.externalIps = mapped
    }

    /**
     * @param values Preserved external IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("ntkqcbatewyqgyyn")
    public suspend fun externalIps(vararg values: PerInstanceConfigPreservedStateExternalIpArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.externalIps = mapped
    }

    /**
     * @param value Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("lkmxhwxoeoakjtfy")
    public suspend fun internalIps(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.internalIps = mapped
    }

    /**
     * @param argument Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("rbsqcnuvaivhekpa")
    public suspend fun internalIps(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PerInstanceConfigPreservedStateInternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.internalIps = mapped
    }

    /**
     * @param argument Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("ghqqdhvfvcdbjjdw")
    public suspend fun internalIps(vararg argument: suspend PerInstanceConfigPreservedStateInternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            PerInstanceConfigPreservedStateInternalIpArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.internalIps = mapped
    }

    /**
     * @param argument Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("mpqnmehkywrwlvbi")
    public suspend fun internalIps(argument: suspend PerInstanceConfigPreservedStateInternalIpArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PerInstanceConfigPreservedStateInternalIpArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.internalIps = mapped
    }

    /**
     * @param values Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface.
     * Structure is documented below.
     */
    @JvmName("ijpxdtcpmpgcjioa")
    public suspend fun internalIps(vararg values: PerInstanceConfigPreservedStateInternalIpArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.internalIps = mapped
    }

    /**
     * @param value Preserved metadata defined for this instance. This is a list of key->value pairs.
     */
    @JvmName("hdvtkibqgwksakrm")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values Preserved metadata defined for this instance. This is a list of key->value pairs.
     */
    @JvmName("lbxckbtqaxaanthe")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    internal fun build(): PerInstanceConfigPreservedStateArgs = PerInstanceConfigPreservedStateArgs(
        disks = disks,
        externalIps = externalIps,
        internalIps = internalIps,
        metadata = metadata,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy