com.pulumi.azurenative.networkcloud.kotlin.inputs.OsDiskArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.networkcloud.kotlin.inputs
import com.pulumi.azurenative.networkcloud.inputs.OsDiskArgs.builder
import com.pulumi.azurenative.networkcloud.kotlin.enums.OsDiskCreateOption
import com.pulumi.azurenative.networkcloud.kotlin.enums.OsDiskDeleteOption
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.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property createOption The strategy for creating the OS disk.
* @property deleteOption The strategy for deleting the OS disk.
* @property diskSizeGB The size of the disk in gigabytes. Required if the createOption is Ephemeral.
*/
public data class OsDiskArgs(
public val createOption: Output>? = null,
public val deleteOption: Output>? = null,
public val diskSizeGB: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.networkcloud.inputs.OsDiskArgs =
com.pulumi.azurenative.networkcloud.inputs.OsDiskArgs.builder()
.createOption(
createOption?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.deleteOption(
deleteOption?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.diskSizeGB(diskSizeGB.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [OsDiskArgs].
*/
@PulumiTagMarker
public class OsDiskArgsBuilder internal constructor() {
private var createOption: Output>? = null
private var deleteOption: Output>? = null
private var diskSizeGB: Output? = null
/**
* @param value The strategy for creating the OS disk.
*/
@JvmName("fqidvlilkectrokw")
public suspend fun createOption(`value`: Output>) {
this.createOption = value
}
/**
* @param value The strategy for deleting the OS disk.
*/
@JvmName("hqcgoslcruyidlli")
public suspend fun deleteOption(`value`: Output>) {
this.deleteOption = value
}
/**
* @param value The size of the disk in gigabytes. Required if the createOption is Ephemeral.
*/
@JvmName("mxfthbgwtybfjvfw")
public suspend fun diskSizeGB(`value`: Output) {
this.diskSizeGB = value
}
/**
* @param value The strategy for creating the OS disk.
*/
@JvmName("mxuapqtwnmploown")
public suspend fun createOption(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.createOption = mapped
}
/**
* @param value The strategy for creating the OS disk.
*/
@JvmName("vrvcrfwnbtfipjdo")
public fun createOption(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.createOption = mapped
}
/**
* @param value The strategy for creating the OS disk.
*/
@JvmName("atwpsdgchptgkeiv")
public fun createOption(`value`: OsDiskCreateOption) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.createOption = mapped
}
/**
* @param value The strategy for deleting the OS disk.
*/
@JvmName("egajvgqcamnuadlp")
public suspend fun deleteOption(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deleteOption = mapped
}
/**
* @param value The strategy for deleting the OS disk.
*/
@JvmName("pgavyjkaaqekwdie")
public fun deleteOption(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.deleteOption = mapped
}
/**
* @param value The strategy for deleting the OS disk.
*/
@JvmName("rcvodknekpnvseoo")
public fun deleteOption(`value`: OsDiskDeleteOption) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.deleteOption = mapped
}
/**
* @param value The size of the disk in gigabytes. Required if the createOption is Ephemeral.
*/
@JvmName("ykjayekheuhqglss")
public suspend fun diskSizeGB(`value`: Double) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.diskSizeGB = mapped
}
internal fun build(): OsDiskArgs = OsDiskArgs(
createOption = createOption,
deleteOption = deleteOption,
diskSizeGB = diskSizeGB ?: throw PulumiNullFieldException("diskSizeGB"),
)
}