commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.EnumerationValue.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
/**
* Each slot type can have a set of values. Each enumeration value represents a value the slot type can take.
*
* For example, a pizza ordering bot could have a slot type that specifies the type of crust that the pizza should have. The slot type could include the values
* + thick
* + thin
* + stuffed
*/
public class EnumerationValue private constructor(builder: Builder) {
/**
* Additional values related to the slot type value.
*/
public val synonyms: List? = builder.synonyms
/**
* The value of the slot type.
*/
public val value: kotlin.String = requireNotNull(builder.value) { "A non-null value must be provided for value" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexmodelbuildingservice.model.EnumerationValue = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EnumerationValue(")
append("synonyms=$synonyms,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = synonyms?.hashCode() ?: 0
result = 31 * result + (value.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 EnumerationValue
if (synonyms != other.synonyms) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexmodelbuildingservice.model.EnumerationValue = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Additional values related to the slot type value.
*/
public var synonyms: List? = null
/**
* The value of the slot type.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.EnumerationValue) : this() {
this.synonyms = x.synonyms
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexmodelbuildingservice.model.EnumerationValue = EnumerationValue(this)
internal fun correctErrors(): Builder {
if (value == null) value = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy