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

com.pulumi.azurenative.networkcloud.kotlin.inputs.ClusterUpdateStrategyArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.networkcloud.kotlin.inputs

import com.pulumi.azurenative.networkcloud.inputs.ClusterUpdateStrategyArgs.builder
import com.pulumi.azurenative.networkcloud.kotlin.enums.ClusterUpdateStrategyType
import com.pulumi.azurenative.networkcloud.kotlin.enums.ValidationThresholdType
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 maxUnavailable The maximum number of worker nodes that can be offline within the increment of update, e.g., rack-by-rack.
 * Limited by the maximum number of machines in the increment. Defaults to the whole increment size.
 * @property strategyType The mode of operation for runtime protection.
 * @property thresholdType Selection of how the threshold should be evaluated.
 * @property thresholdValue The numeric threshold value.
 * @property waitTimeMinutes The time to wait between the increments of update defined by the strategy.
 */
public data class ClusterUpdateStrategyArgs(
    public val maxUnavailable: Output? = null,
    public val strategyType: Output>,
    public val thresholdType: Output>,
    public val thresholdValue: Output,
    public val waitTimeMinutes: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.networkcloud.inputs.ClusterUpdateStrategyArgs =
        com.pulumi.azurenative.networkcloud.inputs.ClusterUpdateStrategyArgs.builder()
            .maxUnavailable(maxUnavailable?.applyValue({ args0 -> args0 }))
            .strategyType(
                strategyType.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .thresholdType(
                thresholdType.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .thresholdValue(thresholdValue.applyValue({ args0 -> args0 }))
            .waitTimeMinutes(waitTimeMinutes?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ClusterUpdateStrategyArgs].
 */
@PulumiTagMarker
public class ClusterUpdateStrategyArgsBuilder internal constructor() {
    private var maxUnavailable: Output? = null

    private var strategyType: Output>? = null

    private var thresholdType: Output>? = null

    private var thresholdValue: Output? = null

    private var waitTimeMinutes: Output? = null

    /**
     * @param value The maximum number of worker nodes that can be offline within the increment of update, e.g., rack-by-rack.
     * Limited by the maximum number of machines in the increment. Defaults to the whole increment size.
     */
    @JvmName("byduhgosvjmbgoad")
    public suspend fun maxUnavailable(`value`: Output) {
        this.maxUnavailable = value
    }

    /**
     * @param value The mode of operation for runtime protection.
     */
    @JvmName("renysanpgbhryscg")
    public suspend fun strategyType(`value`: Output>) {
        this.strategyType = value
    }

    /**
     * @param value Selection of how the threshold should be evaluated.
     */
    @JvmName("bbbbswxfqvxovhxr")
    public suspend fun thresholdType(`value`: Output>) {
        this.thresholdType = value
    }

    /**
     * @param value The numeric threshold value.
     */
    @JvmName("nsrimgugjlfujohx")
    public suspend fun thresholdValue(`value`: Output) {
        this.thresholdValue = value
    }

    /**
     * @param value The time to wait between the increments of update defined by the strategy.
     */
    @JvmName("uhcqfjrljgrncifg")
    public suspend fun waitTimeMinutes(`value`: Output) {
        this.waitTimeMinutes = value
    }

    /**
     * @param value The maximum number of worker nodes that can be offline within the increment of update, e.g., rack-by-rack.
     * Limited by the maximum number of machines in the increment. Defaults to the whole increment size.
     */
    @JvmName("pmysqfanbjeefmul")
    public suspend fun maxUnavailable(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxUnavailable = mapped
    }

    /**
     * @param value The mode of operation for runtime protection.
     */
    @JvmName("kiqxpnqifadiawrk")
    public suspend fun strategyType(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.strategyType = mapped
    }

    /**
     * @param value The mode of operation for runtime protection.
     */
    @JvmName("mqsoblumxvljqywu")
    public fun strategyType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.strategyType = mapped
    }

    /**
     * @param value The mode of operation for runtime protection.
     */
    @JvmName("iovbgpfknnbjitka")
    public fun strategyType(`value`: ClusterUpdateStrategyType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.strategyType = mapped
    }

    /**
     * @param value Selection of how the threshold should be evaluated.
     */
    @JvmName("actkodugalacgsus")
    public suspend fun thresholdType(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.thresholdType = mapped
    }

    /**
     * @param value Selection of how the threshold should be evaluated.
     */
    @JvmName("ibdylxtaiheexoav")
    public fun thresholdType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.thresholdType = mapped
    }

    /**
     * @param value Selection of how the threshold should be evaluated.
     */
    @JvmName("wqvxobnqwaloaiqd")
    public fun thresholdType(`value`: ValidationThresholdType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.thresholdType = mapped
    }

    /**
     * @param value The numeric threshold value.
     */
    @JvmName("wmlbwwkdumbwosld")
    public suspend fun thresholdValue(`value`: Double) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.thresholdValue = mapped
    }

    /**
     * @param value The time to wait between the increments of update defined by the strategy.
     */
    @JvmName("xjjccwtsfmodgksu")
    public suspend fun waitTimeMinutes(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.waitTimeMinutes = mapped
    }

    internal fun build(): ClusterUpdateStrategyArgs = ClusterUpdateStrategyArgs(
        maxUnavailable = maxUnavailable,
        strategyType = strategyType ?: throw PulumiNullFieldException("strategyType"),
        thresholdType = thresholdType ?: throw PulumiNullFieldException("thresholdType"),
        thresholdValue = thresholdValue ?: throw PulumiNullFieldException("thresholdValue"),
        waitTimeMinutes = waitTimeMinutes,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy