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

com.pulumi.kubernetes.resource.v1alpha3.kotlin.outputs.ResourceSliceSpec.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.outputs

import com.pulumi.kubernetes.core.v1.kotlin.outputs.NodeSelector
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 * ResourceSliceSpec contains the information published by the driver in one ResourceSlice.
 * @property allNodes AllNodes indicates that all nodes have access to the resources in the pool.
 * Exactly one of NodeName, NodeSelector and AllNodes must be set.
 * @property devices Devices lists some or all of the devices in this pool.
 * Must not have more than 128 entries.
 * @property driver Driver identifies the DRA driver providing the capacity information. A field selector can be used to list only ResourceSlice objects with a certain driver name.
 * Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver. This field is immutable.
 * @property nodeName NodeName identifies the node which provides the resources in this pool. A field selector can be used to list only ResourceSlice objects belonging to a certain node.
 * This field can be used to limit access from nodes to ResourceSlices with the same node name. It also indicates to autoscalers that adding new nodes of the same type as some old node might also make new resources available.
 * Exactly one of NodeName, NodeSelector and AllNodes must be set. This field is immutable.
 * @property nodeSelector NodeSelector defines which nodes have access to the resources in the pool, when that pool is not limited to a single node.
 * Must use exactly one term.
 * Exactly one of NodeName, NodeSelector and AllNodes must be set.
 * @property pool Pool describes the pool that this ResourceSlice belongs to.
 */
public data class ResourceSliceSpec(
    public val allNodes: Boolean? = null,
    public val devices: List? = null,
    public val driver: String,
    public val nodeName: String? = null,
    public val nodeSelector: NodeSelector? = null,
    public val pool: ResourcePool,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.resource.v1alpha3.outputs.ResourceSliceSpec): ResourceSliceSpec = ResourceSliceSpec(
            allNodes = javaType.allNodes().map({ args0 -> args0 }).orElse(null),
            devices = javaType.devices().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.resource.v1alpha3.kotlin.outputs.Device.Companion.toKotlin(args0)
                })
            }),
            driver = javaType.driver(),
            nodeName = javaType.nodeName().map({ args0 -> args0 }).orElse(null),
            nodeSelector = javaType.nodeSelector().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.core.v1.kotlin.outputs.NodeSelector.Companion.toKotlin(args0)
                })
            }).orElse(null),
            pool = javaType.pool().let({ args0 ->
                com.pulumi.kubernetes.resource.v1alpha3.kotlin.outputs.ResourcePool.Companion.toKotlin(args0)
            }),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy