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

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

/**
 * Describes the performance risk ratings for a given resource type.
 *
 * Resources with a `high` or `medium` rating are at risk of not meeting the performance needs of their workloads, while resources with a `low` rating are performing well in their workloads.
 */
public class CurrentPerformanceRiskRatings private constructor(builder: Builder) {
    /**
     * A count of the applicable resource types with a high performance risk rating.
     */
    public val high: kotlin.Long = builder.high
    /**
     * A count of the applicable resource types with a low performance risk rating.
     */
    public val low: kotlin.Long = builder.low
    /**
     * A count of the applicable resource types with a medium performance risk rating.
     */
    public val medium: kotlin.Long = builder.medium
    /**
     * A count of the applicable resource types with a very low performance risk rating.
     */
    public val veryLow: kotlin.Long = builder.veryLow

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

    override fun toString(): kotlin.String = buildString {
        append("CurrentPerformanceRiskRatings(")
        append("high=$high,")
        append("low=$low,")
        append("medium=$medium,")
        append("veryLow=$veryLow")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = high.hashCode()
        result = 31 * result + (low.hashCode())
        result = 31 * result + (medium.hashCode())
        result = 31 * result + (veryLow.hashCode())
        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 CurrentPerformanceRiskRatings

        if (high != other.high) return false
        if (low != other.low) return false
        if (medium != other.medium) return false
        if (veryLow != other.veryLow) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A count of the applicable resource types with a high performance risk rating.
         */
        public var high: kotlin.Long = 0L
        /**
         * A count of the applicable resource types with a low performance risk rating.
         */
        public var low: kotlin.Long = 0L
        /**
         * A count of the applicable resource types with a medium performance risk rating.
         */
        public var medium: kotlin.Long = 0L
        /**
         * A count of the applicable resource types with a very low performance risk rating.
         */
        public var veryLow: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.computeoptimizer.model.CurrentPerformanceRiskRatings) : this() {
            this.high = x.high
            this.low = x.low
            this.medium = x.medium
            this.veryLow = x.veryLow
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy