commonMain.aws.sdk.kotlin.services.textract.model.AdapterVersionEvaluationMetric.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of textract-jvm Show documentation
Show all versions of textract-jvm Show documentation
The AWS SDK for Kotlin client for Textract
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.textract.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains information on the metrics used to evalute the peformance of a given adapter version. Includes data for baseline model performance and individual adapter version perfromance.
*/
public class AdapterVersionEvaluationMetric private constructor(builder: Builder) {
/**
* The F1 score, precision, and recall metrics for the baseline model.
*/
public val adapterVersion: aws.sdk.kotlin.services.textract.model.EvaluationMetric? = builder.adapterVersion
/**
* The F1 score, precision, and recall metrics for the baseline model.
*/
public val baseline: aws.sdk.kotlin.services.textract.model.EvaluationMetric? = builder.baseline
/**
* Indicates the feature type being analyzed by a given adapter version.
*/
public val featureType: aws.sdk.kotlin.services.textract.model.FeatureType? = builder.featureType
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.textract.model.AdapterVersionEvaluationMetric = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AdapterVersionEvaluationMetric(")
append("adapterVersion=$adapterVersion,")
append("baseline=$baseline,")
append("featureType=$featureType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = adapterVersion?.hashCode() ?: 0
result = 31 * result + (baseline?.hashCode() ?: 0)
result = 31 * result + (featureType?.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 AdapterVersionEvaluationMetric
if (adapterVersion != other.adapterVersion) return false
if (baseline != other.baseline) return false
if (featureType != other.featureType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.textract.model.AdapterVersionEvaluationMetric = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The F1 score, precision, and recall metrics for the baseline model.
*/
public var adapterVersion: aws.sdk.kotlin.services.textract.model.EvaluationMetric? = null
/**
* The F1 score, precision, and recall metrics for the baseline model.
*/
public var baseline: aws.sdk.kotlin.services.textract.model.EvaluationMetric? = null
/**
* Indicates the feature type being analyzed by a given adapter version.
*/
public var featureType: aws.sdk.kotlin.services.textract.model.FeatureType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.textract.model.AdapterVersionEvaluationMetric) : this() {
this.adapterVersion = x.adapterVersion
this.baseline = x.baseline
this.featureType = x.featureType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.textract.model.AdapterVersionEvaluationMetric = AdapterVersionEvaluationMetric(this)
/**
* construct an [aws.sdk.kotlin.services.textract.model.EvaluationMetric] inside the given [block]
*/
public fun adapterVersion(block: aws.sdk.kotlin.services.textract.model.EvaluationMetric.Builder.() -> kotlin.Unit) {
this.adapterVersion = aws.sdk.kotlin.services.textract.model.EvaluationMetric.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.textract.model.EvaluationMetric] inside the given [block]
*/
public fun baseline(block: aws.sdk.kotlin.services.textract.model.EvaluationMetric.Builder.() -> kotlin.Unit) {
this.baseline = aws.sdk.kotlin.services.textract.model.EvaluationMetric.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}