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

com.pulumi.azure.cosmosdb.kotlin.inputs.AccountRestoreArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.cosmosdb.kotlin.inputs

import com.pulumi.azure.cosmosdb.inputs.AccountRestoreArgs.builder
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

/**
 *
 * @property databases A `database` block as defined below. Changing this forces a new resource to be created.
 * @property gremlinDatabases One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
 * @property restoreTimestampInUtc The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
 * @property sourceCosmosdbAccountId The resource ID of the restorable database account from which the restore has to be initiated. The example is `/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}`. Changing this forces a new resource to be created.
 * > **Note:** Any database account with `Continuous` type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by `azure.cosmosdb.getRestorableDatabaseAccounts`.
 * @property tablesToRestores A list of specific tables available for restore. Changing this forces a new resource to be created.
 */
public data class AccountRestoreArgs(
    public val databases: Output>? = null,
    public val gremlinDatabases: Output>? = null,
    public val restoreTimestampInUtc: Output,
    public val sourceCosmosdbAccountId: Output,
    public val tablesToRestores: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cosmosdb.inputs.AccountRestoreArgs =
        com.pulumi.azure.cosmosdb.inputs.AccountRestoreArgs.builder()
            .databases(
                databases?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .gremlinDatabases(
                gremlinDatabases?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .restoreTimestampInUtc(restoreTimestampInUtc.applyValue({ args0 -> args0 }))
            .sourceCosmosdbAccountId(sourceCosmosdbAccountId.applyValue({ args0 -> args0 }))
            .tablesToRestores(tablesToRestores?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [AccountRestoreArgs].
 */
@PulumiTagMarker
public class AccountRestoreArgsBuilder internal constructor() {
    private var databases: Output>? = null

    private var gremlinDatabases: Output>? = null

    private var restoreTimestampInUtc: Output? = null

    private var sourceCosmosdbAccountId: Output? = null

    private var tablesToRestores: Output>? = null

    /**
     * @param value A `database` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("pssjhopuvgvuskfo")
    public suspend fun databases(`value`: Output>) {
        this.databases = value
    }

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

    /**
     * @param values A `database` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ivlqpdpbgfojmscl")
    public suspend fun databases(values: List>) {
        this.databases = Output.all(values)
    }

    /**
     * @param value One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("nyegtcysvpalablr")
    public suspend fun gremlinDatabases(`value`: Output>) {
        this.gremlinDatabases = value
    }

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

    /**
     * @param values One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("yscrbgmdewdxjoeo")
    public suspend fun gremlinDatabases(values: List>) {
        this.gremlinDatabases = Output.all(values)
    }

    /**
     * @param value The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
     */
    @JvmName("jtxmdrspmdsyhafu")
    public suspend fun restoreTimestampInUtc(`value`: Output) {
        this.restoreTimestampInUtc = value
    }

    /**
     * @param value The resource ID of the restorable database account from which the restore has to be initiated. The example is `/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}`. Changing this forces a new resource to be created.
     * > **Note:** Any database account with `Continuous` type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by `azure.cosmosdb.getRestorableDatabaseAccounts`.
     */
    @JvmName("svxacelbyhlkttnw")
    public suspend fun sourceCosmosdbAccountId(`value`: Output) {
        this.sourceCosmosdbAccountId = value
    }

    /**
     * @param value A list of specific tables available for restore. Changing this forces a new resource to be created.
     */
    @JvmName("kabgqvfocverxwfk")
    public suspend fun tablesToRestores(`value`: Output>) {
        this.tablesToRestores = value
    }

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

    /**
     * @param values A list of specific tables available for restore. Changing this forces a new resource to be created.
     */
    @JvmName("bedagwkpbnipoxns")
    public suspend fun tablesToRestores(values: List>) {
        this.tablesToRestores = Output.all(values)
    }

    /**
     * @param value A `database` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("xjekxwpggwkoyjfv")
    public suspend fun databases(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.databases = mapped
    }

    /**
     * @param argument A `database` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("rtylrvuaegpqbfhv")
    public suspend fun databases(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccountRestoreDatabaseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.databases = mapped
    }

    /**
     * @param argument A `database` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ytyewgsxswdhrnsa")
    public suspend fun databases(vararg argument: suspend AccountRestoreDatabaseArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccountRestoreDatabaseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.databases = mapped
    }

    /**
     * @param argument A `database` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("claiiimmmvwpuwcs")
    public suspend fun databases(argument: suspend AccountRestoreDatabaseArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AccountRestoreDatabaseArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.databases = mapped
    }

    /**
     * @param values A `database` block as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("pugaalpkhqjoahao")
    public suspend fun databases(vararg values: AccountRestoreDatabaseArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.databases = mapped
    }

    /**
     * @param value One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("qiqmrhappgoddjfk")
    public suspend fun gremlinDatabases(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gremlinDatabases = mapped
    }

    /**
     * @param argument One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("jfbiastpafnesnye")
    public suspend fun gremlinDatabases(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AccountRestoreGremlinDatabaseArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.gremlinDatabases = mapped
    }

    /**
     * @param argument One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("ccevmodkjbmidtul")
    public suspend fun gremlinDatabases(vararg argument: suspend AccountRestoreGremlinDatabaseArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AccountRestoreGremlinDatabaseArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.gremlinDatabases = mapped
    }

    /**
     * @param argument One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("eysyotwhnlxhhhxc")
    public suspend fun gremlinDatabases(argument: suspend AccountRestoreGremlinDatabaseArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AccountRestoreGremlinDatabaseArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.gremlinDatabases = mapped
    }

    /**
     * @param values One or more `gremlin_database` blocks as defined below. Changing this forces a new resource to be created.
     */
    @JvmName("rjbmsmtwggkhvixc")
    public suspend fun gremlinDatabases(vararg values: AccountRestoreGremlinDatabaseArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.gremlinDatabases = mapped
    }

    /**
     * @param value The creation time of the database or the collection (Datetime Format `RFC 3339`). Changing this forces a new resource to be created.
     */
    @JvmName("qrupcbqrshsmoabh")
    public suspend fun restoreTimestampInUtc(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.restoreTimestampInUtc = mapped
    }

    /**
     * @param value The resource ID of the restorable database account from which the restore has to be initiated. The example is `/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}`. Changing this forces a new resource to be created.
     * > **Note:** Any database account with `Continuous` type (live account or accounts deleted in last 30 days) is a restorable database account and there cannot be Create/Update/Delete operations on the restorable database accounts. They can only be read and retrieved by `azure.cosmosdb.getRestorableDatabaseAccounts`.
     */
    @JvmName("hcidhbdrimohkkya")
    public suspend fun sourceCosmosdbAccountId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sourceCosmosdbAccountId = mapped
    }

    /**
     * @param value A list of specific tables available for restore. Changing this forces a new resource to be created.
     */
    @JvmName("njnchbjsiiwolvcp")
    public suspend fun tablesToRestores(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tablesToRestores = mapped
    }

    /**
     * @param values A list of specific tables available for restore. Changing this forces a new resource to be created.
     */
    @JvmName("owqepepytnpfbfkr")
    public suspend fun tablesToRestores(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tablesToRestores = mapped
    }

    internal fun build(): AccountRestoreArgs = AccountRestoreArgs(
        databases = databases,
        gremlinDatabases = gremlinDatabases,
        restoreTimestampInUtc = restoreTimestampInUtc ?: throw
            PulumiNullFieldException("restoreTimestampInUtc"),
        sourceCosmosdbAccountId = sourceCosmosdbAccountId ?: throw
            PulumiNullFieldException("sourceCosmosdbAccountId"),
        tablesToRestores = tablesToRestores,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy