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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.AutoScalingGroupConfiguration.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.computeoptimizer.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Describes the configuration of an Auto Scaling group.
 */
public class AutoScalingGroupConfiguration private constructor(builder: Builder) {
    /**
     * The desired capacity, or number of instances, for the Auto Scaling group.
     */
    public val desiredCapacity: kotlin.Int = builder.desiredCapacity
    /**
     * The instance type for the Auto Scaling group.
     */
    public val instanceType: kotlin.String? = builder.instanceType
    /**
     * The maximum size, or maximum number of instances, for the Auto Scaling group.
     */
    public val maxSize: kotlin.Int = builder.maxSize
    /**
     * The minimum size, or minimum number of instances, for the Auto Scaling group.
     */
    public val minSize: kotlin.Int = builder.minSize

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

    override fun toString(): kotlin.String = buildString {
        append("AutoScalingGroupConfiguration(")
        append("desiredCapacity=$desiredCapacity,")
        append("instanceType=$instanceType,")
        append("maxSize=$maxSize,")
        append("minSize=$minSize")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = desiredCapacity
        result = 31 * result + (instanceType?.hashCode() ?: 0)
        result = 31 * result + (maxSize)
        result = 31 * result + (minSize)
        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 AutoScalingGroupConfiguration

        if (desiredCapacity != other.desiredCapacity) return false
        if (instanceType != other.instanceType) return false
        if (maxSize != other.maxSize) return false
        if (minSize != other.minSize) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The desired capacity, or number of instances, for the Auto Scaling group.
         */
        public var desiredCapacity: kotlin.Int = 0
        /**
         * The instance type for the Auto Scaling group.
         */
        public var instanceType: kotlin.String? = null
        /**
         * The maximum size, or maximum number of instances, for the Auto Scaling group.
         */
        public var maxSize: kotlin.Int = 0
        /**
         * The minimum size, or minimum number of instances, for the Auto Scaling group.
         */
        public var minSize: kotlin.Int = 0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.AutoScalingGroupConfiguration) : this() {
            this.desiredCapacity = x.desiredCapacity
            this.instanceType = x.instanceType
            this.maxSize = x.maxSize
            this.minSize = x.minSize
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy