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

commonMain.aws.sdk.kotlin.services.databasemigrationservice.model.CreateDataMigrationRequest.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

public class CreateDataMigrationRequest private constructor(builder: Builder) {
    /**
     * A user-friendly name for the data migration. Data migration names have the following constraints:
     * + Must begin with a letter, and can only contain ASCII letters, digits, and hyphens.
     * + Can't end with a hyphen or contain two consecutive hyphens.
     * + Length must be from 1 to 255 characters.
     */
    public val dataMigrationName: kotlin.String? = builder.dataMigrationName
    /**
     * Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.
     */
    public val dataMigrationType: aws.sdk.kotlin.services.databasemigrationservice.model.MigrationTypeValue? = builder.dataMigrationType
    /**
     * Specifies whether to enable CloudWatch logs for the data migration.
     */
    public val enableCloudwatchLogs: kotlin.Boolean? = builder.enableCloudwatchLogs
    /**
     * An identifier for the migration project.
     */
    public val migrationProjectIdentifier: kotlin.String? = builder.migrationProjectIdentifier
    /**
     * 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
    /**
     * An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.
     */
    public val selectionRules: kotlin.String? = builder.selectionRules
    /**
     * The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.
     */
    public val serviceAccessRoleArn: kotlin.String? = builder.serviceAccessRoleArn
    /**
     * Specifies information about the source data provider.
     */
    public val sourceDataSettings: List? = builder.sourceDataSettings
    /**
     * One or more tags to be assigned to the data migration.
     */
    public val tags: List? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("CreateDataMigrationRequest(")
        append("dataMigrationName=$dataMigrationName,")
        append("dataMigrationType=$dataMigrationType,")
        append("enableCloudwatchLogs=$enableCloudwatchLogs,")
        append("migrationProjectIdentifier=$migrationProjectIdentifier,")
        append("numberOfJobs=$numberOfJobs,")
        append("selectionRules=*** Sensitive Data Redacted ***,")
        append("serviceAccessRoleArn=$serviceAccessRoleArn,")
        append("sourceDataSettings=$sourceDataSettings,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataMigrationName?.hashCode() ?: 0
        result = 31 * result + (dataMigrationType?.hashCode() ?: 0)
        result = 31 * result + (enableCloudwatchLogs?.hashCode() ?: 0)
        result = 31 * result + (migrationProjectIdentifier?.hashCode() ?: 0)
        result = 31 * result + (numberOfJobs ?: 0)
        result = 31 * result + (selectionRules?.hashCode() ?: 0)
        result = 31 * result + (serviceAccessRoleArn?.hashCode() ?: 0)
        result = 31 * result + (sourceDataSettings?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateDataMigrationRequest

        if (dataMigrationName != other.dataMigrationName) return false
        if (dataMigrationType != other.dataMigrationType) return false
        if (enableCloudwatchLogs != other.enableCloudwatchLogs) return false
        if (migrationProjectIdentifier != other.migrationProjectIdentifier) return false
        if (numberOfJobs != other.numberOfJobs) return false
        if (selectionRules != other.selectionRules) return false
        if (serviceAccessRoleArn != other.serviceAccessRoleArn) return false
        if (sourceDataSettings != other.sourceDataSettings) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * A user-friendly name for the data migration. Data migration names have the following constraints:
         * + Must begin with a letter, and can only contain ASCII letters, digits, and hyphens.
         * + Can't end with a hyphen or contain two consecutive hyphens.
         * + Length must be from 1 to 255 characters.
         */
        public var dataMigrationName: kotlin.String? = null
        /**
         * Specifies if the data migration is full-load only, change data capture (CDC) only, or full-load and CDC.
         */
        public var dataMigrationType: aws.sdk.kotlin.services.databasemigrationservice.model.MigrationTypeValue? = null
        /**
         * Specifies whether to enable CloudWatch logs for the data migration.
         */
        public var enableCloudwatchLogs: kotlin.Boolean? = null
        /**
         * An identifier for the migration project.
         */
        public var migrationProjectIdentifier: kotlin.String? = 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
        /**
         * An optional JSON string specifying what tables, views, and schemas to include or exclude from the migration.
         */
        public var selectionRules: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) for the service access role that you want to use to create the data migration.
         */
        public var serviceAccessRoleArn: kotlin.String? = null
        /**
         * Specifies information about the source data provider.
         */
        public var sourceDataSettings: List? = null
        /**
         * One or more tags to be assigned to the data migration.
         */
        public var tags: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.databasemigrationservice.model.CreateDataMigrationRequest) : this() {
            this.dataMigrationName = x.dataMigrationName
            this.dataMigrationType = x.dataMigrationType
            this.enableCloudwatchLogs = x.enableCloudwatchLogs
            this.migrationProjectIdentifier = x.migrationProjectIdentifier
            this.numberOfJobs = x.numberOfJobs
            this.selectionRules = x.selectionRules
            this.serviceAccessRoleArn = x.serviceAccessRoleArn
            this.sourceDataSettings = x.sourceDataSettings
            this.tags = x.tags
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy