commonMain.aws.sdk.kotlin.services.comprehend.model.ClassifierMetadata.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Provides information about a document classifier.
*/
public class ClassifierMetadata private constructor(builder: Builder) {
/**
* Describes the result metrics for the test data associated with an documentation classifier.
*/
public val evaluationMetrics: aws.sdk.kotlin.services.comprehend.model.ClassifierEvaluationMetrics? = builder.evaluationMetrics
/**
* The number of labels in the input data.
*/
public val numberOfLabels: kotlin.Int? = builder.numberOfLabels
/**
* The number of documents in the input data that were used to test the classifier. Typically this is 10 to 20 percent of the input documents, up to 10,000 documents.
*/
public val numberOfTestDocuments: kotlin.Int? = builder.numberOfTestDocuments
/**
* The number of documents in the input data that were used to train the classifier. Typically this is 80 to 90 percent of the input documents.
*/
public val numberOfTrainedDocuments: kotlin.Int? = builder.numberOfTrainedDocuments
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.ClassifierMetadata = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ClassifierMetadata(")
append("*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = evaluationMetrics?.hashCode() ?: 0
result = 31 * result + (numberOfLabels ?: 0)
result = 31 * result + (numberOfTestDocuments ?: 0)
result = 31 * result + (numberOfTrainedDocuments ?: 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 ClassifierMetadata
if (evaluationMetrics != other.evaluationMetrics) return false
if (numberOfLabels != other.numberOfLabels) return false
if (numberOfTestDocuments != other.numberOfTestDocuments) return false
if (numberOfTrainedDocuments != other.numberOfTrainedDocuments) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.ClassifierMetadata = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Describes the result metrics for the test data associated with an documentation classifier.
*/
public var evaluationMetrics: aws.sdk.kotlin.services.comprehend.model.ClassifierEvaluationMetrics? = null
/**
* The number of labels in the input data.
*/
public var numberOfLabels: kotlin.Int? = null
/**
* The number of documents in the input data that were used to test the classifier. Typically this is 10 to 20 percent of the input documents, up to 10,000 documents.
*/
public var numberOfTestDocuments: kotlin.Int? = null
/**
* The number of documents in the input data that were used to train the classifier. Typically this is 80 to 90 percent of the input documents.
*/
public var numberOfTrainedDocuments: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.ClassifierMetadata) : this() {
this.evaluationMetrics = x.evaluationMetrics
this.numberOfLabels = x.numberOfLabels
this.numberOfTestDocuments = x.numberOfTestDocuments
this.numberOfTrainedDocuments = x.numberOfTrainedDocuments
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.ClassifierMetadata = ClassifierMetadata(this)
/**
* construct an [aws.sdk.kotlin.services.comprehend.model.ClassifierEvaluationMetrics] inside the given [block]
*/
public fun evaluationMetrics(block: aws.sdk.kotlin.services.comprehend.model.ClassifierEvaluationMetrics.Builder.() -> kotlin.Unit) {
this.evaluationMetrics = aws.sdk.kotlin.services.comprehend.model.ClassifierEvaluationMetrics.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}