com.pulumi.awsnative.lex.kotlin.BotAlias.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.enums.BotAliasStatus
import com.pulumi.awsnative.lex.kotlin.outputs.BotAliasConversationLogSettings
import com.pulumi.awsnative.lex.kotlin.outputs.BotAliasLocaleSettingsItem
import com.pulumi.awsnative.lex.kotlin.outputs.BotAliasTag
import com.pulumi.awsnative.lex.kotlin.outputs.SentimentAnalysisSettingsProperties
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.lex.kotlin.enums.BotAliasStatus.Companion.toKotlin as botAliasStatusToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotAliasConversationLogSettings.Companion.toKotlin as botAliasConversationLogSettingsToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotAliasLocaleSettingsItem.Companion.toKotlin as botAliasLocaleSettingsItemToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotAliasTag.Companion.toKotlin as botAliasTagToKotlin
import com.pulumi.awsnative.lex.kotlin.outputs.SentimentAnalysisSettingsProperties.Companion.toKotlin as sentimentAnalysisSettingsPropertiesToKotlin
/**
* Builder for [BotAlias].
*/
@PulumiTagMarker
public class BotAliasResourceBuilder internal constructor() {
public var name: String? = null
public var args: BotAliasArgs = BotAliasArgs()
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 BotAliasArgsBuilder.() -> Unit) {
val builder = BotAliasArgsBuilder()
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(): BotAlias {
val builtJavaResource = com.pulumi.awsnative.lex.BotAlias(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return BotAlias(builtJavaResource)
}
}
/**
* A Bot Alias enables you to change the version of a bot without updating applications that use the bot
*/
public class BotAlias internal constructor(
override val javaResource: com.pulumi.awsnative.lex.BotAlias,
) : KotlinCustomResource(javaResource, BotAliasMapper) {
/**
* The Amazon Resource Name (ARN) of the bot alias.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The unique identifier of the bot alias.
*/
public val botAliasId: Output
get() = javaResource.botAliasId().applyValue({ args0 -> args0 })
/**
* Specifies settings that are unique to a locale. For example, you can use different Lambda function depending on the bot's locale.
*/
public val botAliasLocaleSettings: Output>?
get() = javaResource.botAliasLocaleSettings().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
botAliasLocaleSettingsItemToKotlin(args0)
})
})
}).orElse(null)
})
/**
* The name of the bot alias.
*/
public val botAliasName: Output
get() = javaResource.botAliasName().applyValue({ args0 -> args0 })
/**
* The current status of the bot alias. When the status is Available the alias is ready for use with your bot.
*/
public val botAliasStatus: Output
get() = javaResource.botAliasStatus().applyValue({ args0 ->
args0.let({ args0 ->
botAliasStatusToKotlin(args0)
})
})
/**
* A list of tags to add to the bot alias.
*/
public val botAliasTags: Output>?
get() = javaResource.botAliasTags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> botAliasTagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The unique identifier of the bot.
*/
public val botId: Output
get() = javaResource.botId().applyValue({ args0 -> args0 })
/**
* The version of the bot that the bot alias references.
*/
public val botVersion: Output?
get() = javaResource.botVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Specifies whether Amazon Lex logs text and audio for conversations with the bot. When you enable conversation logs, text logs store text input, transcripts of audio input, and associated metadata in Amazon CloudWatch logs. Audio logs store input in Amazon S3 .
*/
public val conversationLogSettings: Output?
get() = javaResource.conversationLogSettings().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> botAliasConversationLogSettingsToKotlin(args0) })
}).orElse(null)
})
/**
* The description of the bot alias.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Determines whether Amazon Lex will use Amazon Comprehend to detect the sentiment of user utterances.
*/
public val sentimentAnalysisSettings: Output?
get() = javaResource.sentimentAnalysisSettings().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> sentimentAnalysisSettingsPropertiesToKotlin(args0) })
}).orElse(null)
})
}
public object BotAliasMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.lex.BotAlias::class == javaResource::class
override fun map(javaResource: Resource): BotAlias = BotAlias(
javaResource as
com.pulumi.awsnative.lex.BotAlias,
)
}
/**
* @see [BotAlias].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [BotAlias].
*/
public suspend fun botAlias(name: String, block: suspend BotAliasResourceBuilder.() -> Unit): BotAlias {
val builder = BotAliasResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [BotAlias].
* @param name The _unique_ name of the resulting resource.
*/
public fun botAlias(name: String): BotAlias {
val builder = BotAliasResourceBuilder()
builder.name(name)
return builder.build()
}