aws.sdk.kotlin.services.sagemaker.model.ResolvedAttributes.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.sagemaker.model
/**
* The resolved attributes.
*/
class ResolvedAttributes private constructor(builder: BuilderImpl) {
/**
* Specifies a metric to minimize or maximize as the objective of a job.
*/
val autoMlJobObjective: AutoMlJobObjective? = builder.autoMlJobObjective
/**
* How long a job is allowed to run, or how many candidates a job is allowed to
* generate.
*/
val completionCriteria: AutoMlJobCompletionCriteria? = builder.completionCriteria
/**
* The problem type.
*/
val problemType: ProblemType? = builder.problemType
companion object {
@JvmStatic
fun fluentBuilder(): FluentBuilder = BuilderImpl()
internal fun builder(): DslBuilder = BuilderImpl()
operator fun invoke(block: DslBuilder.() -> kotlin.Unit): ResolvedAttributes = BuilderImpl().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ResolvedAttributes(")
append("autoMlJobObjective=$autoMlJobObjective,")
append("completionCriteria=$completionCriteria,")
append("problemType=$problemType)")
}
override fun hashCode(): kotlin.Int {
var result = autoMlJobObjective?.hashCode() ?: 0
result = 31 * result + (completionCriteria?.hashCode() ?: 0)
result = 31 * result + (problemType?.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 ResolvedAttributes
if (autoMlJobObjective != other.autoMlJobObjective) return false
if (completionCriteria != other.completionCriteria) return false
if (problemType != other.problemType) return false
return true
}
fun copy(block: DslBuilder.() -> kotlin.Unit = {}): ResolvedAttributes = BuilderImpl(this).apply(block).build()
interface FluentBuilder {
fun build(): ResolvedAttributes
/**
* Specifies a metric to minimize or maximize as the objective of a job.
*/
fun autoMlJobObjective(autoMlJobObjective: AutoMlJobObjective): FluentBuilder
/**
* How long a job is allowed to run, or how many candidates a job is allowed to
* generate.
*/
fun completionCriteria(completionCriteria: AutoMlJobCompletionCriteria): FluentBuilder
/**
* The problem type.
*/
fun problemType(problemType: ProblemType): FluentBuilder
}
interface DslBuilder {
/**
* Specifies a metric to minimize or maximize as the objective of a job.
*/
var autoMlJobObjective: AutoMlJobObjective?
/**
* How long a job is allowed to run, or how many candidates a job is allowed to
* generate.
*/
var completionCriteria: AutoMlJobCompletionCriteria?
/**
* The problem type.
*/
var problemType: ProblemType?
fun build(): ResolvedAttributes
/**
* construct an [aws.sdk.kotlin.services.sagemaker.model.AutoMlJobObjective] inside the given [block]
*/
fun autoMlJobObjective(block: AutoMlJobObjective.DslBuilder.() -> kotlin.Unit) {
this.autoMlJobObjective = AutoMlJobObjective.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.sagemaker.model.AutoMlJobCompletionCriteria] inside the given [block]
*/
fun completionCriteria(block: AutoMlJobCompletionCriteria.DslBuilder.() -> kotlin.Unit) {
this.completionCriteria = AutoMlJobCompletionCriteria.invoke(block)
}
}
private class BuilderImpl() : FluentBuilder, DslBuilder {
override var autoMlJobObjective: AutoMlJobObjective? = null
override var completionCriteria: AutoMlJobCompletionCriteria? = null
override var problemType: ProblemType? = null
constructor(x: ResolvedAttributes) : this() {
this.autoMlJobObjective = x.autoMlJobObjective
this.completionCriteria = x.completionCriteria
this.problemType = x.problemType
}
override fun build(): ResolvedAttributes = ResolvedAttributes(this)
override fun autoMlJobObjective(autoMlJobObjective: AutoMlJobObjective): FluentBuilder = apply { this.autoMlJobObjective = autoMlJobObjective }
override fun completionCriteria(completionCriteria: AutoMlJobCompletionCriteria): FluentBuilder = apply { this.completionCriteria = completionCriteria }
override fun problemType(problemType: ProblemType): FluentBuilder = apply { this.problemType = problemType }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy