All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.datazone.model.RejectRule.kt Maven / Gradle / Ivy

There is a newer version: 1.3.76
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.datazone.model



/**
 * Specifies the rule and the threshold under which a prediction can be rejected.
 */
public class RejectRule private constructor(builder: Builder) {
    /**
     * Specifies whether you want to reject the top prediction for all targets or none.
     */
    public val rule: aws.sdk.kotlin.services.datazone.model.RejectRuleBehavior? = builder.rule
    /**
     * The confidence score that specifies the condition at which a prediction can be rejected.
     */
    public val threshold: kotlin.Float? = builder.threshold

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.datazone.model.RejectRule = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("RejectRule(")
        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 RejectRule

        if (rule != other.rule) return false
        if (threshold != other.threshold) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.datazone.model.RejectRule = Builder(this).apply(block).build()

    public class Builder {
        /**
         * Specifies whether you want to reject the top prediction for all targets or none.
         */
        public var rule: aws.sdk.kotlin.services.datazone.model.RejectRuleBehavior? = null
        /**
         * The confidence score that specifies the condition at which a prediction can be rejected.
         */
        public var threshold: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.datazone.model.RejectRule) : this() {
            this.rule = x.rule
            this.threshold = x.threshold
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.datazone.model.RejectRule = RejectRule(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy