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

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

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

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

import com.pulumi.azure.cosmosdb.inputs.CassandraTableSchemaArgs.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.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property clusterKeys One or more `cluster_key` blocks as defined below.
 * @property columns One or more `column` blocks as defined below.
 * @property partitionKeys One or more `partition_key` blocks as defined below.
 */
public data class CassandraTableSchemaArgs(
    public val clusterKeys: Output>? = null,
    public val columns: Output>,
    public val partitionKeys: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.cosmosdb.inputs.CassandraTableSchemaArgs =
        com.pulumi.azure.cosmosdb.inputs.CassandraTableSchemaArgs.builder()
            .clusterKeys(
                clusterKeys?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .columns(
                columns.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .partitionKeys(
                partitionKeys.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var columns: Output>? = null

    private var partitionKeys: Output>? = null

    /**
     * @param value One or more `cluster_key` blocks as defined below.
     */
    @JvmName("wgwdwymmknlmnjht")
    public suspend fun clusterKeys(`value`: Output>) {
        this.clusterKeys = value
    }

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

    /**
     * @param values One or more `cluster_key` blocks as defined below.
     */
    @JvmName("twrmumobjkpalcms")
    public suspend fun clusterKeys(values: List>) {
        this.clusterKeys = Output.all(values)
    }

    /**
     * @param value One or more `column` blocks as defined below.
     */
    @JvmName("bmiikubylpgvtlba")
    public suspend fun columns(`value`: Output>) {
        this.columns = value
    }

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

    /**
     * @param values One or more `column` blocks as defined below.
     */
    @JvmName("omvfdwcptvviuxvs")
    public suspend fun columns(values: List>) {
        this.columns = Output.all(values)
    }

    /**
     * @param value One or more `partition_key` blocks as defined below.
     */
    @JvmName("bndsvhbubrhvpnhw")
    public suspend fun partitionKeys(`value`: Output>) {
        this.partitionKeys = value
    }

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

    /**
     * @param values One or more `partition_key` blocks as defined below.
     */
    @JvmName("acqvdjrutevmlsmt")
    public suspend fun partitionKeys(values: List>) {
        this.partitionKeys = Output.all(values)
    }

    /**
     * @param value One or more `cluster_key` blocks as defined below.
     */
    @JvmName("avysvyckkfdnnnxd")
    public suspend fun clusterKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterKeys = mapped
    }

    /**
     * @param argument One or more `cluster_key` blocks as defined below.
     */
    @JvmName("lxirilgfaatdmovw")
    public suspend fun clusterKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CassandraTableSchemaClusterKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.clusterKeys = mapped
    }

    /**
     * @param argument One or more `cluster_key` blocks as defined below.
     */
    @JvmName("ervjushirflgidef")
    public suspend fun clusterKeys(vararg argument: suspend CassandraTableSchemaClusterKeyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CassandraTableSchemaClusterKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.clusterKeys = mapped
    }

    /**
     * @param argument One or more `cluster_key` blocks as defined below.
     */
    @JvmName("iqnpsibscxwhoxwx")
    public suspend fun clusterKeys(argument: suspend CassandraTableSchemaClusterKeyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CassandraTableSchemaClusterKeyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.clusterKeys = mapped
    }

    /**
     * @param values One or more `cluster_key` blocks as defined below.
     */
    @JvmName("pdxblrpwhclvcsos")
    public suspend fun clusterKeys(vararg values: CassandraTableSchemaClusterKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clusterKeys = mapped
    }

    /**
     * @param value One or more `column` blocks as defined below.
     */
    @JvmName("abrpduvsdiwamlcb")
    public suspend fun columns(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.columns = mapped
    }

    /**
     * @param argument One or more `column` blocks as defined below.
     */
    @JvmName("pkoghqqacsqvmrhl")
    public suspend fun columns(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CassandraTableSchemaColumnArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.columns = mapped
    }

    /**
     * @param argument One or more `column` blocks as defined below.
     */
    @JvmName("hlcoyphaykckosjf")
    public suspend fun columns(vararg argument: suspend CassandraTableSchemaColumnArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CassandraTableSchemaColumnArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.columns = mapped
    }

    /**
     * @param argument One or more `column` blocks as defined below.
     */
    @JvmName("xwlhyegmrvwogini")
    public suspend fun columns(argument: suspend CassandraTableSchemaColumnArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CassandraTableSchemaColumnArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.columns = mapped
    }

    /**
     * @param values One or more `column` blocks as defined below.
     */
    @JvmName("saicaudjbqaavjii")
    public suspend fun columns(vararg values: CassandraTableSchemaColumnArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.columns = mapped
    }

    /**
     * @param value One or more `partition_key` blocks as defined below.
     */
    @JvmName("bkoryjscydafcnji")
    public suspend fun partitionKeys(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.partitionKeys = mapped
    }

    /**
     * @param argument One or more `partition_key` blocks as defined below.
     */
    @JvmName("lnnxbgbmombyujss")
    public suspend fun partitionKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CassandraTableSchemaPartitionKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.partitionKeys = mapped
    }

    /**
     * @param argument One or more `partition_key` blocks as defined below.
     */
    @JvmName("asawsblnwmdmjyal")
    public suspend fun partitionKeys(vararg argument: suspend CassandraTableSchemaPartitionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CassandraTableSchemaPartitionKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.partitionKeys = mapped
    }

    /**
     * @param argument One or more `partition_key` blocks as defined below.
     */
    @JvmName("euvoysdabamtiyyh")
    public suspend fun partitionKeys(argument: suspend CassandraTableSchemaPartitionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CassandraTableSchemaPartitionKeyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.partitionKeys = mapped
    }

    /**
     * @param values One or more `partition_key` blocks as defined below.
     */
    @JvmName("vjdkhlaqmysiefea")
    public suspend fun partitionKeys(vararg values: CassandraTableSchemaPartitionKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.partitionKeys = mapped
    }

    internal fun build(): CassandraTableSchemaArgs = CassandraTableSchemaArgs(
        clusterKeys = clusterKeys,
        columns = columns ?: throw PulumiNullFieldException("columns"),
        partitionKeys = partitionKeys ?: throw PulumiNullFieldException("partitionKeys"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy