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

com.pulumi.gcp.networkservices.kotlin.inputs.HttpRouteRuleActionRequestHeaderModifierArgs.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.networkservices.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestHeaderModifierArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property add Add the headers with given map where key is the name of the header, value is the value of the header.
 * @property removes Remove headers (matching by header names) specified in the list.
 * @property set Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
 */
public data class HttpRouteRuleActionRequestHeaderModifierArgs(
    public val add: Output>? = null,
    public val removes: Output>? = null,
    public val `set`: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestHeaderModifierArgs =
        com.pulumi.gcp.networkservices.inputs.HttpRouteRuleActionRequestHeaderModifierArgs.builder()
            .add(add?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .removes(removes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .`set`(
                `set`?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var removes: Output>? = null

    private var `set`: Output>? = null

    /**
     * @param value Add the headers with given map where key is the name of the header, value is the value of the header.
     */
    @JvmName("kfquwkumadrkiqvs")
    public suspend fun add(`value`: Output>) {
        this.add = value
    }

    /**
     * @param value Remove headers (matching by header names) specified in the list.
     */
    @JvmName("xyxjuyehdwnfcjkc")
    public suspend fun removes(`value`: Output>) {
        this.removes = value
    }

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

    /**
     * @param values Remove headers (matching by header names) specified in the list.
     */
    @JvmName("eydbhrvdudmklaaw")
    public suspend fun removes(values: List>) {
        this.removes = Output.all(values)
    }

    /**
     * @param value Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
     */
    @JvmName("jgbumjodlivfdigm")
    public suspend fun `set`(`value`: Output>) {
        this.`set` = value
    }

    /**
     * @param value Add the headers with given map where key is the name of the header, value is the value of the header.
     */
    @JvmName("vcrxvrfifoluvcam")
    public suspend fun add(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.add = mapped
    }

    /**
     * @param values Add the headers with given map where key is the name of the header, value is the value of the header.
     */
    @JvmName("xlsrafwaxpqabhvg")
    public fun add(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.add = mapped
    }

    /**
     * @param value Remove headers (matching by header names) specified in the list.
     */
    @JvmName("igwbsydlpbakbduu")
    public suspend fun removes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.removes = mapped
    }

    /**
     * @param values Remove headers (matching by header names) specified in the list.
     */
    @JvmName("oqairyuivpronyff")
    public suspend fun removes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.removes = mapped
    }

    /**
     * @param value Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
     */
    @JvmName("mqlfnbqpkwmswbdr")
    public suspend fun `set`(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`set` = mapped
    }

    /**
     * @param values Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.
     */
    @JvmName("sbgvlovcsgoahkov")
    public fun `set`(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.`set` = mapped
    }

    internal fun build(): HttpRouteRuleActionRequestHeaderModifierArgs =
        HttpRouteRuleActionRequestHeaderModifierArgs(
            add = add,
            removes = removes,
            `set` = `set`,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy