commonMain.aws.sdk.kotlin.services.datazone.model.AcceptRule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datazone-jvm Show documentation
Show all versions of datazone-jvm Show documentation
The AWS SDK for Kotlin client for DataZone
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.datazone.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Specifies the rule and the threshold under which a prediction can be accepted.
*/
public class AcceptRule private constructor(builder: Builder) {
/**
* Specifies whether you want to accept the top prediction for all targets or none.
*/
public val rule: aws.sdk.kotlin.services.datazone.model.AcceptRuleBehavior? = builder.rule
/**
* The confidence score that specifies the condition at which a prediction can be accepted.
*/
public val threshold: kotlin.Float? = builder.threshold
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.datazone.model.AcceptRule = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AcceptRule(")
append("rule=$rule,")
append("threshold=$threshold")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = rule?.hashCode() ?: 0
result = 31 * result + (threshold?.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 AcceptRule
if (rule != other.rule) return false
if (!(threshold?.equals(other.threshold) ?: (other.threshold == null))) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datazone.model.AcceptRule = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies whether you want to accept the top prediction for all targets or none.
*/
public var rule: aws.sdk.kotlin.services.datazone.model.AcceptRuleBehavior? = null
/**
* The confidence score that specifies the condition at which a prediction can be accepted.
*/
public var threshold: kotlin.Float? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.datazone.model.AcceptRule) : this() {
this.rule = x.rule
this.threshold = x.threshold
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.datazone.model.AcceptRule = AcceptRule(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy