
commonMain.aws.sdk.kotlin.services.lightsail.model.StopInstanceOnIdleRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lightsail.model
/**
* Describes a request to create or edit the `StopInstanceOnIdle` add-on.
*
* This add-on only applies to Lightsail for Research resources.
*/
public class StopInstanceOnIdleRequest private constructor(builder: Builder) {
/**
* The amount of idle time in minutes after which your virtual computer will automatically stop.
*/
public val duration: kotlin.String? = builder.duration
/**
* The value to compare with the duration.
*/
public val threshold: kotlin.String? = builder.threshold
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lightsail.model.StopInstanceOnIdleRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("StopInstanceOnIdleRequest(")
append("duration=$duration,")
append("threshold=$threshold")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = duration?.hashCode() ?: 0
result = 31 * result + (threshold?.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 StopInstanceOnIdleRequest
if (duration != other.duration) return false
if (threshold != other.threshold) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lightsail.model.StopInstanceOnIdleRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The amount of idle time in minutes after which your virtual computer will automatically stop.
*/
public var duration: kotlin.String? = null
/**
* The value to compare with the duration.
*/
public var threshold: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lightsail.model.StopInstanceOnIdleRequest) : this() {
this.duration = x.duration
this.threshold = x.threshold
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lightsail.model.StopInstanceOnIdleRequest = StopInstanceOnIdleRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy