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

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

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

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

import com.pulumi.azurenative.datamigration.inputs.ValidateMigrationInputSqlServerSqlMITaskInputArgs.builder
import com.pulumi.azurenative.datamigration.kotlin.enums.BackupMode
import com.pulumi.core.Either
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Input for task that validates migration input for SQL to Azure SQL Managed Instance
 * @property backupBlobShare SAS URI of Azure Storage Account Container to be used for storing backup files.
 * @property backupFileShare Backup file share information for all selected databases.
 * @property backupMode Backup Mode to specify whether to use existing backup or create new backup.
 * @property selectedDatabases Databases to migrate
 * @property selectedLogins Logins to migrate
 * @property sourceConnectionInfo Information for connecting to source
 * @property targetConnectionInfo Information for connecting to target
 */
public data class ValidateMigrationInputSqlServerSqlMITaskInputArgs(
    public val backupBlobShare: Output,
    public val backupFileShare: Output? = null,
    public val backupMode: Output>? = null,
    public val selectedDatabases: Output>,
    public val selectedLogins: Output>? = null,
    public val sourceConnectionInfo: Output,
    public val targetConnectionInfo: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.datamigration.inputs.ValidateMigrationInputSqlServerSqlMITaskInputArgs =
        com.pulumi.azurenative.datamigration.inputs.ValidateMigrationInputSqlServerSqlMITaskInputArgs.builder()
            .backupBlobShare(backupBlobShare.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .backupFileShare(backupFileShare?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .backupMode(
                backupMode?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .selectedDatabases(
                selectedDatabases.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .selectedLogins(selectedLogins?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .sourceConnectionInfo(
                sourceConnectionInfo.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .targetConnectionInfo(
                targetConnectionInfo.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [ValidateMigrationInputSqlServerSqlMITaskInputArgs].
 */
@PulumiTagMarker
public class ValidateMigrationInputSqlServerSqlMITaskInputArgsBuilder internal constructor() {
    private var backupBlobShare: Output? = null

    private var backupFileShare: Output? = null

    private var backupMode: Output>? = null

    private var selectedDatabases: Output>? = null

    private var selectedLogins: Output>? = null

    private var sourceConnectionInfo: Output? = null

    private var targetConnectionInfo: Output? = null

    /**
     * @param value SAS URI of Azure Storage Account Container to be used for storing backup files.
     */
    @JvmName("ehpuwdrjqmsbbqkf")
    public suspend fun backupBlobShare(`value`: Output) {
        this.backupBlobShare = value
    }

    /**
     * @param value Backup file share information for all selected databases.
     */
    @JvmName("gwxcigripcgoaotr")
    public suspend fun backupFileShare(`value`: Output) {
        this.backupFileShare = value
    }

    /**
     * @param value Backup Mode to specify whether to use existing backup or create new backup.
     */
    @JvmName("jowbxotomvvapllj")
    public suspend fun backupMode(`value`: Output>) {
        this.backupMode = value
    }

    /**
     * @param value Databases to migrate
     */
    @JvmName("rmrwyxwybkqcfjyd")
    public suspend fun selectedDatabases(`value`: Output>) {
        this.selectedDatabases = value
    }

    @JvmName("cbtpqupdulmuifrs")
    public suspend fun selectedDatabases(vararg values: Output) {
        this.selectedDatabases = Output.all(values.asList())
    }

    /**
     * @param values Databases to migrate
     */
    @JvmName("fyvvgxwromevplcn")
    public suspend fun selectedDatabases(values: List>) {
        this.selectedDatabases = Output.all(values)
    }

    /**
     * @param value Logins to migrate
     */
    @JvmName("pdkmmslcrsgofams")
    public suspend fun selectedLogins(`value`: Output>) {
        this.selectedLogins = value
    }

    @JvmName("osewhwxdrxwisyia")
    public suspend fun selectedLogins(vararg values: Output) {
        this.selectedLogins = Output.all(values.asList())
    }

    /**
     * @param values Logins to migrate
     */
    @JvmName("tluwbxukblsfbmwa")
    public suspend fun selectedLogins(values: List>) {
        this.selectedLogins = Output.all(values)
    }

    /**
     * @param value Information for connecting to source
     */
    @JvmName("brhulslryikktacu")
    public suspend fun sourceConnectionInfo(`value`: Output) {
        this.sourceConnectionInfo = value
    }

    /**
     * @param value Information for connecting to target
     */
    @JvmName("nyppwdeknmifxtmh")
    public suspend fun targetConnectionInfo(`value`: Output) {
        this.targetConnectionInfo = value
    }

    /**
     * @param value SAS URI of Azure Storage Account Container to be used for storing backup files.
     */
    @JvmName("lamsfwjddavwrgca")
    public suspend fun backupBlobShare(`value`: BlobShareArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupBlobShare = mapped
    }

    /**
     * @param argument SAS URI of Azure Storage Account Container to be used for storing backup files.
     */
    @JvmName("ujxwjnqwicsxtuwo")
    public suspend fun backupBlobShare(argument: suspend BlobShareArgsBuilder.() -> Unit) {
        val toBeMapped = BlobShareArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backupBlobShare = mapped
    }

    /**
     * @param value Backup file share information for all selected databases.
     */
    @JvmName("lpmsulfejqlpfjiy")
    public suspend fun backupFileShare(`value`: FileShareArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupFileShare = mapped
    }

    /**
     * @param argument Backup file share information for all selected databases.
     */
    @JvmName("svrchktejyxwhtxd")
    public suspend fun backupFileShare(argument: suspend FileShareArgsBuilder.() -> Unit) {
        val toBeMapped = FileShareArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.backupFileShare = mapped
    }

    /**
     * @param value Backup Mode to specify whether to use existing backup or create new backup.
     */
    @JvmName("mmhurbvwbfwhlwhh")
    public suspend fun backupMode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.backupMode = mapped
    }

    /**
     * @param value Backup Mode to specify whether to use existing backup or create new backup.
     */
    @JvmName("yylksumexcmeqpsb")
    public fun backupMode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupMode = mapped
    }

    /**
     * @param value Backup Mode to specify whether to use existing backup or create new backup.
     */
    @JvmName("saqflltnhvsubgvq")
    public fun backupMode(`value`: BackupMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.backupMode = mapped
    }

    /**
     * @param value Databases to migrate
     */
    @JvmName("psweyhvxdcqrnsyv")
    public suspend fun selectedDatabases(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectedDatabases = mapped
    }

    /**
     * @param argument Databases to migrate
     */
    @JvmName("hxytskfkvgsqvvvk")
    public suspend fun selectedDatabases(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            MigrateSqlServerSqlMIDatabaseInputArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.selectedDatabases = mapped
    }

    /**
     * @param argument Databases to migrate
     */
    @JvmName("vwpyboresswcbhnd")
    public suspend fun selectedDatabases(vararg argument: suspend MigrateSqlServerSqlMIDatabaseInputArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            MigrateSqlServerSqlMIDatabaseInputArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.selectedDatabases = mapped
    }

    /**
     * @param argument Databases to migrate
     */
    @JvmName("ooofsvtcyguqugms")
    public suspend fun selectedDatabases(argument: suspend MigrateSqlServerSqlMIDatabaseInputArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            MigrateSqlServerSqlMIDatabaseInputArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.selectedDatabases = mapped
    }

    /**
     * @param values Databases to migrate
     */
    @JvmName("ayjvaorvilrrmxhe")
    public suspend fun selectedDatabases(vararg values: MigrateSqlServerSqlMIDatabaseInputArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectedDatabases = mapped
    }

    /**
     * @param value Logins to migrate
     */
    @JvmName("buggflrcqpjautpj")
    public suspend fun selectedLogins(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selectedLogins = mapped
    }

    /**
     * @param values Logins to migrate
     */
    @JvmName("aqnlrotdcmorvfdh")
    public suspend fun selectedLogins(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectedLogins = mapped
    }

    /**
     * @param value Information for connecting to source
     */
    @JvmName("bpgwlcgpjypomwgg")
    public suspend fun sourceConnectionInfo(`value`: SqlConnectionInfoArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceConnectionInfo = mapped
    }

    /**
     * @param argument Information for connecting to source
     */
    @JvmName("uxkacqmlnrxbphfi")
    public suspend fun sourceConnectionInfo(argument: suspend SqlConnectionInfoArgsBuilder.() -> Unit) {
        val toBeMapped = SqlConnectionInfoArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sourceConnectionInfo = mapped
    }

    /**
     * @param value Information for connecting to target
     */
    @JvmName("xtkomarqrkttqwmj")
    public suspend fun targetConnectionInfo(`value`: SqlConnectionInfoArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetConnectionInfo = mapped
    }

    /**
     * @param argument Information for connecting to target
     */
    @JvmName("ysajpkklujbjmlyr")
    public suspend fun targetConnectionInfo(argument: suspend SqlConnectionInfoArgsBuilder.() -> Unit) {
        val toBeMapped = SqlConnectionInfoArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.targetConnectionInfo = mapped
    }

    internal fun build(): ValidateMigrationInputSqlServerSqlMITaskInputArgs =
        ValidateMigrationInputSqlServerSqlMITaskInputArgs(
            backupBlobShare = backupBlobShare ?: throw PulumiNullFieldException("backupBlobShare"),
            backupFileShare = backupFileShare,
            backupMode = backupMode,
            selectedDatabases = selectedDatabases ?: throw PulumiNullFieldException("selectedDatabases"),
            selectedLogins = selectedLogins,
            sourceConnectionInfo = sourceConnectionInfo ?: throw
                PulumiNullFieldException("sourceConnectionInfo"),
            targetConnectionInfo = targetConnectionInfo ?: throw
                PulumiNullFieldException("targetConnectionInfo"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy