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

commonMain.aws.sdk.kotlin.services.devopsguru.model.TimestampMetricValuePair.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// 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
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy