
commonMain.aws.sdk.kotlin.services.kendra.model.AttributeSuggestionsUpdateConfig.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.kendra.model
/**
* Updates the configuration information for the document fields/attributes that you want to base query suggestions on.
*
* To deactivate using documents fields for query suggestions, set the mode to `INACTIVE`. You must also set `SuggestionTypes` as either `QUERY` or `DOCUMENT_ATTRIBUTES` and then call [GetQuerySuggestions](https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html). If you set to `QUERY`, then Amazon Kendra uses the query history to base suggestions on. If you set to `DOCUMENT_ATTRIBUTES`, then Amazon Kendra uses the contents of document fields to base suggestions on.
*/
public class AttributeSuggestionsUpdateConfig private constructor(builder: Builder) {
/**
* You can set the mode to `ACTIVE` or `INACTIVE`. You must also set `SuggestionTypes` as either `QUERY` or `DOCUMENT_ATTRIBUTES` and then call [GetQuerySuggestions](https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html). If `Mode` to use query history is set to `ENABLED` when calling [UpdateQuerySuggestionsConfig](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html) and `AttributeSuggestionsMode` to use fields/attributes is set to `ACTIVE`, and you haven't set your `SuggestionTypes` preference to `DOCUMENT_ATTRIBUTES`, then Amazon Kendra uses the query history.
*/
public val attributeSuggestionsMode: aws.sdk.kotlin.services.kendra.model.AttributeSuggestionsMode? = builder.attributeSuggestionsMode
/**
* The list of fields/attributes that you want to set as suggestible for query suggestions.
*/
public val suggestableConfigList: List? = builder.suggestableConfigList
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.kendra.model.AttributeSuggestionsUpdateConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AttributeSuggestionsUpdateConfig(")
append("attributeSuggestionsMode=$attributeSuggestionsMode,")
append("suggestableConfigList=$suggestableConfigList")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributeSuggestionsMode?.hashCode() ?: 0
result = 31 * result + (suggestableConfigList?.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 AttributeSuggestionsUpdateConfig
if (attributeSuggestionsMode != other.attributeSuggestionsMode) return false
if (suggestableConfigList != other.suggestableConfigList) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.kendra.model.AttributeSuggestionsUpdateConfig = Builder(this).apply(block).build()
public class Builder {
/**
* You can set the mode to `ACTIVE` or `INACTIVE`. You must also set `SuggestionTypes` as either `QUERY` or `DOCUMENT_ATTRIBUTES` and then call [GetQuerySuggestions](https://docs.aws.amazon.com/kendra/latest/dg/API_GetQuerySuggestions.html). If `Mode` to use query history is set to `ENABLED` when calling [UpdateQuerySuggestionsConfig](https://docs.aws.amazon.com/kendra/latest/dg/API_UpdateQuerySuggestionsConfig.html) and `AttributeSuggestionsMode` to use fields/attributes is set to `ACTIVE`, and you haven't set your `SuggestionTypes` preference to `DOCUMENT_ATTRIBUTES`, then Amazon Kendra uses the query history.
*/
public var attributeSuggestionsMode: aws.sdk.kotlin.services.kendra.model.AttributeSuggestionsMode? = null
/**
* The list of fields/attributes that you want to set as suggestible for query suggestions.
*/
public var suggestableConfigList: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.kendra.model.AttributeSuggestionsUpdateConfig) : this() {
this.attributeSuggestionsMode = x.attributeSuggestionsMode
this.suggestableConfigList = x.suggestableConfigList
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.kendra.model.AttributeSuggestionsUpdateConfig = AttributeSuggestionsUpdateConfig(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy