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

com.pulumi.azurenative.web.kotlin.inputs.TemplateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.web.kotlin.inputs

import com.pulumi.azurenative.web.inputs.TemplateArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Container App versioned application definition.
 * Defines the desired state of an immutable revision.
 * Any changes to this section Will result in a new revision being created
 * @property containers List of container definitions for the Container App.
 * @property dapr Dapr configuration for the Container App.
 * @property revisionSuffix User friendly suffix that is appended to the revision name
 * @property scale Scaling properties for the Container App.
 */
public data class TemplateArgs(
    public val containers: Output>? = null,
    public val dapr: Output? = null,
    public val revisionSuffix: Output? = null,
    public val scale: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.web.inputs.TemplateArgs =
        com.pulumi.azurenative.web.inputs.TemplateArgs.builder()
            .containers(
                containers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .dapr(dapr?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .revisionSuffix(revisionSuffix?.applyValue({ args0 -> args0 }))
            .scale(scale?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var dapr: Output? = null

    private var revisionSuffix: Output? = null

    private var scale: Output? = null

    /**
     * @param value List of container definitions for the Container App.
     */
    @JvmName("pqjkdyxipimnhuya")
    public suspend fun containers(`value`: Output>) {
        this.containers = value
    }

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

    /**
     * @param values List of container definitions for the Container App.
     */
    @JvmName("snlmxcpipnunfwhd")
    public suspend fun containers(values: List>) {
        this.containers = Output.all(values)
    }

    /**
     * @param value Dapr configuration for the Container App.
     */
    @JvmName("ulpcepghfjhhljle")
    public suspend fun dapr(`value`: Output) {
        this.dapr = value
    }

    /**
     * @param value User friendly suffix that is appended to the revision name
     */
    @JvmName("ypjlgheshcccqwse")
    public suspend fun revisionSuffix(`value`: Output) {
        this.revisionSuffix = value
    }

    /**
     * @param value Scaling properties for the Container App.
     */
    @JvmName("aiqifpuykrvocvoo")
    public suspend fun scale(`value`: Output) {
        this.scale = value
    }

    /**
     * @param value List of container definitions for the Container App.
     */
    @JvmName("fbolospkmkkqlnar")
    public suspend fun containers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param argument List of container definitions for the Container App.
     */
    @JvmName("qrweifcwgslqcpka")
    public suspend fun containers(argument: List Unit>) {
        val toBeMapped = argument.toList().map { ContainerArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument List of container definitions for the Container App.
     */
    @JvmName("vvoipdrbotwtyuuv")
    public suspend fun containers(vararg argument: suspend ContainerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { ContainerArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument List of container definitions for the Container App.
     */
    @JvmName("hvaxirmlvilacypr")
    public suspend fun containers(argument: suspend ContainerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ContainerArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param values List of container definitions for the Container App.
     */
    @JvmName("nhifihdunbvcinqc")
    public suspend fun containers(vararg values: ContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param value Dapr configuration for the Container App.
     */
    @JvmName("tcgoponersxjbldu")
    public suspend fun dapr(`value`: DaprArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dapr = mapped
    }

    /**
     * @param argument Dapr configuration for the Container App.
     */
    @JvmName("ciegwlbcryxjoxnn")
    public suspend fun dapr(argument: suspend DaprArgsBuilder.() -> Unit) {
        val toBeMapped = DaprArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.dapr = mapped
    }

    /**
     * @param value User friendly suffix that is appended to the revision name
     */
    @JvmName("nreqwfvubikheldf")
    public suspend fun revisionSuffix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.revisionSuffix = mapped
    }

    /**
     * @param value Scaling properties for the Container App.
     */
    @JvmName("fyqufmsmpltfaudo")
    public suspend fun scale(`value`: ScaleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.scale = mapped
    }

    /**
     * @param argument Scaling properties for the Container App.
     */
    @JvmName("nufnyesoqrlrjskb")
    public suspend fun scale(argument: suspend ScaleArgsBuilder.() -> Unit) {
        val toBeMapped = ScaleArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.scale = mapped
    }

    internal fun build(): TemplateArgs = TemplateArgs(
        containers = containers,
        dapr = dapr,
        revisionSuffix = revisionSuffix,
        scale = scale,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy