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

com.pulumi.azurenative.botservice.kotlin.BotArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.botservice.kotlin

import com.pulumi.azurenative.botservice.BotArgs.builder
import com.pulumi.azurenative.botservice.kotlin.enums.Kind
import com.pulumi.azurenative.botservice.kotlin.inputs.BotPropertiesArgs
import com.pulumi.azurenative.botservice.kotlin.inputs.BotPropertiesArgsBuilder
import com.pulumi.azurenative.botservice.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.botservice.kotlin.inputs.SkuArgsBuilder
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.Map
import kotlin.jvm.JvmName

/**
 * Bot resource definition
 * Azure REST API version: 2022-09-15. Prior API version in Azure Native 1.x: 2021-03-01.
 * Other available API versions: 2023-09-15-preview.
 * ## Example Usage
 * ### Create Bot
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var bot = new AzureNative.BotService.Bot("bot", new()
 *     {
 *         Kind = AzureNative.BotService.Kind.Sdk,
 *         Location = "West US",
 *         Properties = new AzureNative.BotService.Inputs.BotPropertiesArgs
 *         {
 *             CmekKeyVaultUrl = "https://myCmekKey",
 *             Description = "The description of the bot",
 *             DeveloperAppInsightKey = "appinsightskey",
 *             DeveloperAppInsightsApiKey = "appinsightsapikey",
 *             DeveloperAppInsightsApplicationId = "appinsightsappid",
 *             DisableLocalAuth = true,
 *             DisplayName = "The Name of the bot",
 *             Endpoint = "http://mybot.coffee",
 *             IconUrl = "http://myicon",
 *             IsCmekEnabled = true,
 *             LuisAppIds = new[]
 *             {
 *                 "luisappid1",
 *                 "luisappid2",
 *             },
 *             LuisKey = "luiskey",
 *             MsaAppId = "exampleappid",
 *             MsaAppMSIResourceId = "/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId",
 *             MsaAppTenantId = "exampleapptenantid",
 *             MsaAppType = AzureNative.BotService.MsaAppType.UserAssignedMSI,
 *             PublicNetworkAccess = AzureNative.BotService.PublicNetworkAccess.Enabled,
 *             SchemaTransformationVersion = "1.0",
 *         },
 *         ResourceGroupName = "OneResourceGroupName",
 *         ResourceName = "samplebotname",
 *         Sku = new AzureNative.BotService.Inputs.SkuArgs
 *         {
 *             Name = AzureNative.BotService.SkuName.S1,
 *         },
 *         Tags =
 *         {
 *             { "tag1", "value1" },
 *             { "tag2", "value2" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	botservice "github.com/pulumi/pulumi-azure-native-sdk/botservice/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := botservice.NewBot(ctx, "bot", &botservice.BotArgs{
 * 			Kind:     pulumi.String(botservice.KindSdk),
 * 			Location: pulumi.String("West US"),
 * 			Properties: &botservice.BotPropertiesArgs{
 * 				CmekKeyVaultUrl:                   pulumi.String("https://myCmekKey"),
 * 				Description:                       pulumi.String("The description of the bot"),
 * 				DeveloperAppInsightKey:            pulumi.String("appinsightskey"),
 * 				DeveloperAppInsightsApiKey:        pulumi.String("appinsightsapikey"),
 * 				DeveloperAppInsightsApplicationId: pulumi.String("appinsightsappid"),
 * 				DisableLocalAuth:                  pulumi.Bool(true),
 * 				DisplayName:                       pulumi.String("The Name of the bot"),
 * 				Endpoint:                          pulumi.String("http://mybot.coffee"),
 * 				IconUrl:                           pulumi.String("http://myicon"),
 * 				IsCmekEnabled:                     pulumi.Bool(true),
 * 				LuisAppIds: pulumi.StringArray{
 * 					pulumi.String("luisappid1"),
 * 					pulumi.String("luisappid2"),
 * 				},
 * 				LuisKey:                     pulumi.String("luiskey"),
 * 				MsaAppId:                    pulumi.String("exampleappid"),
 * 				MsaAppMSIResourceId:         pulumi.String("/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId"),
 * 				MsaAppTenantId:              pulumi.String("exampleapptenantid"),
 * 				MsaAppType:                  pulumi.String(botservice.MsaAppTypeUserAssignedMSI),
 * 				PublicNetworkAccess:         pulumi.String(botservice.PublicNetworkAccessEnabled),
 * 				SchemaTransformationVersion: pulumi.String("1.0"),
 * 			},
 * 			ResourceGroupName: pulumi.String("OneResourceGroupName"),
 * 			ResourceName:      pulumi.String("samplebotname"),
 * 			Sku: &botservice.SkuArgs{
 * 				Name: pulumi.String(botservice.SkuNameS1),
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"tag1": pulumi.String("value1"),
 * 				"tag2": pulumi.String("value2"),
 * 			},
 * 		})
 * 		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.botservice.Bot;
 * import com.pulumi.azurenative.botservice.BotArgs;
 * import com.pulumi.azurenative.botservice.inputs.BotPropertiesArgs;
 * import com.pulumi.azurenative.botservice.inputs.SkuArgs;
 * 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 bot = new Bot("bot", BotArgs.builder()
 *             .kind("sdk")
 *             .location("West US")
 *             .properties(BotPropertiesArgs.builder()
 *                 .cmekKeyVaultUrl("https://myCmekKey")
 *                 .description("The description of the bot")
 *                 .developerAppInsightKey("appinsightskey")
 *                 .developerAppInsightsApiKey("appinsightsapikey")
 *                 .developerAppInsightsApplicationId("appinsightsappid")
 *                 .disableLocalAuth(true)
 *                 .displayName("The Name of the bot")
 *                 .endpoint("http://mybot.coffee")
 *                 .iconUrl("http://myicon")
 *                 .isCmekEnabled(true)
 *                 .luisAppIds(
 *                     "luisappid1",
 *                     "luisappid2")
 *                 .luisKey("luiskey")
 *                 .msaAppId("exampleappid")
 *                 .msaAppMSIResourceId("/subscriptions/foo/resourcegroups/bar/providers/microsoft.managedidentity/userassignedidentities/sampleId")
 *                 .msaAppTenantId("exampleapptenantid")
 *                 .msaAppType("UserAssignedMSI")
 *                 .publicNetworkAccess("Enabled")
 *                 .schemaTransformationVersion("1.0")
 *                 .build())
 *             .resourceGroupName("OneResourceGroupName")
 *             .resourceName("samplebotname")
 *             .sku(SkuArgs.builder()
 *                 .name("S1")
 *                 .build())
 *             .tags(Map.ofEntries(
 *                 Map.entry("tag1", "value1"),
 *                 Map.entry("tag2", "value2")
 *             ))
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:botservice:Bot samplebotname /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}
 * ```
 * @property kind Required. Gets or sets the Kind of the resource.
 * @property location Specifies the location of the resource.
 * @property properties The set of properties specific to bot resource
 * @property resourceGroupName The name of the Bot resource group in the user subscription.
 * @property resourceName The name of the Bot resource.
 * @property sku Gets or sets the SKU of the resource.
 * @property tags Contains resource tags defined as key/value pairs.
 */
public data class BotArgs(
    public val kind: Output>? = null,
    public val location: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val resourceName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.botservice.BotArgs =
        com.pulumi.azurenative.botservice.BotArgs.builder()
            .kind(
                kind?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .resourceName(resourceName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var location: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var resourceName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Required. Gets or sets the Kind of the resource.
     */
    @JvmName("oheuhggtccwlktqb")
    public suspend fun kind(`value`: Output>) {
        this.kind = value
    }

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

    /**
     * @param value The set of properties specific to bot resource
     */
    @JvmName("irquxqmuckippukg")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

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

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

    /**
     * @param value Gets or sets the SKU of the resource.
     */
    @JvmName("lfxvkrikdfgjdqyy")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

    /**
     * @param value Contains resource tags defined as key/value pairs.
     */
    @JvmName("xpmjiaqyuuooeqrr")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Required. Gets or sets the Kind of the resource.
     */
    @JvmName("hixbxlamvbhnvhuc")
    public suspend fun kind(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Required. Gets or sets the Kind of the resource.
     */
    @JvmName("prpxoxcxgmvkciys")
    public fun kind(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kind = mapped
    }

    /**
     * @param value Required. Gets or sets the Kind of the resource.
     */
    @JvmName("rtxrnqsfdrkledjm")
    public fun kind(`value`: Kind) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.kind = mapped
    }

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

    /**
     * @param value The set of properties specific to bot resource
     */
    @JvmName("nwwjdrbivxcwdsqj")
    public suspend fun properties(`value`: BotPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument The set of properties specific to bot resource
     */
    @JvmName("udeebtivcptppxgo")
    public suspend fun properties(argument: suspend BotPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = BotPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

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

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

    /**
     * @param value Gets or sets the SKU of the resource.
     */
    @JvmName("wacsndukjphndkqn")
    public suspend fun sku(`value`: SkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument Gets or sets the SKU of the resource.
     */
    @JvmName("oboessixhspgpdcl")
    public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
        val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

    /**
     * @param value Contains resource tags defined as key/value pairs.
     */
    @JvmName("gmucglfcprlcvojh")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Contains resource tags defined as key/value pairs.
     */
    @JvmName("yjmpqhktrhesygtp")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): BotArgs = BotArgs(
        kind = kind,
        location = location,
        properties = properties,
        resourceGroupName = resourceGroupName,
        resourceName = resourceName,
        sku = sku,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy