commonMain.aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetector.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
/**
* An anomaly detection model associated with a particular CloudWatch metric, statistic, or metric math expression. You can use the model to display a band of expected, normal values when the metric is graphed.
*
* If you have enabled unified cross-account observability, and this account is a monitoring account, the metric can be in the same account or a source account.
*/
public class AnomalyDetector private constructor(builder: Builder) {
/**
* The configuration specifies details about how the anomaly detection model is to be trained, including time ranges to exclude from use for training the model, and the time zone to use for the metric.
*/
public val configuration: aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetectorConfiguration? = builder.configuration
/**
* The metric dimensions associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public val dimensions: List? = builder.dimensions
/**
* The CloudWatch metric math expression for this anomaly detector.
*/
public val metricMathAnomalyDetector: aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector? = builder.metricMathAnomalyDetector
/**
* The name of the metric associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public val metricName: kotlin.String? = builder.metricName
/**
* The namespace of the metric associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public val namespace: kotlin.String? = builder.namespace
/**
* The CloudWatch metric and statistic for this anomaly detector.
*/
public val singleMetricAnomalyDetector: aws.sdk.kotlin.services.cloudwatch.model.SingleMetricAnomalyDetector? = builder.singleMetricAnomalyDetector
/**
* The statistic associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public val stat: kotlin.String? = builder.stat
/**
* The current status of the anomaly detector's training. The possible values are `TRAINED | PENDING_TRAINING | TRAINED_INSUFFICIENT_DATA`
*/
public val stateValue: aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetectorStateValue? = builder.stateValue
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetector = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AnomalyDetector(")
append("configuration=$configuration,")
append("dimensions=$dimensions,")
append("metricMathAnomalyDetector=$metricMathAnomalyDetector,")
append("metricName=$metricName,")
append("namespace=$namespace,")
append("singleMetricAnomalyDetector=$singleMetricAnomalyDetector,")
append("stat=$stat,")
append("stateValue=$stateValue")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configuration?.hashCode() ?: 0
result = 31 * result + (dimensions?.hashCode() ?: 0)
result = 31 * result + (metricMathAnomalyDetector?.hashCode() ?: 0)
result = 31 * result + (metricName?.hashCode() ?: 0)
result = 31 * result + (namespace?.hashCode() ?: 0)
result = 31 * result + (singleMetricAnomalyDetector?.hashCode() ?: 0)
result = 31 * result + (stat?.hashCode() ?: 0)
result = 31 * result + (stateValue?.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 AnomalyDetector
if (configuration != other.configuration) return false
if (dimensions != other.dimensions) return false
if (metricMathAnomalyDetector != other.metricMathAnomalyDetector) return false
if (metricName != other.metricName) return false
if (namespace != other.namespace) return false
if (singleMetricAnomalyDetector != other.singleMetricAnomalyDetector) return false
if (stat != other.stat) return false
if (stateValue != other.stateValue) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetector = Builder(this).apply(block).build()
public class Builder {
/**
* The configuration specifies details about how the anomaly detection model is to be trained, including time ranges to exclude from use for training the model, and the time zone to use for the metric.
*/
public var configuration: aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetectorConfiguration? = null
/**
* The metric dimensions associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public var dimensions: List? = null
/**
* The CloudWatch metric math expression for this anomaly detector.
*/
public var metricMathAnomalyDetector: aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector? = null
/**
* The name of the metric associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public var metricName: kotlin.String? = null
/**
* The namespace of the metric associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public var namespace: kotlin.String? = null
/**
* The CloudWatch metric and statistic for this anomaly detector.
*/
public var singleMetricAnomalyDetector: aws.sdk.kotlin.services.cloudwatch.model.SingleMetricAnomalyDetector? = null
/**
* The statistic associated with the anomaly detection model.
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public var stat: kotlin.String? = null
/**
* The current status of the anomaly detector's training. The possible values are `TRAINED | PENDING_TRAINING | TRAINED_INSUFFICIENT_DATA`
*/
public var stateValue: aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetectorStateValue? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetector) : this() {
this.configuration = x.configuration
this.dimensions = x.dimensions
this.metricMathAnomalyDetector = x.metricMathAnomalyDetector
this.metricName = x.metricName
this.namespace = x.namespace
this.singleMetricAnomalyDetector = x.singleMetricAnomalyDetector
this.stat = x.stat
this.stateValue = x.stateValue
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetector = AnomalyDetector(this)
/**
* construct an [aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetectorConfiguration] inside the given [block]
*/
public fun configuration(block: aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetectorConfiguration.Builder.() -> kotlin.Unit) {
this.configuration = aws.sdk.kotlin.services.cloudwatch.model.AnomalyDetectorConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector] inside the given [block]
*/
public fun metricMathAnomalyDetector(block: aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector.Builder.() -> kotlin.Unit) {
this.metricMathAnomalyDetector = aws.sdk.kotlin.services.cloudwatch.model.MetricMathAnomalyDetector.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.cloudwatch.model.SingleMetricAnomalyDetector] inside the given [block]
*/
public fun singleMetricAnomalyDetector(block: aws.sdk.kotlin.services.cloudwatch.model.SingleMetricAnomalyDetector.Builder.() -> kotlin.Unit) {
this.singleMetricAnomalyDetector = aws.sdk.kotlin.services.cloudwatch.model.SingleMetricAnomalyDetector.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}