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

commonMain.aws.sdk.kotlin.services.autoscaling.model.GetPredictiveScalingForecastResponse.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
import aws.smithy.kotlin.runtime.time.Instant

public class GetPredictiveScalingForecastResponse private constructor(builder: Builder) {
    /**
     * The capacity forecast.
     */
    public val capacityForecast: aws.sdk.kotlin.services.autoscaling.model.CapacityForecast? = builder.capacityForecast
    /**
     * The load forecast.
     */
    public val loadForecast: List? = builder.loadForecast
    /**
     * The time the forecast was made.
     */
    public val updateTime: aws.smithy.kotlin.runtime.time.Instant? = builder.updateTime

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

    override fun toString(): kotlin.String = buildString {
        append("GetPredictiveScalingForecastResponse(")
        append("capacityForecast=$capacityForecast,")
        append("loadForecast=$loadForecast,")
        append("updateTime=$updateTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = capacityForecast?.hashCode() ?: 0
        result = 31 * result + (loadForecast?.hashCode() ?: 0)
        result = 31 * result + (updateTime?.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 GetPredictiveScalingForecastResponse

        if (capacityForecast != other.capacityForecast) return false
        if (loadForecast != other.loadForecast) return false
        if (updateTime != other.updateTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The capacity forecast.
         */
        public var capacityForecast: aws.sdk.kotlin.services.autoscaling.model.CapacityForecast? = null
        /**
         * The load forecast.
         */
        public var loadForecast: List? = null
        /**
         * The time the forecast was made.
         */
        public var updateTime: aws.smithy.kotlin.runtime.time.Instant? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.GetPredictiveScalingForecastResponse) : this() {
            this.capacityForecast = x.capacityForecast
            this.loadForecast = x.loadForecast
            this.updateTime = x.updateTime
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy