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

commonMain.aws.sdk.kotlin.services.timestreamquery.model.Datum.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.timestreamquery.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Datum represents a single data point in a query result.
 */
public class Datum private constructor(builder: Builder) {
    /**
     * Indicates if the data point is an array.
     */
    public val arrayValue: List? = builder.arrayValue
    /**
     * Indicates if the data point is null.
     */
    public val nullValue: kotlin.Boolean? = builder.nullValue
    /**
     * Indicates if the data point is a row.
     */
    public val rowValue: aws.sdk.kotlin.services.timestreamquery.model.Row? = builder.rowValue
    /**
     * Indicates if the data point is a scalar value such as integer, string, double, or Boolean.
     */
    public val scalarValue: kotlin.String? = builder.scalarValue
    /**
     * Indicates if the data point is a timeseries data type.
     */
    public val timeSeriesValue: List? = builder.timeSeriesValue

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

    override fun toString(): kotlin.String = buildString {
        append("Datum(")
        append("arrayValue=$arrayValue,")
        append("nullValue=$nullValue,")
        append("rowValue=$rowValue,")
        append("scalarValue=$scalarValue,")
        append("timeSeriesValue=$timeSeriesValue")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arrayValue?.hashCode() ?: 0
        result = 31 * result + (nullValue?.hashCode() ?: 0)
        result = 31 * result + (rowValue?.hashCode() ?: 0)
        result = 31 * result + (scalarValue?.hashCode() ?: 0)
        result = 31 * result + (timeSeriesValue?.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 Datum

        if (arrayValue != other.arrayValue) return false
        if (nullValue != other.nullValue) return false
        if (rowValue != other.rowValue) return false
        if (scalarValue != other.scalarValue) return false
        if (timeSeriesValue != other.timeSeriesValue) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Indicates if the data point is an array.
         */
        public var arrayValue: List? = null
        /**
         * Indicates if the data point is null.
         */
        public var nullValue: kotlin.Boolean? = null
        /**
         * Indicates if the data point is a row.
         */
        public var rowValue: aws.sdk.kotlin.services.timestreamquery.model.Row? = null
        /**
         * Indicates if the data point is a scalar value such as integer, string, double, or Boolean.
         */
        public var scalarValue: kotlin.String? = null
        /**
         * Indicates if the data point is a timeseries data type.
         */
        public var timeSeriesValue: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.Datum) : this() {
            this.arrayValue = x.arrayValue
            this.nullValue = x.nullValue
            this.rowValue = x.rowValue
            this.scalarValue = x.scalarValue
            this.timeSeriesValue = x.timeSeriesValue
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy