commonMain.aws.sdk.kotlin.services.personalize.model.HpoObjective.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
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.personalize.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The metric to optimize during hyperparameter optimization (HPO).
*
* Amazon Personalize doesn't support configuring the `hpoObjective` at this time.
*/
public class HpoObjective private constructor(builder: Builder) {
/**
* The name of the metric.
*/
public val metricName: kotlin.String? = builder.metricName
/**
* A regular expression for finding the metric in the training job logs.
*/
public val metricRegex: kotlin.String? = builder.metricRegex
/**
* The type of the metric. Valid values are `Maximize` and `Minimize`.
*/
public val type: kotlin.String? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalize.model.HpoObjective = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("HpoObjective(")
append("metricName=$metricName,")
append("metricRegex=$metricRegex,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metricName?.hashCode() ?: 0
result = 31 * result + (metricRegex?.hashCode() ?: 0)
result = 31 * result + (type?.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 HpoObjective
if (metricName != other.metricName) return false
if (metricRegex != other.metricRegex) return false
if (type != other.type) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalize.model.HpoObjective = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the metric.
*/
public var metricName: kotlin.String? = null
/**
* A regular expression for finding the metric in the training job logs.
*/
public var metricRegex: kotlin.String? = null
/**
* The type of the metric. Valid values are `Maximize` and `Minimize`.
*/
public var type: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalize.model.HpoObjective) : this() {
this.metricName = x.metricName
this.metricRegex = x.metricRegex
this.type = x.type
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalize.model.HpoObjective = HpoObjective(this)
internal fun correctErrors(): Builder {
return this
}
}
}