aws.sdk.kotlin.services.sagemaker.model.IntegerParameterRange.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
/**
* For a hyperparameter of the integer type, specifies the range
* that
* a hyperparameter tuning job searches.
*/
class IntegerParameterRange private constructor(builder: BuilderImpl) {
/**
* The maximum
* value
* of the hyperparameter to search.
*/
val maxValue: String? = builder.maxValue
/**
* The minimum
* value
* of the hyperparameter to search.
*/
val minValue: String? = builder.minValue
/**
* The name of the hyperparameter to search.
*/
val name: String? = builder.name
/**
* The scale that hyperparameter tuning uses to search the hyperparameter range. For
* information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values:
* Auto
* Amazon SageMaker hyperparameter tuning chooses the best scale for the
* hyperparameter.
* Linear
* Hyperparameter tuning searches the values in the hyperparameter range by
* using a linear scale.
* Logarithmic
* Hyperparameter tuning searches the values in the hyperparameter range by
* using a logarithmic scale.
* Logarithmic scaling works only for ranges that have only values greater
* than 0.
*/
val scalingType: HyperParameterScalingType? = builder.scalingType
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): IntegerParameterRange = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("IntegerParameterRange(")
append("maxValue=$maxValue,")
append("minValue=$minValue,")
append("name=$name,")
append("scalingType=$scalingType)")
}
override fun hashCode(): kotlin.Int {
var result = maxValue?.hashCode() ?: 0
result = 31 * result + (minValue?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (scalingType?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as IntegerParameterRange
if (maxValue != other.maxValue) return false
if (minValue != other.minValue) return false
if (name != other.name) return false
if (scalingType != other.scalingType) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): IntegerParameterRange = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): IntegerParameterRange
/**
* The maximum
* value
* of the hyperparameter to search.
*/
fun maxValue(maxValue: String): FluentBuilder
/**
* The minimum
* value
* of the hyperparameter to search.
*/
fun minValue(minValue: String): FluentBuilder
/**
* The name of the hyperparameter to search.
*/
fun name(name: String): FluentBuilder
/**
* The scale that hyperparameter tuning uses to search the hyperparameter range. For
* information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values:
* Auto
* Amazon SageMaker hyperparameter tuning chooses the best scale for the
* hyperparameter.
* Linear
* Hyperparameter tuning searches the values in the hyperparameter range by
* using a linear scale.
* Logarithmic
* Hyperparameter tuning searches the values in the hyperparameter range by
* using a logarithmic scale.
* Logarithmic scaling works only for ranges that have only values greater
* than 0.
*/
fun scalingType(scalingType: HyperParameterScalingType): FluentBuilder
}
interface DslBuilder {
/**
* The maximum
* value
* of the hyperparameter to search.
*/
var maxValue: String?
/**
* The minimum
* value
* of the hyperparameter to search.
*/
var minValue: String?
/**
* The name of the hyperparameter to search.
*/
var name: String?
/**
* The scale that hyperparameter tuning uses to search the hyperparameter range. For
* information about choosing a hyperparameter scale, see Hyperparameter Scaling. One of the following values:
* Auto
* Amazon SageMaker hyperparameter tuning chooses the best scale for the
* hyperparameter.
* Linear
* Hyperparameter tuning searches the values in the hyperparameter range by
* using a linear scale.
* Logarithmic
* Hyperparameter tuning searches the values in the hyperparameter range by
* using a logarithmic scale.
* Logarithmic scaling works only for ranges that have only values greater
* than 0.
*/
var scalingType: HyperParameterScalingType?
fun build(): IntegerParameterRange
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var maxValue: String? = null
override var minValue: String? = null
override var name: String? = null
override var scalingType: HyperParameterScalingType? = null
constructor(x: IntegerParameterRange) : this() {
this.maxValue = x.maxValue
this.minValue = x.minValue
this.name = x.name
this.scalingType = x.scalingType
}
override fun build(): IntegerParameterRange = IntegerParameterRange(this)
override fun maxValue(maxValue: String): FluentBuilder = apply { this.maxValue = maxValue }
override fun minValue(minValue: String): FluentBuilder = apply { this.minValue = minValue }
override fun name(name: String): FluentBuilder = apply { this.name = name }
override fun scalingType(scalingType: HyperParameterScalingType): FluentBuilder = apply { this.scalingType = scalingType }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy