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

com.pulumi.azurenative.compute.kotlin.inputs.EncryptionSettingsCollectionArgs.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.EncryptionSettingsCollectionArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Encryption settings for disk or snapshot
 * @property enabled Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
 * @property encryptionSettings A collection of encryption settings, one for each disk volume.
 * @property encryptionSettingsVersion Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
 */
public data class EncryptionSettingsCollectionArgs(
    public val enabled: Output,
    public val encryptionSettings: Output>? = null,
    public val encryptionSettingsVersion: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.compute.inputs.EncryptionSettingsCollectionArgs =
        com.pulumi.azurenative.compute.inputs.EncryptionSettingsCollectionArgs.builder()
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .encryptionSettings(
                encryptionSettings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .encryptionSettingsVersion(encryptionSettingsVersion?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [EncryptionSettingsCollectionArgs].
 */
@PulumiTagMarker
public class EncryptionSettingsCollectionArgsBuilder internal constructor() {
    private var enabled: Output? = null

    private var encryptionSettings: Output>? = null

    private var encryptionSettingsVersion: Output? = null

    /**
     * @param value Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
     */
    @JvmName("qutbpkstbpfbsjwb")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value A collection of encryption settings, one for each disk volume.
     */
    @JvmName("etjajpkasiqnnoae")
    public suspend fun encryptionSettings(`value`: Output>) {
        this.encryptionSettings = value
    }

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

    /**
     * @param values A collection of encryption settings, one for each disk volume.
     */
    @JvmName("ledmwkdehwicyilt")
    public suspend fun encryptionSettings(values: List>) {
        this.encryptionSettings = Output.all(values)
    }

    /**
     * @param value Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
     */
    @JvmName("bqlbgawebpbkabtp")
    public suspend fun encryptionSettingsVersion(`value`: Output) {
        this.encryptionSettingsVersion = value
    }

    /**
     * @param value Set this flag to true and provide DiskEncryptionKey and optional KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, the existing settings remain unchanged.
     */
    @JvmName("qabnkxqoqpdjnxaw")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value A collection of encryption settings, one for each disk volume.
     */
    @JvmName("yavtyxglwdgnxcgb")
    public suspend fun encryptionSettings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryptionSettings = mapped
    }

    /**
     * @param argument A collection of encryption settings, one for each disk volume.
     */
    @JvmName("vfqtptvtrtehncqb")
    public suspend fun encryptionSettings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EncryptionSettingsElementArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.encryptionSettings = mapped
    }

    /**
     * @param argument A collection of encryption settings, one for each disk volume.
     */
    @JvmName("wbwwcuqmdqexsull")
    public suspend fun encryptionSettings(vararg argument: suspend EncryptionSettingsElementArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EncryptionSettingsElementArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.encryptionSettings = mapped
    }

    /**
     * @param argument A collection of encryption settings, one for each disk volume.
     */
    @JvmName("ueydoouoyvnobnes")
    public suspend fun encryptionSettings(argument: suspend EncryptionSettingsElementArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            EncryptionSettingsElementArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.encryptionSettings = mapped
    }

    /**
     * @param values A collection of encryption settings, one for each disk volume.
     */
    @JvmName("kdqkrymeajcfohti")
    public suspend fun encryptionSettings(vararg values: EncryptionSettingsElementArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.encryptionSettings = mapped
    }

    /**
     * @param value Describes what type of encryption is used for the disks. Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption with AAD app.'1.1' corresponds to Azure Disk Encryption.
     */
    @JvmName("fxtlqluvvywflpdl")
    public suspend fun encryptionSettingsVersion(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryptionSettingsVersion = mapped
    }

    internal fun build(): EncryptionSettingsCollectionArgs = EncryptionSettingsCollectionArgs(
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        encryptionSettings = encryptionSettings,
        encryptionSettingsVersion = encryptionSettingsVersion,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy