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

commonMain.aws.sdk.kotlin.services.devopsguru.model.DescribeAccountHealthResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.devopsguru.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DescribeAccountHealthResponse private constructor(builder: Builder) {
    /**
     * Number of resources that DevOps Guru is monitoring in your Amazon Web Services account.
     */
    public val analyzedResourceCount: kotlin.Long? = builder.analyzedResourceCount
    /**
     * An integer that specifies the number of metrics that have been analyzed in your Amazon Web Services account.
     */
    public val metricsAnalyzed: kotlin.Int = builder.metricsAnalyzed
    /**
     * An integer that specifies the number of open proactive insights in your Amazon Web Services account.
     */
    public val openProactiveInsights: kotlin.Int = builder.openProactiveInsights
    /**
     * An integer that specifies the number of open reactive insights in your Amazon Web Services account.
     */
    public val openReactiveInsights: kotlin.Int = builder.openReactiveInsights
    /**
     * The number of Amazon DevOps Guru resource analysis hours billed to the current Amazon Web Services account in the last hour.
     */
    public val resourceHours: kotlin.Long = requireNotNull(builder.resourceHours) { "A non-null value must be provided for resourceHours" }

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

    override fun toString(): kotlin.String = buildString {
        append("DescribeAccountHealthResponse(")
        append("analyzedResourceCount=$analyzedResourceCount,")
        append("metricsAnalyzed=$metricsAnalyzed,")
        append("openProactiveInsights=$openProactiveInsights,")
        append("openReactiveInsights=$openReactiveInsights,")
        append("resourceHours=$resourceHours")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = analyzedResourceCount?.hashCode() ?: 0
        result = 31 * result + (metricsAnalyzed)
        result = 31 * result + (openProactiveInsights)
        result = 31 * result + (openReactiveInsights)
        result = 31 * result + (resourceHours.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 DescribeAccountHealthResponse

        if (analyzedResourceCount != other.analyzedResourceCount) return false
        if (metricsAnalyzed != other.metricsAnalyzed) return false
        if (openProactiveInsights != other.openProactiveInsights) return false
        if (openReactiveInsights != other.openReactiveInsights) return false
        if (resourceHours != other.resourceHours) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Number of resources that DevOps Guru is monitoring in your Amazon Web Services account.
         */
        public var analyzedResourceCount: kotlin.Long? = null
        /**
         * An integer that specifies the number of metrics that have been analyzed in your Amazon Web Services account.
         */
        public var metricsAnalyzed: kotlin.Int = 0
        /**
         * An integer that specifies the number of open proactive insights in your Amazon Web Services account.
         */
        public var openProactiveInsights: kotlin.Int = 0
        /**
         * An integer that specifies the number of open reactive insights in your Amazon Web Services account.
         */
        public var openReactiveInsights: kotlin.Int = 0
        /**
         * The number of Amazon DevOps Guru resource analysis hours billed to the current Amazon Web Services account in the last hour.
         */
        public var resourceHours: kotlin.Long? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.DescribeAccountHealthResponse) : this() {
            this.analyzedResourceCount = x.analyzedResourceCount
            this.metricsAnalyzed = x.metricsAnalyzed
            this.openProactiveInsights = x.openProactiveInsights
            this.openReactiveInsights = x.openReactiveInsights
            this.resourceHours = x.resourceHours
        }

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

        internal fun correctErrors(): Builder {
            if (resourceHours == null) resourceHours = 0L
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy