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

com.pulumi.awsnative.amplifyuibuilder.kotlin.FormArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.amplifyuibuilder.kotlin

import com.pulumi.awsnative.amplifyuibuilder.FormArgs.builder
import com.pulumi.awsnative.amplifyuibuilder.kotlin.enums.FormActionType
import com.pulumi.awsnative.amplifyuibuilder.kotlin.enums.FormLabelDecorator
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormCtaArgs
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormCtaArgsBuilder
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormDataTypeConfigArgs
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormDataTypeConfigArgsBuilder
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormFieldConfigArgs
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormFieldConfigArgsBuilder
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormSectionalElementArgs
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormSectionalElementArgsBuilder
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormStyleArgs
import com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormStyleArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Definition of AWS::AmplifyUIBuilder::Form Resource Type
 * @property appId The unique ID of the Amplify app associated with the form.
 * @property cta The `FormCTA` object that stores the call to action configuration for the form.
 * @property dataType The type of data source to use to create the form.
 * @property environmentName The name of the backend environment that is a part of the Amplify app.
 * @property fields The configuration information for the form's fields.
 * @property formActionType Specifies whether to perform a create or update action on the form.
 * @property labelDecorator Specifies an icon or decoration to display on the form.
 * @property name The name of the form.
 * @property schemaVersion The schema version of the form.
 * @property sectionalElements The configuration information for the visual helper elements for the form. These elements are not associated with any data.
 * @property style The configuration for the form's style.
 * @property tags One or more key-value pairs to use when tagging the form data.
 */
public data class FormArgs(
    public val appId: Output? = null,
    public val cta: Output? = null,
    public val dataType: Output? = null,
    public val environmentName: Output? = null,
    public val fields: Output>? = null,
    public val formActionType: Output? = null,
    public val labelDecorator: Output? = null,
    public val name: Output? = null,
    public val schemaVersion: Output? = null,
    public val sectionalElements: Output>? = null,
    public val style: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.amplifyuibuilder.FormArgs =
        com.pulumi.awsnative.amplifyuibuilder.FormArgs.builder()
            .appId(appId?.applyValue({ args0 -> args0 }))
            .cta(cta?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dataType(dataType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .environmentName(environmentName?.applyValue({ args0 -> args0 }))
            .fields(
                fields?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(
                            args0.value.let({ args0 ->
                                args0.toJava()
                            }),
                        )
                    }).toMap()
                }),
            )
            .formActionType(formActionType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .labelDecorator(labelDecorator?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name?.applyValue({ args0 -> args0 }))
            .schemaVersion(schemaVersion?.applyValue({ args0 -> args0 }))
            .sectionalElements(
                sectionalElements?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .style(style?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [FormArgs].
 */
@PulumiTagMarker
public class FormArgsBuilder internal constructor() {
    private var appId: Output? = null

    private var cta: Output? = null

    private var dataType: Output? = null

    private var environmentName: Output? = null

    private var fields: Output>? = null

    private var formActionType: Output? = null

    private var labelDecorator: Output? = null

    private var name: Output? = null

    private var schemaVersion: Output? = null

    private var sectionalElements: Output>? = null

    private var style: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The unique ID of the Amplify app associated with the form.
     */
    @JvmName("miipjdwtiplsivfa")
    public suspend fun appId(`value`: Output) {
        this.appId = value
    }

    /**
     * @param value The `FormCTA` object that stores the call to action configuration for the form.
     */
    @JvmName("qpbdsnysnrsirocq")
    public suspend fun cta(`value`: Output) {
        this.cta = value
    }

    /**
     * @param value The type of data source to use to create the form.
     */
    @JvmName("jaaschpcynghybou")
    public suspend fun dataType(`value`: Output) {
        this.dataType = value
    }

    /**
     * @param value The name of the backend environment that is a part of the Amplify app.
     */
    @JvmName("etpvujchyenertqi")
    public suspend fun environmentName(`value`: Output) {
        this.environmentName = value
    }

    /**
     * @param value The configuration information for the form's fields.
     */
    @JvmName("lwsixiqrcdtkkskb")
    public suspend fun fields(`value`: Output>) {
        this.fields = value
    }

    /**
     * @param value Specifies whether to perform a create or update action on the form.
     */
    @JvmName("kdxgtdppsagdjdmv")
    public suspend fun formActionType(`value`: Output) {
        this.formActionType = value
    }

    /**
     * @param value Specifies an icon or decoration to display on the form.
     */
    @JvmName("ualdqvkkmjcvlffa")
    public suspend fun labelDecorator(`value`: Output) {
        this.labelDecorator = value
    }

    /**
     * @param value The name of the form.
     */
    @JvmName("uttimabpxpyujfau")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The schema version of the form.
     */
    @JvmName("qseulisdypacmoqn")
    public suspend fun schemaVersion(`value`: Output) {
        this.schemaVersion = value
    }

    /**
     * @param value The configuration information for the visual helper elements for the form. These elements are not associated with any data.
     */
    @JvmName("uejskvenajtbyuya")
    public suspend fun sectionalElements(`value`: Output>) {
        this.sectionalElements = value
    }

    /**
     * @param value The configuration for the form's style.
     */
    @JvmName("ljdgytynqlikopxh")
    public suspend fun style(`value`: Output) {
        this.style = value
    }

    /**
     * @param value One or more key-value pairs to use when tagging the form data.
     */
    @JvmName("arhnymuiqdxmqlqj")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The unique ID of the Amplify app associated with the form.
     */
    @JvmName("myxsdfdrcmnujiwi")
    public suspend fun appId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appId = mapped
    }

    /**
     * @param value The `FormCTA` object that stores the call to action configuration for the form.
     */
    @JvmName("wqpjvyamkstvqojx")
    public suspend fun cta(`value`: FormCtaArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cta = mapped
    }

    /**
     * @param argument The `FormCTA` object that stores the call to action configuration for the form.
     */
    @JvmName("loocbeotdrhmjpqd")
    public suspend fun cta(argument: suspend FormCtaArgsBuilder.() -> Unit) {
        val toBeMapped = FormCtaArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.cta = mapped
    }

    /**
     * @param value The type of data source to use to create the form.
     */
    @JvmName("onfkpqmossyustba")
    public suspend fun dataType(`value`: FormDataTypeConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataType = mapped
    }

    /**
     * @param argument The type of data source to use to create the form.
     */
    @JvmName("pqwxjhhqjgxvecbw")
    public suspend fun dataType(argument: suspend FormDataTypeConfigArgsBuilder.() -> Unit) {
        val toBeMapped = FormDataTypeConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dataType = mapped
    }

    /**
     * @param value The name of the backend environment that is a part of the Amplify app.
     */
    @JvmName("ycvudvitksttxodv")
    public suspend fun environmentName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentName = mapped
    }

    /**
     * @param value The configuration information for the form's fields.
     */
    @JvmName("demuskoaasullxqy")
    public suspend fun fields(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fields = mapped
    }

    /**
     * @param argument The configuration information for the form's fields.
     */
    @JvmName("ujlxrhxayetgtqct")
    public suspend fun fields(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                FormFieldConfigArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.fields = mapped
    }

    /**
     * @param values The configuration information for the form's fields.
     */
    @JvmName("tpysuiyjeyyjclkc")
    public fun fields(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fields = mapped
    }

    /**
     * @param value Specifies whether to perform a create or update action on the form.
     */
    @JvmName("dutqnhncucrxxvch")
    public suspend fun formActionType(`value`: FormActionType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.formActionType = mapped
    }

    /**
     * @param value Specifies an icon or decoration to display on the form.
     */
    @JvmName("tojjbyqgdsitqnxw")
    public suspend fun labelDecorator(`value`: FormLabelDecorator?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labelDecorator = mapped
    }

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

    /**
     * @param value The schema version of the form.
     */
    @JvmName("dvakvkmmosonifce")
    public suspend fun schemaVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schemaVersion = mapped
    }

    /**
     * @param value The configuration information for the visual helper elements for the form. These elements are not associated with any data.
     */
    @JvmName("gegwjsogdarrpufg")
    public suspend fun sectionalElements(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sectionalElements = mapped
    }

    /**
     * @param argument The configuration information for the visual helper elements for the form. These elements are not associated with any data.
     */
    @JvmName("ahnfrbwqecxryqqh")
    public suspend fun sectionalElements(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                FormSectionalElementArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.sectionalElements = mapped
    }

    /**
     * @param values The configuration information for the visual helper elements for the form. These elements are not associated with any data.
     */
    @JvmName("nxytatbnkqejflxc")
    public fun sectionalElements(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sectionalElements = mapped
    }

    /**
     * @param value The configuration for the form's style.
     */
    @JvmName("qctfdodoyfrlifow")
    public suspend fun style(`value`: FormStyleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.style = mapped
    }

    /**
     * @param argument The configuration for the form's style.
     */
    @JvmName("ebiwugasppavseaj")
    public suspend fun style(argument: suspend FormStyleArgsBuilder.() -> Unit) {
        val toBeMapped = FormStyleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.style = mapped
    }

    /**
     * @param value One or more key-value pairs to use when tagging the form data.
     */
    @JvmName("igodhkpiptyxjdri")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values One or more key-value pairs to use when tagging the form data.
     */
    @JvmName("buykqdfcawtjcvrh")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): FormArgs = FormArgs(
        appId = appId,
        cta = cta,
        dataType = dataType,
        environmentName = environmentName,
        fields = fields,
        formActionType = formActionType,
        labelDecorator = labelDecorator,
        name = name,
        schemaVersion = schemaVersion,
        sectionalElements = sectionalElements,
        style = style,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy