commonMain.aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoscaling-jvm Show documentation
Show all versions of autoscaling-jvm Show documentation
The AWS SDK for Kotlin client for Auto Scaling
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.autoscaling.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Reports progress on replacing instances that are in the Auto Scaling group.
*/
public class InstanceRefreshLivePoolProgress private constructor(builder: Builder) {
/**
* The number of instances remaining to update.
*/
public val instancesToUpdate: kotlin.Int? = builder.instancesToUpdate
/**
* The percentage of instances in the Auto Scaling group that have been replaced. For each instance replacement, Amazon EC2 Auto Scaling tracks the instance's health status and warm-up time. When the instance's health status changes to healthy and the specified warm-up time passes, the instance is considered updated and is added to the percentage complete.
*/
public val percentageComplete: kotlin.Int? = builder.percentageComplete
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("InstanceRefreshLivePoolProgress(")
append("instancesToUpdate=$instancesToUpdate,")
append("percentageComplete=$percentageComplete")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = instancesToUpdate ?: 0
result = 31 * result + (percentageComplete ?: 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 InstanceRefreshLivePoolProgress
if (instancesToUpdate != other.instancesToUpdate) return false
if (percentageComplete != other.percentageComplete) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of instances remaining to update.
*/
public var instancesToUpdate: kotlin.Int? = null
/**
* The percentage of instances in the Auto Scaling group that have been replaced. For each instance replacement, Amazon EC2 Auto Scaling tracks the instance's health status and warm-up time. When the instance's health status changes to healthy and the specified warm-up time passes, the instance is considered updated and is added to the percentage complete.
*/
public var percentageComplete: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress) : this() {
this.instancesToUpdate = x.instancesToUpdate
this.percentageComplete = x.percentageComplete
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress = InstanceRefreshLivePoolProgress(this)
internal fun correctErrors(): Builder {
return this
}
}
}