commonMain.aws.sdk.kotlin.services.cloudwatchlogs.model.LogEvent.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
/**
* This structure contains the information for one sample log event that is associated with an anomaly found by a log anomaly detector.
*/
public class LogEvent private constructor(builder: Builder) {
/**
* The message content of the log event.
*/
public val message: kotlin.String? = builder.message
/**
* The time stamp of the log event.
*/
public val timestamp: kotlin.Long? = builder.timestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.cloudwatchlogs.model.LogEvent = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LogEvent(")
append("message=$message,")
append("timestamp=$timestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = message?.hashCode() ?: 0
result = 31 * result + (timestamp?.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 LogEvent
if (message != other.message) return false
if (timestamp != other.timestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.cloudwatchlogs.model.LogEvent = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The message content of the log event.
*/
public var message: kotlin.String? = null
/**
* The time stamp of the log event.
*/
public var timestamp: kotlin.Long? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.cloudwatchlogs.model.LogEvent) : this() {
this.message = x.message
this.timestamp = x.timestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.cloudwatchlogs.model.LogEvent = LogEvent(this)
internal fun correctErrors(): Builder {
return this
}
}
}