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

com.pulumi.azurenative.compute.kotlin.inputs.GalleryApplicationCustomActionArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.compute.kotlin.inputs

import com.pulumi.azurenative.compute.inputs.GalleryApplicationCustomActionArgs.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

/**
 * A custom action that can be performed with a Gallery Application Version.
 * @property description Description to help the users understand what this custom action does.
 * @property name The name of the custom action.  Must be unique within the Gallery Application Version.
 * @property parameters The parameters that this custom action uses
 * @property script The script to run when executing this custom action.
 */
public data class GalleryApplicationCustomActionArgs(
    public val description: Output? = null,
    public val name: Output,
    public val parameters: Output>? = null,
    public val script: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.compute.inputs.GalleryApplicationCustomActionArgs =
        com.pulumi.azurenative.compute.inputs.GalleryApplicationCustomActionArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .script(script.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GalleryApplicationCustomActionArgs].
 */
@PulumiTagMarker
public class GalleryApplicationCustomActionArgsBuilder internal constructor() {
    private var description: Output? = null

    private var name: Output? = null

    private var parameters: Output>? = null

    private var script: Output? = null

    /**
     * @param value Description to help the users understand what this custom action does.
     */
    @JvmName("jcsiqonengbkqoqy")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name of the custom action.  Must be unique within the Gallery Application Version.
     */
    @JvmName("uuaupmeystxjihrn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The parameters that this custom action uses
     */
    @JvmName("hytlebexfsscgsxs")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param values The parameters that this custom action uses
     */
    @JvmName("hlfyjrwouevsknui")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value The script to run when executing this custom action.
     */
    @JvmName("btjaggsmsdtegnvs")
    public suspend fun script(`value`: Output) {
        this.script = value
    }

    /**
     * @param value Description to help the users understand what this custom action does.
     */
    @JvmName("fidjqbeilmuhbrux")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The name of the custom action.  Must be unique within the Gallery Application Version.
     */
    @JvmName("jvajmrmnjckkwbge")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The parameters that this custom action uses
     */
    @JvmName("einafsplxncnwfic")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument The parameters that this custom action uses
     */
    @JvmName("qswnnvqlilwfmsbq")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GalleryApplicationCustomActionParameterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument The parameters that this custom action uses
     */
    @JvmName("khvwmjsarwfjwpty")
    public suspend fun parameters(vararg argument: suspend GalleryApplicationCustomActionParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GalleryApplicationCustomActionParameterArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument The parameters that this custom action uses
     */
    @JvmName("clunkafkfpmxpeub")
    public suspend fun parameters(argument: suspend GalleryApplicationCustomActionParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GalleryApplicationCustomActionParameterArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values The parameters that this custom action uses
     */
    @JvmName("alcihvxwbodnmatb")
    public suspend fun parameters(vararg values: GalleryApplicationCustomActionParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value The script to run when executing this custom action.
     */
    @JvmName("twejpvwqveucylcq")
    public suspend fun script(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.script = mapped
    }

    internal fun build(): GalleryApplicationCustomActionArgs = GalleryApplicationCustomActionArgs(
        description = description,
        name = name ?: throw PulumiNullFieldException("name"),
        parameters = parameters,
        script = script ?: throw PulumiNullFieldException("script"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy