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

commonMain.aws.sdk.kotlin.services.sagemakeredge.model.EdgeMetric.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.sagemakeredge.model

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

/**
 * Information required for edge device metrics.
 */
public class EdgeMetric private constructor(builder: Builder) {
    /**
     * The dimension of metrics published.
     */
    public val dimension: kotlin.String? = builder.dimension
    /**
     * Returns the name of the metric.
     */
    public val metricName: kotlin.String? = builder.metricName
    /**
     * Timestamp of when the metric was requested.
     */
    public val timestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.timestamp
    /**
     * Returns the value of the metric.
     */
    public val value: kotlin.Double? = builder.value

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.sagemakeredge.model.EdgeMetric = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("EdgeMetric(")
        append("dimension=$dimension,")
        append("metricName=$metricName,")
        append("timestamp=$timestamp,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dimension?.hashCode() ?: 0
        result = 31 * result + (metricName?.hashCode() ?: 0)
        result = 31 * result + (timestamp?.hashCode() ?: 0)
        result = 31 * result + (value?.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 EdgeMetric

        if (dimension != other.dimension) return false
        if (metricName != other.metricName) return false
        if (timestamp != other.timestamp) return false
        if (!(value?.equals(other.value) ?: (other.value == null))) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.sagemakeredge.model.EdgeMetric = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The dimension of metrics published.
         */
        public var dimension: kotlin.String? = null
        /**
         * Returns the name of the metric.
         */
        public var metricName: kotlin.String? = null
        /**
         * Timestamp of when the metric was requested.
         */
        public var timestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Returns the value of the metric.
         */
        public var value: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.sagemakeredge.model.EdgeMetric) : this() {
            this.dimension = x.dimension
            this.metricName = x.metricName
            this.timestamp = x.timestamp
            this.value = x.value
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.sagemakeredge.model.EdgeMetric = EdgeMetric(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy