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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.model.DataMigrationSettings.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.databasemigrationservice.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Options for configuring a data migration, including whether to enable CloudWatch logs, and the selection rules to use to include or exclude database objects from the migration.
 */
public class DataMigrationSettings private constructor(builder: Builder) {
    /**
     * Whether to enable CloudWatch logging for the data migration.
     */
    public val cloudwatchLogsEnabled: kotlin.Boolean? = builder.cloudwatchLogsEnabled
    /**
     * The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.
     */
    public val numberOfJobs: kotlin.Int? = builder.numberOfJobs
    /**
     * A JSON-formatted string that defines what objects to include and exclude from the migration.
     */
    public val selectionRules: kotlin.String? = builder.selectionRules

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

    override fun toString(): kotlin.String = buildString {
        append("DataMigrationSettings(")
        append("cloudwatchLogsEnabled=$cloudwatchLogsEnabled,")
        append("numberOfJobs=$numberOfJobs,")
        append("selectionRules=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = cloudwatchLogsEnabled?.hashCode() ?: 0
        result = 31 * result + (numberOfJobs ?: 0)
        result = 31 * result + (selectionRules?.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 DataMigrationSettings

        if (cloudwatchLogsEnabled != other.cloudwatchLogsEnabled) return false
        if (numberOfJobs != other.numberOfJobs) return false
        if (selectionRules != other.selectionRules) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Whether to enable CloudWatch logging for the data migration.
         */
        public var cloudwatchLogsEnabled: kotlin.Boolean? = null
        /**
         * The number of parallel jobs that trigger parallel threads to unload the tables from the source, and then load them to the target.
         */
        public var numberOfJobs: kotlin.Int? = null
        /**
         * A JSON-formatted string that defines what objects to include and exclude from the migration.
         */
        public var selectionRules: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databasemigrationservice.model.DataMigrationSettings) : this() {
            this.cloudwatchLogsEnabled = x.cloudwatchLogsEnabled
            this.numberOfJobs = x.numberOfJobs
            this.selectionRules = x.selectionRules
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy