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

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.computeoptimizer.model



/**
 * Defines the various metric parameters that can be customized, such as threshold and headroom.
 */
public class CustomizableMetricParameters private constructor(builder: Builder) {
    /**
     * The headroom threshold value in percentage used for the specified metric parameter.
     */
    public val headroom: aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricHeadroom? = builder.headroom
    /**
     * The threshold value used for the specified metric parameter.
     */
    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()

    public class Builder {
        /**
         * The headroom threshold value in percentage used for the specified metric parameter.
         */
        public var headroom: aws.sdk.kotlin.services.computeoptimizer.model.CustomizableMetricHeadroom? = null
        /**
         * The threshold value used for the specified metric parameter.
         */
        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 - 2025 Weber Informatics LLC | Privacy Policy