commonMain.aws.sdk.kotlin.services.autoscaling.model.SetDesiredCapacityRequest.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
public class SetDesiredCapacityRequest private constructor(builder: Builder) {
/**
* The name of the Auto Scaling group.
*/
public val autoScalingGroupName: kotlin.String? = builder.autoScalingGroupName
/**
* The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain.
*/
public val desiredCapacity: kotlin.Int? = builder.desiredCapacity
/**
* Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before initiating a scaling activity to set your Auto Scaling group to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the cooldown period during manual scaling activities.
*/
public val honorCooldown: kotlin.Boolean? = builder.honorCooldown
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.autoscaling.model.SetDesiredCapacityRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SetDesiredCapacityRequest(")
append("autoScalingGroupName=$autoScalingGroupName,")
append("desiredCapacity=$desiredCapacity,")
append("honorCooldown=$honorCooldown")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = autoScalingGroupName?.hashCode() ?: 0
result = 31 * result + (desiredCapacity ?: 0)
result = 31 * result + (honorCooldown?.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 SetDesiredCapacityRequest
if (autoScalingGroupName != other.autoScalingGroupName) return false
if (desiredCapacity != other.desiredCapacity) return false
if (honorCooldown != other.honorCooldown) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.autoscaling.model.SetDesiredCapacityRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the Auto Scaling group.
*/
public var autoScalingGroupName: kotlin.String? = null
/**
* The desired capacity is the initial capacity of the Auto Scaling group after this operation completes and the capacity it attempts to maintain.
*/
public var desiredCapacity: kotlin.Int? = null
/**
* Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before initiating a scaling activity to set your Auto Scaling group to its new capacity. By default, Amazon EC2 Auto Scaling does not honor the cooldown period during manual scaling activities.
*/
public var honorCooldown: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.SetDesiredCapacityRequest) : this() {
this.autoScalingGroupName = x.autoScalingGroupName
this.desiredCapacity = x.desiredCapacity
this.honorCooldown = x.honorCooldown
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.autoscaling.model.SetDesiredCapacityRequest = SetDesiredCapacityRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}