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

com.pulumi.googlenative.compute.alpha.kotlin.inputs.FixedOrPercentArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.compute.alpha.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.alpha.inputs.FixedOrPercentArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Encapsulates numeric value that can be either absolute or relative.
 * @property fixed Specifies a fixed number of VM instances. This must be a positive integer.
 * @property percent Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
 */
public data class FixedOrPercentArgs(
    public val fixed: Output? = null,
    public val percent: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.compute.alpha.inputs.FixedOrPercentArgs =
        com.pulumi.googlenative.compute.alpha.inputs.FixedOrPercentArgs.builder()
            .fixed(fixed?.applyValue({ args0 -> args0 }))
            .percent(percent?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FixedOrPercentArgs].
 */
@PulumiTagMarker
public class FixedOrPercentArgsBuilder internal constructor() {
    private var fixed: Output? = null

    private var percent: Output? = null

    /**
     * @param value Specifies a fixed number of VM instances. This must be a positive integer.
     */
    @JvmName("sfitsiyipixnwgjb")
    public suspend fun fixed(`value`: Output) {
        this.fixed = value
    }

    /**
     * @param value Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
     */
    @JvmName("uraknrprulsivbaf")
    public suspend fun percent(`value`: Output) {
        this.percent = value
    }

    /**
     * @param value Specifies a fixed number of VM instances. This must be a positive integer.
     */
    @JvmName("pfpbbyqwhhjjudum")
    public suspend fun fixed(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fixed = mapped
    }

    /**
     * @param value Specifies a percentage of instances between 0 to 100%, inclusive. For example, specify 80 for 80%.
     */
    @JvmName("ophwmgkmbwipysgn")
    public suspend fun percent(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.percent = mapped
    }

    internal fun build(): FixedOrPercentArgs = FixedOrPercentArgs(
        fixed = fixed,
        percent = percent,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy