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

commonMain.aws.sdk.kotlin.services.kendra.model.SqlConfiguration.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.kendra.model



/**
 * Provides the configuration information to use a SQL database.
 */
public class SqlConfiguration private constructor(builder: Builder) {
    /**
     * Determines whether Amazon Kendra encloses SQL identifiers for tables and column names in double quotes (") when making a database query.
     *
     * By default, Amazon Kendra passes SQL identifiers the way that they are entered into the data source configuration. It does not change the case of identifiers or enclose them in quotes.
     *
     * PostgreSQL internally converts uppercase characters to lower case characters in identifiers unless they are quoted. Choosing this option encloses identifiers in quotes so that PostgreSQL does not convert the character's case.
     *
     * For MySQL databases, you must enable the `ansi_quotes` option when you set this field to `DOUBLE_QUOTES`.
     */
    public val queryIdentifiersEnclosingOption: aws.sdk.kotlin.services.kendra.model.QueryIdentifiersEnclosingOption? = builder.queryIdentifiersEnclosingOption

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

    override fun toString(): kotlin.String = buildString {
        append("SqlConfiguration(")
        append("queryIdentifiersEnclosingOption=$queryIdentifiersEnclosingOption")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = queryIdentifiersEnclosingOption?.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 SqlConfiguration

        if (queryIdentifiersEnclosingOption != other.queryIdentifiersEnclosingOption) return false

        return true
    }

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

    public class Builder {
        /**
         * Determines whether Amazon Kendra encloses SQL identifiers for tables and column names in double quotes (") when making a database query.
         *
         * By default, Amazon Kendra passes SQL identifiers the way that they are entered into the data source configuration. It does not change the case of identifiers or enclose them in quotes.
         *
         * PostgreSQL internally converts uppercase characters to lower case characters in identifiers unless they are quoted. Choosing this option encloses identifiers in quotes so that PostgreSQL does not convert the character's case.
         *
         * For MySQL databases, you must enable the `ansi_quotes` option when you set this field to `DOUBLE_QUOTES`.
         */
        public var queryIdentifiersEnclosingOption: aws.sdk.kotlin.services.kendra.model.QueryIdentifiersEnclosingOption? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.kendra.model.SqlConfiguration) : this() {
            this.queryIdentifiersEnclosingOption = x.queryIdentifiersEnclosingOption
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy