All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshWarmPoolProgress.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
Show newest version
// 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 warm pool.
 */
public class InstanceRefreshWarmPoolProgress private constructor(builder: Builder) {
    /**
     * The number of instances remaining to update.
     */
    public val instancesToUpdate: kotlin.Int? = builder.instancesToUpdate
    /**
     * The percentage of instances in the warm pool 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.InstanceRefreshWarmPoolProgress = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("InstanceRefreshWarmPoolProgress(")
        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 InstanceRefreshWarmPoolProgress

        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.InstanceRefreshWarmPoolProgress = 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 warm pool 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.InstanceRefreshWarmPoolProgress) : this() {
            this.instancesToUpdate = x.instancesToUpdate
            this.percentageComplete = x.percentageComplete
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshWarmPoolProgress = InstanceRefreshWarmPoolProgress(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy