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

commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.AnomalyDetector.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.cloudwatchlogs.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains information about one anomaly detector in the account.
 */
public class AnomalyDetector private constructor(builder: Builder) {
    /**
     * The ARN of the anomaly detector.
     */
    public val anomalyDetectorArn: kotlin.String? = builder.anomalyDetectorArn
    /**
     * Specifies the current status of the anomaly detector. To pause an anomaly detector, use the `enabled` parameter in the [UpdateLogAnomalyDetector](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateLogAnomalyDetector.html) operation.
     */
    public val anomalyDetectorStatus: aws.sdk.kotlin.services.cloudwatchlogs.model.AnomalyDetectorStatus? = builder.anomalyDetectorStatus
    /**
     * The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined and the anomaly detector model will treat new occurrences of similar event as normal.
     */
    public val anomalyVisibilityTime: kotlin.Long? = builder.anomalyVisibilityTime
    /**
     * The date and time when this anomaly detector was created.
     */
    public val creationTimeStamp: kotlin.Long = builder.creationTimeStamp
    /**
     * The name of the anomaly detector.
     */
    public val detectorName: kotlin.String? = builder.detectorName
    /**
     * Specifies how often the anomaly detector runs and look for anomalies.
     */
    public val evaluationFrequency: aws.sdk.kotlin.services.cloudwatchlogs.model.EvaluationFrequency? = builder.evaluationFrequency
    /**
     * A symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.
     */
    public val filterPattern: kotlin.String? = builder.filterPattern
    /**
     * The ID of the KMS key assigned to this anomaly detector, if any.
     */
    public val kmsKeyId: kotlin.String? = builder.kmsKeyId
    /**
     * The date and time when this anomaly detector was most recently modified.
     */
    public val lastModifiedTimeStamp: kotlin.Long = builder.lastModifiedTimeStamp
    /**
     * A list of the ARNs of the log groups that this anomaly detector watches.
     */
    public val logGroupArnList: List? = builder.logGroupArnList

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

    override fun toString(): kotlin.String = buildString {
        append("AnomalyDetector(")
        append("anomalyDetectorArn=$anomalyDetectorArn,")
        append("anomalyDetectorStatus=$anomalyDetectorStatus,")
        append("anomalyVisibilityTime=$anomalyVisibilityTime,")
        append("creationTimeStamp=$creationTimeStamp,")
        append("detectorName=$detectorName,")
        append("evaluationFrequency=$evaluationFrequency,")
        append("filterPattern=$filterPattern,")
        append("kmsKeyId=$kmsKeyId,")
        append("lastModifiedTimeStamp=$lastModifiedTimeStamp,")
        append("logGroupArnList=$logGroupArnList")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = anomalyDetectorArn?.hashCode() ?: 0
        result = 31 * result + (anomalyDetectorStatus?.hashCode() ?: 0)
        result = 31 * result + (anomalyVisibilityTime?.hashCode() ?: 0)
        result = 31 * result + (creationTimeStamp.hashCode())
        result = 31 * result + (detectorName?.hashCode() ?: 0)
        result = 31 * result + (evaluationFrequency?.hashCode() ?: 0)
        result = 31 * result + (filterPattern?.hashCode() ?: 0)
        result = 31 * result + (kmsKeyId?.hashCode() ?: 0)
        result = 31 * result + (lastModifiedTimeStamp.hashCode())
        result = 31 * result + (logGroupArnList?.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 (anomalyDetectorArn != other.anomalyDetectorArn) return false
        if (anomalyDetectorStatus != other.anomalyDetectorStatus) return false
        if (anomalyVisibilityTime != other.anomalyVisibilityTime) return false
        if (creationTimeStamp != other.creationTimeStamp) return false
        if (detectorName != other.detectorName) return false
        if (evaluationFrequency != other.evaluationFrequency) return false
        if (filterPattern != other.filterPattern) return false
        if (kmsKeyId != other.kmsKeyId) return false
        if (lastModifiedTimeStamp != other.lastModifiedTimeStamp) return false
        if (logGroupArnList != other.logGroupArnList) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The ARN of the anomaly detector.
         */
        public var anomalyDetectorArn: kotlin.String? = null
        /**
         * Specifies the current status of the anomaly detector. To pause an anomaly detector, use the `enabled` parameter in the [UpdateLogAnomalyDetector](https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_UpdateLogAnomalyDetector.html) operation.
         */
        public var anomalyDetectorStatus: aws.sdk.kotlin.services.cloudwatchlogs.model.AnomalyDetectorStatus? = null
        /**
         * The number of days used as the life cycle of anomalies. After this time, anomalies are automatically baselined and the anomaly detector model will treat new occurrences of similar event as normal.
         */
        public var anomalyVisibilityTime: kotlin.Long? = null
        /**
         * The date and time when this anomaly detector was created.
         */
        public var creationTimeStamp: kotlin.Long = 0L
        /**
         * The name of the anomaly detector.
         */
        public var detectorName: kotlin.String? = null
        /**
         * Specifies how often the anomaly detector runs and look for anomalies.
         */
        public var evaluationFrequency: aws.sdk.kotlin.services.cloudwatchlogs.model.EvaluationFrequency? = null
        /**
         * A symbolic description of how CloudWatch Logs should interpret the data in each log event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You use the filter pattern to specify what to look for in the log event message.
         */
        public var filterPattern: kotlin.String? = null
        /**
         * The ID of the KMS key assigned to this anomaly detector, if any.
         */
        public var kmsKeyId: kotlin.String? = null
        /**
         * The date and time when this anomaly detector was most recently modified.
         */
        public var lastModifiedTimeStamp: kotlin.Long = 0L
        /**
         * A list of the ARNs of the log groups that this anomaly detector watches.
         */
        public var logGroupArnList: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.AnomalyDetector) : this() {
            this.anomalyDetectorArn = x.anomalyDetectorArn
            this.anomalyDetectorStatus = x.anomalyDetectorStatus
            this.anomalyVisibilityTime = x.anomalyVisibilityTime
            this.creationTimeStamp = x.creationTimeStamp
            this.detectorName = x.detectorName
            this.evaluationFrequency = x.evaluationFrequency
            this.filterPattern = x.filterPattern
            this.kmsKeyId = x.kmsKeyId
            this.lastModifiedTimeStamp = x.lastModifiedTimeStamp
            this.logGroupArnList = x.logGroupArnList
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy