All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.qbusiness.model.NativeIndexConfiguration.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.qbusiness.model



/**
 * Configuration information for an Amazon Q Business index.
 */
public class NativeIndexConfiguration private constructor(builder: Builder) {
    /**
     * Overrides the default boosts applied by Amazon Q Business to supported document attribute data types.
     */
    public val boostingOverride: Map? = builder.boostingOverride
    /**
     * The identifier for the Amazon Q Business index.
     */
    public val indexId: kotlin.String = requireNotNull(builder.indexId) { "A non-null value must be provided for indexId" }

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.qbusiness.model.NativeIndexConfiguration = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("NativeIndexConfiguration(")
        append("boostingOverride=$boostingOverride,")
        append("indexId=$indexId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = boostingOverride?.hashCode() ?: 0
        result = 31 * result + (indexId.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 NativeIndexConfiguration

        if (boostingOverride != other.boostingOverride) return false
        if (indexId != other.indexId) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.qbusiness.model.NativeIndexConfiguration = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Overrides the default boosts applied by Amazon Q Business to supported document attribute data types.
         */
        public var boostingOverride: Map? = null
        /**
         * The identifier for the Amazon Q Business index.
         */
        public var indexId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.qbusiness.model.NativeIndexConfiguration) : this() {
            this.boostingOverride = x.boostingOverride
            this.indexId = x.indexId
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.qbusiness.model.NativeIndexConfiguration = NativeIndexConfiguration(this)

        internal fun correctErrors(): Builder {
            if (indexId == null) indexId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy