
commonMain.aws.sdk.kotlin.services.comprehend.model.DocumentClassificationConfig.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
/**
* Configuration required for a custom classification model.
*/
public class DocumentClassificationConfig private constructor(builder: Builder) {
/**
* One or more labels to associate with the custom classifier.
*/
public val labels: List? = builder.labels
/**
* Classification mode indicates whether the documents are `MULTI_CLASS` or `MULTI_LABEL`.
*/
public val mode: aws.sdk.kotlin.services.comprehend.model.DocumentClassifierMode? = builder.mode
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.DocumentClassificationConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("DocumentClassificationConfig(")
append("labels=$labels,")
append("mode=$mode")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = labels?.hashCode() ?: 0
result = 31 * result + (mode?.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 DocumentClassificationConfig
if (labels != other.labels) return false
if (mode != other.mode) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.DocumentClassificationConfig = Builder(this).apply(block).build()
public class Builder {
/**
* One or more labels to associate with the custom classifier.
*/
public var labels: List? = null
/**
* Classification mode indicates whether the documents are `MULTI_CLASS` or `MULTI_LABEL`.
*/
public var mode: aws.sdk.kotlin.services.comprehend.model.DocumentClassifierMode? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.DocumentClassificationConfig) : this() {
this.labels = x.labels
this.mode = x.mode
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.DocumentClassificationConfig = DocumentClassificationConfig(this)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy