commonMain.aws.sdk.kotlin.services.personalize.model.AutoTrainingConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personalize-jvm Show documentation
Show all versions of personalize-jvm Show documentation
The AWS SDK for Kotlin client for Personalize
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
/**
* The automatic training configuration to use when `performAutoTraining` is true.
*/
public class AutoTrainingConfig private constructor(builder: Builder) {
/**
* Specifies how often to automatically train new solution versions. Specify a rate expression in rate(*value**unit*) format. For value, specify a number between 1 and 30. For unit, specify `day` or `days`. For example, to automatically create a new solution version every 5 days, specify `rate(5 days)`. The default is every 7 days.
*
* For more information about auto training, see [Creating and configuring a solution](https://docs.aws.amazon.com/personalize/latest/dg/customizing-solution-config.html).
*/
public val schedulingExpression: kotlin.String? = builder.schedulingExpression
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalize.model.AutoTrainingConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AutoTrainingConfig(")
append("schedulingExpression=$schedulingExpression")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = schedulingExpression?.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 AutoTrainingConfig
if (schedulingExpression != other.schedulingExpression) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalize.model.AutoTrainingConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies how often to automatically train new solution versions. Specify a rate expression in rate(*value**unit*) format. For value, specify a number between 1 and 30. For unit, specify `day` or `days`. For example, to automatically create a new solution version every 5 days, specify `rate(5 days)`. The default is every 7 days.
*
* For more information about auto training, see [Creating and configuring a solution](https://docs.aws.amazon.com/personalize/latest/dg/customizing-solution-config.html).
*/
public var schedulingExpression: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalize.model.AutoTrainingConfig) : this() {
this.schedulingExpression = x.schedulingExpression
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalize.model.AutoTrainingConfig = AutoTrainingConfig(this)
internal fun correctErrors(): Builder {
return this
}
}
}