
commonMain.aws.sdk.kotlin.services.kendra.model.Suggestion.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* A single query suggestion.
*/
public class Suggestion private constructor(builder: Builder) {
/**
* The UUID (universally unique identifier) of a single query suggestion.
*/
public val id: kotlin.String? = builder.id
/**
* The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.
*/
public val sourceDocuments: List? = builder.sourceDocuments
/**
* The value for the UUID (universally unique identifier) of a single query suggestion.
*
* The value is the text string of a suggestion.
*/
public val value: aws.sdk.kotlin.services.kendra.model.SuggestionValue? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.Suggestion = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("Suggestion(")
append("id=$id,")
append("sourceDocuments=$sourceDocuments,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = id?.hashCode() ?: 0
result = 31 * result + (sourceDocuments?.hashCode() ?: 0)
result = 31 * result + (value?.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 Suggestion
if (id != other.id) return false
if (sourceDocuments != other.sourceDocuments) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.Suggestion = Builder(this).apply(block).build()
public class Builder {
/**
* The UUID (universally unique identifier) of a single query suggestion.
*/
public var id: kotlin.String? = null
/**
* The list of document IDs and their fields/attributes that are used for a single query suggestion, if document fields set to use for query suggestions.
*/
public var sourceDocuments: List? = null
/**
* The value for the UUID (universally unique identifier) of a single query suggestion.
*
* The value is the text string of a suggestion.
*/
public var value: aws.sdk.kotlin.services.kendra.model.SuggestionValue? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.Suggestion) : this() {
this.id = x.id
this.sourceDocuments = x.sourceDocuments
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.Suggestion = Suggestion(this)
/**
* construct an [aws.sdk.kotlin.services.kendra.model.SuggestionValue] inside the given [block]
*/
public fun value(block: aws.sdk.kotlin.services.kendra.model.SuggestionValue.Builder.() -> kotlin.Unit) {
this.value = aws.sdk.kotlin.services.kendra.model.SuggestionValue.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy