commonMain.aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatch-jvm Show documentation
Show all versions of cloudwatch-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatch.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Indicates the CloudWatch math expression that provides the time series the anomaly detector uses as input. The designated math expression must return a single time series.
*/
public class MetricMathAnomalyDetector private constructor(builder: Builder) {
/**
* An array of metric data query structures that enables you to create an anomaly detector based on the result of a metric math expression. Each item in `MetricDataQueries` gets a metric or performs a math expression. One item in `MetricDataQueries` is the expression that provides the time series that the anomaly detector uses as input. Designate the expression by setting `ReturnData` to `true` for this object in the array. For all other expressions and metrics, set `ReturnData` to `false`. The designated expression must return a single time series.
*/
public val metricDataQueries: List? = builder.metricDataQueries
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("MetricMathAnomalyDetector(")
append("metricDataQueries=$metricDataQueries")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metricDataQueries?.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 MetricMathAnomalyDetector
if (metricDataQueries != other.metricDataQueries) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of metric data query structures that enables you to create an anomaly detector based on the result of a metric math expression. Each item in `MetricDataQueries` gets a metric or performs a math expression. One item in `MetricDataQueries` is the expression that provides the time series that the anomaly detector uses as input. Designate the expression by setting `ReturnData` to `true` for this object in the array. For all other expressions and metrics, set `ReturnData` to `false`. The designated expression must return a single time series.
*/
public var metricDataQueries: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector) : this() {
this.metricDataQueries = x.metricDataQueries
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector = MetricMathAnomalyDetector(this)
internal fun correctErrors(): Builder {
return this
}
}
}