commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.GetLogAnomalyDetectorResponse.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 GetLogAnomalyDetectorResponse private constructor(builder: Builder) {
/**
* Specifies whether the anomaly detector is currently active. To change its status, 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 log anomaly detector
*/
public val detectorName: kotlin.String? = builder.detectorName
/**
* 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
/**
* 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
/**
* An array of structures, where each structure contains the ARN of a log group associated with this anomaly detector.
*/
public val logGroupArnList: List? = builder.logGroupArnList
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.GetLogAnomalyDetectorResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetLogAnomalyDetectorResponse(")
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 = 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 GetLogAnomalyDetectorResponse
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.GetLogAnomalyDetectorResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Specifies whether the anomaly detector is currently active. To change its status, 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 log anomaly detector
*/
public var detectorName: kotlin.String? = 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
/**
* 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
/**
* An array of structures, where each structure contains the ARN of a log group associated with this anomaly detector.
*/
public var logGroupArnList: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.GetLogAnomalyDetectorResponse) : this() {
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.GetLogAnomalyDetectorResponse = GetLogAnomalyDetectorResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}