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

commonMain.aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorSummary.kt Maven / Gradle / Ivy

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
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Contains information about an an anomaly detector.
 */
public class AnomalyDetectorSummary private constructor(builder: Builder) {
    /**
     * The ARN of the detector.
     */
    public val anomalyDetectorArn: kotlin.String? = builder.anomalyDetectorArn
    /**
     * 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 time at which the detector was created.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * The time at which the detector was last modified.
     */
    public val lastModificationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.lastModificationTime
    /**
     * The status of detector.
     */
    public val status: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorStatus? = builder.status
    /**
     * The detector's [tags](https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html).
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("AnomalyDetectorSummary(")
        append("anomalyDetectorArn=$anomalyDetectorArn,")
        append("anomalyDetectorDescription=$anomalyDetectorDescription,")
        append("anomalyDetectorName=$anomalyDetectorName,")
        append("creationTime=$creationTime,")
        append("lastModificationTime=$lastModificationTime,")
        append("status=$status,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = anomalyDetectorArn?.hashCode() ?: 0
        result = 31 * result + (anomalyDetectorDescription?.hashCode() ?: 0)
        result = 31 * result + (anomalyDetectorName?.hashCode() ?: 0)
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (lastModificationTime?.hashCode() ?: 0)
        result = 31 * result + (status?.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 AnomalyDetectorSummary

        if (anomalyDetectorArn != other.anomalyDetectorArn) return false
        if (anomalyDetectorDescription != other.anomalyDetectorDescription) return false
        if (anomalyDetectorName != other.anomalyDetectorName) return false
        if (creationTime != other.creationTime) return false
        if (lastModificationTime != other.lastModificationTime) return false
        if (status != other.status) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the detector.
         */
        public var anomalyDetectorArn: kotlin.String? = null
        /**
         * A description of the detector.
         */
        public var anomalyDetectorDescription: kotlin.String? = null
        /**
         * The name of the detector.
         */
        public var anomalyDetectorName: kotlin.String? = null
        /**
         * The time at which the detector was created.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The time at which the detector was last modified.
         */
        public var lastModificationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The status of detector.
         */
        public var status: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorStatus? = null
        /**
         * The detector's [tags](https://docs.aws.amazon.com/lookoutmetrics/latest/dev/detectors-tags.html).
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorSummary) : this() {
            this.anomalyDetectorArn = x.anomalyDetectorArn
            this.anomalyDetectorDescription = x.anomalyDetectorDescription
            this.anomalyDetectorName = x.anomalyDetectorName
            this.creationTime = x.creationTime
            this.lastModificationTime = x.lastModificationTime
            this.status = x.status
            this.tags = x.tags
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.lookoutmetrics.model.AnomalyDetectorSummary = AnomalyDetectorSummary(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy