
aws.sdk.kotlin.services.lexmodelsv2.model.OutputContext.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexmodelsv2.model
/**
* Describes a session context that is activated when an intent is
* fulfilled.
*/
class OutputContext private constructor(builder: Builder) {
/**
* The name of the output context.
*/
val name: kotlin.String? = builder.name
/**
* The amount of time, in seconds, that the output context should
* remain active. The time is figured from the first time the context is
* sent to the user.
*/
val timeToLiveInSeconds: kotlin.Int? = builder.timeToLiveInSeconds
/**
* The number of conversation turns that the output context should
* remain active. The number of turns is counted from the first time that
* the context is sent to the user.
*/
val turnsToLive: kotlin.Int? = builder.turnsToLive
companion object {
operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexmodelsv2.model.OutputContext = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OutputContext(")
append("name=$name,")
append("timeToLiveInSeconds=$timeToLiveInSeconds,")
append("turnsToLive=$turnsToLive)")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (timeToLiveInSeconds ?: 0)
result = 31 * result + (turnsToLive ?: 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 OutputContext
if (name != other.name) return false
if (timeToLiveInSeconds != other.timeToLiveInSeconds) return false
if (turnsToLive != other.turnsToLive) return false
return true
}
inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexmodelsv2.model.OutputContext = Builder(this).apply(block).build()
class Builder {
/**
* The name of the output context.
*/
var name: kotlin.String? = null
/**
* The amount of time, in seconds, that the output context should
* remain active. The time is figured from the first time the context is
* sent to the user.
*/
var timeToLiveInSeconds: kotlin.Int? = null
/**
* The number of conversation turns that the output context should
* remain active. The number of turns is counted from the first time that
* the context is sent to the user.
*/
var turnsToLive: kotlin.Int? = null
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexmodelsv2.model.OutputContext) : this() {
this.name = x.name
this.timeToLiveInSeconds = x.timeToLiveInSeconds
this.turnsToLive = x.turnsToLive
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexmodelsv2.model.OutputContext = OutputContext(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy