commonMain.aws.sdk.kotlin.services.autoscaling.model.LoadForecast.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of autoscaling-jvm Show documentation
Show all versions of autoscaling-jvm Show documentation
The AWS SDK for Kotlin client for Auto Scaling
// 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
/**
* A `GetPredictiveScalingForecast` call returns the load forecast for a predictive scaling policy. This structure includes the data points for that load forecast, along with the timestamps of those data points and the metric specification.
*/
public class LoadForecast private constructor(builder: Builder) {
/**
* The metric specification for the load forecast.
*/
public val metricSpecification: aws.sdk.kotlin.services.autoscaling.model.PredictiveScalingMetricSpecification? = builder.metricSpecification
/**
* The timestamps for the data points, in UTC format.
*/
public val timestamps: List? = builder.timestamps
/**
* The values of the data points.
*/
public val values: List? = builder.values
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.autoscaling.model.LoadForecast = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LoadForecast(")
append("metricSpecification=$metricSpecification,")
append("timestamps=$timestamps,")
append("values=$values")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metricSpecification?.hashCode() ?: 0
result = 31 * result + (timestamps?.hashCode() ?: 0)
result = 31 * result + (values?.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 LoadForecast
if (metricSpecification != other.metricSpecification) return false
if (timestamps != other.timestamps) return false
if (values != other.values) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.autoscaling.model.LoadForecast = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The metric specification for the load forecast.
*/
public var metricSpecification: aws.sdk.kotlin.services.autoscaling.model.PredictiveScalingMetricSpecification? = null
/**
* The timestamps for the data points, in UTC format.
*/
public var timestamps: List? = null
/**
* The values of the data points.
*/
public var values: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.LoadForecast) : this() {
this.metricSpecification = x.metricSpecification
this.timestamps = x.timestamps
this.values = x.values
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.autoscaling.model.LoadForecast = LoadForecast(this)
/**
* construct an [aws.sdk.kotlin.services.autoscaling.model.PredictiveScalingMetricSpecification] inside the given [block]
*/
public fun metricSpecification(block: aws.sdk.kotlin.services.autoscaling.model.PredictiveScalingMetricSpecification.Builder.() -> kotlin.Unit) {
this.metricSpecification = aws.sdk.kotlin.services.autoscaling.model.PredictiveScalingMetricSpecification.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}