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

commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAnomalyDetectorRequest.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



public class UpdateAnomalyDetectorRequest private constructor(builder: Builder) {
    /**
     * The ARN of the detector to update.
     */
    public val anomalyDetectorArn: kotlin.String? = builder.anomalyDetectorArn
    /**
     * Contains information about the configuration to which the detector will be updated.
     */
    public val anomalyDetectorConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorConfig? = builder.anomalyDetectorConfig
    /**
     * The updated detector description.
     */
    public val anomalyDetectorDescription: kotlin.String? = builder.anomalyDetectorDescription
    /**
     * The Amazon Resource Name (ARN) of an AWS KMS encryption key.
     */
    public val kmsKeyArn: kotlin.String? = builder.kmsKeyArn

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateAnomalyDetectorRequest(")
        append("anomalyDetectorArn=$anomalyDetectorArn,")
        append("anomalyDetectorConfig=$anomalyDetectorConfig,")
        append("anomalyDetectorDescription=$anomalyDetectorDescription,")
        append("kmsKeyArn=$kmsKeyArn")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = anomalyDetectorArn?.hashCode() ?: 0
        result = 31 * result + (anomalyDetectorConfig?.hashCode() ?: 0)
        result = 31 * result + (anomalyDetectorDescription?.hashCode() ?: 0)
        result = 31 * result + (kmsKeyArn?.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 UpdateAnomalyDetectorRequest

        if (anomalyDetectorArn != other.anomalyDetectorArn) return false
        if (anomalyDetectorConfig != other.anomalyDetectorConfig) return false
        if (anomalyDetectorDescription != other.anomalyDetectorDescription) return false
        if (kmsKeyArn != other.kmsKeyArn) return false

        return true
    }

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

    public class Builder {
        /**
         * The ARN of the detector to update.
         */
        public var anomalyDetectorArn: kotlin.String? = null
        /**
         * Contains information about the configuration to which the detector will be updated.
         */
        public var anomalyDetectorConfig: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorConfig? = null
        /**
         * The updated detector description.
         */
        public var anomalyDetectorDescription: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of an AWS KMS encryption key.
         */
        public var kmsKeyArn: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAnomalyDetectorRequest) : this() {
            this.anomalyDetectorArn = x.anomalyDetectorArn
            this.anomalyDetectorConfig = x.anomalyDetectorConfig
            this.anomalyDetectorDescription = x.anomalyDetectorDescription
            this.kmsKeyArn = x.kmsKeyArn
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lookoutmetrics.model.UpdateAnomalyDetectorRequest = UpdateAnomalyDetectorRequest(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