commonMain.aws.sdk.kotlin.services.applicationautoscaling.model.ScalableTargetAction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of applicationautoscaling-jvm Show documentation
Show all versions of applicationautoscaling-jvm Show documentation
The AWS Kotlin client for Application Auto Scaling
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.applicationautoscaling.model
/**
* Represents the minimum and maximum capacity for a scheduled action.
*/
public class ScalableTargetAction private constructor(builder: Builder) {
/**
* The maximum capacity.
*
* Although you can specify a large maximum capacity, note that service quotas may impose lower limits. Each service has its own default quotas for the maximum capacity of the resource. If you want to specify a higher limit, you can request an increase. For more information, consult the documentation for that service. For information about the default quotas for each service, see [Service endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html) in the *Amazon Web Services General Reference*.
*/
public val maxCapacity: kotlin.Int? = builder.maxCapacity
/**
* The minimum capacity.
*
* When the scheduled action runs, the resource will have at least this much capacity, but it might have more depending on other settings, such as the target utilization level of a target tracking scaling policy.
*/
public val minCapacity: kotlin.Int? = builder.minCapacity
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.applicationautoscaling.model.ScalableTargetAction = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ScalableTargetAction(")
append("maxCapacity=$maxCapacity,")
append("minCapacity=$minCapacity")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maxCapacity ?: 0
result = 31 * result + (minCapacity ?: 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 ScalableTargetAction
if (maxCapacity != other.maxCapacity) return false
if (minCapacity != other.minCapacity) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.applicationautoscaling.model.ScalableTargetAction = Builder(this).apply(block).build()
public class Builder {
/**
* The maximum capacity.
*
* Although you can specify a large maximum capacity, note that service quotas may impose lower limits. Each service has its own default quotas for the maximum capacity of the resource. If you want to specify a higher limit, you can request an increase. For more information, consult the documentation for that service. For information about the default quotas for each service, see [Service endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html) in the *Amazon Web Services General Reference*.
*/
public var maxCapacity: kotlin.Int? = null
/**
* The minimum capacity.
*
* When the scheduled action runs, the resource will have at least this much capacity, but it might have more depending on other settings, such as the target utilization level of a target tracking scaling policy.
*/
public var minCapacity: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.applicationautoscaling.model.ScalableTargetAction) : this() {
this.maxCapacity = x.maxCapacity
this.minCapacity = x.minCapacity
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.applicationautoscaling.model.ScalableTargetAction = ScalableTargetAction(this)
internal fun correctErrors(): Builder {
return this
}
}
}