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

com.pulumi.gcp.bigquery.kotlin.inputs.TableTableConstraintsArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.bigquery.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.bigquery.inputs.TableTableConstraintsArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
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 foreignKeys Present only if the table has a foreign key.
 * The foreign key is not enforced.
 * Structure is documented below.
 * @property primaryKey Represents the primary key constraint
 * on a table's columns. Present only if the table has a primary key.
 * The primary key is not enforced.
 * Structure is documented below.
 */
public data class TableTableConstraintsArgs(
    public val foreignKeys: Output>? = null,
    public val primaryKey: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.bigquery.inputs.TableTableConstraintsArgs =
        com.pulumi.gcp.bigquery.inputs.TableTableConstraintsArgs.builder()
            .foreignKeys(
                foreignKeys?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .primaryKey(primaryKey?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var primaryKey: Output? = null

    /**
     * @param value Present only if the table has a foreign key.
     * The foreign key is not enforced.
     * Structure is documented below.
     */
    @JvmName("cvlqicvvngekilgj")
    public suspend fun foreignKeys(`value`: Output>) {
        this.foreignKeys = value
    }

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

    /**
     * @param values Present only if the table has a foreign key.
     * The foreign key is not enforced.
     * Structure is documented below.
     */
    @JvmName("fboqmbqsfbxcnoqr")
    public suspend fun foreignKeys(values: List>) {
        this.foreignKeys = Output.all(values)
    }

    /**
     * @param value Represents the primary key constraint
     * on a table's columns. Present only if the table has a primary key.
     * The primary key is not enforced.
     * Structure is documented below.
     */
    @JvmName("jyvbpljscpcognhi")
    public suspend fun primaryKey(`value`: Output) {
        this.primaryKey = value
    }

    /**
     * @param value Present only if the table has a foreign key.
     * The foreign key is not enforced.
     * Structure is documented below.
     */
    @JvmName("cumkdrlujrsuhfat")
    public suspend fun foreignKeys(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.foreignKeys = mapped
    }

    /**
     * @param argument Present only if the table has a foreign key.
     * The foreign key is not enforced.
     * Structure is documented below.
     */
    @JvmName("kmaxikqrddyoggku")
    public suspend fun foreignKeys(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TableTableConstraintsForeignKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.foreignKeys = mapped
    }

    /**
     * @param argument Present only if the table has a foreign key.
     * The foreign key is not enforced.
     * Structure is documented below.
     */
    @JvmName("vsnkqsnxfwnqcrxv")
    public suspend fun foreignKeys(vararg argument: suspend TableTableConstraintsForeignKeyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TableTableConstraintsForeignKeyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.foreignKeys = mapped
    }

    /**
     * @param argument Present only if the table has a foreign key.
     * The foreign key is not enforced.
     * Structure is documented below.
     */
    @JvmName("wdxajhrlsakklech")
    public suspend fun foreignKeys(argument: suspend TableTableConstraintsForeignKeyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TableTableConstraintsForeignKeyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.foreignKeys = mapped
    }

    /**
     * @param values Present only if the table has a foreign key.
     * The foreign key is not enforced.
     * Structure is documented below.
     */
    @JvmName("cfrjjrtkiepagspq")
    public suspend fun foreignKeys(vararg values: TableTableConstraintsForeignKeyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.foreignKeys = mapped
    }

    /**
     * @param value Represents the primary key constraint
     * on a table's columns. Present only if the table has a primary key.
     * The primary key is not enforced.
     * Structure is documented below.
     */
    @JvmName("qoydsamxcohmitha")
    public suspend fun primaryKey(`value`: TableTableConstraintsPrimaryKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.primaryKey = mapped
    }

    /**
     * @param argument Represents the primary key constraint
     * on a table's columns. Present only if the table has a primary key.
     * The primary key is not enforced.
     * Structure is documented below.
     */
    @JvmName("fytilqomqylpdojj")
    public suspend fun primaryKey(argument: suspend TableTableConstraintsPrimaryKeyArgsBuilder.() -> Unit) {
        val toBeMapped = TableTableConstraintsPrimaryKeyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.primaryKey = mapped
    }

    internal fun build(): TableTableConstraintsArgs = TableTableConstraintsArgs(
        foreignKeys = foreignKeys,
        primaryKey = primaryKey,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy