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

commonMain.aws.sdk.kotlin.services.personalize.model.DefaultCategoricalHyperParameterRange.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.personalize.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Provides the name and default range of a categorical hyperparameter and whether the hyperparameter is tunable. A tunable hyperparameter can have its value determined during hyperparameter optimization (HPO).
 */
public class DefaultCategoricalHyperParameterRange private constructor(builder: Builder) {
    /**
     * Whether the hyperparameter is tunable.
     */
    public val isTunable: kotlin.Boolean = builder.isTunable
    /**
     * The name of the hyperparameter.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A list of the categories for the hyperparameter.
     */
    public val values: List? = builder.values

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

    override fun toString(): kotlin.String = buildString {
        append("DefaultCategoricalHyperParameterRange(")
        append("isTunable=$isTunable,")
        append("name=$name,")
        append("values=$values")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = isTunable.hashCode()
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (values?.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 DefaultCategoricalHyperParameterRange

        if (isTunable != other.isTunable) return false
        if (name != other.name) return false
        if (values != other.values) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Whether the hyperparameter is tunable.
         */
        public var isTunable: kotlin.Boolean = false
        /**
         * The name of the hyperparameter.
         */
        public var name: kotlin.String? = null
        /**
         * A list of the categories for the hyperparameter.
         */
        public var values: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.personalize.model.DefaultCategoricalHyperParameterRange) : this() {
            this.isTunable = x.isTunable
            this.name = x.name
            this.values = x.values
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy