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

commonMain.aws.sdk.kotlin.services.rdsdata.model.ColumnMetadata.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.rdsdata.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains the metadata for a column.
 */
public class ColumnMetadata private constructor(builder: Builder) {
    /**
     * The type of the column.
     */
    public val arrayBaseColumnType: kotlin.Int = builder.arrayBaseColumnType
    /**
     * A value that indicates whether the column increments automatically.
     */
    public val isAutoIncrement: kotlin.Boolean = builder.isAutoIncrement
    /**
     * A value that indicates whether the column is case-sensitive.
     */
    public val isCaseSensitive: kotlin.Boolean = builder.isCaseSensitive
    /**
     * A value that indicates whether the column contains currency values.
     */
    public val isCurrency: kotlin.Boolean = builder.isCurrency
    /**
     * A value that indicates whether an integer column is signed.
     */
    public val isSigned: kotlin.Boolean = builder.isSigned
    /**
     * The label for the column.
     */
    public val label: kotlin.String? = builder.label
    /**
     * The name of the column.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A value that indicates whether the column is nullable.
     */
    public val nullable: kotlin.Int = builder.nullable
    /**
     * The precision value of a decimal number column.
     */
    public val precision: kotlin.Int = builder.precision
    /**
     * The scale value of a decimal number column.
     */
    public val scale: kotlin.Int = builder.scale
    /**
     * The name of the schema that owns the table that includes the column.
     */
    public val schemaName: kotlin.String? = builder.schemaName
    /**
     * The name of the table that includes the column.
     */
    public val tableName: kotlin.String? = builder.tableName
    /**
     * The type of the column.
     */
    public val type: kotlin.Int = builder.type
    /**
     * The database-specific data type of the column.
     */
    public val typeName: kotlin.String? = builder.typeName

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

    override fun toString(): kotlin.String = buildString {
        append("ColumnMetadata(")
        append("arrayBaseColumnType=$arrayBaseColumnType,")
        append("isAutoIncrement=$isAutoIncrement,")
        append("isCaseSensitive=$isCaseSensitive,")
        append("isCurrency=$isCurrency,")
        append("isSigned=$isSigned,")
        append("label=$label,")
        append("name=$name,")
        append("nullable=$nullable,")
        append("precision=$precision,")
        append("scale=$scale,")
        append("schemaName=$schemaName,")
        append("tableName=$tableName,")
        append("type=$type,")
        append("typeName=$typeName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = arrayBaseColumnType
        result = 31 * result + (isAutoIncrement.hashCode())
        result = 31 * result + (isCaseSensitive.hashCode())
        result = 31 * result + (isCurrency.hashCode())
        result = 31 * result + (isSigned.hashCode())
        result = 31 * result + (label?.hashCode() ?: 0)
        result = 31 * result + (name?.hashCode() ?: 0)
        result = 31 * result + (nullable)
        result = 31 * result + (precision)
        result = 31 * result + (scale)
        result = 31 * result + (schemaName?.hashCode() ?: 0)
        result = 31 * result + (tableName?.hashCode() ?: 0)
        result = 31 * result + (type)
        result = 31 * result + (typeName?.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 ColumnMetadata

        if (arrayBaseColumnType != other.arrayBaseColumnType) return false
        if (isAutoIncrement != other.isAutoIncrement) return false
        if (isCaseSensitive != other.isCaseSensitive) return false
        if (isCurrency != other.isCurrency) return false
        if (isSigned != other.isSigned) return false
        if (label != other.label) return false
        if (name != other.name) return false
        if (nullable != other.nullable) return false
        if (precision != other.precision) return false
        if (scale != other.scale) return false
        if (schemaName != other.schemaName) return false
        if (tableName != other.tableName) return false
        if (type != other.type) return false
        if (typeName != other.typeName) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The type of the column.
         */
        public var arrayBaseColumnType: kotlin.Int = 0
        /**
         * A value that indicates whether the column increments automatically.
         */
        public var isAutoIncrement: kotlin.Boolean = false
        /**
         * A value that indicates whether the column is case-sensitive.
         */
        public var isCaseSensitive: kotlin.Boolean = false
        /**
         * A value that indicates whether the column contains currency values.
         */
        public var isCurrency: kotlin.Boolean = false
        /**
         * A value that indicates whether an integer column is signed.
         */
        public var isSigned: kotlin.Boolean = false
        /**
         * The label for the column.
         */
        public var label: kotlin.String? = null
        /**
         * The name of the column.
         */
        public var name: kotlin.String? = null
        /**
         * A value that indicates whether the column is nullable.
         */
        public var nullable: kotlin.Int = 0
        /**
         * The precision value of a decimal number column.
         */
        public var precision: kotlin.Int = 0
        /**
         * The scale value of a decimal number column.
         */
        public var scale: kotlin.Int = 0
        /**
         * The name of the schema that owns the table that includes the column.
         */
        public var schemaName: kotlin.String? = null
        /**
         * The name of the table that includes the column.
         */
        public var tableName: kotlin.String? = null
        /**
         * The type of the column.
         */
        public var type: kotlin.Int = 0
        /**
         * The database-specific data type of the column.
         */
        public var typeName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.rdsdata.model.ColumnMetadata) : this() {
            this.arrayBaseColumnType = x.arrayBaseColumnType
            this.isAutoIncrement = x.isAutoIncrement
            this.isCaseSensitive = x.isCaseSensitive
            this.isCurrency = x.isCurrency
            this.isSigned = x.isSigned
            this.label = x.label
            this.name = x.name
            this.nullable = x.nullable
            this.precision = x.precision
            this.scale = x.scale
            this.schemaName = x.schemaName
            this.tableName = x.tableName
            this.type = x.type
            this.typeName = x.typeName
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy