commonMain.aws.sdk.kotlin.services.cleanroomsml.model.StoppingCondition.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cleanroomsml-jvm Show documentation
Show all versions of cleanroomsml-jvm Show documentation
The AWS SDK for Kotlin client for CleanRoomsML
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cleanroomsml.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The criteria used to stop model training.
*/
public class StoppingCondition private constructor(builder: Builder) {
/**
* The maximum amount of time, in seconds, that model training can run before it is terminated.
*/
public val maxRuntimeInSeconds: kotlin.Int = builder.maxRuntimeInSeconds
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cleanroomsml.model.StoppingCondition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StoppingCondition(")
append("maxRuntimeInSeconds=$maxRuntimeInSeconds")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maxRuntimeInSeconds
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 StoppingCondition
if (maxRuntimeInSeconds != other.maxRuntimeInSeconds) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cleanroomsml.model.StoppingCondition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The maximum amount of time, in seconds, that model training can run before it is terminated.
*/
public var maxRuntimeInSeconds: kotlin.Int = 86400
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cleanroomsml.model.StoppingCondition) : this() {
this.maxRuntimeInSeconds = x.maxRuntimeInSeconds
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cleanroomsml.model.StoppingCondition = StoppingCondition(this)
internal fun correctErrors(): Builder {
return this
}
}
}