commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.SlotDefaultValue.kt Maven / Gradle / Ivy
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexmodelbuildingservice.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A default value for a slot.
*/
public class SlotDefaultValue private constructor(builder: Builder) {
/**
* The default value for the slot. You can specify one of the following:
* + `#context-name.slot-name` - The slot value "slot-name" in the context "context-name."
* + `{attribute}` - The slot value of the session attribute "attribute."
* + `'value'` - The discrete value "value."
*/
public val defaultValue: kotlin.String = requireNotNull(builder.defaultValue) { "A non-null value must be provided for defaultValue" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexmodelbuildingservice.model.SlotDefaultValue = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SlotDefaultValue(")
append("defaultValue=$defaultValue")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = defaultValue.hashCode()
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as SlotDefaultValue
if (defaultValue != other.defaultValue) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexmodelbuildingservice.model.SlotDefaultValue = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The default value for the slot. You can specify one of the following:
* + `#context-name.slot-name` - The slot value "slot-name" in the context "context-name."
* + `{attribute}` - The slot value of the session attribute "attribute."
* + `'value'` - The discrete value "value."
*/
public var defaultValue: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.SlotDefaultValue) : this() {
this.defaultValue = x.defaultValue
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexmodelbuildingservice.model.SlotDefaultValue = SlotDefaultValue(this)
internal fun correctErrors(): Builder {
if (defaultValue == null) defaultValue = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy