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

commonMain.aws.sdk.kotlin.services.kendraranking.model.CapacityUnitsConfiguration.kt Maven / Gradle / Ivy

There is a newer version: 1.3.34
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kendraranking.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Sets additional capacity units configured for your rescore execution plan. A rescore execution plan is an Amazon Kendra Intelligent Ranking resource used for provisioning the `Rescore` API. You can add and remove capacity units to fit your usage requirements.
 */
public class CapacityUnitsConfiguration private constructor(builder: Builder) {
    /**
     * The amount of extra capacity for your rescore execution plan.
     *
     * A single extra capacity unit for a rescore execution plan provides 0.01 rescore requests per second. You can add up to 1000 extra capacity units.
     */
    public val rescoreCapacityUnits: kotlin.Int = requireNotNull(builder.rescoreCapacityUnits) { "A non-null value must be provided for rescoreCapacityUnits" }

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

    override fun toString(): kotlin.String = buildString {
        append("CapacityUnitsConfiguration(")
        append("rescoreCapacityUnits=$rescoreCapacityUnits")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = rescoreCapacityUnits
        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 CapacityUnitsConfiguration

        if (rescoreCapacityUnits != other.rescoreCapacityUnits) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The amount of extra capacity for your rescore execution plan.
         *
         * A single extra capacity unit for a rescore execution plan provides 0.01 rescore requests per second. You can add up to 1000 extra capacity units.
         */
        public var rescoreCapacityUnits: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendraranking.model.CapacityUnitsConfiguration) : this() {
            this.rescoreCapacityUnits = x.rescoreCapacityUnits
        }

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

        internal fun correctErrors(): Builder {
            if (rescoreCapacityUnits == null) rescoreCapacityUnits = 0
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy