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

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

There is a newer version: 1.3.76
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 in an Auto Scaling group that has a warm pool. This includes separate details for instances in the warm pool and instances in the Auto Scaling group (the live pool).
 */
public class InstanceRefreshProgressDetails private constructor(builder: Builder) {
    /**
     * Reports progress on replacing instances that are in the Auto Scaling group.
     */
    public val livePoolProgress: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress? = builder.livePoolProgress
    /**
     * Reports progress on replacing instances that are in the warm pool.
     */
    public val warmPoolProgress: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshWarmPoolProgress? = builder.warmPoolProgress

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshProgressDetails = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("InstanceRefreshProgressDetails(")
        append("livePoolProgress=$livePoolProgress,")
        append("warmPoolProgress=$warmPoolProgress")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = livePoolProgress?.hashCode() ?: 0
        result = 31 * result + (warmPoolProgress?.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 InstanceRefreshProgressDetails

        if (livePoolProgress != other.livePoolProgress) return false
        if (warmPoolProgress != other.warmPoolProgress) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshProgressDetails = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Reports progress on replacing instances that are in the Auto Scaling group.
         */
        public var livePoolProgress: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress? = null
        /**
         * Reports progress on replacing instances that are in the warm pool.
         */
        public var warmPoolProgress: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshWarmPoolProgress? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshProgressDetails) : this() {
            this.livePoolProgress = x.livePoolProgress
            this.warmPoolProgress = x.warmPoolProgress
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress] inside the given [block]
         */
        public fun livePoolProgress(block: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress.Builder.() -> kotlin.Unit) {
            this.livePoolProgress = aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshLivePoolProgress.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshWarmPoolProgress] inside the given [block]
         */
        public fun warmPoolProgress(block: aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshWarmPoolProgress.Builder.() -> kotlin.Unit) {
            this.warmPoolProgress = aws.sdk.kotlin.services.autoscaling.model.InstanceRefreshWarmPoolProgress.invoke(block)
        }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy