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

com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs.FormFileUploaderFieldConfigArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.amplifyuibuilder.kotlin.inputs

import com.pulumi.awsnative.amplifyuibuilder.inputs.FormFileUploaderFieldConfigArgs.builder
import com.pulumi.awsnative.amplifyuibuilder.kotlin.enums.FormStorageAccessLevel
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 kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property acceptedFileTypes The file types that are allowed to be uploaded by the file uploader. Provide this information in an array of strings specifying the valid file extensions.
 * @property accessLevel The access level to assign to the uploaded files in the Amazon S3 bucket where they are stored. The valid values for this property are `private` , `protected` , or `public` . For detailed information about the permissions associated with each access level, see [File access levels](https://docs.aws.amazon.com/https://docs.amplify.aws/lib/storage/configureaccess/q/platform/js/) in the *Amplify documentation* .
 * @property isResumable Allows the file upload operation to be paused and resumed. The default value is `false` .
 * When `isResumable` is set to `true` , the file uploader uses a multipart upload to break the files into chunks before upload. The progress of the upload isn't continuous, because the file uploader uploads a chunk at a time.
 * @property maxFileCount Specifies the maximum number of files that can be selected to upload. The default value is an unlimited number of files.
 * @property maxSize The maximum file size in bytes that the file uploader will accept. The default value is an unlimited file size.
 * @property showThumbnails Specifies whether to display or hide the image preview after selecting a file for upload. The default value is `true` to display the image preview.
 */
public data class FormFileUploaderFieldConfigArgs(
    public val acceptedFileTypes: Output>,
    public val accessLevel: Output,
    public val isResumable: Output? = null,
    public val maxFileCount: Output? = null,
    public val maxSize: Output? = null,
    public val showThumbnails: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.amplifyuibuilder.inputs.FormFileUploaderFieldConfigArgs =
        com.pulumi.awsnative.amplifyuibuilder.inputs.FormFileUploaderFieldConfigArgs.builder()
            .acceptedFileTypes(acceptedFileTypes.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .accessLevel(accessLevel.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .isResumable(isResumable?.applyValue({ args0 -> args0 }))
            .maxFileCount(maxFileCount?.applyValue({ args0 -> args0 }))
            .maxSize(maxSize?.applyValue({ args0 -> args0 }))
            .showThumbnails(showThumbnails?.applyValue({ args0 -> args0 })).build()
}

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

    private var accessLevel: Output? = null

    private var isResumable: Output? = null

    private var maxFileCount: Output? = null

    private var maxSize: Output? = null

    private var showThumbnails: Output? = null

    /**
     * @param value The file types that are allowed to be uploaded by the file uploader. Provide this information in an array of strings specifying the valid file extensions.
     */
    @JvmName("wchnijmslknuppou")
    public suspend fun acceptedFileTypes(`value`: Output>) {
        this.acceptedFileTypes = value
    }

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

    /**
     * @param values The file types that are allowed to be uploaded by the file uploader. Provide this information in an array of strings specifying the valid file extensions.
     */
    @JvmName("voxwjlcwqcnxtmmh")
    public suspend fun acceptedFileTypes(values: List>) {
        this.acceptedFileTypes = Output.all(values)
    }

    /**
     * @param value The access level to assign to the uploaded files in the Amazon S3 bucket where they are stored. The valid values for this property are `private` , `protected` , or `public` . For detailed information about the permissions associated with each access level, see [File access levels](https://docs.aws.amazon.com/https://docs.amplify.aws/lib/storage/configureaccess/q/platform/js/) in the *Amplify documentation* .
     */
    @JvmName("jnsnaageqeqggvbr")
    public suspend fun accessLevel(`value`: Output) {
        this.accessLevel = value
    }

    /**
     * @param value Allows the file upload operation to be paused and resumed. The default value is `false` .
     * When `isResumable` is set to `true` , the file uploader uses a multipart upload to break the files into chunks before upload. The progress of the upload isn't continuous, because the file uploader uploads a chunk at a time.
     */
    @JvmName("iuetirbwkertliwu")
    public suspend fun isResumable(`value`: Output) {
        this.isResumable = value
    }

    /**
     * @param value Specifies the maximum number of files that can be selected to upload. The default value is an unlimited number of files.
     */
    @JvmName("sjmfwncedhgmttai")
    public suspend fun maxFileCount(`value`: Output) {
        this.maxFileCount = value
    }

    /**
     * @param value The maximum file size in bytes that the file uploader will accept. The default value is an unlimited file size.
     */
    @JvmName("oylbgfsbagjwoeum")
    public suspend fun maxSize(`value`: Output) {
        this.maxSize = value
    }

    /**
     * @param value Specifies whether to display or hide the image preview after selecting a file for upload. The default value is `true` to display the image preview.
     */
    @JvmName("kvwpapimmkhxnlbx")
    public suspend fun showThumbnails(`value`: Output) {
        this.showThumbnails = value
    }

    /**
     * @param value The file types that are allowed to be uploaded by the file uploader. Provide this information in an array of strings specifying the valid file extensions.
     */
    @JvmName("hkihmrxxhtrlouoh")
    public suspend fun acceptedFileTypes(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.acceptedFileTypes = mapped
    }

    /**
     * @param values The file types that are allowed to be uploaded by the file uploader. Provide this information in an array of strings specifying the valid file extensions.
     */
    @JvmName("cdtecwfivuptnemj")
    public suspend fun acceptedFileTypes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.acceptedFileTypes = mapped
    }

    /**
     * @param value The access level to assign to the uploaded files in the Amazon S3 bucket where they are stored. The valid values for this property are `private` , `protected` , or `public` . For detailed information about the permissions associated with each access level, see [File access levels](https://docs.aws.amazon.com/https://docs.amplify.aws/lib/storage/configureaccess/q/platform/js/) in the *Amplify documentation* .
     */
    @JvmName("pumcgfwkccswbrrr")
    public suspend fun accessLevel(`value`: FormStorageAccessLevel) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.accessLevel = mapped
    }

    /**
     * @param value Allows the file upload operation to be paused and resumed. The default value is `false` .
     * When `isResumable` is set to `true` , the file uploader uses a multipart upload to break the files into chunks before upload. The progress of the upload isn't continuous, because the file uploader uploads a chunk at a time.
     */
    @JvmName("jjhmgujxdebuhpqh")
    public suspend fun isResumable(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isResumable = mapped
    }

    /**
     * @param value Specifies the maximum number of files that can be selected to upload. The default value is an unlimited number of files.
     */
    @JvmName("bvppktfmvfsdyfwu")
    public suspend fun maxFileCount(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxFileCount = mapped
    }

    /**
     * @param value The maximum file size in bytes that the file uploader will accept. The default value is an unlimited file size.
     */
    @JvmName("xwahjsbuvbybpfrc")
    public suspend fun maxSize(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxSize = mapped
    }

    /**
     * @param value Specifies whether to display or hide the image preview after selecting a file for upload. The default value is `true` to display the image preview.
     */
    @JvmName("croierkndgoxnrbj")
    public suspend fun showThumbnails(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.showThumbnails = mapped
    }

    internal fun build(): FormFileUploaderFieldConfigArgs = FormFileUploaderFieldConfigArgs(
        acceptedFileTypes = acceptedFileTypes ?: throw PulumiNullFieldException("acceptedFileTypes"),
        accessLevel = accessLevel ?: throw PulumiNullFieldException("accessLevel"),
        isResumable = isResumable,
        maxFileCount = maxFileCount,
        maxSize = maxSize,
        showThumbnails = showThumbnails,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy