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

com.pulumi.googlenative.compute.v1.kotlin.inputs.SourceInstanceParamsArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.compute.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.v1.inputs.SourceInstanceParamsArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A specification of the parameters to use when creating the instance template from a source instance.
 * @property diskConfigs Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
 */
public data class SourceInstanceParamsArgs(
    public val diskConfigs: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.compute.v1.inputs.SourceInstanceParamsArgs =
        com.pulumi.googlenative.compute.v1.inputs.SourceInstanceParamsArgs.builder()
            .diskConfigs(
                diskConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    /**
     * @param value Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     */
    @JvmName("mpirlyhivvtdviyb")
    public suspend fun diskConfigs(`value`: Output>) {
        this.diskConfigs = value
    }

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

    /**
     * @param values Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     */
    @JvmName("bockvvigpculqhcj")
    public suspend fun diskConfigs(values: List>) {
        this.diskConfigs = Output.all(values)
    }

    /**
     * @param value Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     */
    @JvmName("ekadwnkbinsejgtg")
    public suspend fun diskConfigs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskConfigs = mapped
    }

    /**
     * @param argument Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     */
    @JvmName("bvaxordmsspicvod")
    public suspend fun diskConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DiskInstantiationConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.diskConfigs = mapped
    }

    /**
     * @param argument Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     */
    @JvmName("uwybdbeybptrqfjr")
    public suspend fun diskConfigs(vararg argument: suspend DiskInstantiationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DiskInstantiationConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.diskConfigs = mapped
    }

    /**
     * @param argument Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     */
    @JvmName("lgoxhmwwesmaoopd")
    public suspend fun diskConfigs(argument: suspend DiskInstantiationConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DiskInstantiationConfigArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.diskConfigs = mapped
    }

    /**
     * @param values Attached disks configuration. If not provided, defaults are applied: For boot disk and any other R/W disks, the source images for each disk will be used. For read-only disks, they will be attached in read-only mode. Local SSD disks will be created as blank volumes.
     */
    @JvmName("ojkhirmnpxbbgnxq")
    public suspend fun diskConfigs(vararg values: DiskInstantiationConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.diskConfigs = mapped
    }

    internal fun build(): SourceInstanceParamsArgs = SourceInstanceParamsArgs(
        diskConfigs = diskConfigs,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy