commonMain.aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lexmodelbuildingservice.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Provides configuration information for the AMAZON.KendraSearchIntent intent. When you use this intent, Amazon Lex searches the specified Amazon Kendra index and returns documents from the index that match the user's utterance. For more information, see [ AMAZON.KendraSearchIntent](http://docs.aws.amazon.com/lex/latest/dg/built-in-intent-kendra-search.html).
*/
public class KendraConfiguration private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot. If the Amazon Kendra index does not exist, you get an exception when you call the `PutIntent` operation.
*/
public val kendraIndex: kotlin.String = requireNotNull(builder.kendraIndex) { "A non-null value must be provided for kendraIndex" }
/**
* A query filter that Amazon Lex sends to Amazon Kendra to filter the response from the query. The filter is in the format defined by Amazon Kendra. For more information, see [Filtering queries](http://docs.aws.amazon.com/kendra/latest/dg/filtering.html).
*
* You can override this filter string with a new filter string at runtime.
*/
public val queryFilterString: kotlin.String? = builder.queryFilterString
/**
* The Amazon Resource Name (ARN) of an IAM role that has permission to search the Amazon Kendra index. The role must be in the same account and Region as the Amazon Lex bot. If the role does not exist, you get an exception when you call the `PutIntent` operation.
*/
public val role: kotlin.String = requireNotNull(builder.role) { "A non-null value must be provided for role" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("KendraConfiguration(")
append("kendraIndex=$kendraIndex,")
append("queryFilterString=$queryFilterString,")
append("role=$role")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = kendraIndex.hashCode()
result = 31 * result + (queryFilterString?.hashCode() ?: 0)
result = 31 * result + (role.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 KendraConfiguration
if (kendraIndex != other.kendraIndex) return false
if (queryFilterString != other.queryFilterString) return false
if (role != other.role) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the Amazon Kendra index that you want the AMAZON.KendraSearchIntent intent to search. The index must be in the same account and Region as the Amazon Lex bot. If the Amazon Kendra index does not exist, you get an exception when you call the `PutIntent` operation.
*/
public var kendraIndex: kotlin.String? = null
/**
* A query filter that Amazon Lex sends to Amazon Kendra to filter the response from the query. The filter is in the format defined by Amazon Kendra. For more information, see [Filtering queries](http://docs.aws.amazon.com/kendra/latest/dg/filtering.html).
*
* You can override this filter string with a new filter string at runtime.
*/
public var queryFilterString: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of an IAM role that has permission to search the Amazon Kendra index. The role must be in the same account and Region as the Amazon Lex bot. If the role does not exist, you get an exception when you call the `PutIntent` operation.
*/
public var role: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration) : this() {
this.kendraIndex = x.kendraIndex
this.queryFilterString = x.queryFilterString
this.role = x.role
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lexmodelbuildingservice.model.KendraConfiguration = KendraConfiguration(this)
internal fun correctErrors(): Builder {
if (kendraIndex == null) kendraIndex = ""
if (role == null) role = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy