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

commonMain.aws.sdk.kotlin.services.glue.model.CsvClassifier.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.glue.model

import aws.smithy.kotlin.runtime.time.Instant

/**
 * A classifier for custom `CSV` content.
 */
public class CsvClassifier private constructor(builder: Builder) {
    /**
     * Enables the processing of files that contain only one column.
     */
    public val allowSingleColumn: kotlin.Boolean? = builder.allowSingleColumn
    /**
     * Indicates whether the CSV file contains a header.
     */
    public val containsHeader: aws.sdk.kotlin.services.glue.model.CsvHeaderOption? = builder.containsHeader
    /**
     * The time that this classifier was registered.
     */
    public val creationTime: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTime
    /**
     * Enables the custom datatype to be configured.
     */
    public val customDatatypeConfigured: kotlin.Boolean? = builder.customDatatypeConfigured
    /**
     * A list of custom datatypes including "BINARY", "BOOLEAN", "DATE", "DECIMAL", "DOUBLE", "FLOAT", "INT", "LONG", "SHORT", "STRING", "TIMESTAMP".
     */
    public val customDatatypes: List? = builder.customDatatypes
    /**
     * A custom symbol to denote what separates each column entry in the row.
     */
    public val delimiter: kotlin.String? = builder.delimiter
    /**
     * Specifies not to trim values before identifying the type of column values. The default value is `true`.
     */
    public val disableValueTrimming: kotlin.Boolean? = builder.disableValueTrimming
    /**
     * A list of strings representing column names.
     */
    public val header: List? = builder.header
    /**
     * The time that this classifier was last updated.
     */
    public val lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdated
    /**
     * The name of the classifier.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.
     */
    public val quoteSymbol: kotlin.String? = builder.quoteSymbol
    /**
     * Sets the SerDe for processing CSV in the classifier, which will be applied in the Data Catalog. Valid values are `OpenCSVSerDe`, `LazySimpleSerDe`, and `None`. You can specify the `None` value when you want the crawler to do the detection.
     */
    public val serde: aws.sdk.kotlin.services.glue.model.CsvSerdeOption? = builder.serde
    /**
     * The version of this classifier.
     */
    public val version: kotlin.Long = builder.version

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

    override fun toString(): kotlin.String = buildString {
        append("CsvClassifier(")
        append("allowSingleColumn=$allowSingleColumn,")
        append("containsHeader=$containsHeader,")
        append("creationTime=$creationTime,")
        append("customDatatypeConfigured=$customDatatypeConfigured,")
        append("customDatatypes=$customDatatypes,")
        append("delimiter=$delimiter,")
        append("disableValueTrimming=$disableValueTrimming,")
        append("header=$header,")
        append("lastUpdated=$lastUpdated,")
        append("name=$name,")
        append("quoteSymbol=$quoteSymbol,")
        append("serde=$serde,")
        append("version=$version")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = allowSingleColumn?.hashCode() ?: 0
        result = 31 * result + (containsHeader?.hashCode() ?: 0)
        result = 31 * result + (creationTime?.hashCode() ?: 0)
        result = 31 * result + (customDatatypeConfigured?.hashCode() ?: 0)
        result = 31 * result + (customDatatypes?.hashCode() ?: 0)
        result = 31 * result + (delimiter?.hashCode() ?: 0)
        result = 31 * result + (disableValueTrimming?.hashCode() ?: 0)
        result = 31 * result + (header?.hashCode() ?: 0)
        result = 31 * result + (lastUpdated?.hashCode() ?: 0)
        result = 31 * result + (name.hashCode())
        result = 31 * result + (quoteSymbol?.hashCode() ?: 0)
        result = 31 * result + (serde?.hashCode() ?: 0)
        result = 31 * result + (version.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 CsvClassifier

        if (allowSingleColumn != other.allowSingleColumn) return false
        if (containsHeader != other.containsHeader) return false
        if (creationTime != other.creationTime) return false
        if (customDatatypeConfigured != other.customDatatypeConfigured) return false
        if (customDatatypes != other.customDatatypes) return false
        if (delimiter != other.delimiter) return false
        if (disableValueTrimming != other.disableValueTrimming) return false
        if (header != other.header) return false
        if (lastUpdated != other.lastUpdated) return false
        if (name != other.name) return false
        if (quoteSymbol != other.quoteSymbol) return false
        if (serde != other.serde) return false
        if (version != other.version) return false

        return true
    }

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

    public class Builder {
        /**
         * Enables the processing of files that contain only one column.
         */
        public var allowSingleColumn: kotlin.Boolean? = null
        /**
         * Indicates whether the CSV file contains a header.
         */
        public var containsHeader: aws.sdk.kotlin.services.glue.model.CsvHeaderOption? = null
        /**
         * The time that this classifier was registered.
         */
        public var creationTime: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * Enables the custom datatype to be configured.
         */
        public var customDatatypeConfigured: kotlin.Boolean? = null
        /**
         * A list of custom datatypes including "BINARY", "BOOLEAN", "DATE", "DECIMAL", "DOUBLE", "FLOAT", "INT", "LONG", "SHORT", "STRING", "TIMESTAMP".
         */
        public var customDatatypes: List? = null
        /**
         * A custom symbol to denote what separates each column entry in the row.
         */
        public var delimiter: kotlin.String? = null
        /**
         * Specifies not to trim values before identifying the type of column values. The default value is `true`.
         */
        public var disableValueTrimming: kotlin.Boolean? = null
        /**
         * A list of strings representing column names.
         */
        public var header: List? = null
        /**
         * The time that this classifier was last updated.
         */
        public var lastUpdated: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The name of the classifier.
         */
        public var name: kotlin.String? = null
        /**
         * A custom symbol to denote what combines content into a single column value. It must be different from the column delimiter.
         */
        public var quoteSymbol: kotlin.String? = null
        /**
         * Sets the SerDe for processing CSV in the classifier, which will be applied in the Data Catalog. Valid values are `OpenCSVSerDe`, `LazySimpleSerDe`, and `None`. You can specify the `None` value when you want the crawler to do the detection.
         */
        public var serde: aws.sdk.kotlin.services.glue.model.CsvSerdeOption? = null
        /**
         * The version of this classifier.
         */
        public var version: kotlin.Long = 0L

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.CsvClassifier) : this() {
            this.allowSingleColumn = x.allowSingleColumn
            this.containsHeader = x.containsHeader
            this.creationTime = x.creationTime
            this.customDatatypeConfigured = x.customDatatypeConfigured
            this.customDatatypes = x.customDatatypes
            this.delimiter = x.delimiter
            this.disableValueTrimming = x.disableValueTrimming
            this.header = x.header
            this.lastUpdated = x.lastUpdated
            this.name = x.name
            this.quoteSymbol = x.quoteSymbol
            this.serde = x.serde
            this.version = x.version
        }

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

        internal fun correctErrors(): Builder {
            if (name == null) name = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy