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

commonMain.aws.sdk.kotlin.services.autoscaling.model.DisableMetricsCollectionRequest.kt Maven / Gradle / Ivy

There is a newer version: 1.3.35
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

public class DisableMetricsCollectionRequest private constructor(builder: Builder) {
    /**
     * The name of the Auto Scaling group.
     */
    public val autoScalingGroupName: kotlin.String? = builder.autoScalingGroupName
    /**
     * Identifies the metrics to disable.
     *
     * 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 omit this property, all metrics are disabled.
     *
     * 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.DisableMetricsCollectionRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DisableMetricsCollectionRequest(")
        append("autoScalingGroupName=$autoScalingGroupName,")
        append("metrics=$metrics")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = autoScalingGroupName?.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 DisableMetricsCollectionRequest

        if (autoScalingGroupName != other.autoScalingGroupName) return false
        if (metrics != other.metrics) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the Auto Scaling group.
         */
        public var autoScalingGroupName: kotlin.String? = null
        /**
         * Identifies the metrics to disable.
         *
         * 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 omit this property, all metrics are disabled.
         *
         * 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.DisableMetricsCollectionRequest) : this() {
            this.autoScalingGroupName = x.autoScalingGroupName
            this.metrics = x.metrics
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy