com.pulumi.azurenative.networkcloud.kotlin.inputs.VirtualMachinePlacementHintArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.networkcloud.kotlin.inputs
import com.pulumi.azurenative.networkcloud.inputs.VirtualMachinePlacementHintArgs.builder
import com.pulumi.azurenative.networkcloud.kotlin.enums.VirtualMachinePlacementHintPodAffinityScope
import com.pulumi.azurenative.networkcloud.kotlin.enums.VirtualMachinePlacementHintType
import com.pulumi.azurenative.networkcloud.kotlin.enums.VirtualMachineSchedulingExecution
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
/**
*
* @property hintType The specification of whether this hint supports affinity or anti-affinity with the referenced resources.
* @property resourceId The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.
* @property schedulingExecution The indicator of whether the hint is a hard or soft requirement during scheduling.
* @property scope The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.
*/
public data class VirtualMachinePlacementHintArgs(
public val hintType: Output>,
public val resourceId: Output,
public val schedulingExecution: Output>,
public val scope: Output>,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.networkcloud.inputs.VirtualMachinePlacementHintArgs = com.pulumi.azurenative.networkcloud.inputs.VirtualMachinePlacementHintArgs.builder()
.hintType(
hintType.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.resourceId(resourceId.applyValue({ args0 -> args0 }))
.schedulingExecution(
schedulingExecution.applyValue({ args0 ->
args0.transform(
{ args0 -> args0 },
{ args0 -> args0.let({ args0 -> args0.toJava() }) },
)
}),
)
.scope(
scope.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [VirtualMachinePlacementHintArgs].
*/
@PulumiTagMarker
public class VirtualMachinePlacementHintArgsBuilder internal constructor() {
private var hintType: Output>? = null
private var resourceId: Output? = null
private var schedulingExecution: Output>? = null
private var scope: Output>? = null
/**
* @param value The specification of whether this hint supports affinity or anti-affinity with the referenced resources.
*/
@JvmName("ncologscvsjjbqfi")
public suspend fun hintType(`value`: Output>) {
this.hintType = value
}
/**
* @param value The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.
*/
@JvmName("hmtlkuhmsguvedfw")
public suspend fun resourceId(`value`: Output) {
this.resourceId = value
}
/**
* @param value The indicator of whether the hint is a hard or soft requirement during scheduling.
*/
@JvmName("nqrcabvebsaaiyag")
public suspend fun schedulingExecution(`value`: Output>) {
this.schedulingExecution = value
}
/**
* @param value The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.
*/
@JvmName("ewrtjnjmgwhmeafh")
public suspend fun scope(`value`: Output>) {
this.scope = value
}
/**
* @param value The specification of whether this hint supports affinity or anti-affinity with the referenced resources.
*/
@JvmName("votnmqsrfmmvcaba")
public suspend fun hintType(`value`: Either) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.hintType = mapped
}
/**
* @param value The specification of whether this hint supports affinity or anti-affinity with the referenced resources.
*/
@JvmName("bjjbgneaunraotgn")
public fun hintType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.hintType = mapped
}
/**
* @param value The specification of whether this hint supports affinity or anti-affinity with the referenced resources.
*/
@JvmName("mrwotqpokawouiev")
public fun hintType(`value`: VirtualMachinePlacementHintType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.hintType = mapped
}
/**
* @param value The resource ID of the target object that the placement hints will be checked against, e.g., the bare metal node to host the virtual machine.
*/
@JvmName("nhtrbxrmvkqjtffq")
public suspend fun resourceId(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.resourceId = mapped
}
/**
* @param value The indicator of whether the hint is a hard or soft requirement during scheduling.
*/
@JvmName("vbfkafkdlyjkepuf")
public suspend fun schedulingExecution(`value`: Either) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.schedulingExecution = mapped
}
/**
* @param value The indicator of whether the hint is a hard or soft requirement during scheduling.
*/
@JvmName("fvodiweurellflrw")
public fun schedulingExecution(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.schedulingExecution = mapped
}
/**
* @param value The indicator of whether the hint is a hard or soft requirement during scheduling.
*/
@JvmName("jitjkaxdixeqmdwn")
public fun schedulingExecution(`value`: VirtualMachineSchedulingExecution) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.schedulingExecution = mapped
}
/**
* @param value The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.
*/
@JvmName("lgdilasmbrddpbum")
public suspend fun scope(`value`: Either) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.scope = mapped
}
/**
* @param value The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.
*/
@JvmName("ficcqlrnsooltmbf")
public fun scope(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.scope = mapped
}
/**
* @param value The scope for the virtual machine affinity or anti-affinity placement hint. It should always be "Machine" in the case of node affinity.
*/
@JvmName("nadofmebgobarthf")
public fun scope(`value`: VirtualMachinePlacementHintPodAffinityScope) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.scope = mapped
}
internal fun build(): VirtualMachinePlacementHintArgs = VirtualMachinePlacementHintArgs(
hintType = hintType ?: throw PulumiNullFieldException("hintType"),
resourceId = resourceId ?: throw PulumiNullFieldException("resourceId"),
schedulingExecution = schedulingExecution ?: throw PulumiNullFieldException("schedulingExecution"),
scope = scope ?: throw PulumiNullFieldException("scope"),
)
}