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

commonMain.aws.sdk.kotlin.services.ssm.model.CompliantSummary.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.ssm.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A summary of resources that are compliant. The summary is organized according to the resource count for each compliance type.
 */
public class CompliantSummary private constructor(builder: Builder) {
    /**
     * The total number of resources that are compliant.
     */
    public val compliantCount: kotlin.Int = builder.compliantCount
    /**
     * A summary of the compliance severity by compliance type.
     */
    public val severitySummary: aws.sdk.kotlin.services.ssm.model.SeveritySummary? = builder.severitySummary

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

    override fun toString(): kotlin.String = buildString {
        append("CompliantSummary(")
        append("compliantCount=$compliantCount,")
        append("severitySummary=$severitySummary")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = compliantCount
        result = 31 * result + (severitySummary?.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 CompliantSummary

        if (compliantCount != other.compliantCount) return false
        if (severitySummary != other.severitySummary) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The total number of resources that are compliant.
         */
        public var compliantCount: kotlin.Int = 0
        /**
         * A summary of the compliance severity by compliance type.
         */
        public var severitySummary: aws.sdk.kotlin.services.ssm.model.SeveritySummary? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ssm.model.CompliantSummary) : this() {
            this.compliantCount = x.compliantCount
            this.severitySummary = x.severitySummary
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.ssm.model.SeveritySummary] inside the given [block]
         */
        public fun severitySummary(block: aws.sdk.kotlin.services.ssm.model.SeveritySummary.Builder.() -> kotlin.Unit) {
            this.severitySummary = aws.sdk.kotlin.services.ssm.model.SeveritySummary.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy