com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs.ResourceRequest.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs
import com.google.gson.GsonBuilder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.Suppress
/**
* ResourceRequest is a request for resources from one particular driver.
* @property namedResources NamedResources describes a request for resources with the named resources model.
* @property vendorParameters VendorParameters are arbitrary setup parameters for the requested resource. They are ignored while allocating a claim.
*/
public data class ResourceRequest(
public val namedResources: NamedResourcesRequest? = null,
public val vendorParameters: JsonElement? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.kubernetes.resource.v1alpha2.outputs.ResourceRequest): ResourceRequest = ResourceRequest(
namedResources = javaType.namedResources().map({ args0 ->
args0.let({ args0 ->
com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs.NamedResourcesRequest.Companion.toKotlin(args0)
})
}).orElse(null),
vendorParameters = javaType.vendorParameters().map({ args0 ->
Json.parseToJsonElement(GsonBuilder().serializeNulls().create().toJson(args0))
}).orElse(null),
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy