commonMain.aws.sdk.kotlin.services.personalize.model.OptimizationObjective.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personalize-jvm Show documentation
Show all versions of personalize-jvm Show documentation
The AWS SDK for Kotlin client for Personalize
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.personalize.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Describes the additional objective for the solution, such as maximizing streaming minutes or increasing revenue. For more information see [Optimizing a solution](https://docs.aws.amazon.com/personalize/latest/dg/optimizing-solution-for-objective.html).
*/
public class OptimizationObjective private constructor(builder: Builder) {
/**
* The numerical metadata column in an Items dataset related to the optimization objective. For example, VIDEO_LENGTH (to maximize streaming minutes), or PRICE (to maximize revenue).
*/
public val itemAttribute: kotlin.String? = builder.itemAttribute
/**
* Specifies how Amazon Personalize balances the importance of your optimization objective versus relevance.
*/
public val objectiveSensitivity: aws.sdk.kotlin.services.personalize.model.ObjectiveSensitivity? = builder.objectiveSensitivity
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalize.model.OptimizationObjective = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OptimizationObjective(")
append("itemAttribute=$itemAttribute,")
append("objectiveSensitivity=$objectiveSensitivity")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = itemAttribute?.hashCode() ?: 0
result = 31 * result + (objectiveSensitivity?.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 OptimizationObjective
if (itemAttribute != other.itemAttribute) return false
if (objectiveSensitivity != other.objectiveSensitivity) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalize.model.OptimizationObjective = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The numerical metadata column in an Items dataset related to the optimization objective. For example, VIDEO_LENGTH (to maximize streaming minutes), or PRICE (to maximize revenue).
*/
public var itemAttribute: kotlin.String? = null
/**
* Specifies how Amazon Personalize balances the importance of your optimization objective versus relevance.
*/
public var objectiveSensitivity: aws.sdk.kotlin.services.personalize.model.ObjectiveSensitivity? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalize.model.OptimizationObjective) : this() {
this.itemAttribute = x.itemAttribute
this.objectiveSensitivity = x.objectiveSensitivity
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalize.model.OptimizationObjective = OptimizationObjective(this)
internal fun correctErrors(): Builder {
return this
}
}
}