com.pulumi.azurenative.avs.kotlin.inputs.DiskPoolVolumeArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.avs.kotlin.inputs
import com.pulumi.azurenative.avs.inputs.DiskPoolVolumeArgs.builder
import com.pulumi.azurenative.avs.kotlin.enums.MountOptionEnum
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.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* An iSCSI volume from Microsoft.StoragePool provider
* @property lunName Name of the LUN to be used for datastore
* @property mountOption Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN
* @property targetId Azure resource ID of the iSCSI target
*/
public data class DiskPoolVolumeArgs(
public val lunName: Output,
public val mountOption: Output>? = null,
public val targetId: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.avs.inputs.DiskPoolVolumeArgs =
com.pulumi.azurenative.avs.inputs.DiskPoolVolumeArgs.builder()
.lunName(lunName.applyValue({ args0 -> args0 }))
.mountOption(
mountOption?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.targetId(targetId.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [DiskPoolVolumeArgs].
*/
@PulumiTagMarker
public class DiskPoolVolumeArgsBuilder internal constructor() {
private var lunName: Output? = null
private var mountOption: Output>? = null
private var targetId: Output? = null
/**
* @param value Name of the LUN to be used for datastore
*/
@JvmName("eihwbuacefnrxrfb")
public suspend fun lunName(`value`: Output) {
this.lunName = value
}
/**
* @param value Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN
*/
@JvmName("gnuolwnjdvyjldra")
public suspend fun mountOption(`value`: Output>) {
this.mountOption = value
}
/**
* @param value Azure resource ID of the iSCSI target
*/
@JvmName("vskuncycbtwqgxlg")
public suspend fun targetId(`value`: Output) {
this.targetId = value
}
/**
* @param value Name of the LUN to be used for datastore
*/
@JvmName("ikkfwlarwsgmtmsf")
public suspend fun lunName(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.lunName = mapped
}
/**
* @param value Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN
*/
@JvmName("psfqeupmidiiijxd")
public suspend fun mountOption(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mountOption = mapped
}
/**
* @param value Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN
*/
@JvmName("jyokpsminogrmkdm")
public fun mountOption(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.mountOption = mapped
}
/**
* @param value Mode that describes whether the LUN has to be mounted as a datastore or attached as a LUN
*/
@JvmName("sswxagbcbpcjbxgi")
public fun mountOption(`value`: MountOptionEnum) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.mountOption = mapped
}
/**
* @param value Azure resource ID of the iSCSI target
*/
@JvmName("bvvgrgplpogicbtu")
public suspend fun targetId(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.targetId = mapped
}
internal fun build(): DiskPoolVolumeArgs = DiskPoolVolumeArgs(
lunName = lunName ?: throw PulumiNullFieldException("lunName"),
mountOption = mountOption,
targetId = targetId ?: throw PulumiNullFieldException("targetId"),
)
}