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

com.pulumi.gcp.appengine.kotlin.inputs.StandardAppVersionHandlerStaticFilesArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.appengine.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.appengine.inputs.StandardAppVersionHandlerStaticFilesArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property applicationReadable Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as
 * static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged
 * against both your code and static data storage resource quotas.
 * @property expiration Time a static file served by this handler should be cached by web proxies and browsers.
 * A duration in seconds with up to nine fractional digits, terminated by 's'. Example "3.5s".
 * @property httpHeaders HTTP headers to use for all responses from these URLs.
 * An object containing a list of "key:value" value pairs.".
 * @property mimeType MIME type used to serve all files served by this handler.
 * Defaults to file-specific MIME types, which are derived from each file's filename extension.
 * @property path Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.
 * @property requireMatchingFile Whether this handler should match the request if the file referenced by the handler does not exist.
 * @property uploadPathRegex Regular expression that matches the file paths for all files that should be referenced by this handler.
 */
public data class StandardAppVersionHandlerStaticFilesArgs(
    public val applicationReadable: Output? = null,
    public val expiration: Output? = null,
    public val httpHeaders: Output>? = null,
    public val mimeType: Output? = null,
    public val path: Output? = null,
    public val requireMatchingFile: Output? = null,
    public val uploadPathRegex: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.appengine.inputs.StandardAppVersionHandlerStaticFilesArgs =
        com.pulumi.gcp.appengine.inputs.StandardAppVersionHandlerStaticFilesArgs.builder()
            .applicationReadable(applicationReadable?.applyValue({ args0 -> args0 }))
            .expiration(expiration?.applyValue({ args0 -> args0 }))
            .httpHeaders(
                httpHeaders?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .mimeType(mimeType?.applyValue({ args0 -> args0 }))
            .path(path?.applyValue({ args0 -> args0 }))
            .requireMatchingFile(requireMatchingFile?.applyValue({ args0 -> args0 }))
            .uploadPathRegex(uploadPathRegex?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [StandardAppVersionHandlerStaticFilesArgs].
 */
@PulumiTagMarker
public class StandardAppVersionHandlerStaticFilesArgsBuilder internal constructor() {
    private var applicationReadable: Output? = null

    private var expiration: Output? = null

    private var httpHeaders: Output>? = null

    private var mimeType: Output? = null

    private var path: Output? = null

    private var requireMatchingFile: Output? = null

    private var uploadPathRegex: Output? = null

    /**
     * @param value Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as
     * static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged
     * against both your code and static data storage resource quotas.
     */
    @JvmName("eresfdgefbihffdv")
    public suspend fun applicationReadable(`value`: Output) {
        this.applicationReadable = value
    }

    /**
     * @param value Time a static file served by this handler should be cached by web proxies and browsers.
     * A duration in seconds with up to nine fractional digits, terminated by 's'. Example "3.5s".
     */
    @JvmName("sfrmwfpllywqkcok")
    public suspend fun expiration(`value`: Output) {
        this.expiration = value
    }

    /**
     * @param value HTTP headers to use for all responses from these URLs.
     * An object containing a list of "key:value" value pairs.".
     */
    @JvmName("qlarwgxffffbrngs")
    public suspend fun httpHeaders(`value`: Output>) {
        this.httpHeaders = value
    }

    /**
     * @param value MIME type used to serve all files served by this handler.
     * Defaults to file-specific MIME types, which are derived from each file's filename extension.
     */
    @JvmName("ajyjpotvvqdqlndv")
    public suspend fun mimeType(`value`: Output) {
        this.mimeType = value
    }

    /**
     * @param value Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.
     */
    @JvmName("ukpefcebxvydttyd")
    public suspend fun path(`value`: Output) {
        this.path = value
    }

    /**
     * @param value Whether this handler should match the request if the file referenced by the handler does not exist.
     */
    @JvmName("spjmirdfiowydljg")
    public suspend fun requireMatchingFile(`value`: Output) {
        this.requireMatchingFile = value
    }

    /**
     * @param value Regular expression that matches the file paths for all files that should be referenced by this handler.
     */
    @JvmName("kwiymspdwlooedpg")
    public suspend fun uploadPathRegex(`value`: Output) {
        this.uploadPathRegex = value
    }

    /**
     * @param value Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as
     * static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged
     * against both your code and static data storage resource quotas.
     */
    @JvmName("ghxgdljyjvprkqtr")
    public suspend fun applicationReadable(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applicationReadable = mapped
    }

    /**
     * @param value Time a static file served by this handler should be cached by web proxies and browsers.
     * A duration in seconds with up to nine fractional digits, terminated by 's'. Example "3.5s".
     */
    @JvmName("aehvqvrwwvleqaqd")
    public suspend fun expiration(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expiration = mapped
    }

    /**
     * @param value HTTP headers to use for all responses from these URLs.
     * An object containing a list of "key:value" value pairs.".
     */
    @JvmName("qdjshihcifdfmvus")
    public suspend fun httpHeaders(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpHeaders = mapped
    }

    /**
     * @param values HTTP headers to use for all responses from these URLs.
     * An object containing a list of "key:value" value pairs.".
     */
    @JvmName("bmpgxqyuinclifsd")
    public fun httpHeaders(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.httpHeaders = mapped
    }

    /**
     * @param value MIME type used to serve all files served by this handler.
     * Defaults to file-specific MIME types, which are derived from each file's filename extension.
     */
    @JvmName("iawjqyjtnkjhvcxd")
    public suspend fun mimeType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mimeType = mapped
    }

    /**
     * @param value Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.
     */
    @JvmName("uwlxhyjnlbovqfwk")
    public suspend fun path(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.path = mapped
    }

    /**
     * @param value Whether this handler should match the request if the file referenced by the handler does not exist.
     */
    @JvmName("kthpjucvweumebky")
    public suspend fun requireMatchingFile(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.requireMatchingFile = mapped
    }

    /**
     * @param value Regular expression that matches the file paths for all files that should be referenced by this handler.
     */
    @JvmName("axogehwrfmabsnul")
    public suspend fun uploadPathRegex(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uploadPathRegex = mapped
    }

    internal fun build(): StandardAppVersionHandlerStaticFilesArgs =
        StandardAppVersionHandlerStaticFilesArgs(
            applicationReadable = applicationReadable,
            expiration = expiration,
            httpHeaders = httpHeaders,
            mimeType = mimeType,
            path = path,
            requireMatchingFile = requireMatchingFile,
            uploadPathRegex = uploadPathRegex,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy