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

com.pulumi.kubernetes.resource.v1alpha3.kotlin.inputs.BasicDeviceArgs.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.kubernetes.resource.v1alpha3.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.resource.v1alpha3.inputs.BasicDeviceArgs.builder
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * BasicDevice defines one device instance.
 * @property attributes Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.
 * The maximum number of attributes and capacities combined is 32.
 * @property capacity Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.
 * The maximum number of attributes and capacities combined is 32.
 */
public data class BasicDeviceArgs(
    public val attributes: Output>? = null,
    public val capacity: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha3.inputs.BasicDeviceArgs =
        com.pulumi.kubernetes.resource.v1alpha3.inputs.BasicDeviceArgs.builder()
            .attributes(
                attributes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value.let({ args0 -> args0.toJava() }))
                    }).toMap()
                }),
            )
            .capacity(
                capacity?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [BasicDeviceArgs].
 */
@PulumiTagMarker
public class BasicDeviceArgsBuilder internal constructor() {
    private var attributes: Output>? = null

    private var capacity: Output>? = null

    /**
     * @param value Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.
     * The maximum number of attributes and capacities combined is 32.
     */
    @JvmName("hjwnpeuwhugrtmvf")
    public suspend fun attributes(`value`: Output>) {
        this.attributes = value
    }

    /**
     * @param value Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.
     * The maximum number of attributes and capacities combined is 32.
     */
    @JvmName("wludyfdtwuuripwl")
    public suspend fun capacity(`value`: Output>) {
        this.capacity = value
    }

    /**
     * @param value Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.
     * The maximum number of attributes and capacities combined is 32.
     */
    @JvmName("sylorioiqdyqouqv")
    public suspend fun attributes(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param argument Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.
     * The maximum number of attributes and capacities combined is 32.
     */
    @JvmName("tjndpevlynxjeckg")
    public suspend fun attributes(vararg argument: Pair Unit>) {
        val toBeMapped = argument.toList().map { (left, right) ->
            left to
                DeviceAttributeArgsBuilder().applySuspend { right() }.build()
        }.toMap()
        val mapped = of(toBeMapped)
        this.attributes = mapped
    }

    /**
     * @param values Attributes defines the set of attributes for this device. The name of each attribute must be unique in that set.
     * The maximum number of attributes and capacities combined is 32.
     */
    @JvmName("pvpdktrfwobiujil")
    public fun attributes(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param value Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.
     * The maximum number of attributes and capacities combined is 32.
     */
    @JvmName("mgpllpbthcqhgywc")
    public suspend fun capacity(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacity = mapped
    }

    /**
     * @param values Capacity defines the set of capacities for this device. The name of each capacity must be unique in that set.
     * The maximum number of attributes and capacities combined is 32.
     */
    @JvmName("xhetyqlpkgmiakgw")
    public fun capacity(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.capacity = mapped
    }

    internal fun build(): BasicDeviceArgs = BasicDeviceArgs(
        attributes = attributes,
        capacity = capacity,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy