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

commonMain.aws.sdk.kotlin.services.glue.model.UpdateCsvClassifierRequest.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.glue.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specifies a custom CSV classifier to be updated.
 */
public class UpdateCsvClassifierRequest 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
    /**
     * Specifies the configuration of custom datatypes.
     */
    public val customDatatypeConfigured: kotlin.Boolean? = builder.customDatatypeConfigured
    /**
     * Specifies a list of supported custom datatypes.
     */
    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 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

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

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

    override fun hashCode(): kotlin.Int {
        var result = allowSingleColumn?.hashCode() ?: 0
        result = 31 * result + (containsHeader?.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 + (name.hashCode())
        result = 31 * result + (quoteSymbol?.hashCode() ?: 0)
        result = 31 * result + (serde?.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 UpdateCsvClassifierRequest

        if (allowSingleColumn != other.allowSingleColumn) return false
        if (containsHeader != other.containsHeader) 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 (name != other.name) return false
        if (quoteSymbol != other.quoteSymbol) return false
        if (serde != other.serde) return false

        return true
    }

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

    @SdkDsl
    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
        /**
         * Specifies the configuration of custom datatypes.
         */
        public var customDatatypeConfigured: kotlin.Boolean? = null
        /**
         * Specifies a list of supported custom datatypes.
         */
        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 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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy