commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.UpdateLogAnomalyDetectorRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudwatchlogs-jvm Show documentation
Show all versions of cloudwatchlogs-jvm Show documentation
The AWS SDK for Kotlin client for CloudWatch Logs
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.cloudwatchlogs.model
import aws.smithy.kotlin.runtime.SdkDsl
public class UpdateLogAnomalyDetectorRequest private constructor(builder: Builder) {
/**
* The ARN of the anomaly detector that you want to update.
*/
public val anomalyDetectorArn: kotlin.String? = builder.anomalyDetectorArn
/**
* The number of days to use 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. Therefore, if you do not correct the cause of an anomaly during this time, it will be considered normal going forward and will not be detected.
*/
public val anomalyVisibilityTime: kotlin.Long? = builder.anomalyVisibilityTime
/**
* Use this parameter to pause or restart the anomaly detector.
*/
public val enabled: kotlin.Boolean? = builder.enabled
/**
* Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then setting `evaluationFrequency` to `FIFTEEN_MIN` might be appropriate.
*/
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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.UpdateLogAnomalyDetectorRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateLogAnomalyDetectorRequest(")
append("anomalyDetectorArn=$anomalyDetectorArn,")
append("anomalyVisibilityTime=$anomalyVisibilityTime,")
append("enabled=$enabled,")
append("evaluationFrequency=$evaluationFrequency,")
append("filterPattern=$filterPattern")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = anomalyDetectorArn?.hashCode() ?: 0
result = 31 * result + (anomalyVisibilityTime?.hashCode() ?: 0)
result = 31 * result + (enabled?.hashCode() ?: 0)
result = 31 * result + (evaluationFrequency?.hashCode() ?: 0)
result = 31 * result + (filterPattern?.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 UpdateLogAnomalyDetectorRequest
if (anomalyDetectorArn != other.anomalyDetectorArn) return false
if (anomalyVisibilityTime != other.anomalyVisibilityTime) return false
if (enabled != other.enabled) return false
if (evaluationFrequency != other.evaluationFrequency) return false
if (filterPattern != other.filterPattern) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.UpdateLogAnomalyDetectorRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The ARN of the anomaly detector that you want to update.
*/
public var anomalyDetectorArn: kotlin.String? = null
/**
* The number of days to use 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. Therefore, if you do not correct the cause of an anomaly during this time, it will be considered normal going forward and will not be detected.
*/
public var anomalyVisibilityTime: kotlin.Long? = null
/**
* Use this parameter to pause or restart the anomaly detector.
*/
public var enabled: kotlin.Boolean? = null
/**
* Specifies how often the anomaly detector runs and look for anomalies. Set this value according to the frequency that the log group receives new logs. For example, if the log group receives new log events every 10 minutes, then setting `evaluationFrequency` to `FIFTEEN_MIN` might be appropriate.
*/
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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.UpdateLogAnomalyDetectorRequest) : this() {
this.anomalyDetectorArn = x.anomalyDetectorArn
this.anomalyVisibilityTime = x.anomalyVisibilityTime
this.enabled = x.enabled
this.evaluationFrequency = x.evaluationFrequency
this.filterPattern = x.filterPattern
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.UpdateLogAnomalyDetectorRequest = UpdateLogAnomalyDetectorRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}