commonMain.aws.sdk.kotlin.services.devopsguru.model.TimestampMetricValuePair.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of devopsguru-jvm Show documentation
Show all versions of devopsguru-jvm Show documentation
The AWS SDK for Kotlin client for DevOps Guru
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.devopsguru.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* A pair that contains metric values at the respective timestamp.
*/
public class TimestampMetricValuePair private constructor(builder: Builder) {
/**
* Value of the anomalous metric data point at respective Timestamp.
*/
public val metricValue: kotlin.Double? = builder.metricValue
/**
* A `Timestamp` that specifies the time the event occurred.
*/
public val timestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.timestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.devopsguru.model.TimestampMetricValuePair = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("TimestampMetricValuePair(")
append("metricValue=$metricValue,")
append("timestamp=$timestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metricValue?.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 TimestampMetricValuePair
if (!(metricValue?.equals(other.metricValue) ?: (other.metricValue == null))) return false
if (timestamp != other.timestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.devopsguru.model.TimestampMetricValuePair = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Value of the anomalous metric data point at respective Timestamp.
*/
public var metricValue: kotlin.Double? = null
/**
* A `Timestamp` that specifies the time the event occurred.
*/
public var timestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.devopsguru.model.TimestampMetricValuePair) : this() {
this.metricValue = x.metricValue
this.timestamp = x.timestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.devopsguru.model.TimestampMetricValuePair = TimestampMetricValuePair(this)
internal fun correctErrors(): Builder {
return this
}
}
}