commonMain.aws.sdk.kotlin.services.comprehend.model.EntityRecognizerMetadata.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
/**
* Detailed information about an entity recognizer.
*/
public class EntityRecognizerMetadata private constructor(builder: Builder) {
/**
* Entity types from the metadata of an entity recognizer.
*/
public val entityTypes: List? = builder.entityTypes
/**
* Detailed information about the accuracy of an entity recognizer.
*/
public val evaluationMetrics: aws.sdk.kotlin.services.comprehend.model.EntityRecognizerEvaluationMetrics? = builder.evaluationMetrics
/**
* The number of documents in the input data that were used to test the entity recognizer. Typically this is 10 to 20 percent of the input documents.
*/
public val numberOfTestDocuments: kotlin.Int? = builder.numberOfTestDocuments
/**
* The number of documents in the input data that were used to train the entity recognizer. 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.EntityRecognizerMetadata = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EntityRecognizerMetadata(")
append("*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = entityTypes?.hashCode() ?: 0
result = 31 * result + (evaluationMetrics?.hashCode() ?: 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 EntityRecognizerMetadata
if (entityTypes != other.entityTypes) return false
if (evaluationMetrics != other.evaluationMetrics) 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.EntityRecognizerMetadata = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Entity types from the metadata of an entity recognizer.
*/
public var entityTypes: List? = null
/**
* Detailed information about the accuracy of an entity recognizer.
*/
public var evaluationMetrics: aws.sdk.kotlin.services.comprehend.model.EntityRecognizerEvaluationMetrics? = null
/**
* The number of documents in the input data that were used to test the entity recognizer. Typically this is 10 to 20 percent of the input documents.
*/
public var numberOfTestDocuments: kotlin.Int? = null
/**
* The number of documents in the input data that were used to train the entity recognizer. 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.EntityRecognizerMetadata) : this() {
this.entityTypes = x.entityTypes
this.evaluationMetrics = x.evaluationMetrics
this.numberOfTestDocuments = x.numberOfTestDocuments
this.numberOfTrainedDocuments = x.numberOfTrainedDocuments
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.EntityRecognizerMetadata = EntityRecognizerMetadata(this)
/**
* construct an [aws.sdk.kotlin.services.comprehend.model.EntityRecognizerEvaluationMetrics] inside the given [block]
*/
public fun evaluationMetrics(block: aws.sdk.kotlin.services.comprehend.model.EntityRecognizerEvaluationMetrics.Builder.() -> kotlin.Unit) {
this.evaluationMetrics = aws.sdk.kotlin.services.comprehend.model.EntityRecognizerEvaluationMetrics.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}