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

commonMain.aws.sdk.kotlin.services.wellarchitected.model.LensMetric.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.wellarchitected.model



/**
 * A metric for a particular lens in a workload.
 */
public class LensMetric private constructor(builder: Builder) {
    /**
     * The lens ARN.
     */
    public val lensArn: kotlin.String? = builder.lensArn
    /**
     * The metrics for the pillars in a lens.
     */
    public val pillars: List? = builder.pillars
    /**
     * A map from risk names to the count of how many questions have that rating.
     */
    public val riskCounts: Map? = builder.riskCounts

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

    override fun toString(): kotlin.String = buildString {
        append("LensMetric(")
        append("lensArn=$lensArn,")
        append("pillars=$pillars,")
        append("riskCounts=$riskCounts")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = lensArn?.hashCode() ?: 0
        result = 31 * result + (pillars?.hashCode() ?: 0)
        result = 31 * result + (riskCounts?.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 LensMetric

        if (lensArn != other.lensArn) return false
        if (pillars != other.pillars) return false
        if (riskCounts != other.riskCounts) return false

        return true
    }

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

    public class Builder {
        /**
         * The lens ARN.
         */
        public var lensArn: kotlin.String? = null
        /**
         * The metrics for the pillars in a lens.
         */
        public var pillars: List? = null
        /**
         * A map from risk names to the count of how many questions have that rating.
         */
        public var riskCounts: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wellarchitected.model.LensMetric) : this() {
            this.lensArn = x.lensArn
            this.pillars = x.pillars
            this.riskCounts = x.riskCounts
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy