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

com.pulumi.gcp.compute.kotlin.inputs.InstanceReservationAffinityArgs.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.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.InstanceReservationAffinityArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property specificReservation Specifies the label selector for the reservation to use..
 * Structure is documented below.
 * @property type The type of reservation from which this instance can consume resources.
 */
public data class InstanceReservationAffinityArgs(
    public val specificReservation: Output? =
        null,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.InstanceReservationAffinityArgs =
        com.pulumi.gcp.compute.inputs.InstanceReservationAffinityArgs.builder()
            .specificReservation(
                specificReservation?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceReservationAffinityArgs].
 */
@PulumiTagMarker
public class InstanceReservationAffinityArgsBuilder internal constructor() {
    private var specificReservation: Output? =
        null

    private var type: Output? = null

    /**
     * @param value Specifies the label selector for the reservation to use..
     * Structure is documented below.
     */
    @JvmName("favwsqmwcgyjvymc")
    public suspend fun specificReservation(`value`: Output) {
        this.specificReservation = value
    }

    /**
     * @param value The type of reservation from which this instance can consume resources.
     */
    @JvmName("dotndkhoqvcanknp")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Specifies the label selector for the reservation to use..
     * Structure is documented below.
     */
    @JvmName("mbjnlkfathfjawlh")
    public suspend fun specificReservation(`value`: InstanceReservationAffinitySpecificReservationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.specificReservation = mapped
    }

    /**
     * @param argument Specifies the label selector for the reservation to use..
     * Structure is documented below.
     */
    @JvmName("tatxbhamsffjovak")
    public suspend fun specificReservation(argument: suspend InstanceReservationAffinitySpecificReservationArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceReservationAffinitySpecificReservationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.specificReservation = mapped
    }

    /**
     * @param value The type of reservation from which this instance can consume resources.
     */
    @JvmName("ajxetagahfiwdcqp")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): InstanceReservationAffinityArgs = InstanceReservationAffinityArgs(
        specificReservation = specificReservation,
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy