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

com.pulumi.googlenative.vmmigration.v1.kotlin.inputs.ComputeEngineTargetDefaultsArgs.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.vmmigration.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.vmmigration.v1.inputs.ComputeEngineTargetDefaultsArgs.builder
import com.pulumi.googlenative.vmmigration.v1.kotlin.enums.ComputeEngineTargetDefaultsDiskType
import com.pulumi.googlenative.vmmigration.v1.kotlin.enums.ComputeEngineTargetDefaultsLicenseType
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * ComputeEngineTargetDefaults is a collection of details for creating a VM in a target Compute Engine project.
 * @property additionalLicenses Additional licenses to assign to the VM.
 * @property computeScheduling Compute instance scheduling information (if empty default is used).
 * @property diskType The disk type to use in the VM.
 * @property hostname The hostname to assign to the VM.
 * @property labels A map of labels to associate with the VM.
 * @property licenseType The license type to use in OS adaptation.
 * @property machineType The machine type to create the VM with.
 * @property machineTypeSeries The machine type series to create the VM with.
 * @property metadata The metadata key/value pairs to assign to the VM.
 * @property networkInterfaces List of NICs connected to this VM.
 * @property networkTags A map of network tags to associate with the VM.
 * @property secureBoot Defines whether the instance has Secure Boot enabled. This can be set to true only if the vm boot option is EFI.
 * @property serviceAccount The service account to associate the VM with.
 * @property targetProject The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM.
 * @property vmName The name of the VM to create.
 * @property zone The zone in which to create the VM.
 */
public data class ComputeEngineTargetDefaultsArgs(
    public val additionalLicenses: Output>? = null,
    public val computeScheduling: Output? = null,
    public val diskType: Output? = null,
    public val hostname: Output? = null,
    public val labels: Output>? = null,
    public val licenseType: Output? = null,
    public val machineType: Output? = null,
    public val machineTypeSeries: Output? = null,
    public val metadata: Output>? = null,
    public val networkInterfaces: Output>? = null,
    public val networkTags: Output>? = null,
    public val secureBoot: Output? = null,
    public val serviceAccount: Output? = null,
    public val targetProject: Output? = null,
    public val vmName: Output? = null,
    public val zone: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.vmmigration.v1.inputs.ComputeEngineTargetDefaultsArgs =
        com.pulumi.googlenative.vmmigration.v1.inputs.ComputeEngineTargetDefaultsArgs.builder()
            .additionalLicenses(additionalLicenses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .computeScheduling(computeScheduling?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .diskType(diskType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .hostname(hostname?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .licenseType(licenseType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .machineType(machineType?.applyValue({ args0 -> args0 }))
            .machineTypeSeries(machineTypeSeries?.applyValue({ args0 -> args0 }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .networkInterfaces(
                networkInterfaces?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .networkTags(networkTags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .secureBoot(secureBoot?.applyValue({ args0 -> args0 }))
            .serviceAccount(serviceAccount?.applyValue({ args0 -> args0 }))
            .targetProject(targetProject?.applyValue({ args0 -> args0 }))
            .vmName(vmName?.applyValue({ args0 -> args0 }))
            .zone(zone?.applyValue({ args0 -> args0 })).build()
}

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

    private var computeScheduling: Output? = null

    private var diskType: Output? = null

    private var hostname: Output? = null

    private var labels: Output>? = null

    private var licenseType: Output? = null

    private var machineType: Output? = null

    private var machineTypeSeries: Output? = null

    private var metadata: Output>? = null

    private var networkInterfaces: Output>? = null

    private var networkTags: Output>? = null

    private var secureBoot: Output? = null

    private var serviceAccount: Output? = null

    private var targetProject: Output? = null

    private var vmName: Output? = null

    private var zone: Output? = null

    /**
     * @param value Additional licenses to assign to the VM.
     */
    @JvmName("jpfxhkajocrdlpxm")
    public suspend fun additionalLicenses(`value`: Output>) {
        this.additionalLicenses = value
    }

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

    /**
     * @param values Additional licenses to assign to the VM.
     */
    @JvmName("avpcurttxskakmnw")
    public suspend fun additionalLicenses(values: List>) {
        this.additionalLicenses = Output.all(values)
    }

    /**
     * @param value Compute instance scheduling information (if empty default is used).
     */
    @JvmName("wsmmkcfserpnvduo")
    public suspend fun computeScheduling(`value`: Output) {
        this.computeScheduling = value
    }

    /**
     * @param value The disk type to use in the VM.
     */
    @JvmName("csadcnkppbdjdxxa")
    public suspend fun diskType(`value`: Output) {
        this.diskType = value
    }

    /**
     * @param value The hostname to assign to the VM.
     */
    @JvmName("guriyycucrakpdev")
    public suspend fun hostname(`value`: Output) {
        this.hostname = value
    }

    /**
     * @param value A map of labels to associate with the VM.
     */
    @JvmName("cutkkchcnkalsyyp")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The license type to use in OS adaptation.
     */
    @JvmName("dvdckfcptupnymio")
    public suspend fun licenseType(`value`: Output) {
        this.licenseType = value
    }

    /**
     * @param value The machine type to create the VM with.
     */
    @JvmName("sssxqpxmlwhirbuv")
    public suspend fun machineType(`value`: Output) {
        this.machineType = value
    }

    /**
     * @param value The machine type series to create the VM with.
     */
    @JvmName("orfbjtvyycecfypq")
    public suspend fun machineTypeSeries(`value`: Output) {
        this.machineTypeSeries = value
    }

    /**
     * @param value The metadata key/value pairs to assign to the VM.
     */
    @JvmName("rtsicsqdjgxfvcyg")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value List of NICs connected to this VM.
     */
    @JvmName("shtocemkibihqmmt")
    public suspend fun networkInterfaces(`value`: Output>) {
        this.networkInterfaces = value
    }

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

    /**
     * @param values List of NICs connected to this VM.
     */
    @JvmName("lbhcidpebhofnnos")
    public suspend fun networkInterfaces(values: List>) {
        this.networkInterfaces = Output.all(values)
    }

    /**
     * @param value A map of network tags to associate with the VM.
     */
    @JvmName("xrxfavtwadmphvxa")
    public suspend fun networkTags(`value`: Output>) {
        this.networkTags = value
    }

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

    /**
     * @param values A map of network tags to associate with the VM.
     */
    @JvmName("cglftoorwofmkbuq")
    public suspend fun networkTags(values: List>) {
        this.networkTags = Output.all(values)
    }

    /**
     * @param value Defines whether the instance has Secure Boot enabled. This can be set to true only if the vm boot option is EFI.
     */
    @JvmName("wxvkokabiatvcwjl")
    public suspend fun secureBoot(`value`: Output) {
        this.secureBoot = value
    }

    /**
     * @param value The service account to associate the VM with.
     */
    @JvmName("qymnmegkrigktutd")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM.
     */
    @JvmName("afpkhhpgfqewouke")
    public suspend fun targetProject(`value`: Output) {
        this.targetProject = value
    }

    /**
     * @param value The name of the VM to create.
     */
    @JvmName("meecgcodsbfhteix")
    public suspend fun vmName(`value`: Output) {
        this.vmName = value
    }

    /**
     * @param value The zone in which to create the VM.
     */
    @JvmName("qgkqwdgiijhscbpu")
    public suspend fun zone(`value`: Output) {
        this.zone = value
    }

    /**
     * @param value Additional licenses to assign to the VM.
     */
    @JvmName("pgrnyletknlmyjto")
    public suspend fun additionalLicenses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalLicenses = mapped
    }

    /**
     * @param values Additional licenses to assign to the VM.
     */
    @JvmName("anskfupbpuvnagfc")
    public suspend fun additionalLicenses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalLicenses = mapped
    }

    /**
     * @param value Compute instance scheduling information (if empty default is used).
     */
    @JvmName("ybequhbpskmaxflx")
    public suspend fun computeScheduling(`value`: ComputeSchedulingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.computeScheduling = mapped
    }

    /**
     * @param argument Compute instance scheduling information (if empty default is used).
     */
    @JvmName("dwidveggqbgpsmsi")
    public suspend fun computeScheduling(argument: suspend ComputeSchedulingArgsBuilder.() -> Unit) {
        val toBeMapped = ComputeSchedulingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.computeScheduling = mapped
    }

    /**
     * @param value The disk type to use in the VM.
     */
    @JvmName("uugpvanwjqeaffnh")
    public suspend fun diskType(`value`: ComputeEngineTargetDefaultsDiskType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskType = mapped
    }

    /**
     * @param value The hostname to assign to the VM.
     */
    @JvmName("ndnlfiqlenvxubac")
    public suspend fun hostname(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hostname = mapped
    }

    /**
     * @param value A map of labels to associate with the VM.
     */
    @JvmName("nkefraaebgpixltw")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values A map of labels to associate with the VM.
     */
    @JvmName("gctjiwvfrfkpteyy")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The license type to use in OS adaptation.
     */
    @JvmName("vsyhtuptpsnfrgmf")
    public suspend fun licenseType(`value`: ComputeEngineTargetDefaultsLicenseType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenseType = mapped
    }

    /**
     * @param value The machine type to create the VM with.
     */
    @JvmName("tbhkjxxvmjtbruws")
    public suspend fun machineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineType = mapped
    }

    /**
     * @param value The machine type series to create the VM with.
     */
    @JvmName("dbgelmjnbhlgshch")
    public suspend fun machineTypeSeries(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineTypeSeries = mapped
    }

    /**
     * @param value The metadata key/value pairs to assign to the VM.
     */
    @JvmName("vwidrogblsedvdli")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values The metadata key/value pairs to assign to the VM.
     */
    @JvmName("rkowjbivxbshqljs")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value List of NICs connected to this VM.
     */
    @JvmName("upmutpdeflbvxyhh")
    public suspend fun networkInterfaces(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkInterfaces = mapped
    }

    /**
     * @param argument List of NICs connected to this VM.
     */
    @JvmName("qsukqvwnwxiuopmi")
    public suspend fun networkInterfaces(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            NetworkInterfaceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param argument List of NICs connected to this VM.
     */
    @JvmName("lpntbjsvgcfawedf")
    public suspend fun networkInterfaces(vararg argument: suspend NetworkInterfaceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            NetworkInterfaceArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param argument List of NICs connected to this VM.
     */
    @JvmName("avxvadohioouxfho")
    public suspend fun networkInterfaces(argument: suspend NetworkInterfaceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(NetworkInterfaceArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param values List of NICs connected to this VM.
     */
    @JvmName("uetmfhropqpeiskr")
    public suspend fun networkInterfaces(vararg values: NetworkInterfaceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networkInterfaces = mapped
    }

    /**
     * @param value A map of network tags to associate with the VM.
     */
    @JvmName("sgmjvhmhafqawcre")
    public suspend fun networkTags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkTags = mapped
    }

    /**
     * @param values A map of network tags to associate with the VM.
     */
    @JvmName("lcrsuernagnxdxoj")
    public suspend fun networkTags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networkTags = mapped
    }

    /**
     * @param value Defines whether the instance has Secure Boot enabled. This can be set to true only if the vm boot option is EFI.
     */
    @JvmName("hcpqcmeeendkctlu")
    public suspend fun secureBoot(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secureBoot = mapped
    }

    /**
     * @param value The service account to associate the VM with.
     */
    @JvmName("xpnxdidwhmyvjhtl")
    public suspend fun serviceAccount(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param value The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM.
     */
    @JvmName("syqayuaeyjkeumwg")
    public suspend fun targetProject(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetProject = mapped
    }

    /**
     * @param value The name of the VM to create.
     */
    @JvmName("edifwyupgvlbspbh")
    public suspend fun vmName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vmName = mapped
    }

    /**
     * @param value The zone in which to create the VM.
     */
    @JvmName("pjoswsysqmivqbro")
    public suspend fun zone(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.zone = mapped
    }

    internal fun build(): ComputeEngineTargetDefaultsArgs = ComputeEngineTargetDefaultsArgs(
        additionalLicenses = additionalLicenses,
        computeScheduling = computeScheduling,
        diskType = diskType,
        hostname = hostname,
        labels = labels,
        licenseType = licenseType,
        machineType = machineType,
        machineTypeSeries = machineTypeSeries,
        metadata = metadata,
        networkInterfaces = networkInterfaces,
        networkTags = networkTags,
        secureBoot = secureBoot,
        serviceAccount = serviceAccount,
        targetProject = targetProject,
        vmName = vmName,
        zone = zone,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy