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

com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs.NamedResourcesRequestArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.resource.v1alpha2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kubernetes.resource.v1alpha2.inputs.NamedResourcesRequestArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * NamedResourcesRequest is used in ResourceRequestModel.
 * @property selector Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/
 * In addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:
 *    attributes.quantity["a"].isGreaterThan(quantity("0")) &&
 *    attributes.stringslice["b"].isSorted()
 */
public data class NamedResourcesRequestArgs(
    public val selector: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.resource.v1alpha2.inputs.NamedResourcesRequestArgs =
        com.pulumi.kubernetes.resource.v1alpha2.inputs.NamedResourcesRequestArgs.builder()
            .selector(selector.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [NamedResourcesRequestArgs].
 */
@PulumiTagMarker
public class NamedResourcesRequestArgsBuilder internal constructor() {
    private var selector: Output? = null

    /**
     * @param value Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/
     * In addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:
     *    attributes.quantity["a"].isGreaterThan(quantity("0")) &&
     *    attributes.stringslice["b"].isSorted()
     */
    @JvmName("defvocfdbhxruvtn")
    public suspend fun selector(`value`: Output) {
        this.selector = value
    }

    /**
     * @param value Selector is a CEL expression which must evaluate to true if a resource instance is suitable. The language is as defined in https://kubernetes.io/docs/reference/using-api/cel/
     * In addition, for each type NamedResourcesin AttributeValue there is a map that resolves to the corresponding value of the instance under evaluation. For example:
     *    attributes.quantity["a"].isGreaterThan(quantity("0")) &&
     *    attributes.stringslice["b"].isSorted()
     */
    @JvmName("bbyxcrnwsgxiwcgl")
    public suspend fun selector(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selector = mapped
    }

    internal fun build(): NamedResourcesRequestArgs = NamedResourcesRequestArgs(
        selector = selector ?: throw PulumiNullFieldException("selector"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy