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

commonMain.aws.sdk.kotlin.services.cleanroomsml.model.TrainedModelsConfigurationPolicy.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cleanroomsml.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The configuration policy for the trained models.
 */
public class TrainedModelsConfigurationPolicy private constructor(builder: Builder) {
    /**
     * The container for the logs of the trained model.
     */
    public val containerLogs: List? = builder.containerLogs
    /**
     * The container for the metrics of the trained model.
     */
    public val containerMetrics: aws.sdk.kotlin.services.cleanroomsml.model.MetricsConfigurationPolicy? = builder.containerMetrics

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

    override fun toString(): kotlin.String = buildString {
        append("TrainedModelsConfigurationPolicy(")
        append("containerLogs=$containerLogs,")
        append("containerMetrics=$containerMetrics")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = containerLogs?.hashCode() ?: 0
        result = 31 * result + (containerMetrics?.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 TrainedModelsConfigurationPolicy

        if (containerLogs != other.containerLogs) return false
        if (containerMetrics != other.containerMetrics) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The container for the logs of the trained model.
         */
        public var containerLogs: List? = null
        /**
         * The container for the metrics of the trained model.
         */
        public var containerMetrics: aws.sdk.kotlin.services.cleanroomsml.model.MetricsConfigurationPolicy? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.TrainedModelsConfigurationPolicy) : this() {
            this.containerLogs = x.containerLogs
            this.containerMetrics = x.containerMetrics
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.cleanroomsml.model.MetricsConfigurationPolicy] inside the given [block]
         */
        public fun containerMetrics(block: aws.sdk.kotlin.services.cleanroomsml.model.MetricsConfigurationPolicy.Builder.() -> kotlin.Unit) {
            this.containerMetrics = aws.sdk.kotlin.services.cleanroomsml.model.MetricsConfigurationPolicy.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy