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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Contains details on the configuration of a table optimizer. You pass this configuration when creating or updating a table optimizer.
 */
public class TableOptimizerConfiguration private constructor(builder: Builder) {
    /**
     * Whether table optimization is enabled.
     */
    public val enabled: kotlin.Boolean? = builder.enabled
    /**
     * The configuration for an orphan file deletion optimizer.
     */
    public val orphanFileDeletionConfiguration: aws.sdk.kotlin.services.glue.model.OrphanFileDeletionConfiguration? = builder.orphanFileDeletionConfiguration
    /**
     * The configuration for a snapshot retention optimizer.
     */
    public val retentionConfiguration: aws.sdk.kotlin.services.glue.model.RetentionConfiguration? = builder.retentionConfiguration
    /**
     * A role passed by the caller which gives the service permission to update the resources associated with the optimizer on the caller's behalf.
     */
    public val roleArn: kotlin.String? = builder.roleArn
    /**
     * A `TableOptimizerVpcConfiguration` object representing the VPC configuration for a table optimizer.
     *
     * This configuration is necessary to perform optimization on tables that are in a customer VPC.
     */
    public val vpcConfiguration: aws.sdk.kotlin.services.glue.model.TableOptimizerVpcConfiguration? = builder.vpcConfiguration

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

    override fun toString(): kotlin.String = buildString {
        append("TableOptimizerConfiguration(")
        append("enabled=$enabled,")
        append("orphanFileDeletionConfiguration=$orphanFileDeletionConfiguration,")
        append("retentionConfiguration=$retentionConfiguration,")
        append("roleArn=$roleArn,")
        append("vpcConfiguration=$vpcConfiguration")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = enabled?.hashCode() ?: 0
        result = 31 * result + (orphanFileDeletionConfiguration?.hashCode() ?: 0)
        result = 31 * result + (retentionConfiguration?.hashCode() ?: 0)
        result = 31 * result + (roleArn?.hashCode() ?: 0)
        result = 31 * result + (vpcConfiguration?.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 TableOptimizerConfiguration

        if (enabled != other.enabled) return false
        if (orphanFileDeletionConfiguration != other.orphanFileDeletionConfiguration) return false
        if (retentionConfiguration != other.retentionConfiguration) return false
        if (roleArn != other.roleArn) return false
        if (vpcConfiguration != other.vpcConfiguration) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Whether table optimization is enabled.
         */
        public var enabled: kotlin.Boolean? = null
        /**
         * The configuration for an orphan file deletion optimizer.
         */
        public var orphanFileDeletionConfiguration: aws.sdk.kotlin.services.glue.model.OrphanFileDeletionConfiguration? = null
        /**
         * The configuration for a snapshot retention optimizer.
         */
        public var retentionConfiguration: aws.sdk.kotlin.services.glue.model.RetentionConfiguration? = null
        /**
         * A role passed by the caller which gives the service permission to update the resources associated with the optimizer on the caller's behalf.
         */
        public var roleArn: kotlin.String? = null
        /**
         * A `TableOptimizerVpcConfiguration` object representing the VPC configuration for a table optimizer.
         *
         * This configuration is necessary to perform optimization on tables that are in a customer VPC.
         */
        public var vpcConfiguration: aws.sdk.kotlin.services.glue.model.TableOptimizerVpcConfiguration? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.glue.model.TableOptimizerConfiguration) : this() {
            this.enabled = x.enabled
            this.orphanFileDeletionConfiguration = x.orphanFileDeletionConfiguration
            this.retentionConfiguration = x.retentionConfiguration
            this.roleArn = x.roleArn
            this.vpcConfiguration = x.vpcConfiguration
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.OrphanFileDeletionConfiguration] inside the given [block]
         */
        public fun orphanFileDeletionConfiguration(block: aws.sdk.kotlin.services.glue.model.OrphanFileDeletionConfiguration.Builder.() -> kotlin.Unit) {
            this.orphanFileDeletionConfiguration = aws.sdk.kotlin.services.glue.model.OrphanFileDeletionConfiguration.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.glue.model.RetentionConfiguration] inside the given [block]
         */
        public fun retentionConfiguration(block: aws.sdk.kotlin.services.glue.model.RetentionConfiguration.Builder.() -> kotlin.Unit) {
            this.retentionConfiguration = aws.sdk.kotlin.services.glue.model.RetentionConfiguration.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy