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

commonMain.aws.sdk.kotlin.services.glue.model.DirectSchemaChangePolicy.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 policy that specifies update behavior for the crawler.
 */
public class DirectSchemaChangePolicy private constructor(builder: Builder) {
    /**
     * Specifies the database that the schema change policy applies to.
     */
    public val database: kotlin.String? = builder.database
    /**
     * Whether to use the specified update behavior when the crawler finds a changed schema.
     */
    public val enableUpdateCatalog: kotlin.Boolean? = builder.enableUpdateCatalog
    /**
     * Specifies the table in the database that the schema change policy applies to.
     */
    public val table: kotlin.String? = builder.table
    /**
     * The update behavior when the crawler finds a changed schema.
     */
    public val updateBehavior: aws.sdk.kotlin.services.glue.model.UpdateCatalogBehavior? = builder.updateBehavior

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

    override fun toString(): kotlin.String = buildString {
        append("DirectSchemaChangePolicy(")
        append("database=$database,")
        append("enableUpdateCatalog=$enableUpdateCatalog,")
        append("table=$table,")
        append("updateBehavior=$updateBehavior")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = database?.hashCode() ?: 0
        result = 31 * result + (enableUpdateCatalog?.hashCode() ?: 0)
        result = 31 * result + (table?.hashCode() ?: 0)
        result = 31 * result + (updateBehavior?.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 DirectSchemaChangePolicy

        if (database != other.database) return false
        if (enableUpdateCatalog != other.enableUpdateCatalog) return false
        if (table != other.table) return false
        if (updateBehavior != other.updateBehavior) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specifies the database that the schema change policy applies to.
         */
        public var database: kotlin.String? = null
        /**
         * Whether to use the specified update behavior when the crawler finds a changed schema.
         */
        public var enableUpdateCatalog: kotlin.Boolean? = null
        /**
         * Specifies the table in the database that the schema change policy applies to.
         */
        public var table: kotlin.String? = null
        /**
         * The update behavior when the crawler finds a changed schema.
         */
        public var updateBehavior: aws.sdk.kotlin.services.glue.model.UpdateCatalogBehavior? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.DirectSchemaChangePolicy) : this() {
            this.database = x.database
            this.enableUpdateCatalog = x.enableUpdateCatalog
            this.table = x.table
            this.updateBehavior = x.updateBehavior
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy