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

commonMain.aws.sdk.kotlin.services.timestreamwrite.model.CsvConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.timestreamwrite.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A delimited data format where the column separator can be a comma and the record separator is a newline character.
 */
public class CsvConfiguration private constructor(builder: Builder) {
    /**
     * Column separator can be one of comma (','), pipe ('|), semicolon (';'), tab('/t'), or blank space (' ').
     */
    public val columnSeparator: kotlin.String? = builder.columnSeparator
    /**
     * Escape character can be one of
     */
    public val escapeChar: kotlin.String? = builder.escapeChar
    /**
     * Can be blank space (' ').
     */
    public val nullValue: kotlin.String? = builder.nullValue
    /**
     * Can be single quote (') or double quote (").
     */
    public val quoteChar: kotlin.String? = builder.quoteChar
    /**
     * Specifies to trim leading and trailing white space.
     */
    public val trimWhiteSpace: kotlin.Boolean? = builder.trimWhiteSpace

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

    override fun toString(): kotlin.String = buildString {
        append("CsvConfiguration(")
        append("columnSeparator=$columnSeparator,")
        append("escapeChar=$escapeChar,")
        append("nullValue=$nullValue,")
        append("quoteChar=$quoteChar,")
        append("trimWhiteSpace=$trimWhiteSpace")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = columnSeparator?.hashCode() ?: 0
        result = 31 * result + (escapeChar?.hashCode() ?: 0)
        result = 31 * result + (nullValue?.hashCode() ?: 0)
        result = 31 * result + (quoteChar?.hashCode() ?: 0)
        result = 31 * result + (trimWhiteSpace?.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 CsvConfiguration

        if (columnSeparator != other.columnSeparator) return false
        if (escapeChar != other.escapeChar) return false
        if (nullValue != other.nullValue) return false
        if (quoteChar != other.quoteChar) return false
        if (trimWhiteSpace != other.trimWhiteSpace) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Column separator can be one of comma (','), pipe ('|), semicolon (';'), tab('/t'), or blank space (' ').
         */
        public var columnSeparator: kotlin.String? = null
        /**
         * Escape character can be one of
         */
        public var escapeChar: kotlin.String? = null
        /**
         * Can be blank space (' ').
         */
        public var nullValue: kotlin.String? = null
        /**
         * Can be single quote (') or double quote (").
         */
        public var quoteChar: kotlin.String? = null
        /**
         * Specifies to trim leading and trailing white space.
         */
        public var trimWhiteSpace: kotlin.Boolean? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.timestreamwrite.model.CsvConfiguration) : this() {
            this.columnSeparator = x.columnSeparator
            this.escapeChar = x.escapeChar
            this.nullValue = x.nullValue
            this.quoteChar = x.quoteChar
            this.trimWhiteSpace = x.trimWhiteSpace
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy