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

commonMain.aws.sdk.kotlin.services.bedrock.model.ValidatorMetric.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.bedrock.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The metric for the validator.
 */
public class ValidatorMetric private constructor(builder: Builder) {
    /**
     * The validation loss associated with this validator.
     */
    public val validationLoss: kotlin.Float? = builder.validationLoss

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

    override fun toString(): kotlin.String = buildString {
        append("ValidatorMetric(")
        append("validationLoss=$validationLoss")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = validationLoss?.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 ValidatorMetric

        if (!(validationLoss?.equals(other.validationLoss) ?: (other.validationLoss == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The validation loss associated with this validator.
         */
        public var validationLoss: kotlin.Float? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrock.model.ValidatorMetric) : this() {
            this.validationLoss = x.validationLoss
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy