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

com.pulumi.googlenative.tpu.v2alpha1.kotlin.inputs.NodeSpecArgs.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.tpu.v2alpha1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.tpu.v2alpha1.inputs.NodeSpecArgs.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

/**
 * Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created.
 * @property node The node.
 * @property nodeId The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multi-node requests, multi_node_params must be populated instead. It's an error to specify both node_id and multi_node_params.
 * @property parent The parent resource name.
 */
public data class NodeSpecArgs(
    public val node: Output,
    public val nodeId: Output? = null,
    public val parent: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.tpu.v2alpha1.inputs.NodeSpecArgs =
        com.pulumi.googlenative.tpu.v2alpha1.inputs.NodeSpecArgs.builder()
            .node(node.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .nodeId(nodeId?.applyValue({ args0 -> args0 }))
            .parent(parent.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [NodeSpecArgs].
 */
@PulumiTagMarker
public class NodeSpecArgsBuilder internal constructor() {
    private var node: Output? = null

    private var nodeId: Output? = null

    private var parent: Output? = null

    /**
     * @param value The node.
     */
    @JvmName("cfjnmryithrbfpay")
    public suspend fun node(`value`: Output) {
        this.node = value
    }

    /**
     * @param value The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multi-node requests, multi_node_params must be populated instead. It's an error to specify both node_id and multi_node_params.
     */
    @JvmName("hplgluijqmhdprny")
    public suspend fun nodeId(`value`: Output) {
        this.nodeId = value
    }

    /**
     * @param value The parent resource name.
     */
    @JvmName("fyyehlvqisxvydww")
    public suspend fun parent(`value`: Output) {
        this.parent = value
    }

    /**
     * @param value The node.
     */
    @JvmName("sulcbvtkhauyrdtu")
    public suspend fun node(`value`: NodeArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.node = mapped
    }

    /**
     * @param argument The node.
     */
    @JvmName("atllyrqounlrgktd")
    public suspend fun node(argument: suspend NodeArgsBuilder.() -> Unit) {
        val toBeMapped = NodeArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.node = mapped
    }

    /**
     * @param value The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multi-node requests, multi_node_params must be populated instead. It's an error to specify both node_id and multi_node_params.
     */
    @JvmName("osqdbnllwmfjpljo")
    public suspend fun nodeId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nodeId = mapped
    }

    /**
     * @param value The parent resource name.
     */
    @JvmName("olkevnsfmtbjuuxd")
    public suspend fun parent(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parent = mapped
    }

    internal fun build(): NodeSpecArgs = NodeSpecArgs(
        node = node ?: throw PulumiNullFieldException("node"),
        nodeId = nodeId,
        parent = parent ?: throw PulumiNullFieldException("parent"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy