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

commonMain.aws.sdk.kotlin.services.iot.model.PercentPair.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.iot.model



/**
 * Describes the percentile and percentile value.
 */
public class PercentPair private constructor(builder: Builder) {
    /**
     * The percentile.
     */
    public val percent: kotlin.Double = builder.percent
    /**
     * The value of the percentile.
     */
    public val value: kotlin.Double = builder.value

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

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

    override fun hashCode(): kotlin.Int {
        var result = percent.hashCode()
        result = 31 * result + (value.hashCode())
        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 PercentPair

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

        return true
    }

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

    public class Builder {
        /**
         * The percentile.
         */
        public var percent: kotlin.Double = 0.0
        /**
         * The value of the percentile.
         */
        public var value: kotlin.Double = 0.0

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot.model.PercentPair) : this() {
            this.percent = x.percent
            this.value = x.value
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy