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

com.pulumi.azurenative.devtestlab.kotlin.VirtualMachineArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.devtestlab.kotlin

import com.pulumi.azurenative.devtestlab.VirtualMachineArgs.builder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ArtifactInstallPropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ArtifactInstallPropertiesArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.DataDiskPropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.DataDiskPropertiesArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.GalleryImageReferenceArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.GalleryImageReferenceArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.NetworkInterfacePropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.NetworkInterfacePropertiesArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ScheduleCreationParameterArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.ScheduleCreationParameterArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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

/**
 * A virtual machine.
 * Azure REST API version: 2018-09-15. Prior API version in Azure Native 1.x: 2018-09-15.
 * Other available API versions: 2016-05-15.
 * ## Example Usage
 * ### VirtualMachines_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualMachine = new AzureNative.DevTestLab.VirtualMachine("virtualMachine", new()
 *     {
 *         AllowClaim = true,
 *         DisallowPublicIpAddress = true,
 *         GalleryImageReference = new AzureNative.DevTestLab.Inputs.GalleryImageReferenceArgs
 *         {
 *             Offer = "UbuntuServer",
 *             OsType = "Linux",
 *             Publisher = "Canonical",
 *             Sku = "16.04-LTS",
 *             Version = "Latest",
 *         },
 *         LabName = "{labName}",
 *         LabSubnetName = "{virtualNetworkName}Subnet",
 *         LabVirtualNetworkId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}",
 *         Location = "{location}",
 *         Name = "{vmName}",
 *         Password = "{userPassword}",
 *         ResourceGroupName = "resourceGroupName",
 *         Size = "Standard_A2_v2",
 *         StorageType = "Standard",
 *         Tags =
 *         {
 *             { "tagName1", "tagValue1" },
 *         },
 *         UserName = "{userName}",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := devtestlab.NewVirtualMachine(ctx, "virtualMachine", &devtestlab.VirtualMachineArgs{
 * 			AllowClaim:              pulumi.Bool(true),
 * 			DisallowPublicIpAddress: pulumi.Bool(true),
 * 			GalleryImageReference: &devtestlab.GalleryImageReferenceArgs{
 * 				Offer:     pulumi.String("UbuntuServer"),
 * 				OsType:    pulumi.String("Linux"),
 * 				Publisher: pulumi.String("Canonical"),
 * 				Sku:       pulumi.String("16.04-LTS"),
 * 				Version:   pulumi.String("Latest"),
 * 			},
 * 			LabName:             pulumi.String("{labName}"),
 * 			LabSubnetName:       pulumi.String("{virtualNetworkName}Subnet"),
 * 			LabVirtualNetworkId: pulumi.String("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}"),
 * 			Location:            pulumi.String("{location}"),
 * 			Name:                pulumi.String("{vmName}"),
 * 			Password:            pulumi.String("{userPassword}"),
 * 			ResourceGroupName:   pulumi.String("resourceGroupName"),
 * 			Size:                pulumi.String("Standard_A2_v2"),
 * 			StorageType:         pulumi.String("Standard"),
 * 			Tags: pulumi.StringMap{
 * 				"tagName1": pulumi.String("tagValue1"),
 * 			},
 * 			UserName: pulumi.String("{userName}"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.devtestlab.VirtualMachine;
 * import com.pulumi.azurenative.devtestlab.VirtualMachineArgs;
 * import com.pulumi.azurenative.devtestlab.inputs.GalleryImageReferenceArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var virtualMachine = new VirtualMachine("virtualMachine", VirtualMachineArgs.builder()
 *             .allowClaim(true)
 *             .disallowPublicIpAddress(true)
 *             .galleryImageReference(GalleryImageReferenceArgs.builder()
 *                 .offer("UbuntuServer")
 *                 .osType("Linux")
 *                 .publisher("Canonical")
 *                 .sku("16.04-LTS")
 *                 .version("Latest")
 *                 .build())
 *             .labName("{labName}")
 *             .labSubnetName("{virtualNetworkName}Subnet")
 *             .labVirtualNetworkId("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}")
 *             .location("{location}")
 *             .name("{vmName}")
 *             .password("{userPassword}")
 *             .resourceGroupName("resourceGroupName")
 *             .size("Standard_A2_v2")
 *             .storageType("Standard")
 *             .tags(Map.of("tagName1", "tagValue1"))
 *             .userName("{userName}")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:devtestlab:VirtualMachine {vmName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}
 * ```
 * @property allowClaim Indicates whether another user can take ownership of the virtual machine
 * @property artifacts The artifacts to be installed on the virtual machine.
 * @property createdDate The creation date of the virtual machine.
 * @property customImageId The custom image identifier of the virtual machine.
 * @property dataDiskParameters New or existing data disks to attach to the virtual machine after creation
 * @property disallowPublicIpAddress Indicates whether the virtual machine is to be created without a public IP address.
 * @property environmentId The resource ID of the environment that contains this virtual machine, if any.
 * @property expirationDate The expiration date for VM.
 * @property galleryImageReference The Microsoft Azure Marketplace image reference of the virtual machine.
 * @property isAuthenticationWithSshKey Indicates whether this virtual machine uses an SSH key for authentication.
 * @property labName The name of the lab.
 * @property labSubnetName The lab subnet name of the virtual machine.
 * @property labVirtualNetworkId The lab virtual network identifier of the virtual machine.
 * @property location The location of the resource.
 * @property name The name of the virtual machine.
 * @property networkInterface The network interface properties.
 * @property notes The notes of the virtual machine.
 * @property ownerObjectId The object identifier of the owner of the virtual machine.
 * @property ownerUserPrincipalName The user principal name of the virtual machine owner.
 * @property password The password of the virtual machine administrator.
 * @property planId The id of the plan associated with the virtual machine image
 * @property resourceGroupName The name of the resource group.
 * @property scheduleParameters Virtual Machine schedules to be created
 * @property size The size of the virtual machine.
 * @property sshKey The SSH key of the virtual machine administrator.
 * @property storageType Storage type to use for virtual machine (i.e. Standard, Premium).
 * @property tags The tags of the resource.
 * @property userName The user name of the virtual machine.
 */
public data class VirtualMachineArgs(
    public val allowClaim: Output? = null,
    public val artifacts: Output>? = null,
    public val createdDate: Output? = null,
    public val customImageId: Output? = null,
    public val dataDiskParameters: Output>? = null,
    public val disallowPublicIpAddress: Output? = null,
    public val environmentId: Output? = null,
    public val expirationDate: Output? = null,
    public val galleryImageReference: Output? = null,
    public val isAuthenticationWithSshKey: Output? = null,
    public val labName: Output? = null,
    public val labSubnetName: Output? = null,
    public val labVirtualNetworkId: Output? = null,
    public val location: Output? = null,
    public val name: Output? = null,
    public val networkInterface: Output? = null,
    public val notes: Output? = null,
    public val ownerObjectId: Output? = null,
    public val ownerUserPrincipalName: Output? = null,
    public val password: Output? = null,
    public val planId: Output? = null,
    public val resourceGroupName: Output? = null,
    public val scheduleParameters: Output>? = null,
    public val size: Output? = null,
    public val sshKey: Output? = null,
    public val storageType: Output? = null,
    public val tags: Output>? = null,
    public val userName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devtestlab.VirtualMachineArgs =
        com.pulumi.azurenative.devtestlab.VirtualMachineArgs.builder()
            .allowClaim(allowClaim?.applyValue({ args0 -> args0 }))
            .artifacts(
                artifacts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .createdDate(createdDate?.applyValue({ args0 -> args0 }))
            .customImageId(customImageId?.applyValue({ args0 -> args0 }))
            .dataDiskParameters(
                dataDiskParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .disallowPublicIpAddress(disallowPublicIpAddress?.applyValue({ args0 -> args0 }))
            .environmentId(environmentId?.applyValue({ args0 -> args0 }))
            .expirationDate(expirationDate?.applyValue({ args0 -> args0 }))
            .galleryImageReference(
                galleryImageReference?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .isAuthenticationWithSshKey(isAuthenticationWithSshKey?.applyValue({ args0 -> args0 }))
            .labName(labName?.applyValue({ args0 -> args0 }))
            .labSubnetName(labSubnetName?.applyValue({ args0 -> args0 }))
            .labVirtualNetworkId(labVirtualNetworkId?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .networkInterface(networkInterface?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .notes(notes?.applyValue({ args0 -> args0 }))
            .ownerObjectId(ownerObjectId?.applyValue({ args0 -> args0 }))
            .ownerUserPrincipalName(ownerUserPrincipalName?.applyValue({ args0 -> args0 }))
            .password(password?.applyValue({ args0 -> args0 }))
            .planId(planId?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .scheduleParameters(
                scheduleParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .size(size?.applyValue({ args0 -> args0 }))
            .sshKey(sshKey?.applyValue({ args0 -> args0 }))
            .storageType(storageType?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .userName(userName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VirtualMachineArgs].
 */
@PulumiTagMarker
public class VirtualMachineArgsBuilder internal constructor() {
    private var allowClaim: Output? = null

    private var artifacts: Output>? = null

    private var createdDate: Output? = null

    private var customImageId: Output? = null

    private var dataDiskParameters: Output>? = null

    private var disallowPublicIpAddress: Output? = null

    private var environmentId: Output? = null

    private var expirationDate: Output? = null

    private var galleryImageReference: Output? = null

    private var isAuthenticationWithSshKey: Output? = null

    private var labName: Output? = null

    private var labSubnetName: Output? = null

    private var labVirtualNetworkId: Output? = null

    private var location: Output? = null

    private var name: Output? = null

    private var networkInterface: Output? = null

    private var notes: Output? = null

    private var ownerObjectId: Output? = null

    private var ownerUserPrincipalName: Output? = null

    private var password: Output? = null

    private var planId: Output? = null

    private var resourceGroupName: Output? = null

    private var scheduleParameters: Output>? = null

    private var size: Output? = null

    private var sshKey: Output? = null

    private var storageType: Output? = null

    private var tags: Output>? = null

    private var userName: Output? = null

    /**
     * @param value Indicates whether another user can take ownership of the virtual machine
     */
    @JvmName("xdbjbeukrniiigiy")
    public suspend fun allowClaim(`value`: Output) {
        this.allowClaim = value
    }

    /**
     * @param value The artifacts to be installed on the virtual machine.
     */
    @JvmName("qbsqiariqfxbdmyl")
    public suspend fun artifacts(`value`: Output>) {
        this.artifacts = value
    }

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

    /**
     * @param values The artifacts to be installed on the virtual machine.
     */
    @JvmName("yvuavedbuvoffiew")
    public suspend fun artifacts(values: List>) {
        this.artifacts = Output.all(values)
    }

    /**
     * @param value The creation date of the virtual machine.
     */
    @JvmName("upgrnkurukuaxxkn")
    public suspend fun createdDate(`value`: Output) {
        this.createdDate = value
    }

    /**
     * @param value The custom image identifier of the virtual machine.
     */
    @JvmName("lmsewlqoymcdqdaf")
    public suspend fun customImageId(`value`: Output) {
        this.customImageId = value
    }

    /**
     * @param value New or existing data disks to attach to the virtual machine after creation
     */
    @JvmName("ulvnkugxfwhgkkme")
    public suspend fun dataDiskParameters(`value`: Output>) {
        this.dataDiskParameters = value
    }

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

    /**
     * @param values New or existing data disks to attach to the virtual machine after creation
     */
    @JvmName("yghnjxlsiysgawqi")
    public suspend fun dataDiskParameters(values: List>) {
        this.dataDiskParameters = Output.all(values)
    }

    /**
     * @param value Indicates whether the virtual machine is to be created without a public IP address.
     */
    @JvmName("fxoylpfgifsptxqi")
    public suspend fun disallowPublicIpAddress(`value`: Output) {
        this.disallowPublicIpAddress = value
    }

    /**
     * @param value The resource ID of the environment that contains this virtual machine, if any.
     */
    @JvmName("sjeafrttgcqgrnav")
    public suspend fun environmentId(`value`: Output) {
        this.environmentId = value
    }

    /**
     * @param value The expiration date for VM.
     */
    @JvmName("tklwtfgsvecjalnn")
    public suspend fun expirationDate(`value`: Output) {
        this.expirationDate = value
    }

    /**
     * @param value The Microsoft Azure Marketplace image reference of the virtual machine.
     */
    @JvmName("vyvprwbyqfiyqwsq")
    public suspend fun galleryImageReference(`value`: Output) {
        this.galleryImageReference = value
    }

    /**
     * @param value Indicates whether this virtual machine uses an SSH key for authentication.
     */
    @JvmName("kvaiiuraluwbleri")
    public suspend fun isAuthenticationWithSshKey(`value`: Output) {
        this.isAuthenticationWithSshKey = value
    }

    /**
     * @param value The name of the lab.
     */
    @JvmName("varxkvtrirxyqblh")
    public suspend fun labName(`value`: Output) {
        this.labName = value
    }

    /**
     * @param value The lab subnet name of the virtual machine.
     */
    @JvmName("vfjnglsorwdcbfoh")
    public suspend fun labSubnetName(`value`: Output) {
        this.labSubnetName = value
    }

    /**
     * @param value The lab virtual network identifier of the virtual machine.
     */
    @JvmName("nkhvaaslbhjrheul")
    public suspend fun labVirtualNetworkId(`value`: Output) {
        this.labVirtualNetworkId = value
    }

    /**
     * @param value The location of the resource.
     */
    @JvmName("fyiqcfeglxthftcg")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name of the virtual machine.
     */
    @JvmName("kltpkwqjmpbighqd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The network interface properties.
     */
    @JvmName("puxwjhitahlmbisk")
    public suspend fun networkInterface(`value`: Output) {
        this.networkInterface = value
    }

    /**
     * @param value The notes of the virtual machine.
     */
    @JvmName("sgckulgunpcuqjnv")
    public suspend fun notes(`value`: Output) {
        this.notes = value
    }

    /**
     * @param value The object identifier of the owner of the virtual machine.
     */
    @JvmName("kknctrmtluogmspr")
    public suspend fun ownerObjectId(`value`: Output) {
        this.ownerObjectId = value
    }

    /**
     * @param value The user principal name of the virtual machine owner.
     */
    @JvmName("oyqhvonghysqwpwh")
    public suspend fun ownerUserPrincipalName(`value`: Output) {
        this.ownerUserPrincipalName = value
    }

    /**
     * @param value The password of the virtual machine administrator.
     */
    @JvmName("rbbojkdcginwrqrc")
    public suspend fun password(`value`: Output) {
        this.password = value
    }

    /**
     * @param value The id of the plan associated with the virtual machine image
     */
    @JvmName("dybjldjmmawulfci")
    public suspend fun planId(`value`: Output) {
        this.planId = value
    }

    /**
     * @param value The name of the resource group.
     */
    @JvmName("afmuuwwkewblemqn")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Virtual Machine schedules to be created
     */
    @JvmName("tqthsmgkwrblkahm")
    public suspend fun scheduleParameters(`value`: Output>) {
        this.scheduleParameters = value
    }

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

    /**
     * @param values Virtual Machine schedules to be created
     */
    @JvmName("ulgeepjnfrlfybwv")
    public suspend fun scheduleParameters(values: List>) {
        this.scheduleParameters = Output.all(values)
    }

    /**
     * @param value The size of the virtual machine.
     */
    @JvmName("ncknmgwxrmnysymr")
    public suspend fun size(`value`: Output) {
        this.size = value
    }

    /**
     * @param value The SSH key of the virtual machine administrator.
     */
    @JvmName("encsfknbjhhqirvn")
    public suspend fun sshKey(`value`: Output) {
        this.sshKey = value
    }

    /**
     * @param value Storage type to use for virtual machine (i.e. Standard, Premium).
     */
    @JvmName("ytcjaftuhnrccwtk")
    public suspend fun storageType(`value`: Output) {
        this.storageType = value
    }

    /**
     * @param value The tags of the resource.
     */
    @JvmName("qnuxijaotqthhloh")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The user name of the virtual machine.
     */
    @JvmName("yjmljqemvtxvvqyu")
    public suspend fun userName(`value`: Output) {
        this.userName = value
    }

    /**
     * @param value Indicates whether another user can take ownership of the virtual machine
     */
    @JvmName("ekvssiyharasjdef")
    public suspend fun allowClaim(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowClaim = mapped
    }

    /**
     * @param value The artifacts to be installed on the virtual machine.
     */
    @JvmName("lyrwofcxejgtnyhk")
    public suspend fun artifacts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.artifacts = mapped
    }

    /**
     * @param argument The artifacts to be installed on the virtual machine.
     */
    @JvmName("yptgxjfrkhkdhecb")
    public suspend fun artifacts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ArtifactInstallPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.artifacts = mapped
    }

    /**
     * @param argument The artifacts to be installed on the virtual machine.
     */
    @JvmName("sonjqvbklhxbttae")
    public suspend fun artifacts(vararg argument: suspend ArtifactInstallPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ArtifactInstallPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.artifacts = mapped
    }

    /**
     * @param argument The artifacts to be installed on the virtual machine.
     */
    @JvmName("rdjajsililsoqgal")
    public suspend fun artifacts(argument: suspend ArtifactInstallPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ArtifactInstallPropertiesArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.artifacts = mapped
    }

    /**
     * @param values The artifacts to be installed on the virtual machine.
     */
    @JvmName("wbmkjciiovdrsnlr")
    public suspend fun artifacts(vararg values: ArtifactInstallPropertiesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.artifacts = mapped
    }

    /**
     * @param value The creation date of the virtual machine.
     */
    @JvmName("cmuukgkmgxjwcoir")
    public suspend fun createdDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createdDate = mapped
    }

    /**
     * @param value The custom image identifier of the virtual machine.
     */
    @JvmName("cioughfunvdggqyu")
    public suspend fun customImageId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customImageId = mapped
    }

    /**
     * @param value New or existing data disks to attach to the virtual machine after creation
     */
    @JvmName("mepkgfqkafrylhmn")
    public suspend fun dataDiskParameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataDiskParameters = mapped
    }

    /**
     * @param argument New or existing data disks to attach to the virtual machine after creation
     */
    @JvmName("nnivkrnhvswbqirw")
    public suspend fun dataDiskParameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DataDiskPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dataDiskParameters = mapped
    }

    /**
     * @param argument New or existing data disks to attach to the virtual machine after creation
     */
    @JvmName("flfjcsmiqlogxmyd")
    public suspend fun dataDiskParameters(vararg argument: suspend DataDiskPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DataDiskPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dataDiskParameters = mapped
    }

    /**
     * @param argument New or existing data disks to attach to the virtual machine after creation
     */
    @JvmName("tdataumcwmevjsop")
    public suspend fun dataDiskParameters(argument: suspend DataDiskPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DataDiskPropertiesArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.dataDiskParameters = mapped
    }

    /**
     * @param values New or existing data disks to attach to the virtual machine after creation
     */
    @JvmName("fqoomouengeqbrip")
    public suspend fun dataDiskParameters(vararg values: DataDiskPropertiesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dataDiskParameters = mapped
    }

    /**
     * @param value Indicates whether the virtual machine is to be created without a public IP address.
     */
    @JvmName("hrodegcnbhnvvdik")
    public suspend fun disallowPublicIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disallowPublicIpAddress = mapped
    }

    /**
     * @param value The resource ID of the environment that contains this virtual machine, if any.
     */
    @JvmName("nwxeistsmhalaaoq")
    public suspend fun environmentId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentId = mapped
    }

    /**
     * @param value The expiration date for VM.
     */
    @JvmName("kvudjdmxtoxdkprf")
    public suspend fun expirationDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expirationDate = mapped
    }

    /**
     * @param value The Microsoft Azure Marketplace image reference of the virtual machine.
     */
    @JvmName("eaftfddwjnusbctn")
    public suspend fun galleryImageReference(`value`: GalleryImageReferenceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.galleryImageReference = mapped
    }

    /**
     * @param argument The Microsoft Azure Marketplace image reference of the virtual machine.
     */
    @JvmName("lpweuhaxudypvsqs")
    public suspend fun galleryImageReference(argument: suspend GalleryImageReferenceArgsBuilder.() -> Unit) {
        val toBeMapped = GalleryImageReferenceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.galleryImageReference = mapped
    }

    /**
     * @param value Indicates whether this virtual machine uses an SSH key for authentication.
     */
    @JvmName("knibsxiqyidsjbmi")
    public suspend fun isAuthenticationWithSshKey(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isAuthenticationWithSshKey = mapped
    }

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

    /**
     * @param value The lab subnet name of the virtual machine.
     */
    @JvmName("hgoruxlctteypcxy")
    public suspend fun labSubnetName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labSubnetName = mapped
    }

    /**
     * @param value The lab virtual network identifier of the virtual machine.
     */
    @JvmName("dlgvyycchsculmnr")
    public suspend fun labVirtualNetworkId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labVirtualNetworkId = mapped
    }

    /**
     * @param value The location of the resource.
     */
    @JvmName("noihshsfuavqtyvw")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

    /**
     * @param value The network interface properties.
     */
    @JvmName("oognxwkyljnfcdyk")
    public suspend fun networkInterface(`value`: NetworkInterfacePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkInterface = mapped
    }

    /**
     * @param argument The network interface properties.
     */
    @JvmName("vrxyxyvgwteitnpg")
    public suspend fun networkInterface(argument: suspend NetworkInterfacePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = NetworkInterfacePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkInterface = mapped
    }

    /**
     * @param value The notes of the virtual machine.
     */
    @JvmName("jhugmpxymmenumql")
    public suspend fun notes(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notes = mapped
    }

    /**
     * @param value The object identifier of the owner of the virtual machine.
     */
    @JvmName("ileluvwpmwpabncj")
    public suspend fun ownerObjectId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ownerObjectId = mapped
    }

    /**
     * @param value The user principal name of the virtual machine owner.
     */
    @JvmName("udkbmuduglypcxvo")
    public suspend fun ownerUserPrincipalName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ownerUserPrincipalName = mapped
    }

    /**
     * @param value The password of the virtual machine administrator.
     */
    @JvmName("rcrchsylhaiwhgpk")
    public suspend fun password(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.password = mapped
    }

    /**
     * @param value The id of the plan associated with the virtual machine image
     */
    @JvmName("toldtcffuivgdjkc")
    public suspend fun planId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.planId = mapped
    }

    /**
     * @param value The name of the resource group.
     */
    @JvmName("lrdysakepstkpfln")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Virtual Machine schedules to be created
     */
    @JvmName("usmbqabwgdpaewoq")
    public suspend fun scheduleParameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scheduleParameters = mapped
    }

    /**
     * @param argument Virtual Machine schedules to be created
     */
    @JvmName("fthmdonmmugqqucr")
    public suspend fun scheduleParameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ScheduleCreationParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.scheduleParameters = mapped
    }

    /**
     * @param argument Virtual Machine schedules to be created
     */
    @JvmName("alammccqfxqfcdpw")
    public suspend fun scheduleParameters(vararg argument: suspend ScheduleCreationParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ScheduleCreationParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.scheduleParameters = mapped
    }

    /**
     * @param argument Virtual Machine schedules to be created
     */
    @JvmName("omndxifwtopeqpnl")
    public suspend fun scheduleParameters(argument: suspend ScheduleCreationParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ScheduleCreationParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.scheduleParameters = mapped
    }

    /**
     * @param values Virtual Machine schedules to be created
     */
    @JvmName("qufxeoicnnxxelcy")
    public suspend fun scheduleParameters(vararg values: ScheduleCreationParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scheduleParameters = mapped
    }

    /**
     * @param value The size of the virtual machine.
     */
    @JvmName("phlvvydngqovgxmx")
    public suspend fun size(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.size = mapped
    }

    /**
     * @param value The SSH key of the virtual machine administrator.
     */
    @JvmName("jynppitlctskwasg")
    public suspend fun sshKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sshKey = mapped
    }

    /**
     * @param value Storage type to use for virtual machine (i.e. Standard, Premium).
     */
    @JvmName("sajkrndjldfocyxx")
    public suspend fun storageType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageType = mapped
    }

    /**
     * @param value The tags of the resource.
     */
    @JvmName("lthvjirgkdpufblx")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The tags of the resource.
     */
    @JvmName("qehajvjweuxjyask")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The user name of the virtual machine.
     */
    @JvmName("qpefmktmtriloayk")
    public suspend fun userName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userName = mapped
    }

    internal fun build(): VirtualMachineArgs = VirtualMachineArgs(
        allowClaim = allowClaim,
        artifacts = artifacts,
        createdDate = createdDate,
        customImageId = customImageId,
        dataDiskParameters = dataDiskParameters,
        disallowPublicIpAddress = disallowPublicIpAddress,
        environmentId = environmentId,
        expirationDate = expirationDate,
        galleryImageReference = galleryImageReference,
        isAuthenticationWithSshKey = isAuthenticationWithSshKey,
        labName = labName,
        labSubnetName = labSubnetName,
        labVirtualNetworkId = labVirtualNetworkId,
        location = location,
        name = name,
        networkInterface = networkInterface,
        notes = notes,
        ownerObjectId = ownerObjectId,
        ownerUserPrincipalName = ownerUserPrincipalName,
        password = password,
        planId = planId,
        resourceGroupName = resourceGroupName,
        scheduleParameters = scheduleParameters,
        size = size,
        sshKey = sshKey,
        storageType = storageType,
        tags = tags,
        userName = userName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy