
commonMain.aws.sdk.kotlin.services.lexruntimev2.model.Intent.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
/**
* The current intent that Amazon Lex V2 is attempting to fulfill.
*/
public class Intent private constructor(builder: Builder) {
/**
* Indicates whether the intent has been `Confirmed`, `Denied`, or `None` if the confirmation stage has not yet been reached.
*/
public val confirmationState: aws.sdk.kotlin.services.lexruntimev2.model.ConfirmationState? = builder.confirmationState
/**
* The name of the intent.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* A map of all of the slots for the intent. The name of the slot maps to the value of the slot. If a slot has not been filled, the value is null.
*/
public val slots: Map? = builder.slots
/**
* Indicates the fulfillment state for the intent. The meanings of each value are as follows:
* + `Failed` – The bot failed to fulfill the intent.
* + `Fulfilled` – The bot has completed fulfillment of the intent.
* + `FulfillmentInProgress` – The bot is in the middle of fulfilling the intent.
* + `InProgress` – The bot is in the middle of eliciting the slot values that are necessary to fulfill the intent.
* + `ReadyForFulfillment` – The bot has elicited all the slot values for the intent and is ready to fulfill the intent.
* + `Waiting` – The bot is waiting for a response from the user (limited to streaming conversations).
*/
public val state: aws.sdk.kotlin.services.lexruntimev2.model.IntentState? = builder.state
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexruntimev2.model.Intent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Intent(")
append("confirmationState=$confirmationState,")
append("name=$name,")
append("slots=$slots,")
append("state=$state")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = confirmationState?.hashCode() ?: 0
result = 31 * result + (name.hashCode())
result = 31 * result + (slots?.hashCode() ?: 0)
result = 31 * result + (state?.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 Intent
if (confirmationState != other.confirmationState) return false
if (name != other.name) return false
if (slots != other.slots) return false
if (state != other.state) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexruntimev2.model.Intent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Indicates whether the intent has been `Confirmed`, `Denied`, or `None` if the confirmation stage has not yet been reached.
*/
public var confirmationState: aws.sdk.kotlin.services.lexruntimev2.model.ConfirmationState? = null
/**
* The name of the intent.
*/
public var name: kotlin.String? = null
/**
* A map of all of the slots for the intent. The name of the slot maps to the value of the slot. If a slot has not been filled, the value is null.
*/
public var slots: Map? = null
/**
* Indicates the fulfillment state for the intent. The meanings of each value are as follows:
* + `Failed` – The bot failed to fulfill the intent.
* + `Fulfilled` – The bot has completed fulfillment of the intent.
* + `FulfillmentInProgress` – The bot is in the middle of fulfilling the intent.
* + `InProgress` – The bot is in the middle of eliciting the slot values that are necessary to fulfill the intent.
* + `ReadyForFulfillment` – The bot has elicited all the slot values for the intent and is ready to fulfill the intent.
* + `Waiting` – The bot is waiting for a response from the user (limited to streaming conversations).
*/
public var state: aws.sdk.kotlin.services.lexruntimev2.model.IntentState? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexruntimev2.model.Intent) : this() {
this.confirmationState = x.confirmationState
this.name = x.name
this.slots = x.slots
this.state = x.state
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexruntimev2.model.Intent = Intent(this)
internal fun correctErrors(): Builder {
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy