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

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

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Use to specify a automatic model evaluation job. The `EvaluationDatasetMetricConfig` object is used to specify the prompt datasets, task type, and metric names.
 */
public class AutomatedEvaluationConfig private constructor(builder: Builder) {
    /**
     * Specifies the required elements for an automatic model evaluation job.
     */
    public val datasetMetricConfigs: List = requireNotNull(builder.datasetMetricConfigs) { "A non-null value must be provided for datasetMetricConfigs" }

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

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

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

        if (datasetMetricConfigs != other.datasetMetricConfigs) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the required elements for an automatic model evaluation job.
         */
        public var datasetMetricConfigs: List? = null

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

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

        internal fun correctErrors(): Builder {
            if (datasetMetricConfigs == null) datasetMetricConfigs = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy