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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * A structure specifying the dialect and dialect version used by the query engine.
 */
public class SupportedDialect private constructor(builder: Builder) {
    /**
     * The dialect of the query engine.
     */
    public val dialect: aws.sdk.kotlin.services.glue.model.ViewDialect? = builder.dialect
    /**
     * The version of the dialect of the query engine. For example, 3.0.0.
     */
    public val dialectVersion: kotlin.String? = builder.dialectVersion

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

    override fun toString(): kotlin.String = buildString {
        append("SupportedDialect(")
        append("dialect=$dialect,")
        append("dialectVersion=$dialectVersion")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dialect?.hashCode() ?: 0
        result = 31 * result + (dialectVersion?.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 SupportedDialect

        if (dialect != other.dialect) return false
        if (dialectVersion != other.dialectVersion) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The dialect of the query engine.
         */
        public var dialect: aws.sdk.kotlin.services.glue.model.ViewDialect? = null
        /**
         * The version of the dialect of the query engine. For example, 3.0.0.
         */
        public var dialectVersion: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.SupportedDialect) : this() {
            this.dialect = x.dialect
            this.dialectVersion = x.dialectVersion
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy