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

com.pulumi.azurenative.datamigration.kotlin.inputs.MigrateSqlServerSqlDbDatabaseInputArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.datamigration.kotlin.inputs

import com.pulumi.azurenative.datamigration.inputs.MigrateSqlServerSqlDbDatabaseInputArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Database specific information for SQL to Azure SQL DB migration task inputs
 * @property makeSourceDbReadOnly Whether to set database read only before migration
 * @property name Name of the database
 * @property tableMap Mapping of source to target tables
 * @property targetDatabaseName Name of target database. Note: Target database will be truncated before starting migration.
 */
public data class MigrateSqlServerSqlDbDatabaseInputArgs(
    public val makeSourceDbReadOnly: Output? = null,
    public val name: Output? = null,
    public val tableMap: Output>? = null,
    public val targetDatabaseName: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.datamigration.inputs.MigrateSqlServerSqlDbDatabaseInputArgs =
        com.pulumi.azurenative.datamigration.inputs.MigrateSqlServerSqlDbDatabaseInputArgs.builder()
            .makeSourceDbReadOnly(makeSourceDbReadOnly?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tableMap(
                tableMap?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .targetDatabaseName(targetDatabaseName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [MigrateSqlServerSqlDbDatabaseInputArgs].
 */
@PulumiTagMarker
public class MigrateSqlServerSqlDbDatabaseInputArgsBuilder internal constructor() {
    private var makeSourceDbReadOnly: Output? = null

    private var name: Output? = null

    private var tableMap: Output>? = null

    private var targetDatabaseName: Output? = null

    /**
     * @param value Whether to set database read only before migration
     */
    @JvmName("ilvumryxrehtmucq")
    public suspend fun makeSourceDbReadOnly(`value`: Output) {
        this.makeSourceDbReadOnly = value
    }

    /**
     * @param value Name of the database
     */
    @JvmName("uhvrmqyiwjttsduj")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Mapping of source to target tables
     */
    @JvmName("mhirpbvxqknxrinm")
    public suspend fun tableMap(`value`: Output>) {
        this.tableMap = value
    }

    /**
     * @param value Name of target database. Note: Target database will be truncated before starting migration.
     */
    @JvmName("wpnfarvwrfkerhke")
    public suspend fun targetDatabaseName(`value`: Output) {
        this.targetDatabaseName = value
    }

    /**
     * @param value Whether to set database read only before migration
     */
    @JvmName("xylyovaqewnoqabe")
    public suspend fun makeSourceDbReadOnly(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.makeSourceDbReadOnly = mapped
    }

    /**
     * @param value Name of the database
     */
    @JvmName("nspivdbdchhqtgba")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Mapping of source to target tables
     */
    @JvmName("ooyjhuxhogpuvvnw")
    public suspend fun tableMap(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tableMap = mapped
    }

    /**
     * @param values Mapping of source to target tables
     */
    @JvmName("hcifuafximnllpvw")
    public fun tableMap(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tableMap = mapped
    }

    /**
     * @param value Name of target database. Note: Target database will be truncated before starting migration.
     */
    @JvmName("bmdflueuupxsootj")
    public suspend fun targetDatabaseName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetDatabaseName = mapped
    }

    internal fun build(): MigrateSqlServerSqlDbDatabaseInputArgs =
        MigrateSqlServerSqlDbDatabaseInputArgs(
            makeSourceDbReadOnly = makeSourceDbReadOnly,
            name = name,
            tableMap = tableMap,
            targetDatabaseName = targetDatabaseName,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy