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

com.pulumi.aws.cloudfront.kotlin.inputs.CachePolicyParametersInCacheKeyAndForwardedToOriginArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.cloudfront.kotlin.inputs

import com.pulumi.aws.cloudfront.inputs.CachePolicyParametersInCacheKeyAndForwardedToOriginArgs.builder
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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property cookiesConfig Whether any cookies in viewer requests are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
 * @property enableAcceptEncodingBrotli Flag determines whether the Accept-Encoding HTTP header is included in the cache key and in requests that CloudFront sends to the origin.
 * @property enableAcceptEncodingGzip Whether the Accept-Encoding HTTP header is included in the cache key and in requests sent to the origin by CloudFront.
 * @property headersConfig Whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
 * @property queryStringsConfig Whether any URL query strings in viewer requests are included in the cache key. It also automatically includes these query strings in requests that CloudFront sends to the origin. Please refer to the Query String Config for more information.
 */
public data class CachePolicyParametersInCacheKeyAndForwardedToOriginArgs(
    public val cookiesConfig: Output,
    public val enableAcceptEncodingBrotli: Output? = null,
    public val enableAcceptEncodingGzip: Output? = null,
    public val headersConfig: Output,
    public val queryStringsConfig: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.cloudfront.inputs.CachePolicyParametersInCacheKeyAndForwardedToOriginArgs =
        com.pulumi.aws.cloudfront.inputs.CachePolicyParametersInCacheKeyAndForwardedToOriginArgs.builder()
            .cookiesConfig(cookiesConfig.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enableAcceptEncodingBrotli(enableAcceptEncodingBrotli?.applyValue({ args0 -> args0 }))
            .enableAcceptEncodingGzip(enableAcceptEncodingGzip?.applyValue({ args0 -> args0 }))
            .headersConfig(headersConfig.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .queryStringsConfig(
                queryStringsConfig.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [CachePolicyParametersInCacheKeyAndForwardedToOriginArgs].
 */
@PulumiTagMarker
public class CachePolicyParametersInCacheKeyAndForwardedToOriginArgsBuilder internal constructor() {
    private var cookiesConfig:
        Output? = null

    private var enableAcceptEncodingBrotli: Output? = null

    private var enableAcceptEncodingGzip: Output? = null

    private var headersConfig:
        Output? = null

    private var queryStringsConfig:
        Output? = null

    /**
     * @param value Whether any cookies in viewer requests are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
     */
    @JvmName("dupcdghgrsmncqcg")
    public suspend fun cookiesConfig(`value`: Output) {
        this.cookiesConfig = value
    }

    /**
     * @param value Flag determines whether the Accept-Encoding HTTP header is included in the cache key and in requests that CloudFront sends to the origin.
     */
    @JvmName("dgfrfwnmbemetqxv")
    public suspend fun enableAcceptEncodingBrotli(`value`: Output) {
        this.enableAcceptEncodingBrotli = value
    }

    /**
     * @param value Whether the Accept-Encoding HTTP header is included in the cache key and in requests sent to the origin by CloudFront.
     */
    @JvmName("yvpvvhwrnatxqrvd")
    public suspend fun enableAcceptEncodingGzip(`value`: Output) {
        this.enableAcceptEncodingGzip = value
    }

    /**
     * @param value Whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
     */
    @JvmName("qbxdbknsnfeyulma")
    public suspend fun headersConfig(`value`: Output) {
        this.headersConfig = value
    }

    /**
     * @param value Whether any URL query strings in viewer requests are included in the cache key. It also automatically includes these query strings in requests that CloudFront sends to the origin. Please refer to the Query String Config for more information.
     */
    @JvmName("awwojpqpwudrumyy")
    public suspend fun queryStringsConfig(`value`: Output) {
        this.queryStringsConfig = value
    }

    /**
     * @param value Whether any cookies in viewer requests are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
     */
    @JvmName("dcoluidwbaulrusc")
    public suspend fun cookiesConfig(`value`: CachePolicyParametersInCacheKeyAndForwardedToOriginCookiesConfigArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.cookiesConfig = mapped
    }

    /**
     * @param argument Whether any cookies in viewer requests are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Cookies Config for more information.
     */
    @JvmName("ksobaclpbrwtgsqh")
    public suspend fun cookiesConfig(argument: suspend CachePolicyParametersInCacheKeyAndForwardedToOriginCookiesConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            CachePolicyParametersInCacheKeyAndForwardedToOriginCookiesConfigArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.cookiesConfig = mapped
    }

    /**
     * @param value Flag determines whether the Accept-Encoding HTTP header is included in the cache key and in requests that CloudFront sends to the origin.
     */
    @JvmName("jkdkcpmymieatmnx")
    public suspend fun enableAcceptEncodingBrotli(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableAcceptEncodingBrotli = mapped
    }

    /**
     * @param value Whether the Accept-Encoding HTTP header is included in the cache key and in requests sent to the origin by CloudFront.
     */
    @JvmName("drxqxacwekcfrqxp")
    public suspend fun enableAcceptEncodingGzip(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableAcceptEncodingGzip = mapped
    }

    /**
     * @param value Whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
     */
    @JvmName("qltkpubaqxpkpdbn")
    public suspend fun headersConfig(`value`: CachePolicyParametersInCacheKeyAndForwardedToOriginHeadersConfigArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headersConfig = mapped
    }

    /**
     * @param argument Whether any HTTP headers are included in the cache key and automatically included in requests that CloudFront sends to the origin. See Headers Config for more information.
     */
    @JvmName("cmphokfgdfbpufcg")
    public suspend fun headersConfig(argument: suspend CachePolicyParametersInCacheKeyAndForwardedToOriginHeadersConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            CachePolicyParametersInCacheKeyAndForwardedToOriginHeadersConfigArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.headersConfig = mapped
    }

    /**
     * @param value Whether any URL query strings in viewer requests are included in the cache key. It also automatically includes these query strings in requests that CloudFront sends to the origin. Please refer to the Query String Config for more information.
     */
    @JvmName("rpamuddmricelboe")
    public suspend fun queryStringsConfig(`value`: CachePolicyParametersInCacheKeyAndForwardedToOriginQueryStringsConfigArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.queryStringsConfig = mapped
    }

    /**
     * @param argument Whether any URL query strings in viewer requests are included in the cache key. It also automatically includes these query strings in requests that CloudFront sends to the origin. Please refer to the Query String Config for more information.
     */
    @JvmName("phygqvgljmncawia")
    public suspend fun queryStringsConfig(argument: suspend CachePolicyParametersInCacheKeyAndForwardedToOriginQueryStringsConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            CachePolicyParametersInCacheKeyAndForwardedToOriginQueryStringsConfigArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.queryStringsConfig = mapped
    }

    internal fun build(): CachePolicyParametersInCacheKeyAndForwardedToOriginArgs =
        CachePolicyParametersInCacheKeyAndForwardedToOriginArgs(
            cookiesConfig = cookiesConfig ?: throw PulumiNullFieldException("cookiesConfig"),
            enableAcceptEncodingBrotli = enableAcceptEncodingBrotli,
            enableAcceptEncodingGzip = enableAcceptEncodingGzip,
            headersConfig = headersConfig ?: throw PulumiNullFieldException("headersConfig"),
            queryStringsConfig = queryStringsConfig ?: throw PulumiNullFieldException("queryStringsConfig"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy