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

commonMain.aws.sdk.kotlin.services.iotwireless.model.MetricQueryValue.kt Maven / Gradle / Ivy

There is a newer version: 1.3.31
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iotwireless.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The aggregated values of the metric.
 */
public class MetricQueryValue private constructor(builder: Builder) {
    /**
     * The average of the values of all data points collected during the aggregation period.
     */
    public val avg: kotlin.Double? = builder.avg
    /**
     * The maximum of the values of all the data points collected during the aggregation period.
     */
    public val max: kotlin.Double? = builder.max
    /**
     * The minimum of the values of all data points collected during the aggregation period.
     */
    public val min: kotlin.Double? = builder.min
    /**
     * The 90th percentile of the values of all data points collected during the aggregation period.
     */
    public val p90: kotlin.Double? = builder.p90
    /**
     * The standard deviation of the values of all data points collected during the aggregation period.
     */
    public val std: kotlin.Double? = builder.std
    /**
     * The sum of the values of all data points collected during the aggregation period.
     */
    public val sum: kotlin.Double? = builder.sum

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

    override fun toString(): kotlin.String = buildString {
        append("MetricQueryValue(")
        append("avg=$avg,")
        append("max=$max,")
        append("min=$min,")
        append("p90=$p90,")
        append("std=$std,")
        append("sum=$sum")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = avg?.hashCode() ?: 0
        result = 31 * result + (max?.hashCode() ?: 0)
        result = 31 * result + (min?.hashCode() ?: 0)
        result = 31 * result + (p90?.hashCode() ?: 0)
        result = 31 * result + (std?.hashCode() ?: 0)
        result = 31 * result + (sum?.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 MetricQueryValue

        if (!(avg?.equals(other.avg) ?: (other.avg == null))) return false
        if (!(max?.equals(other.max) ?: (other.max == null))) return false
        if (!(min?.equals(other.min) ?: (other.min == null))) return false
        if (!(p90?.equals(other.p90) ?: (other.p90 == null))) return false
        if (!(std?.equals(other.std) ?: (other.std == null))) return false
        if (!(sum?.equals(other.sum) ?: (other.sum == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The average of the values of all data points collected during the aggregation period.
         */
        public var avg: kotlin.Double? = null
        /**
         * The maximum of the values of all the data points collected during the aggregation period.
         */
        public var max: kotlin.Double? = null
        /**
         * The minimum of the values of all data points collected during the aggregation period.
         */
        public var min: kotlin.Double? = null
        /**
         * The 90th percentile of the values of all data points collected during the aggregation period.
         */
        public var p90: kotlin.Double? = null
        /**
         * The standard deviation of the values of all data points collected during the aggregation period.
         */
        public var std: kotlin.Double? = null
        /**
         * The sum of the values of all data points collected during the aggregation period.
         */
        public var sum: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iotwireless.model.MetricQueryValue) : this() {
            this.avg = x.avg
            this.max = x.max
            this.min = x.min
            this.p90 = x.p90
            this.std = x.std
            this.sum = x.sum
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy