aws.sdk.kotlin.services.sagemaker.model.ModelMetrics.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
/**
* Contains metrics captured from a model.
*/
class ModelMetrics private constructor(builder: BuilderImpl) {
/**
* Metrics that measure bais in a model.
*/
val bias: Bias? = builder.bias
/**
* Metrics that help explain a model.
*/
val explainability: Explainability? = builder.explainability
/**
* Metrics that measure the quality of the input data for a model.
*/
val modelDataQuality: ModelDataQuality? = builder.modelDataQuality
/**
* Metrics that measure the quality of a model.
*/
val modelQuality: ModelQuality? = builder.modelQuality
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): ModelMetrics = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ModelMetrics(")
append("bias=$bias,")
append("explainability=$explainability,")
append("modelDataQuality=$modelDataQuality,")
append("modelQuality=$modelQuality)")
}
override fun hashCode(): kotlin.Int {
var result = bias?.hashCode() ?: 0
result = 31 * result + (explainability?.hashCode() ?: 0)
result = 31 * result + (modelDataQuality?.hashCode() ?: 0)
result = 31 * result + (modelQuality?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as ModelMetrics
if (bias != other.bias) return false
if (explainability != other.explainability) return false
if (modelDataQuality != other.modelDataQuality) return false
if (modelQuality != other.modelQuality) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): ModelMetrics = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): ModelMetrics
/**
* Metrics that measure bais in a model.
*/
fun bias(bias: Bias): FluentBuilder
/**
* Metrics that help explain a model.
*/
fun explainability(explainability: Explainability): FluentBuilder
/**
* Metrics that measure the quality of the input data for a model.
*/
fun modelDataQuality(modelDataQuality: ModelDataQuality): FluentBuilder
/**
* Metrics that measure the quality of a model.
*/
fun modelQuality(modelQuality: ModelQuality): FluentBuilder
}
interface DslBuilder {
/**
* Metrics that measure bais in a model.
*/
var bias: Bias?
/**
* Metrics that help explain a model.
*/
var explainability: Explainability?
/**
* Metrics that measure the quality of the input data for a model.
*/
var modelDataQuality: ModelDataQuality?
/**
* Metrics that measure the quality of a model.
*/
var modelQuality: ModelQuality?
fun build(): ModelMetrics
/**
* construct an [aws.sdk.kotlin.services.sagemaker.model.Bias] inside the given [block]
*/
fun bias(block: Bias.DslBuilder.() -> kotlin.Unit) {
this.bias = Bias.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.sagemaker.model.Explainability] inside the given [block]
*/
fun explainability(block: Explainability.DslBuilder.() -> kotlin.Unit) {
this.explainability = Explainability.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.sagemaker.model.ModelDataQuality] inside the given [block]
*/
fun modelDataQuality(block: ModelDataQuality.DslBuilder.() -> kotlin.Unit) {
this.modelDataQuality = ModelDataQuality.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.sagemaker.model.ModelQuality] inside the given [block]
*/
fun modelQuality(block: ModelQuality.DslBuilder.() -> kotlin.Unit) {
this.modelQuality = ModelQuality.invoke(block)
}
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var bias: Bias? = null
override var explainability: Explainability? = null
override var modelDataQuality: ModelDataQuality? = null
override var modelQuality: ModelQuality? = null
constructor(x: ModelMetrics) : this() {
this.bias = x.bias
this.explainability = x.explainability
this.modelDataQuality = x.modelDataQuality
this.modelQuality = x.modelQuality
}
override fun build(): ModelMetrics = ModelMetrics(this)
override fun bias(bias: Bias): FluentBuilder = apply { this.bias = bias }
override fun explainability(explainability: Explainability): FluentBuilder = apply { this.explainability = explainability }
override fun modelDataQuality(modelDataQuality: ModelDataQuality): FluentBuilder = apply { this.modelDataQuality = modelDataQuality }
override fun modelQuality(modelQuality: ModelQuality): FluentBuilder = apply { this.modelQuality = modelQuality }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy