
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.Slot.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexruntimev2.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* A value that Amazon Lex V2 uses to fulfill an intent.
*/
public class Slot private constructor(builder: Builder) {
/**
* When the `shape` value is `List`, it indicates that the `values` field contains a list of slot values. When the value is `Scalar`, it indicates that the `value` field contains a single value.
*/
public val shape: aws.sdk.kotlin.services.lexruntimev2.model.Shape? = builder.shape
/**
* The constituent sub slots of a composite slot.
*/
public val subSlots: Map? = builder.subSlots
/**
* The current value of the slot.
*/
public val value: aws.sdk.kotlin.services.lexruntimev2.model.Value? = builder.value
/**
* A list of one or more values that the user provided for the slot. For example, if a for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple."
*/
public val values: List? = builder.values
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.Slot = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Slot(")
append("shape=$shape,")
append("subSlots=$subSlots,")
append("value=$value,")
append("values=$values")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = shape?.hashCode() ?: 0
result = 31 * result + (subSlots?.hashCode() ?: 0)
result = 31 * result + (value?.hashCode() ?: 0)
result = 31 * result + (values?.hashCode() ?: 0)
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 Slot
if (shape != other.shape) return false
if (subSlots != other.subSlots) return false
if (value != other.value) return false
if (values != other.values) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.Slot = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* When the `shape` value is `List`, it indicates that the `values` field contains a list of slot values. When the value is `Scalar`, it indicates that the `value` field contains a single value.
*/
public var shape: aws.sdk.kotlin.services.lexruntimev2.model.Shape? = null
/**
* The constituent sub slots of a composite slot.
*/
public var subSlots: Map? = null
/**
* The current value of the slot.
*/
public var value: aws.sdk.kotlin.services.lexruntimev2.model.Value? = null
/**
* A list of one or more values that the user provided for the slot. For example, if a for a slot that elicits pizza toppings, the values might be "pepperoni" and "pineapple."
*/
public var values: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.Slot) : this() {
this.shape = x.shape
this.subSlots = x.subSlots
this.value = x.value
this.values = x.values
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.Slot = Slot(this)
/**
* construct an [aws.sdk.kotlin.services.lexruntimev2.model.Value] inside the given [block]
*/
public fun value(block: aws.sdk.kotlin.services.lexruntimev2.model.Value.Builder.() -> kotlin.Unit) {
this.value = aws.sdk.kotlin.services.lexruntimev2.model.Value.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy