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

com.pulumi.azurenative.botservice.kotlin.BotConnectionArgs.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.botservice.kotlin

import com.pulumi.azurenative.botservice.BotConnectionArgs.builder
import com.pulumi.azurenative.botservice.kotlin.enums.Kind
import com.pulumi.azurenative.botservice.kotlin.inputs.ConnectionSettingPropertiesArgs
import com.pulumi.azurenative.botservice.kotlin.inputs.ConnectionSettingPropertiesArgsBuilder
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 channel 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 Connection Setting
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var botConnection = new AzureNative.BotService.BotConnection("botConnection", new()
 *     {
 *         ConnectionName = "sampleConnection",
 *         Location = "West US",
 *         Properties = new AzureNative.BotService.Inputs.ConnectionSettingPropertiesArgs
 *         {
 *             ClientId = "sampleclientid",
 *             ClientSecret = "samplesecret",
 *             Parameters = new[]
 *             {
 *                 new AzureNative.BotService.Inputs.ConnectionSettingParameterArgs
 *                 {
 *                     Key = "key1",
 *                     Value = "value1",
 *                 },
 *                 new AzureNative.BotService.Inputs.ConnectionSettingParameterArgs
 *                 {
 *                     Key = "key2",
 *                     Value = "value2",
 *                 },
 *             },
 *             Scopes = "samplescope",
 *             ServiceProviderId = "serviceproviderid",
 *         },
 *         ResourceGroupName = "OneResourceGroupName",
 *         ResourceName = "samplebotname",
 *     });
 * });
 * ```
 * ```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.NewBotConnection(ctx, "botConnection", &botservice.BotConnectionArgs{
 * 			ConnectionName: pulumi.String("sampleConnection"),
 * 			Location:       pulumi.String("West US"),
 * 			Properties: &botservice.ConnectionSettingPropertiesArgs{
 * 				ClientId:     pulumi.String("sampleclientid"),
 * 				ClientSecret: pulumi.String("samplesecret"),
 * 				Parameters: botservice.ConnectionSettingParameterArray{
 * 					&botservice.ConnectionSettingParameterArgs{
 * 						Key:   pulumi.String("key1"),
 * 						Value: pulumi.String("value1"),
 * 					},
 * 					&botservice.ConnectionSettingParameterArgs{
 * 						Key:   pulumi.String("key2"),
 * 						Value: pulumi.String("value2"),
 * 					},
 * 				},
 * 				Scopes:            pulumi.String("samplescope"),
 * 				ServiceProviderId: pulumi.String("serviceproviderid"),
 * 			},
 * 			ResourceGroupName: pulumi.String("OneResourceGroupName"),
 * 			ResourceName:      pulumi.String("samplebotname"),
 * 		})
 * 		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.BotConnection;
 * import com.pulumi.azurenative.botservice.BotConnectionArgs;
 * import com.pulumi.azurenative.botservice.inputs.ConnectionSettingPropertiesArgs;
 * 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 botConnection = new BotConnection("botConnection", BotConnectionArgs.builder()
 *             .connectionName("sampleConnection")
 *             .location("West US")
 *             .properties(ConnectionSettingPropertiesArgs.builder()
 *                 .clientId("sampleclientid")
 *                 .clientSecret("samplesecret")
 *                 .parameters(
 *                     ConnectionSettingParameterArgs.builder()
 *                         .key("key1")
 *                         .value("value1")
 *                         .build(),
 *                     ConnectionSettingParameterArgs.builder()
 *                         .key("key2")
 *                         .value("value2")
 *                         .build())
 *                 .scopes("samplescope")
 *                 .serviceProviderId("serviceproviderid")
 *                 .build())
 *             .resourceGroupName("OneResourceGroupName")
 *             .resourceName("samplebotname")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:botservice:BotConnection sampleConnection /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/connections/{connectionName}
 * ```
 * @property connectionName The name of the Bot Service Connection Setting resource.
 * @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 channel 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 BotConnectionArgs(
    public val connectionName: Output? = null,
    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.BotConnectionArgs =
        com.pulumi.azurenative.botservice.BotConnectionArgs.builder()
            .connectionName(connectionName?.applyValue({ args0 -> args0 }))
            .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 [BotConnectionArgs].
 */
@PulumiTagMarker
public class BotConnectionArgsBuilder internal constructor() {
    private var connectionName: Output? = null

    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 The name of the Bot Service Connection Setting resource.
     */
    @JvmName("bwrfpdcfkbtualyb")
    public suspend fun connectionName(`value`: Output) {
        this.connectionName = value
    }

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

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

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

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

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

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

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

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

    /**
     * @param value Required. Gets or sets the Kind of the resource.
     */
    @JvmName("xflrekrjkmmcpsev")
    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("tpytmdmddorfpbjk")
    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("naxnttvdudctdupr")
    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("apksvdrggiounbqw")
    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 channel resource
     */
    @JvmName("sfpfppdxsrocydnj")
    public suspend fun properties(`value`: ConnectionSettingPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

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

    /**
     * @param value The name of the Bot resource group in the user subscription.
     */
    @JvmName("gdoionyubgguvnyd")
    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("tifmvtxhqhufrqfv")
    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("pioylphifijjrkiu")
    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("cgjqbcwxcytqndje")
    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("vixrkuviwywvjwfq")
    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("ioagiacowdvitjbx")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy