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

com.pulumi.azurenative.devtestlab.kotlin.LabArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.devtestlab.kotlin

import com.pulumi.azurenative.devtestlab.LabArgs.builder
import com.pulumi.azurenative.devtestlab.kotlin.enums.EnvironmentPermission
import com.pulumi.azurenative.devtestlab.kotlin.enums.PremiumDataDisk
import com.pulumi.azurenative.devtestlab.kotlin.enums.StorageType
import com.pulumi.azurenative.devtestlab.kotlin.inputs.LabAnnouncementPropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.LabAnnouncementPropertiesArgsBuilder
import com.pulumi.azurenative.devtestlab.kotlin.inputs.LabSupportPropertiesArgs
import com.pulumi.azurenative.devtestlab.kotlin.inputs.LabSupportPropertiesArgsBuilder
import com.pulumi.core.Either
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A lab.
 * 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
 * ### Labs_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var lab = new AzureNative.DevTestLab.Lab("lab", new()
 *     {
 *         LabStorageType = "{Standard|Premium}",
 *         Location = "{location}",
 *         Name = "{labName}",
 *         ResourceGroupName = "resourceGroupName",
 *         Tags =
 *         {
 *             { "tagName1", "tagValue1" },
 *         },
 *     });
 * });
 * ```
 * ```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.NewLab(ctx, "lab", &devtestlab.LabArgs{
 * 			LabStorageType:    pulumi.String("{Standard|Premium}"),
 * 			Location:          pulumi.String("{location}"),
 * 			Name:              pulumi.String("{labName}"),
 * 			ResourceGroupName: pulumi.String("resourceGroupName"),
 * 			Tags: pulumi.StringMap{
 * 				"tagName1": pulumi.String("tagValue1"),
 * 			},
 * 		})
 * 		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.Lab;
 * import com.pulumi.azurenative.devtestlab.LabArgs;
 * 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 lab = new Lab("lab", LabArgs.builder()
 *             .labStorageType("{Standard|Premium}")
 *             .location("{location}")
 *             .name("{labName}")
 *             .resourceGroupName("resourceGroupName")
 *             .tags(Map.of("tagName1", "tagValue1"))
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:devtestlab:Lab {labName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{name}
 * ```
 * @property announcement The properties of any lab announcement associated with this lab
 * @property environmentPermission The access rights to be granted to the user when provisioning an environment
 * @property extendedProperties Extended properties of the lab used for experimental features
 * @property labStorageType Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
 * @property location The location of the resource.
 * @property mandatoryArtifactsResourceIdsLinux The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
 * @property mandatoryArtifactsResourceIdsWindows The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
 * @property name The name of the lab.
 * @property premiumDataDisks The setting to enable usage of premium data disks.
 * When its value is 'Enabled', creation of standard or premium data disks is allowed.
 * When its value is 'Disabled', only creation of standard data disks is allowed.
 * @property resourceGroupName The name of the resource group.
 * @property support The properties of any lab support message associated with this lab
 * @property tags The tags of the resource.
 */
public data class LabArgs(
    public val announcement: Output? = null,
    public val environmentPermission: Output>? = null,
    public val extendedProperties: Output>? = null,
    public val labStorageType: Output>? = null,
    public val location: Output? = null,
    public val mandatoryArtifactsResourceIdsLinux: Output>? = null,
    public val mandatoryArtifactsResourceIdsWindows: Output>? = null,
    public val name: Output? = null,
    public val premiumDataDisks: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val support: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devtestlab.LabArgs =
        com.pulumi.azurenative.devtestlab.LabArgs.builder()
            .announcement(announcement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .environmentPermission(
                environmentPermission?.applyValue({ args0 ->
                    args0.transform({ args0 ->
                        args0
                    }, { args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .extendedProperties(
                extendedProperties?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .labStorageType(
                labStorageType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .mandatoryArtifactsResourceIdsLinux(
                mandatoryArtifactsResourceIdsLinux?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .mandatoryArtifactsResourceIdsWindows(
                mandatoryArtifactsResourceIdsWindows?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .premiumDataDisks(
                premiumDataDisks?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .support(support?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [LabArgs].
 */
@PulumiTagMarker
public class LabArgsBuilder internal constructor() {
    private var announcement: Output? = null

    private var environmentPermission: Output>? = null

    private var extendedProperties: Output>? = null

    private var labStorageType: Output>? = null

    private var location: Output? = null

    private var mandatoryArtifactsResourceIdsLinux: Output>? = null

    private var mandatoryArtifactsResourceIdsWindows: Output>? = null

    private var name: Output? = null

    private var premiumDataDisks: Output>? = null

    private var resourceGroupName: Output? = null

    private var support: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The properties of any lab announcement associated with this lab
     */
    @JvmName("jxdrrdovylspvyag")
    public suspend fun announcement(`value`: Output) {
        this.announcement = value
    }

    /**
     * @param value The access rights to be granted to the user when provisioning an environment
     */
    @JvmName("kpipmumntsiwuohl")
    public suspend fun environmentPermission(`value`: Output>) {
        this.environmentPermission = value
    }

    /**
     * @param value Extended properties of the lab used for experimental features
     */
    @JvmName("speebhbnfkfesbkr")
    public suspend fun extendedProperties(`value`: Output>) {
        this.extendedProperties = value
    }

    /**
     * @param value Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
     */
    @JvmName("jivjkpsfrjnvdgjg")
    public suspend fun labStorageType(`value`: Output>) {
        this.labStorageType = value
    }

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

    /**
     * @param value The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("ypunevlrxofjtxap")
    public suspend fun mandatoryArtifactsResourceIdsLinux(`value`: Output>) {
        this.mandatoryArtifactsResourceIdsLinux = value
    }

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

    /**
     * @param values The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("whpixupbxdixqrvd")
    public suspend fun mandatoryArtifactsResourceIdsLinux(values: List>) {
        this.mandatoryArtifactsResourceIdsLinux = Output.all(values)
    }

    /**
     * @param value The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("ddemgkgogklnwduc")
    public suspend fun mandatoryArtifactsResourceIdsWindows(`value`: Output>) {
        this.mandatoryArtifactsResourceIdsWindows = value
    }

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

    /**
     * @param values The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("trnsnmmrctrgiuio")
    public suspend fun mandatoryArtifactsResourceIdsWindows(values: List>) {
        this.mandatoryArtifactsResourceIdsWindows = Output.all(values)
    }

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

    /**
     * @param value The setting to enable usage of premium data disks.
     * When its value is 'Enabled', creation of standard or premium data disks is allowed.
     * When its value is 'Disabled', only creation of standard data disks is allowed.
     */
    @JvmName("mciaitqjdcblelpb")
    public suspend fun premiumDataDisks(`value`: Output>) {
        this.premiumDataDisks = value
    }

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

    /**
     * @param value The properties of any lab support message associated with this lab
     */
    @JvmName("bavjourfuawcvmrf")
    public suspend fun support(`value`: Output) {
        this.support = value
    }

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

    /**
     * @param value The properties of any lab announcement associated with this lab
     */
    @JvmName("rdavklvrpbopabap")
    public suspend fun announcement(`value`: LabAnnouncementPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.announcement = mapped
    }

    /**
     * @param argument The properties of any lab announcement associated with this lab
     */
    @JvmName("krdwilbnohqbxrbq")
    public suspend fun announcement(argument: suspend LabAnnouncementPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = LabAnnouncementPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.announcement = mapped
    }

    /**
     * @param value The access rights to be granted to the user when provisioning an environment
     */
    @JvmName("stfbaxhnjukvreju")
    public suspend fun environmentPermission(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentPermission = mapped
    }

    /**
     * @param value The access rights to be granted to the user when provisioning an environment
     */
    @JvmName("eoubxxnwhobijnhb")
    public fun environmentPermission(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentPermission = mapped
    }

    /**
     * @param value The access rights to be granted to the user when provisioning an environment
     */
    @JvmName("khboovinalgdxkxi")
    public fun environmentPermission(`value`: EnvironmentPermission) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentPermission = mapped
    }

    /**
     * @param value Extended properties of the lab used for experimental features
     */
    @JvmName("wcvxktmxolcsqytj")
    public suspend fun extendedProperties(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedProperties = mapped
    }

    /**
     * @param values Extended properties of the lab used for experimental features
     */
    @JvmName("xbfcyfkdoiextamp")
    public fun extendedProperties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.extendedProperties = mapped
    }

    /**
     * @param value Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
     */
    @JvmName("bfsgwmphahjtyjtq")
    public suspend fun labStorageType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labStorageType = mapped
    }

    /**
     * @param value Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
     */
    @JvmName("gchfulgpjphywlxd")
    public fun labStorageType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labStorageType = mapped
    }

    /**
     * @param value Type of storage used by the lab. It can be either Premium or Standard. Default is Premium.
     */
    @JvmName("ysaevatcedaxxgey")
    public fun labStorageType(`value`: StorageType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labStorageType = mapped
    }

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

    /**
     * @param value The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("effcirmxiwigwedo")
    public suspend fun mandatoryArtifactsResourceIdsLinux(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mandatoryArtifactsResourceIdsLinux = mapped
    }

    /**
     * @param values The ordered list of artifact resource IDs that should be applied on all Linux VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("mksjgwioriuecwmy")
    public suspend fun mandatoryArtifactsResourceIdsLinux(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mandatoryArtifactsResourceIdsLinux = mapped
    }

    /**
     * @param value The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("folyvvfvkorxcohx")
    public suspend fun mandatoryArtifactsResourceIdsWindows(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mandatoryArtifactsResourceIdsWindows = mapped
    }

    /**
     * @param values The ordered list of artifact resource IDs that should be applied on all Windows VM creations by default, prior to the artifacts specified by the user.
     */
    @JvmName("iytthqmjadfkeuyi")
    public suspend fun mandatoryArtifactsResourceIdsWindows(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mandatoryArtifactsResourceIdsWindows = mapped
    }

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

    /**
     * @param value The setting to enable usage of premium data disks.
     * When its value is 'Enabled', creation of standard or premium data disks is allowed.
     * When its value is 'Disabled', only creation of standard data disks is allowed.
     */
    @JvmName("hlmffjqqwiunpjec")
    public suspend fun premiumDataDisks(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.premiumDataDisks = mapped
    }

    /**
     * @param value The setting to enable usage of premium data disks.
     * When its value is 'Enabled', creation of standard or premium data disks is allowed.
     * When its value is 'Disabled', only creation of standard data disks is allowed.
     */
    @JvmName("wmduhygbihpbpect")
    public fun premiumDataDisks(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.premiumDataDisks = mapped
    }

    /**
     * @param value The setting to enable usage of premium data disks.
     * When its value is 'Enabled', creation of standard or premium data disks is allowed.
     * When its value is 'Disabled', only creation of standard data disks is allowed.
     */
    @JvmName("xbngbblhmaxgwchd")
    public fun premiumDataDisks(`value`: PremiumDataDisk) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.premiumDataDisks = mapped
    }

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

    /**
     * @param value The properties of any lab support message associated with this lab
     */
    @JvmName("qccojyrkshjghmst")
    public suspend fun support(`value`: LabSupportPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.support = mapped
    }

    /**
     * @param argument The properties of any lab support message associated with this lab
     */
    @JvmName("toyxtwvnaopumvbc")
    public suspend fun support(argument: suspend LabSupportPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = LabSupportPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.support = mapped
    }

    /**
     * @param value The tags of the resource.
     */
    @JvmName("tpnytlrlsjetfjsj")
    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("oqemvwmnhuwtvirb")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): LabArgs = LabArgs(
        announcement = announcement,
        environmentPermission = environmentPermission,
        extendedProperties = extendedProperties,
        labStorageType = labStorageType,
        location = location,
        mandatoryArtifactsResourceIdsLinux = mandatoryArtifactsResourceIdsLinux,
        mandatoryArtifactsResourceIdsWindows = mandatoryArtifactsResourceIdsWindows,
        name = name,
        premiumDataDisks = premiumDataDisks,
        resourceGroupName = resourceGroupName,
        support = support,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy