commonMain.aws.sdk.kotlin.services.glue.model.EvaluationMetrics.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Evaluation metrics provide an estimate of the quality of your machine learning transform.
*/
public class EvaluationMetrics private constructor(builder: Builder) {
/**
* The evaluation metrics for the find matches algorithm.
*/
public val findMatchesMetrics: aws.sdk.kotlin.services.glue.model.FindMatchesMetrics? = builder.findMatchesMetrics
/**
* The type of machine learning transform.
*/
public val transformType: aws.sdk.kotlin.services.glue.model.TransformType = requireNotNull(builder.transformType) { "A non-null value must be provided for transformType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.glue.model.EvaluationMetrics = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EvaluationMetrics(")
append("findMatchesMetrics=$findMatchesMetrics,")
append("transformType=$transformType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = findMatchesMetrics?.hashCode() ?: 0
result = 31 * result + (transformType.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 EvaluationMetrics
if (findMatchesMetrics != other.findMatchesMetrics) return false
if (transformType != other.transformType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.glue.model.EvaluationMetrics = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The evaluation metrics for the find matches algorithm.
*/
public var findMatchesMetrics: aws.sdk.kotlin.services.glue.model.FindMatchesMetrics? = null
/**
* The type of machine learning transform.
*/
public var transformType: aws.sdk.kotlin.services.glue.model.TransformType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.glue.model.EvaluationMetrics) : this() {
this.findMatchesMetrics = x.findMatchesMetrics
this.transformType = x.transformType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.glue.model.EvaluationMetrics = EvaluationMetrics(this)
/**
* construct an [aws.sdk.kotlin.services.glue.model.FindMatchesMetrics] inside the given [block]
*/
public fun findMatchesMetrics(block: aws.sdk.kotlin.services.glue.model.FindMatchesMetrics.Builder.() -> kotlin.Unit) {
this.findMatchesMetrics = aws.sdk.kotlin.services.glue.model.FindMatchesMetrics.invoke(block)
}
internal fun correctErrors(): Builder {
if (transformType == null) transformType = TransformType.SdkUnknown("no value provided")
return this
}
}
}