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

commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyGroup.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.lookoutmetrics.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A group of anomalous metrics
 */
public class AnomalyGroup private constructor(builder: Builder) {
    /**
     * The ID of the anomaly group.
     */
    public val anomalyGroupId: kotlin.String? = builder.anomalyGroupId
    /**
     * The severity score of the group.
     */
    public val anomalyGroupScore: kotlin.Double? = builder.anomalyGroupScore
    /**
     * The end time for the group.
     */
    public val endTime: kotlin.String? = builder.endTime
    /**
     * A list of measures affected by the anomaly.
     */
    public val metricLevelImpactList: List? = builder.metricLevelImpactList
    /**
     * The name of the primary affected measure for the group.
     */
    public val primaryMetricName: kotlin.String? = builder.primaryMetricName
    /**
     * The start time for the group.
     */
    public val startTime: kotlin.String? = builder.startTime

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

    override fun toString(): kotlin.String = buildString {
        append("AnomalyGroup(")
        append("anomalyGroupId=$anomalyGroupId,")
        append("anomalyGroupScore=$anomalyGroupScore,")
        append("endTime=$endTime,")
        append("metricLevelImpactList=$metricLevelImpactList,")
        append("primaryMetricName=$primaryMetricName,")
        append("startTime=$startTime")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = anomalyGroupId?.hashCode() ?: 0
        result = 31 * result + (anomalyGroupScore?.hashCode() ?: 0)
        result = 31 * result + (endTime?.hashCode() ?: 0)
        result = 31 * result + (metricLevelImpactList?.hashCode() ?: 0)
        result = 31 * result + (primaryMetricName?.hashCode() ?: 0)
        result = 31 * result + (startTime?.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 AnomalyGroup

        if (anomalyGroupId != other.anomalyGroupId) return false
        if (!(anomalyGroupScore?.equals(other.anomalyGroupScore) ?: (other.anomalyGroupScore == null))) return false
        if (endTime != other.endTime) return false
        if (metricLevelImpactList != other.metricLevelImpactList) return false
        if (primaryMetricName != other.primaryMetricName) return false
        if (startTime != other.startTime) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ID of the anomaly group.
         */
        public var anomalyGroupId: kotlin.String? = null
        /**
         * The severity score of the group.
         */
        public var anomalyGroupScore: kotlin.Double? = null
        /**
         * The end time for the group.
         */
        public var endTime: kotlin.String? = null
        /**
         * A list of measures affected by the anomaly.
         */
        public var metricLevelImpactList: List? = null
        /**
         * The name of the primary affected measure for the group.
         */
        public var primaryMetricName: kotlin.String? = null
        /**
         * The start time for the group.
         */
        public var startTime: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyGroup) : this() {
            this.anomalyGroupId = x.anomalyGroupId
            this.anomalyGroupScore = x.anomalyGroupScore
            this.endTime = x.endTime
            this.metricLevelImpactList = x.metricLevelImpactList
            this.primaryMetricName = x.primaryMetricName
            this.startTime = x.startTime
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy