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

com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs.NamedResourcesInstanceArgs.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: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.resource.v1alpha2.inputs.NamedResourcesInstanceArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * NamedResourcesInstance represents one individual hardware instance that can be selected based on its attributes.
 * @property attributes Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
 * @property name Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.
 */
public data class NamedResourcesInstanceArgs(
    public val attributes: Output>? = null,
    public val name: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.NamedResourcesInstanceArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.NamedResourcesInstanceArgs.builder()
            .attributes(
                attributes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

    /**
     * @param value Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
     */
    @JvmName("btlqfmmklpoucjla")
    public suspend fun attributes(`value`: Output>) {
        this.attributes = value
    }

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

    /**
     * @param values Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
     */
    @JvmName("khoelxdgwofsnaiw")
    public suspend fun attributes(values: List>) {
        this.attributes = Output.all(values)
    }

    /**
     * @param value Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.
     */
    @JvmName("bxolwjxlhhqxobub")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
     */
    @JvmName("hrdywiinwmirylks")
    public suspend fun attributes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param argument Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
     */
    @JvmName("mgfnvykbnryqdxdr")
    public suspend fun attributes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            NamedResourcesAttributeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.attributes = mapped
    }

    /**
     * @param argument Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
     */
    @JvmName("gqojlcttsyjxiywb")
    public suspend fun attributes(vararg argument: suspend NamedResourcesAttributeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            NamedResourcesAttributeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.attributes = mapped
    }

    /**
     * @param argument Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
     */
    @JvmName("qkgukngibodetohc")
    public suspend fun attributes(argument: suspend NamedResourcesAttributeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            NamedResourcesAttributeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.attributes = mapped
    }

    /**
     * @param values Attributes defines the attributes of this resource instance. The name of each attribute must be unique.
     */
    @JvmName("kqjhsqkjjpshqspt")
    public suspend fun attributes(vararg values: NamedResourcesAttributeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.attributes = mapped
    }

    /**
     * @param value Name is unique identifier among all resource instances managed by the driver on the node. It must be a DNS subdomain.
     */
    @JvmName("gmvjeeesaxdrityq")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): NamedResourcesInstanceArgs = NamedResourcesInstanceArgs(
        attributes = attributes,
        name = name ?: throw PulumiNullFieldException("name"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy