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

com.pulumi.awsnative.cloudfront.kotlin.inputs.FunctionConfigArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.cloudfront.kotlin.inputs

import com.pulumi.awsnative.cloudfront.inputs.FunctionConfigArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property comment A comment to describe the function.
 * @property keyValueStoreAssociations The configuration for the key value store associations.
 * @property runtime The function's runtime environment version.
 */
public data class FunctionConfigArgs(
    public val comment: Output,
    public val keyValueStoreAssociations: Output>? = null,
    public val runtime: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudfront.inputs.FunctionConfigArgs =
        com.pulumi.awsnative.cloudfront.inputs.FunctionConfigArgs.builder()
            .comment(comment.applyValue({ args0 -> args0 }))
            .keyValueStoreAssociations(
                keyValueStoreAssociations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .runtime(runtime.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FunctionConfigArgs].
 */
@PulumiTagMarker
public class FunctionConfigArgsBuilder internal constructor() {
    private var comment: Output? = null

    private var keyValueStoreAssociations: Output>? = null

    private var runtime: Output? = null

    /**
     * @param value A comment to describe the function.
     */
    @JvmName("ohumepjfwxnttsfb")
    public suspend fun comment(`value`: Output) {
        this.comment = value
    }

    /**
     * @param value The configuration for the key value store associations.
     */
    @JvmName("xcnfvxkmpnyxybnr")
    public suspend fun keyValueStoreAssociations(`value`: Output>) {
        this.keyValueStoreAssociations = value
    }

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

    /**
     * @param values The configuration for the key value store associations.
     */
    @JvmName("vmaqrplcumaisqfy")
    public suspend fun keyValueStoreAssociations(values: List>) {
        this.keyValueStoreAssociations = Output.all(values)
    }

    /**
     * @param value The function's runtime environment version.
     */
    @JvmName("jcmmxttpbubfycey")
    public suspend fun runtime(`value`: Output) {
        this.runtime = value
    }

    /**
     * @param value A comment to describe the function.
     */
    @JvmName("wwbdfennjtxxowmd")
    public suspend fun comment(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.comment = mapped
    }

    /**
     * @param value The configuration for the key value store associations.
     */
    @JvmName("uciygkdfeaqhbgmh")
    public suspend fun keyValueStoreAssociations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyValueStoreAssociations = mapped
    }

    /**
     * @param argument The configuration for the key value store associations.
     */
    @JvmName("pohfnculfastgtgo")
    public suspend fun keyValueStoreAssociations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FunctionKeyValueStoreAssociationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.keyValueStoreAssociations = mapped
    }

    /**
     * @param argument The configuration for the key value store associations.
     */
    @JvmName("uxohelyaahhhcsvb")
    public suspend fun keyValueStoreAssociations(vararg argument: suspend FunctionKeyValueStoreAssociationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FunctionKeyValueStoreAssociationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.keyValueStoreAssociations = mapped
    }

    /**
     * @param argument The configuration for the key value store associations.
     */
    @JvmName("jktiaoxmfosqsitx")
    public suspend fun keyValueStoreAssociations(argument: suspend FunctionKeyValueStoreAssociationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FunctionKeyValueStoreAssociationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.keyValueStoreAssociations = mapped
    }

    /**
     * @param values The configuration for the key value store associations.
     */
    @JvmName("wxvadlfihlqkwlby")
    public suspend fun keyValueStoreAssociations(vararg values: FunctionKeyValueStoreAssociationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.keyValueStoreAssociations = mapped
    }

    /**
     * @param value The function's runtime environment version.
     */
    @JvmName("dcfonjsutylmqpuf")
    public suspend fun runtime(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.runtime = mapped
    }

    internal fun build(): FunctionConfigArgs = FunctionConfigArgs(
        comment = comment ?: throw PulumiNullFieldException("comment"),
        keyValueStoreAssociations = keyValueStoreAssociations,
        runtime = runtime ?: throw PulumiNullFieldException("runtime"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy