![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.lex.kotlin.BotVersion.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.lex.kotlin
import com.pulumi.awsnative.lex.kotlin.outputs.BotVersionLocaleSpecification
import com.pulumi.awsnative.lex.kotlin.outputs.BotVersionLocaleSpecification.Companion.toKotlin
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
/**
* Builder for [BotVersion].
*/
@PulumiTagMarker
public class BotVersionResourceBuilder internal constructor() {
public var name: String? = null
public var args: BotVersionArgs = BotVersionArgs()
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 BotVersionArgsBuilder.() -> Unit) {
val builder = BotVersionArgsBuilder()
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(): BotVersion {
val builtJavaResource = com.pulumi.awsnative.lex.BotVersion(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return BotVersion(builtJavaResource)
}
}
/**
* A version is a numbered snapshot of your work that you can publish for use in different parts of your workflow, such as development, beta deployment, and production.
*/
public class BotVersion internal constructor(
override val javaResource: com.pulumi.awsnative.lex.BotVersion,
) : KotlinCustomResource(javaResource, BotVersionMapper) {
/**
* The unique identifier of the bot.
*/
public val botId: Output
get() = javaResource.botId().applyValue({ args0 -> args0 })
/**
* The version of the bot.
*/
public val botVersion: Output
get() = javaResource.botVersion().applyValue({ args0 -> args0 })
/**
* Specifies the locales that Amazon Lex adds to this version. You can choose the Draft version or any other previously published version for each locale. When you specify a source version, the locale data is copied from the source version to the new version.
*/
public val botVersionLocaleSpecification: Output>
get() = javaResource.botVersionLocaleSpecification().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
})
/**
* The description of the version.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
}
public object BotVersionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.lex.BotVersion::class == javaResource::class
override fun map(javaResource: Resource): BotVersion = BotVersion(
javaResource as
com.pulumi.awsnative.lex.BotVersion,
)
}
/**
* @see [BotVersion].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [BotVersion].
*/
public suspend fun botVersion(name: String, block: suspend BotVersionResourceBuilder.() -> Unit): BotVersion {
val builder = BotVersionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [BotVersion].
* @param name The _unique_ name of the resulting resource.
*/
public fun botVersion(name: String): BotVersion {
val builder = BotVersionResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy