commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.CreateAnomalyDetectorRequest.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
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.lookoutmetrics.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateAnomalyDetectorRequest private constructor(builder: Builder) {
/**
* Contains information about the configuration of the anomaly detector.
*/
public val anomalyDetectorConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorConfig? = builder.anomalyDetectorConfig
/**
* A description of the detector.
*/
public val anomalyDetectorDescription: kotlin.String? = builder.anomalyDetectorDescription
/**
* The name of the detector.
*/
public val anomalyDetectorName: kotlin.String? = builder.anomalyDetectorName
/**
* The ARN of the KMS key to use to encrypt your data.
*/
public val kmsKeyArn: kotlin.String? = builder.kmsKeyArn
/**
* A list of [tags](https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html) to apply to the anomaly detector.
*/
public val tags: Map? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.lookoutmetrics.model.CreateAnomalyDetectorRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateAnomalyDetectorRequest(")
append("anomalyDetectorConfig=$anomalyDetectorConfig,")
append("anomalyDetectorDescription=$anomalyDetectorDescription,")
append("anomalyDetectorName=$anomalyDetectorName,")
append("kmsKeyArn=$kmsKeyArn,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = anomalyDetectorConfig?.hashCode() ?: 0
result = 31 * result + (anomalyDetectorDescription?.hashCode() ?: 0)
result = 31 * result + (anomalyDetectorName?.hashCode() ?: 0)
result = 31 * result + (kmsKeyArn?.hashCode() ?: 0)
result = 31 * result + (tags?.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 CreateAnomalyDetectorRequest
if (anomalyDetectorConfig != other.anomalyDetectorConfig) return false
if (anomalyDetectorDescription != other.anomalyDetectorDescription) return false
if (anomalyDetectorName != other.anomalyDetectorName) return false
if (kmsKeyArn != other.kmsKeyArn) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.lookoutmetrics.model.CreateAnomalyDetectorRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains information about the configuration of the anomaly detector.
*/
public var anomalyDetectorConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorConfig? = null
/**
* A description of the detector.
*/
public var anomalyDetectorDescription: kotlin.String? = null
/**
* The name of the detector.
*/
public var anomalyDetectorName: kotlin.String? = null
/**
* The ARN of the KMS key to use to encrypt your data.
*/
public var kmsKeyArn: kotlin.String? = null
/**
* A list of [tags](https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html) to apply to the anomaly detector.
*/
public var tags: Map? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.CreateAnomalyDetectorRequest) : this() {
this.anomalyDetectorConfig = x.anomalyDetectorConfig
this.anomalyDetectorDescription = x.anomalyDetectorDescription
this.anomalyDetectorName = x.anomalyDetectorName
this.kmsKeyArn = x.kmsKeyArn
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.lookoutmetrics.model.CreateAnomalyDetectorRequest = CreateAnomalyDetectorRequest(this)
/**
* construct an [aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorConfig] inside the given [block]
*/
public fun anomalyDetectorConfig(block: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorConfig.Builder.() -> kotlin.Unit) {
this.anomalyDetectorConfig = aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorConfig.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy