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

com.pulumi.azurenative.app.kotlin.inputs.VolumeArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.app.kotlin.inputs

import com.pulumi.azurenative.app.inputs.VolumeArgs.builder
import com.pulumi.azurenative.app.kotlin.enums.StorageType
import com.pulumi.core.Either
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

/**
 * Volume definitions for the Container App.
 * @property mountOptions Mount options used while mounting the AzureFile. Must be a comma-separated string.
 * @property name Volume name.
 * @property secrets List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
 * @property storageName Name of storage resource. No need to provide for EmptyDir and Secret.
 * @property storageType Storage type for the volume. If not provided, use EmptyDir.
 */
public data class VolumeArgs(
    public val mountOptions: Output? = null,
    public val name: Output? = null,
    public val secrets: Output>? = null,
    public val storageName: Output? = null,
    public val storageType: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.app.inputs.VolumeArgs =
        com.pulumi.azurenative.app.inputs.VolumeArgs.builder()
            .mountOptions(mountOptions?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .secrets(
                secrets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .storageName(storageName?.applyValue({ args0 -> args0 }))
            .storageType(
                storageType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [VolumeArgs].
 */
@PulumiTagMarker
public class VolumeArgsBuilder internal constructor() {
    private var mountOptions: Output? = null

    private var name: Output? = null

    private var secrets: Output>? = null

    private var storageName: Output? = null

    private var storageType: Output>? = null

    /**
     * @param value Mount options used while mounting the AzureFile. Must be a comma-separated string.
     */
    @JvmName("twgjxdsfyrsdfcwl")
    public suspend fun mountOptions(`value`: Output) {
        this.mountOptions = value
    }

    /**
     * @param value Volume name.
     */
    @JvmName("vdjxkdcnydtucqgg")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
     */
    @JvmName("xpljpcgatchujera")
    public suspend fun secrets(`value`: Output>) {
        this.secrets = value
    }

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

    /**
     * @param values List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
     */
    @JvmName("vxwfvciprmqbkpty")
    public suspend fun secrets(values: List>) {
        this.secrets = Output.all(values)
    }

    /**
     * @param value Name of storage resource. No need to provide for EmptyDir and Secret.
     */
    @JvmName("mvlkpporidhfctuc")
    public suspend fun storageName(`value`: Output) {
        this.storageName = value
    }

    /**
     * @param value Storage type for the volume. If not provided, use EmptyDir.
     */
    @JvmName("vsisncujndollpey")
    public suspend fun storageType(`value`: Output>) {
        this.storageType = value
    }

    /**
     * @param value Mount options used while mounting the AzureFile. Must be a comma-separated string.
     */
    @JvmName("dvwytwpkpubabtve")
    public suspend fun mountOptions(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mountOptions = mapped
    }

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

    /**
     * @param value List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
     */
    @JvmName("qtlgxvwwvnchhrcv")
    public suspend fun secrets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param argument List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
     */
    @JvmName("tjgqbdrrkkrhdyra")
    public suspend fun secrets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SecretVolumeItemArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
     */
    @JvmName("yuwxuxfkvrhhpgwy")
    public suspend fun secrets(vararg argument: suspend SecretVolumeItemArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SecretVolumeItemArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param argument List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
     */
    @JvmName("onhiyqrlrtbygfhj")
    public suspend fun secrets(argument: suspend SecretVolumeItemArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SecretVolumeItemArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.secrets = mapped
    }

    /**
     * @param values List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.
     */
    @JvmName("lbwmucftktwnurqb")
    public suspend fun secrets(vararg values: SecretVolumeItemArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secrets = mapped
    }

    /**
     * @param value Name of storage resource. No need to provide for EmptyDir and Secret.
     */
    @JvmName("rlqskhswsfrvjxno")
    public suspend fun storageName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageName = mapped
    }

    /**
     * @param value Storage type for the volume. If not provided, use EmptyDir.
     */
    @JvmName("hdxuxbkqbqlyyage")
    public suspend fun storageType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageType = mapped
    }

    /**
     * @param value Storage type for the volume. If not provided, use EmptyDir.
     */
    @JvmName("bjdtdggovtouqder")
    public fun storageType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.storageType = mapped
    }

    /**
     * @param value Storage type for the volume. If not provided, use EmptyDir.
     */
    @JvmName("connfbvogpkysqca")
    public fun storageType(`value`: StorageType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.storageType = mapped
    }

    internal fun build(): VolumeArgs = VolumeArgs(
        mountOptions = mountOptions,
        name = name,
        secrets = secrets,
        storageName = storageName,
        storageType = storageType,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy