com.pulumi.awsnative.lex.kotlin.Bot.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.lex.kotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotLocale
import com.pulumi.awsnative.lex.kotlin.outputs.BotS3Location
import com.pulumi.awsnative.lex.kotlin.outputs.BotTag
import com.pulumi.awsnative.lex.kotlin.outputs.BotTestBotAliasSettings
import com.pulumi.awsnative.lex.kotlin.outputs.DataPrivacyProperties
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.lex.kotlin.outputs.BotLocale.Companion.toKotlin as botLocaleToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotS3Location.Companion.toKotlin as botS3LocationToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotTag.Companion.toKotlin as botTagToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotTestBotAliasSettings.Companion.toKotlin as botTestBotAliasSettingsToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.DataPrivacyProperties.Companion.toKotlin as dataPrivacyPropertiesToKotlin
/**
* Builder for [Bot].
*/
@PulumiTagMarker
public class BotResourceBuilder internal constructor() {
public var name: String? = null
public var args: BotArgs = BotArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend BotArgsBuilder.() -> Unit) {
val builder = BotArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Bot {
val builtJavaResource = com.pulumi.awsnative.lex.Bot(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Bot(builtJavaResource)
}
}
/**
* Amazon Lex conversational bot performing automated tasks such as ordering a pizza, booking a hotel, and so on.
*/
public class Bot internal constructor(
override val javaResource: com.pulumi.awsnative.lex.Bot,
) : KotlinCustomResource(javaResource, BotMapper) {
/**
* The Amazon Resource Name (ARN) of the bot.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Specifies whether to build the bot locales after bot creation completes.
*/
public val autoBuildBotLocales: Output?
get() = javaResource.autoBuildBotLocales().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The unique identifier of the bot.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* The Amazon S3 location of files used to import a bot. The files must be in the import format specified in [JSON format for importing and exporting](https://docs.aws.amazon.com/lexv2/latest/dg/import-export-format.html) in the *Amazon Lex developer guide.*
*/
public val botFileS3Location: Output?
get() = javaResource.botFileS3Location().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> botS3LocationToKotlin(args0) })
}).orElse(null)
})
/**
* List of bot locales
*/
public val botLocales: Output>?
get() = javaResource.botLocales().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> botLocaleToKotlin(args0) })
})
}).orElse(null)
})
/**
* A list of tags to add to the bot, which can only be added at bot creation.
*/
public val botTags: Output>?
get() = javaResource.botTags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> botTagToKotlin(args0) })
})
}).orElse(null)
})
/**
* Data privacy setting of the Bot.
*/
public val dataPrivacy: Output
get() = javaResource.dataPrivacy().applyValue({ args0 ->
args0.let({ args0 ->
dataPrivacyPropertiesToKotlin(args0)
})
})
/**
* The description of the version.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* IdleSessionTTLInSeconds of the resource
*/
public val idleSessionTtlInSeconds: Output
get() = javaResource.idleSessionTtlInSeconds().applyValue({ args0 -> args0 })
/**
* The name of the bot locale.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The Amazon Resource Name (ARN) of the IAM role used to build and run the bot.
*/
public val roleArn: Output
get() = javaResource.roleArn().applyValue({ args0 -> args0 })
/**
* Specifies configuration settings for the alias used to test the bot. If the `TestBotAliasSettings` property is not specified, the settings are configured with default values.
*/
public val testBotAliasSettings: Output?
get() = javaResource.testBotAliasSettings().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> botTestBotAliasSettingsToKotlin(args0) })
}).orElse(null)
})
/**
* A list of tags to add to the test alias for a bot, , which can only be added at bot/bot alias creation.
*/
public val testBotAliasTags: Output>?
get() = javaResource.testBotAliasTags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0.let({ args0 -> botTagToKotlin(args0) }) })
}).orElse(null)
})
}
public object BotMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.lex.Bot::class == javaResource::class
override fun map(javaResource: Resource): Bot = Bot(javaResource as com.pulumi.awsnative.lex.Bot)
}
/**
* @see [Bot].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Bot].
*/
public suspend fun bot(name: String, block: suspend BotResourceBuilder.() -> Unit): Bot {
val builder = BotResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Bot].
* @param name The _unique_ name of the resulting resource.
*/
public fun bot(name: String): Bot {
val builder = BotResourceBuilder()
builder.name(name)
return builder.build()
}