
commonMain.aws.sdk.kotlin.services.emrserverless.model.AutoStopConfig.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.emrserverless.model
/**
* The configuration for an application to automatically stop after a certain amount of time being idle.
*/
public class AutoStopConfig private constructor(builder: Builder) {
/**
* Enables the application to automatically stop after a certain amount of time being idle. Defaults to true.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* The amount of idle time in minutes after which your application will automatically stop. Defaults to 15 minutes.
*/
public val idleTimeoutMinutes: kotlin.Int? = builder.idleTimeoutMinutes
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.emrserverless.model.AutoStopConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AutoStopConfig(")
append("enabled=$enabled,")
append("idleTimeoutMinutes=$idleTimeoutMinutes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = enabled?.hashCode() ?: 0
result = 31 * result + (idleTimeoutMinutes ?: 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 AutoStopConfig
if (enabled != other.enabled) return false
if (idleTimeoutMinutes != other.idleTimeoutMinutes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.emrserverless.model.AutoStopConfig = Builder(this).apply(block).build()
public class Builder {
/**
* Enables the application to automatically stop after a certain amount of time being idle. Defaults to true.
*/
public var enabled: kotlin.Boolean? = null
/**
* The amount of idle time in minutes after which your application will automatically stop. Defaults to 15 minutes.
*/
public var idleTimeoutMinutes: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.emrserverless.model.AutoStopConfig) : this() {
this.enabled = x.enabled
this.idleTimeoutMinutes = x.idleTimeoutMinutes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.emrserverless.model.AutoStopConfig = AutoStopConfig(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy