com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs.ResourceClaimStatus.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.v1alpha2.kotlin.outputs
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
* ResourceClaimStatus tracks whether the resource has been allocated and what the resulting attributes are.
* @property allocation Allocation is set by the resource driver once a resource or set of resources has been allocated successfully. If this is not specified, the resources have not been allocated yet.
* @property deallocationRequested DeallocationRequested indicates that a ResourceClaim is to be deallocated.
* The driver then must deallocate this claim and reset the field together with clearing the Allocation field.
* While DeallocationRequested is set, no new consumers may be added to ReservedFor.
* @property driverName DriverName is a copy of the driver name from the ResourceClass at the time when allocation started.
* @property reservedFor ReservedFor indicates which entities are currently allowed to use the claim. A Pod which references a ResourceClaim which is not reserved for that Pod will not be started.
* There can be at most 32 such reservations. This may get increased in the future, but not reduced.
*/
public data class ResourceClaimStatus(
public val allocation: AllocationResult? = null,
public val deallocationRequested: Boolean? = null,
public val driverName: String? = null,
public val reservedFor: List? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.resource.v1alpha2.outputs.ResourceClaimStatus): ResourceClaimStatus = ResourceClaimStatus(
allocation = javaType.allocation().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs.AllocationResult.Companion.toKotlin(args0)
})
}).orElse(null),
deallocationRequested = javaType.deallocationRequested().map({ args0 -> args0 }).orElse(null),
driverName = javaType.driverName().map({ args0 -> args0 }).orElse(null),
reservedFor = javaType.reservedFor().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs.ResourceClaimConsumerReference.Companion.toKotlin(args0)
})
}),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy