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

com.pulumi.awsnative.appconfig.kotlin.ExtensionArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.appconfig.kotlin

import com.pulumi.awsnative.appconfig.ExtensionArgs.builder
import com.pulumi.awsnative.appconfig.kotlin.inputs.ExtensionActionArgs
import com.pulumi.awsnative.appconfig.kotlin.inputs.ExtensionParameterArgs
import com.pulumi.awsnative.appconfig.kotlin.inputs.ExtensionParameterArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgs
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::AppConfig::Extension
 * ## Example Usage
 * ### Example
 * No Java example available.
 * @property actions The actions defined in the extension.
 * @property description Description of the extension.
 * @property latestVersionNumber You can omit this field when you create an extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field.
 * @property name Name of the extension.
 * @property parameters The parameters accepted by the extension. You specify parameter values when you associate the extension to an AWS AppConfig resource by using the `CreateExtensionAssociation` API action. For AWS Lambda extension actions, these parameters are included in the Lambda request object.
 * @property tags An array of key-value tags to apply to this resource.
 */
public data class ExtensionArgs(
    public val actions: Output>>? = null,
    public val description: Output? = null,
    public val latestVersionNumber: Output? = null,
    public val name: Output? = null,
    public val parameters: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.appconfig.ExtensionArgs =
        com.pulumi.awsnative.appconfig.ExtensionArgs.builder()
            .actions(
                actions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(
                            args0.value.map({ args0 ->
                                args0.let({ args0 -> args0.toJava() })
                            }),
                        )
                    }).toMap()
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .latestVersionNumber(latestVersionNumber?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var description: Output? = null

    private var latestVersionNumber: Output? = null

    private var name: Output? = null

    private var parameters: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value The actions defined in the extension.
     */
    @JvmName("vlvvjrfjrqtvagpa")
    public suspend fun actions(`value`: Output>>) {
        this.actions = value
    }

    /**
     * @param value Description of the extension.
     */
    @JvmName("qpbbjwpigefaxsbi")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value You can omit this field when you create an extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field.
     */
    @JvmName("atuxrjiuetporsgi")
    public suspend fun latestVersionNumber(`value`: Output) {
        this.latestVersionNumber = value
    }

    /**
     * @param value Name of the extension.
     */
    @JvmName("ftujypqqqidoekdw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The parameters accepted by the extension. You specify parameter values when you associate the extension to an AWS AppConfig resource by using the `CreateExtensionAssociation` API action. For AWS Lambda extension actions, these parameters are included in the Lambda request object.
     */
    @JvmName("svjpwmosavjwiwqd")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

    /**
     * @param value An array of key-value tags to apply to this resource.
     */
    @JvmName("muecooeuplltegcn")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value tags to apply to this resource.
     */
    @JvmName("wvhvrpibjlsujslm")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The actions defined in the extension.
     */
    @JvmName("iybymgtgoapclhyx")
    public suspend fun actions(`value`: Map>?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param values The actions defined in the extension.
     */
    @JvmName("jrokkvwbdsijuoxj")
    public fun actions(vararg values: Pair>) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.actions = mapped
    }

    /**
     * @param value Description of the extension.
     */
    @JvmName("jxwqpsyfflyctngt")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value You can omit this field when you create an extension. When you create a new version, specify the most recent current version number. For example, you create version 3, enter 2 for this field.
     */
    @JvmName("peqgenmrddlblfub")
    public suspend fun latestVersionNumber(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.latestVersionNumber = mapped
    }

    /**
     * @param value Name of the extension.
     */
    @JvmName("swisbmkfcritqyjv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The parameters accepted by the extension. You specify parameter values when you associate the extension to an AWS AppConfig resource by using the `CreateExtensionAssociation` API action. For AWS Lambda extension actions, these parameters are included in the Lambda request object.
     */
    @JvmName("konvfrpbqudmcjqi")
    public suspend fun parameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument The parameters accepted by the extension. You specify parameter values when you associate the extension to an AWS AppConfig resource by using the `CreateExtensionAssociation` API action. For AWS Lambda extension actions, these parameters are included in the Lambda request object.
     */
    @JvmName("kidrgoyghpbrcauw")
    public suspend fun parameters(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                ExtensionParameterArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values The parameters accepted by the extension. You specify parameter values when you associate the extension to an AWS AppConfig resource by using the `CreateExtensionAssociation` API action. For AWS Lambda extension actions, these parameters are included in the Lambda request object.
     */
    @JvmName("rksqdtbfbpyqtybc")
    public fun parameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value An array of key-value tags to apply to this resource.
     */
    @JvmName("qfcxlxwbwbigppjk")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value tags to apply to this resource.
     */
    @JvmName("qqascrcsoaknatpj")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value tags to apply to this resource.
     */
    @JvmName("mdscrcxpcncdarib")
    public suspend fun tags(vararg argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value tags to apply to this resource.
     */
    @JvmName("sfpirckhnwydbwvf")
    public suspend fun tags(argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CreateOnlyTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value tags to apply to this resource.
     */
    @JvmName("htfvslpyfiemggar")
    public suspend fun tags(vararg values: CreateOnlyTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ExtensionArgs = ExtensionArgs(
        actions = actions,
        description = description,
        latestVersionNumber = latestVersionNumber,
        name = name,
        parameters = parameters,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy