com.pulumi.kubernetes.resource.v1alpha1.kotlin.outputs.ResourceClass.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
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.v1alpha1.kotlin.outputs
import com.pulumi.kubernetes.core.v1.kotlin.outputs.NodeSelector
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.ObjectMeta
import kotlin.String
import kotlin.Suppress
/**
* ResourceClass is used by administrators to influence how resources are allocated.
* This is an alpha type and requires enabling the DynamicResourceAllocation feature gate.
* @property apiVersion APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
* @property driverName DriverName defines the name of the dynamic resource driver that is used for allocation of a ResourceClaim that uses this class.
* Resource drivers have a unique name in forward domain order (acme.example.com).
* @property kind Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
* @property metadata Standard object metadata
* @property parametersRef ParametersRef references an arbitrary separate object that may hold parameters that will be used by the driver when allocating a resource that uses this class. A dynamic resource driver can distinguish between parameters stored here and and those stored in ResourceClaimSpec.
* @property suitableNodes Only nodes matching the selector will be considered by the scheduler when trying to find a Node that fits a Pod when that Pod uses a ResourceClaim that has not been allocated yet.
* Setting this field is optional. If null, all nodes are candidates.
*/
public data class ResourceClass(
public val apiVersion: String? = null,
public val driverName: String,
public val kind: String? = null,
public val metadata: ObjectMeta? = null,
public val parametersRef: ResourceClassParametersReference? = null,
public val suitableNodes: NodeSelector? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.resource.v1alpha1.outputs.ResourceClass): ResourceClass = ResourceClass(
apiVersion = javaType.apiVersion().map({ args0 -> args0 }).orElse(null),
driverName = javaType.driverName(),
kind = javaType.kind().map({ args0 -> args0 }).orElse(null),
metadata = javaType.metadata().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.meta.v1.kotlin.outputs.ObjectMeta.Companion.toKotlin(args0)
})
}).orElse(null),
parametersRef = javaType.parametersRef().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.resource.v1alpha1.kotlin.outputs.ResourceClassParametersReference.Companion.toKotlin(args0)
})
}).orElse(null),
suitableNodes = javaType.suitableNodes().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.core.v1.kotlin.outputs.NodeSelector.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy