com.pulumi.awsnative.amplifyuibuilder.kotlin.Form.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.amplifyuibuilder.kotlin
import com.pulumi.awsnative.amplifyuibuilder.kotlin.enums.FormActionType
import com.pulumi.awsnative.amplifyuibuilder.kotlin.enums.FormLabelDecorator
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormCta
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormDataTypeConfig
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormFieldConfig
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormSectionalElement
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormStyle
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.awsnative.amplifyuibuilder.kotlin.enums.FormActionType.Companion.toKotlin as formActionTypeToKotlin
import com.pulumi.awsnative.amplifyuibuilder.kotlin.enums.FormLabelDecorator.Companion.toKotlin as formLabelDecoratorToKotlin
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormCta.Companion.toKotlin as formCtaToKotlin
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormDataTypeConfig.Companion.toKotlin as formDataTypeConfigToKotlin
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormFieldConfig.Companion.toKotlin as formFieldConfigToKotlin
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormSectionalElement.Companion.toKotlin as formSectionalElementToKotlin
import com.pulumi.awsnative.amplifyuibuilder.kotlin.outputs.FormStyle.Companion.toKotlin as formStyleToKotlin
/**
* Builder for [Form].
*/
@PulumiTagMarker
public class FormResourceBuilder internal constructor() {
public var name: String? = null
public var args: FormArgs = FormArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend FormArgsBuilder.() -> Unit) {
val builder = FormArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): Form {
val builtJavaResource = com.pulumi.awsnative.amplifyuibuilder.Form(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Form(builtJavaResource)
}
}
/**
* Definition of AWS::AmplifyUIBuilder::Form Resource Type
*/
public class Form internal constructor(
override val javaResource: com.pulumi.awsnative.amplifyuibuilder.Form,
) : KotlinCustomResource(javaResource, FormMapper) {
/**
* The unique ID of the Amplify app associated with the form.
*/
public val appId: Output?
get() = javaResource.appId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The ID for the form.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* The `FormCTA` object that stores the call to action configuration for the form.
*/
public val cta: Output?
get() = javaResource.cta().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
formCtaToKotlin(args0)
})
}).orElse(null)
})
/**
* The type of data source to use to create the form.
*/
public val dataType: Output?
get() = javaResource.dataType().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
formDataTypeConfigToKotlin(args0)
})
}).orElse(null)
})
/**
* The name of the backend environment that is a part of the Amplify app.
*/
public val environmentName: Output?
get() = javaResource.environmentName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The configuration information for the form's fields.
*/
public val fields: Output