commonMain.aws.sdk.kotlin.services.kendraranking.model.CapacityUnitsConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kendraranking-jvm Show documentation
Show all versions of kendraranking-jvm Show documentation
The AWS SDK for Kotlin client for Kendra Ranking
// 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
}
}
}