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

com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs.DriverAllocationResult.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.

There is a newer version: 4.18.2.0
Show newest version
@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

/**
 * DriverAllocationResult contains vendor parameters and the allocation result for one request.
 * @property namedResources NamedResources describes the allocation result when using the named resources model.
 * @property vendorRequestParameters VendorRequestParameters are the per-request configuration parameters from the time that the claim was allocated.
 */
public data class DriverAllocationResult(
    public val namedResources: NamedResourcesAllocationResult? = null,
    public val vendorRequestParameters: JsonElement? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.resource.v1alpha2.outputs.DriverAllocationResult): DriverAllocationResult = DriverAllocationResult(
            namedResources = javaType.namedResources().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.resource.v1alpha2.kotlin.outputs.NamedResourcesAllocationResult.Companion.toKotlin(args0)
                })
            }).orElse(null),
            vendorRequestParameters = javaType.vendorRequestParameters().map({ args0 ->
                Json.parseToJsonElement(GsonBuilder().serializeNulls().create().toJson(args0))
            }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy