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

com.pulumi.gcp.container.kotlin.inputs.ClusterNodeConfigReservationAffinityArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.12.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.container.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.container.inputs.ClusterNodeConfigReservationAffinityArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property consumeReservationType The type of reservation consumption
 * Accepted values are:
 * * `"UNSPECIFIED"`: Default value. This should not be used.
 * * `"NO_RESERVATION"`: Do not consume from any reserved capacity.
 * * `"ANY_RESERVATION"`: Consume any reservation available.
 * * `"SPECIFIC_RESERVATION"`: Must consume from a specific reservation. Must specify key value fields for specifying the reservations.
 * @property key The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value.
 * @property values The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name"
 */
public data class ClusterNodeConfigReservationAffinityArgs(
    public val consumeReservationType: Output,
    public val key: Output? = null,
    public val values: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.container.inputs.ClusterNodeConfigReservationAffinityArgs =
        com.pulumi.gcp.container.inputs.ClusterNodeConfigReservationAffinityArgs.builder()
            .consumeReservationType(consumeReservationType.applyValue({ args0 -> args0 }))
            .key(key?.applyValue({ args0 -> args0 }))
            .values(values?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

/**
 * Builder for [ClusterNodeConfigReservationAffinityArgs].
 */
@PulumiTagMarker
public class ClusterNodeConfigReservationAffinityArgsBuilder internal constructor() {
    private var consumeReservationType: Output? = null

    private var key: Output? = null

    private var values: Output>? = null

    /**
     * @param value The type of reservation consumption
     * Accepted values are:
     * * `"UNSPECIFIED"`: Default value. This should not be used.
     * * `"NO_RESERVATION"`: Do not consume from any reserved capacity.
     * * `"ANY_RESERVATION"`: Consume any reservation available.
     * * `"SPECIFIC_RESERVATION"`: Must consume from a specific reservation. Must specify key value fields for specifying the reservations.
     */
    @JvmName("mxjxklshanvybloy")
    public suspend fun consumeReservationType(`value`: Output) {
        this.consumeReservationType = value
    }

    /**
     * @param value The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value.
     */
    @JvmName("sprfhyvmbtfiawkc")
    public suspend fun key(`value`: Output) {
        this.key = value
    }

    /**
     * @param value The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name"
     */
    @JvmName("alohwpcpgwyndmby")
    public suspend fun values(`value`: Output>) {
        this.values = value
    }

    @JvmName("cwclescrgaqbmflv")
    public suspend fun values(vararg values: Output) {
        this.values = Output.all(values.asList())
    }

    /**
     * @param values The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name"
     */
    @JvmName("poikkjnybjtycxtk")
    public suspend fun values(values: List>) {
        this.values = Output.all(values)
    }

    /**
     * @param value The type of reservation consumption
     * Accepted values are:
     * * `"UNSPECIFIED"`: Default value. This should not be used.
     * * `"NO_RESERVATION"`: Do not consume from any reserved capacity.
     * * `"ANY_RESERVATION"`: Consume any reservation available.
     * * `"SPECIFIC_RESERVATION"`: Must consume from a specific reservation. Must specify key value fields for specifying the reservations.
     */
    @JvmName("rexyshdvlgibwjap")
    public suspend fun consumeReservationType(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.consumeReservationType = mapped
    }

    /**
     * @param value The label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify "compute.googleapis.com/reservation-name" as the key and specify the name of your reservation as its value.
     */
    @JvmName("iltohjricqgkewvj")
    public suspend fun key(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.key = mapped
    }

    /**
     * @param value The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name"
     */
    @JvmName("exdwlerneeeyticg")
    public suspend fun values(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.values = mapped
    }

    /**
     * @param values The list of label values of reservation resources. For example: the name of the specific reservation when using a key of "compute.googleapis.com/reservation-name"
     */
    @JvmName("yploiwjtsimckdpt")
    public suspend fun values(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.values = mapped
    }

    internal fun build(): ClusterNodeConfigReservationAffinityArgs =
        ClusterNodeConfigReservationAffinityArgs(
            consumeReservationType = consumeReservationType ?: throw
                PulumiNullFieldException("consumeReservationType"),
            key = key,
            values = values,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy