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

commonMain.aws.sdk.kotlin.services.connect.model.MetricDataV2.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.connect.model



/**
 * Contains the name, thresholds, and metric filters.
 */
public class MetricDataV2 private constructor(builder: Builder) {
    /**
     * The metric name, thresholds, and metric filters of the returned metric.
     */
    public val metric: aws.sdk.kotlin.services.connect.model.MetricV2? = builder.metric
    /**
     * The corresponding value of the metric returned in the response.
     */
    public val value: kotlin.Double? = builder.value

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

    override fun toString(): kotlin.String = buildString {
        append("MetricDataV2(")
        append("metric=$metric,")
        append("value=$value")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = metric?.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 MetricDataV2

        if (metric != other.metric) return false
        if (value != other.value) return false

        return true
    }

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

    public class Builder {
        /**
         * The metric name, thresholds, and metric filters of the returned metric.
         */
        public var metric: aws.sdk.kotlin.services.connect.model.MetricV2? = null
        /**
         * The corresponding value of the metric returned in the response.
         */
        public var value: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connect.model.MetricDataV2) : this() {
            this.metric = x.metric
            this.value = x.value
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.connect.model.MetricV2] inside the given [block]
         */
        public fun metric(block: aws.sdk.kotlin.services.connect.model.MetricV2.Builder.() -> kotlin.Unit) {
            this.metric = aws.sdk.kotlin.services.connect.model.MetricV2.invoke(block)
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy