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

com.pulumi.googlenative.compute.beta.kotlin.inputs.ReservationAffinityArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

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

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.beta.inputs.ReservationAffinityArgs.builder
import com.pulumi.googlenative.compute.beta.kotlin.enums.ReservationAffinityConsumeReservationType
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies the reservations that this instance can consume from.
 * @property consumeReservationType Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
 * @property key Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify googleapis.com/reservation-name as the key and specify the name of your reservation as its value.
 * @property values Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
 */
public data class ReservationAffinityArgs(
    public val consumeReservationType: Output? = null,
    public val key: Output? = null,
    public val values: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.compute.beta.inputs.ReservationAffinityArgs =
        com.pulumi.googlenative.compute.beta.inputs.ReservationAffinityArgs.builder()
            .consumeReservationType(
                consumeReservationType?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .key(key?.applyValue({ args0 -> args0 }))
            .values(values?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var key: Output? = null

    private var values: Output>? = null

    /**
     * @param value Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
     */
    @JvmName("knwaawknxrmjxnur")
    public suspend fun consumeReservationType(`value`: Output) {
        this.consumeReservationType = value
    }

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

    /**
     * @param value Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
     */
    @JvmName("ctcvbmonnfxycwqe")
    public suspend fun values(`value`: Output>) {
        this.values = value
    }

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

    /**
     * @param values Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
     */
    @JvmName("cplgymvpsdodylia")
    public suspend fun values(values: List>) {
        this.values = Output.all(values)
    }

    /**
     * @param value Specifies the type of reservation from which this instance can consume resources: ANY_RESERVATION (default), SPECIFIC_RESERVATION, or NO_RESERVATION. See Consuming reserved instances for examples.
     */
    @JvmName("aegorpkcwxlrwdly")
    public suspend fun consumeReservationType(`value`: ReservationAffinityConsumeReservationType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.consumeReservationType = mapped
    }

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

    /**
     * @param value Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
     */
    @JvmName("mijkptpvhchkfjmj")
    public suspend fun values(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.values = mapped
    }

    /**
     * @param values Corresponds to the label values of a reservation resource. This can be either a name to a reservation in the same project or "projects/different-project/reservations/some-reservation-name" to target a shared reservation in the same zone but in a different project.
     */
    @JvmName("eimkyimlgnmhnvbl")
    public suspend fun values(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.values = mapped
    }

    internal fun build(): ReservationAffinityArgs = ReservationAffinityArgs(
        consumeReservationType = consumeReservationType,
        key = key,
        values = values,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy