com.pulumi.kubernetes.resource.v1alpha3.kotlin.outputs.AllocatedDeviceStatus.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.resource.v1alpha3.kotlin.outputs
import com.google.gson.GsonBuilder
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.Condition
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
* AllocatedDeviceStatus contains the status of an allocated device, if the driver chooses to report it. This may include driver-specific information.
* @property conditions Conditions contains the latest observation of the device's state. If the device has been configured according to the class and claim config references, the `Ready` condition should be True.
* @property data Data contains arbitrary driver-specific data.
* The length of the raw data must be smaller or equal to 10 Ki.
* @property device Device references one device instance via its name in the driver's resource pool. It must be a DNS label.
* @property driver Driver specifies the name of the DRA driver whose kubelet plugin should be invoked to process the allocation once the claim is needed on a node.
* Must be a DNS subdomain and should end with a DNS domain owned by the vendor of the driver.
* @property networkData NetworkData contains network-related information specific to the device.
* @property pool This name together with the driver name and the device name field identify which device was allocated (`//`).
* Must not be longer than 253 characters and may contain one or more DNS sub-domains separated by slashes.
*/
public data class AllocatedDeviceStatus(
public val conditions: List? = null,
public val `data`: JsonElement? = null,
public val device: String,
public val driver: String,
public val networkData: NetworkDeviceData? = null,
public val pool: String,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.resource.v1alpha3.outputs.AllocatedDeviceStatus): AllocatedDeviceStatus = AllocatedDeviceStatus(
conditions = javaType.conditions().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.meta.v1.kotlin.outputs.Condition.Companion.toKotlin(args0)
})
}),
`data` = javaType.`data`().map({ args0 ->
Json.parseToJsonElement(GsonBuilder().serializeNulls().create().toJson(args0))
}).orElse(null),
device = javaType.device(),
driver = javaType.driver(),
networkData = javaType.networkData().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.resource.v1alpha3.kotlin.outputs.NetworkDeviceData.Companion.toKotlin(args0)
})
}).orElse(null),
pool = javaType.pool(),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy