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

commonMain.aws.sdk.kotlin.services.devopsguru.model.DescribeOrganizationHealthResponse.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 DescribeOrganizationHealthResponse private constructor(builder: Builder) {
    /**
     * An integer that specifies the number of metrics that have been analyzed in your organization.
     */
    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.DescribeOrganizationHealthResponse = Builder().apply(block).build()
    }

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

    override fun hashCode(): kotlin.Int {
        var 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 DescribeOrganizationHealthResponse

        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.DescribeOrganizationHealthResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * An integer that specifies the number of metrics that have been analyzed in your organization.
         */
        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.DescribeOrganizationHealthResponse) : this() {
            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.DescribeOrganizationHealthResponse = DescribeOrganizationHealthResponse(this)

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy