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

commonMain.aws.sdk.kotlin.services.cloudwatch.model.StatisticSet.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.cloudwatch.model



/**
 * Represents a set of statistics that describes a specific metric.
 */
public class StatisticSet private constructor(builder: Builder) {
    /**
     * The maximum value of the sample set.
     */
    public val maximum: kotlin.Double? = builder.maximum
    /**
     * The minimum value of the sample set.
     */
    public val minimum: kotlin.Double? = builder.minimum
    /**
     * The number of samples used for the statistic set.
     */
    public val sampleCount: kotlin.Double? = builder.sampleCount
    /**
     * The sum of values for the sample set.
     */
    public val sum: kotlin.Double? = builder.sum

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

    override fun toString(): kotlin.String = buildString {
        append("StatisticSet(")
        append("maximum=$maximum,")
        append("minimum=$minimum,")
        append("sampleCount=$sampleCount,")
        append("sum=$sum")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = maximum?.hashCode() ?: 0
        result = 31 * result + (minimum?.hashCode() ?: 0)
        result = 31 * result + (sampleCount?.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 StatisticSet

        if (maximum != other.maximum) return false
        if (minimum != other.minimum) return false
        if (sampleCount != other.sampleCount) return false
        if (sum != other.sum) return false

        return true
    }

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

    public class Builder {
        /**
         * The maximum value of the sample set.
         */
        public var maximum: kotlin.Double? = null
        /**
         * The minimum value of the sample set.
         */
        public var minimum: kotlin.Double? = null
        /**
         * The number of samples used for the statistic set.
         */
        public var sampleCount: kotlin.Double? = null
        /**
         * The sum of values for the sample set.
         */
        public var sum: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.cloudwatch.model.StatisticSet) : this() {
            this.maximum = x.maximum
            this.minimum = x.minimum
            this.sampleCount = x.sampleCount
            this.sum = x.sum
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy