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

commonMain.aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationOutput.kt Maven / Gradle / Ivy

There is a newer version: 1.3.77
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.codebuild.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The scaling configuration output of a compute fleet.
 */
public class ScalingConfigurationOutput private constructor(builder: Builder) {
    /**
     * The desired number of instances in the fleet when auto-scaling.
     */
    public val desiredCapacity: kotlin.Int? = builder.desiredCapacity
    /**
     * The maximum number of instances in the fleet when auto-scaling.
     */
    public val maxCapacity: kotlin.Int? = builder.maxCapacity
    /**
     * The scaling type for a compute fleet.
     */
    public val scalingType: aws.sdk.kotlin.services.codebuild.model.FleetScalingType? = builder.scalingType
    /**
     * A list of `TargetTrackingScalingConfiguration` objects.
     */
    public val targetTrackingScalingConfigs: List? = builder.targetTrackingScalingConfigs

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

    override fun toString(): kotlin.String = buildString {
        append("ScalingConfigurationOutput(")
        append("desiredCapacity=$desiredCapacity,")
        append("maxCapacity=$maxCapacity,")
        append("scalingType=$scalingType,")
        append("targetTrackingScalingConfigs=$targetTrackingScalingConfigs")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = desiredCapacity ?: 0
        result = 31 * result + (maxCapacity ?: 0)
        result = 31 * result + (scalingType?.hashCode() ?: 0)
        result = 31 * result + (targetTrackingScalingConfigs?.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 ScalingConfigurationOutput

        if (desiredCapacity != other.desiredCapacity) return false
        if (maxCapacity != other.maxCapacity) return false
        if (scalingType != other.scalingType) return false
        if (targetTrackingScalingConfigs != other.targetTrackingScalingConfigs) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The desired number of instances in the fleet when auto-scaling.
         */
        public var desiredCapacity: kotlin.Int? = null
        /**
         * The maximum number of instances in the fleet when auto-scaling.
         */
        public var maxCapacity: kotlin.Int? = null
        /**
         * The scaling type for a compute fleet.
         */
        public var scalingType: aws.sdk.kotlin.services.codebuild.model.FleetScalingType? = null
        /**
         * A list of `TargetTrackingScalingConfiguration` objects.
         */
        public var targetTrackingScalingConfigs: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.codebuild.model.ScalingConfigurationOutput) : this() {
            this.desiredCapacity = x.desiredCapacity
            this.maxCapacity = x.maxCapacity
            this.scalingType = x.scalingType
            this.targetTrackingScalingConfigs = x.targetTrackingScalingConfigs
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy