commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.MetricLevelImpact.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lookoutmetrics-jvm Show documentation
Show all versions of lookoutmetrics-jvm Show documentation
The AWS SDK for Kotlin client for LookoutMetrics
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lookoutmetrics.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Details about a measure affected by an anomaly.
*/
public class MetricLevelImpact private constructor(builder: Builder) {
/**
* Details about the dimensions that contributed to the anomaly.
*/
public val contributionMatrix: aws.sdk.kotlin.services.lookoutmetrics.model.ContributionMatrix? = builder.contributionMatrix
/**
* The name of the measure.
*/
public val metricName: kotlin.String? = builder.metricName
/**
* The number of anomalous metrics for the measure.
*/
public val numTimeSeries: kotlin.Int = builder.numTimeSeries
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lookoutmetrics.model.MetricLevelImpact = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MetricLevelImpact(")
append("contributionMatrix=$contributionMatrix,")
append("metricName=$metricName,")
append("numTimeSeries=$numTimeSeries")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = contributionMatrix?.hashCode() ?: 0
result = 31 * result + (metricName?.hashCode() ?: 0)
result = 31 * result + (numTimeSeries)
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 MetricLevelImpact
if (contributionMatrix != other.contributionMatrix) return false
if (metricName != other.metricName) return false
if (numTimeSeries != other.numTimeSeries) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lookoutmetrics.model.MetricLevelImpact = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Details about the dimensions that contributed to the anomaly.
*/
public var contributionMatrix: aws.sdk.kotlin.services.lookoutmetrics.model.ContributionMatrix? = null
/**
* The name of the measure.
*/
public var metricName: kotlin.String? = null
/**
* The number of anomalous metrics for the measure.
*/
public var numTimeSeries: kotlin.Int = 0
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.MetricLevelImpact) : this() {
this.contributionMatrix = x.contributionMatrix
this.metricName = x.metricName
this.numTimeSeries = x.numTimeSeries
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lookoutmetrics.model.MetricLevelImpact = MetricLevelImpact(this)
/**
* construct an [aws.sdk.kotlin.services.lookoutmetrics.model.ContributionMatrix] inside the given [block]
*/
public fun contributionMatrix(block: aws.sdk.kotlin.services.lookoutmetrics.model.ContributionMatrix.Builder.() -> kotlin.Unit) {
this.contributionMatrix = aws.sdk.kotlin.services.lookoutmetrics.model.ContributionMatrix.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy