commonMain.aws.sdk.kotlin.services.autoscaling.model.EnableMetricsCollectionRequest.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 EnableMetricsCollectionRequest private constructor(builder: Builder) {
/**
* The name of the Auto Scaling group.
*/
public val autoScalingGroupName: kotlin.String? = builder.autoScalingGroupName
/**
* The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. The only valid value is `1Minute`.
*/
public val granularity: kotlin.String? = builder.granularity
/**
* Identifies the metrics to enable.
*
* You can specify one or more of the following metrics:
* + `GroupMinSize`
* + `GroupMaxSize`
* + `GroupDesiredCapacity`
* + `GroupInServiceInstances`
* + `GroupPendingInstances`
* + `GroupStandbyInstances`
* + `GroupTerminatingInstances`
* + `GroupTotalInstances`
* + `GroupInServiceCapacity`
* + `GroupPendingCapacity`
* + `GroupStandbyCapacity`
* + `GroupTerminatingCapacity`
* + `GroupTotalCapacity`
* + `WarmPoolDesiredCapacity`
* + `WarmPoolWarmedCapacity`
* + `WarmPoolPendingCapacity`
* + `WarmPoolTerminatingCapacity`
* + `WarmPoolTotalCapacity`
* + `GroupAndWarmPoolDesiredCapacity`
* + `GroupAndWarmPoolTotalCapacity`
*
* If you specify `Granularity` and don't specify any metrics, all metrics are enabled.
*
* For more information, see [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide*.
*/
public val metrics: List? = builder.metrics
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.autoscaling.model.EnableMetricsCollectionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("EnableMetricsCollectionRequest(")
append("autoScalingGroupName=$autoScalingGroupName,")
append("granularity=$granularity,")
append("metrics=$metrics")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = autoScalingGroupName?.hashCode() ?: 0
result = 31 * result + (granularity?.hashCode() ?: 0)
result = 31 * result + (metrics?.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 EnableMetricsCollectionRequest
if (autoScalingGroupName != other.autoScalingGroupName) return false
if (granularity != other.granularity) return false
if (metrics != other.metrics) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.autoscaling.model.EnableMetricsCollectionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The name of the Auto Scaling group.
*/
public var autoScalingGroupName: kotlin.String? = null
/**
* The frequency at which Amazon EC2 Auto Scaling sends aggregated data to CloudWatch. The only valid value is `1Minute`.
*/
public var granularity: kotlin.String? = null
/**
* Identifies the metrics to enable.
*
* You can specify one or more of the following metrics:
* + `GroupMinSize`
* + `GroupMaxSize`
* + `GroupDesiredCapacity`
* + `GroupInServiceInstances`
* + `GroupPendingInstances`
* + `GroupStandbyInstances`
* + `GroupTerminatingInstances`
* + `GroupTotalInstances`
* + `GroupInServiceCapacity`
* + `GroupPendingCapacity`
* + `GroupStandbyCapacity`
* + `GroupTerminatingCapacity`
* + `GroupTotalCapacity`
* + `WarmPoolDesiredCapacity`
* + `WarmPoolWarmedCapacity`
* + `WarmPoolPendingCapacity`
* + `WarmPoolTerminatingCapacity`
* + `WarmPoolTotalCapacity`
* + `GroupAndWarmPoolDesiredCapacity`
* + `GroupAndWarmPoolTotalCapacity`
*
* If you specify `Granularity` and don't specify any metrics, all metrics are enabled.
*
* For more information, see [Amazon CloudWatch metrics for Amazon EC2 Auto Scaling](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-metrics.html) in the *Amazon EC2 Auto Scaling User Guide*.
*/
public var metrics: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.autoscaling.model.EnableMetricsCollectionRequest) : this() {
this.autoScalingGroupName = x.autoScalingGroupName
this.granularity = x.granularity
this.metrics = x.metrics
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.autoscaling.model.EnableMetricsCollectionRequest = EnableMetricsCollectionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}