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

commonMain.aws.sdk.kotlin.services.wellarchitected.model.QuestionMetric.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 question in the pillar.
 */
public class QuestionMetric private constructor(builder: Builder) {
    /**
     * The best practices, or choices, that have been identified as contributing to risk in a question.
     */
    public val bestPractices: List? = builder.bestPractices
    /**
     * The ID of the question.
     */
    public val questionId: kotlin.String? = builder.questionId
    /**
     * The risk for a given workload, lens review, pillar, or question.
     */
    public val risk: aws.sdk.kotlin.services.wellarchitected.model.Risk? = builder.risk

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

    override fun toString(): kotlin.String = buildString {
        append("QuestionMetric(")
        append("bestPractices=$bestPractices,")
        append("questionId=$questionId,")
        append("risk=$risk")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bestPractices?.hashCode() ?: 0
        result = 31 * result + (questionId?.hashCode() ?: 0)
        result = 31 * result + (risk?.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 QuestionMetric

        if (bestPractices != other.bestPractices) return false
        if (questionId != other.questionId) return false
        if (risk != other.risk) return false

        return true
    }

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

    public class Builder {
        /**
         * The best practices, or choices, that have been identified as contributing to risk in a question.
         */
        public var bestPractices: List? = null
        /**
         * The ID of the question.
         */
        public var questionId: kotlin.String? = null
        /**
         * The risk for a given workload, lens review, pillar, or question.
         */
        public var risk: aws.sdk.kotlin.services.wellarchitected.model.Risk? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.wellarchitected.model.QuestionMetric) : this() {
            this.bestPractices = x.bestPractices
            this.questionId = x.questionId
            this.risk = x.risk
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy