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

commonMain.aws.sdk.kotlin.services.elasticbeanstalk.model.CpuUtilization.kt Maven / Gradle / Ivy

There is a newer version: 1.3.31
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.elasticbeanstalk.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * CPU utilization metrics for an instance.
 */
public class CpuUtilization private constructor(builder: Builder) {
    /**
     * Percentage of time that the CPU has spent in the `Idle` state over the last 10 seconds.
     */
    public val idle: kotlin.Double? = builder.idle
    /**
     * Available on Linux environments only.
     *
     * Percentage of time that the CPU has spent in the `I/O Wait` state over the last 10 seconds.
     */
    public val ioWait: kotlin.Double? = builder.ioWait
    /**
     * Available on Linux environments only.
     *
     * Percentage of time that the CPU has spent in the `IRQ` state over the last 10 seconds.
     */
    public val irq: kotlin.Double? = builder.irq
    /**
     * Available on Linux environments only.
     *
     * Percentage of time that the CPU has spent in the `Nice` state over the last 10 seconds.
     */
    public val nice: kotlin.Double? = builder.nice
    /**
     * Available on Windows environments only.
     *
     * Percentage of time that the CPU has spent in the `Privileged` state over the last 10 seconds.
     */
    public val privileged: kotlin.Double? = builder.privileged
    /**
     * Available on Linux environments only.
     *
     * Percentage of time that the CPU has spent in the `SoftIRQ` state over the last 10 seconds.
     */
    public val softIrq: kotlin.Double? = builder.softIrq
    /**
     * Available on Linux environments only.
     *
     * Percentage of time that the CPU has spent in the `System` state over the last 10 seconds.
     */
    public val system: kotlin.Double? = builder.system
    /**
     * Percentage of time that the CPU has spent in the `User` state over the last 10 seconds.
     */
    public val user: kotlin.Double? = builder.user

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

    override fun toString(): kotlin.String = buildString {
        append("CpuUtilization(")
        append("idle=$idle,")
        append("ioWait=$ioWait,")
        append("irq=$irq,")
        append("nice=$nice,")
        append("privileged=$privileged,")
        append("softIrq=$softIrq,")
        append("system=$system,")
        append("user=$user")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = idle?.hashCode() ?: 0
        result = 31 * result + (ioWait?.hashCode() ?: 0)
        result = 31 * result + (irq?.hashCode() ?: 0)
        result = 31 * result + (nice?.hashCode() ?: 0)
        result = 31 * result + (privileged?.hashCode() ?: 0)
        result = 31 * result + (softIrq?.hashCode() ?: 0)
        result = 31 * result + (system?.hashCode() ?: 0)
        result = 31 * result + (user?.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 CpuUtilization

        if (!(idle?.equals(other.idle) ?: (other.idle == null))) return false
        if (!(ioWait?.equals(other.ioWait) ?: (other.ioWait == null))) return false
        if (!(irq?.equals(other.irq) ?: (other.irq == null))) return false
        if (!(nice?.equals(other.nice) ?: (other.nice == null))) return false
        if (!(privileged?.equals(other.privileged) ?: (other.privileged == null))) return false
        if (!(softIrq?.equals(other.softIrq) ?: (other.softIrq == null))) return false
        if (!(system?.equals(other.system) ?: (other.system == null))) return false
        if (!(user?.equals(other.user) ?: (other.user == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Percentage of time that the CPU has spent in the `Idle` state over the last 10 seconds.
         */
        public var idle: kotlin.Double? = null
        /**
         * Available on Linux environments only.
         *
         * Percentage of time that the CPU has spent in the `I/O Wait` state over the last 10 seconds.
         */
        public var ioWait: kotlin.Double? = null
        /**
         * Available on Linux environments only.
         *
         * Percentage of time that the CPU has spent in the `IRQ` state over the last 10 seconds.
         */
        public var irq: kotlin.Double? = null
        /**
         * Available on Linux environments only.
         *
         * Percentage of time that the CPU has spent in the `Nice` state over the last 10 seconds.
         */
        public var nice: kotlin.Double? = null
        /**
         * Available on Windows environments only.
         *
         * Percentage of time that the CPU has spent in the `Privileged` state over the last 10 seconds.
         */
        public var privileged: kotlin.Double? = null
        /**
         * Available on Linux environments only.
         *
         * Percentage of time that the CPU has spent in the `SoftIRQ` state over the last 10 seconds.
         */
        public var softIrq: kotlin.Double? = null
        /**
         * Available on Linux environments only.
         *
         * Percentage of time that the CPU has spent in the `System` state over the last 10 seconds.
         */
        public var system: kotlin.Double? = null
        /**
         * Percentage of time that the CPU has spent in the `User` state over the last 10 seconds.
         */
        public var user: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elasticbeanstalk.model.CpuUtilization) : this() {
            this.idle = x.idle
            this.ioWait = x.ioWait
            this.irq = x.irq
            this.nice = x.nice
            this.privileged = x.privileged
            this.softIrq = x.softIrq
            this.system = x.system
            this.user = x.user
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy