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

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

/**
 * Contains the metadata for query results such as the column names, data types, and other attributes.
 */
public class ColumnInfo private constructor(builder: Builder) {
    /**
     * The name of the result set column. The name of the result set is available for columns of all data types except for arrays.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The data type of the result set column. The data type can be a scalar or complex. Scalar data types are integers, strings, doubles, Booleans, and others. Complex data types are types such as arrays, rows, and others.
     */
    public val type: aws.sdk.kotlin.services.timestreamquery.model.Type? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("ColumnInfo(")
        append("name=$name,")
        append("type=$type")
        append(")")
    }

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

        if (name != other.name) return false
        if (type != other.type) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The name of the result set column. The name of the result set is available for columns of all data types except for arrays.
         */
        public var name: kotlin.String? = null
        /**
         * The data type of the result set column. The data type can be a scalar or complex. Scalar data types are integers, strings, doubles, Booleans, and others. Complex data types are types such as arrays, rows, and others.
         */
        public var type: aws.sdk.kotlin.services.timestreamquery.model.Type? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.timestreamquery.model.ColumnInfo) : this() {
            this.name = x.name
            this.type = x.type
        }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy