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

commonMain.aws.sdk.kotlin.services.neptune.model.DoubleRange.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.neptune.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A range of double values.
 */
public class DoubleRange private constructor(builder: Builder) {
    /**
     * The minimum value in the range.
     */
    public val from: kotlin.Double? = builder.from
    /**
     * The maximum value in the range.
     */
    public val to: kotlin.Double? = builder.to

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

    override fun toString(): kotlin.String = buildString {
        append("DoubleRange(")
        append("from=$from,")
        append("to=$to")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = from?.hashCode() ?: 0
        result = 31 * result + (to?.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 DoubleRange

        if (!(from?.equals(other.from) ?: (other.from == null))) return false
        if (!(to?.equals(other.to) ?: (other.to == null))) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The minimum value in the range.
         */
        public var from: kotlin.Double? = null
        /**
         * The maximum value in the range.
         */
        public var to: kotlin.Double? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.neptune.model.DoubleRange) : this() {
            this.from = x.from
            this.to = x.to
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy