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

commonMain.aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricParameters.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.computeoptimizer.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Defines the various metric parameters that can be customized, such as threshold and headroom.
 */
public class CustomizableMetricParameters private constructor(builder: Builder) {
    /**
     * The headroom value in percentage used for the specified metric parameter.
     *
     * The following lists the valid values for CPU and memory utilization.
     * + CPU utilization: `PERCENT_30 | PERCENT_20 | PERCENT_0`
     * + Memory utilization: `PERCENT_30 | PERCENT_20 | PERCENT_10`
     */
    public val headroom: aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricHeadroom? = builder.headroom
    /**
     * The threshold value used for the specified metric parameter.
     *
     * You can only specify the threshold value for CPU utilization.
     */
    public val threshold: aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricThreshold? = builder.threshold

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricParameters = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CustomizableMetricParameters(")
        append("headroom=$headroom,")
        append("threshold=$threshold")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = headroom?.hashCode() ?: 0
        result = 31 * result + (threshold?.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 CustomizableMetricParameters

        if (headroom != other.headroom) return false
        if (threshold != other.threshold) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The headroom value in percentage used for the specified metric parameter.
         *
         * The following lists the valid values for CPU and memory utilization.
         * + CPU utilization: `PERCENT_30 | PERCENT_20 | PERCENT_0`
         * + Memory utilization: `PERCENT_30 | PERCENT_20 | PERCENT_10`
         */
        public var headroom: aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricHeadroom? = null
        /**
         * The threshold value used for the specified metric parameter.
         *
         * You can only specify the threshold value for CPU utilization.
         */
        public var threshold: aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricThreshold? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricParameters) : this() {
            this.headroom = x.headroom
            this.threshold = x.threshold
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy