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

com.pulumi.kubernetes.apiextensions.v1.kotlin.inputs.CustomResourceDefinitionVersionArgs.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.apiextensions.v1.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.kotlin.applySuspend
import com.pulumi.kubernetes.apiextensions.v1.inputs.CustomResourceDefinitionVersionArgs.builder
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * CustomResourceDefinitionVersion describes a version for CRD.
 * @property additionalPrinterColumns additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
 * @property deprecated deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
 * @property deprecationWarning deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
 * @property name name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.
 * @property schema schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.
 * @property selectableFields selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
 * @property served served is a flag enabling/disabling this version from being served via REST APIs
 * @property storage storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.
 * @property subresources subresources specify what subresources this version of the defined custom resource have.
 */
public data class CustomResourceDefinitionVersionArgs(
    public val additionalPrinterColumns: Output>? = null,
    public val deprecated: Output? = null,
    public val deprecationWarning: Output? = null,
    public val name: Output,
    public val schema: Output? = null,
    public val selectableFields: Output>? = null,
    public val served: Output,
    public val storage: Output,
    public val subresources: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apiextensions.v1.inputs.CustomResourceDefinitionVersionArgs =
        com.pulumi.kubernetes.apiextensions.v1.inputs.CustomResourceDefinitionVersionArgs.builder()
            .additionalPrinterColumns(
                additionalPrinterColumns?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .deprecated(deprecated?.applyValue({ args0 -> args0 }))
            .deprecationWarning(deprecationWarning?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .schema(schema?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .selectableFields(
                selectableFields?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .served(served.applyValue({ args0 -> args0 }))
            .storage(storage.applyValue({ args0 -> args0 }))
            .subresources(subresources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [CustomResourceDefinitionVersionArgs].
 */
@PulumiTagMarker
public class CustomResourceDefinitionVersionArgsBuilder internal constructor() {
    private var additionalPrinterColumns: Output>? = null

    private var deprecated: Output? = null

    private var deprecationWarning: Output? = null

    private var name: Output? = null

    private var schema: Output? = null

    private var selectableFields: Output>? = null

    private var served: Output? = null

    private var storage: Output? = null

    private var subresources: Output? = null

    /**
     * @param value additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("kvimqgisxgphwrul")
    public suspend fun additionalPrinterColumns(`value`: Output>) {
        this.additionalPrinterColumns = value
    }

    @JvmName("giqhcfiooejbojqk")
    public suspend fun additionalPrinterColumns(vararg values: Output) {
        this.additionalPrinterColumns = Output.all(values.asList())
    }

    /**
     * @param values additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("yomavndwfgpdhirc")
    public suspend fun additionalPrinterColumns(values: List>) {
        this.additionalPrinterColumns = Output.all(values)
    }

    /**
     * @param value deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
     */
    @JvmName("attaafiraselttpo")
    public suspend fun deprecated(`value`: Output) {
        this.deprecated = value
    }

    /**
     * @param value deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
     */
    @JvmName("duwahagdpxfckgox")
    public suspend fun deprecationWarning(`value`: Output) {
        this.deprecationWarning = value
    }

    /**
     * @param value name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.
     */
    @JvmName("ofqsnayatwtwopby")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.
     */
    @JvmName("isqnlfuqyvawasgt")
    public suspend fun schema(`value`: Output) {
        this.schema = value
    }

    /**
     * @param value selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
     */
    @JvmName("axnlwgnhosdtgfhp")
    public suspend fun selectableFields(`value`: Output>) {
        this.selectableFields = value
    }

    @JvmName("jceoqjhtwjbaexrl")
    public suspend fun selectableFields(vararg values: Output) {
        this.selectableFields = Output.all(values.asList())
    }

    /**
     * @param values selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
     */
    @JvmName("pkdiklqlalklpumf")
    public suspend fun selectableFields(values: List>) {
        this.selectableFields = Output.all(values)
    }

    /**
     * @param value served is a flag enabling/disabling this version from being served via REST APIs
     */
    @JvmName("yhnorgsleohhctxu")
    public suspend fun served(`value`: Output) {
        this.served = value
    }

    /**
     * @param value storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.
     */
    @JvmName("ntjlaiixwmbmdwoy")
    public suspend fun storage(`value`: Output) {
        this.storage = value
    }

    /**
     * @param value subresources specify what subresources this version of the defined custom resource have.
     */
    @JvmName("dfpsqdomljdfcjgi")
    public suspend fun subresources(`value`: Output) {
        this.subresources = value
    }

    /**
     * @param value additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("ljobbcbermrowxlr")
    public suspend fun additionalPrinterColumns(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.additionalPrinterColumns = mapped
    }

    /**
     * @param argument additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("xiiunslnqvjuuyvn")
    public suspend fun additionalPrinterColumns(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CustomResourceColumnDefinitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalPrinterColumns = mapped
    }

    /**
     * @param argument additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("qnouewfcokqfadvt")
    public suspend fun additionalPrinterColumns(vararg argument: suspend CustomResourceColumnDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CustomResourceColumnDefinitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.additionalPrinterColumns = mapped
    }

    /**
     * @param argument additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("fievoxrxbmbnrpjk")
    public suspend fun additionalPrinterColumns(argument: suspend CustomResourceColumnDefinitionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CustomResourceColumnDefinitionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.additionalPrinterColumns = mapped
    }

    /**
     * @param values additionalPrinterColumns specifies additional columns returned in Table output. See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. If no columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("gcgosaclmbuvqetd")
    public suspend fun additionalPrinterColumns(vararg values: CustomResourceColumnDefinitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalPrinterColumns = mapped
    }

    /**
     * @param value deprecated indicates this version of the custom resource API is deprecated. When set to true, API requests to this version receive a warning header in the server response. Defaults to false.
     */
    @JvmName("utjctxuekuhrunwd")
    public suspend fun deprecated(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deprecated = mapped
    }

    /**
     * @param value deprecationWarning overrides the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.
     */
    @JvmName("vxurlqqbofcasjva")
    public suspend fun deprecationWarning(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deprecationWarning = mapped
    }

    /**
     * @param value name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at `/apis///...` if `served` is true.
     */
    @JvmName("neyiqsexqjoqnftw")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.
     */
    @JvmName("iloigonwcwgoqhks")
    public suspend fun schema(`value`: CustomResourceValidationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schema = mapped
    }

    /**
     * @param argument schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.
     */
    @JvmName("tiqulldoixxbchbj")
    public suspend fun schema(argument: suspend CustomResourceValidationArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceValidationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.schema = mapped
    }

    /**
     * @param value selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
     */
    @JvmName("kugcvftnbwxpubkf")
    public suspend fun selectableFields(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selectableFields = mapped
    }

    /**
     * @param argument selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
     */
    @JvmName("ycrarnpuifscjfsh")
    public suspend fun selectableFields(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SelectableFieldArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.selectableFields = mapped
    }

    /**
     * @param argument selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
     */
    @JvmName("acnoofxvmpfalrcm")
    public suspend fun selectableFields(vararg argument: suspend SelectableFieldArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SelectableFieldArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.selectableFields = mapped
    }

    /**
     * @param argument selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
     */
    @JvmName("qujcugucpwgdbupa")
    public suspend fun selectableFields(argument: suspend SelectableFieldArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(SelectableFieldArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.selectableFields = mapped
    }

    /**
     * @param values selectableFields specifies paths to fields that may be used as field selectors. A maximum of 8 selectable fields are allowed. See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors
     */
    @JvmName("munfepkfmciiydss")
    public suspend fun selectableFields(vararg values: SelectableFieldArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.selectableFields = mapped
    }

    /**
     * @param value served is a flag enabling/disabling this version from being served via REST APIs
     */
    @JvmName("xnimklufvhsiyaoe")
    public suspend fun served(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.served = mapped
    }

    /**
     * @param value storage indicates this version should be used when persisting custom resources to storage. There must be exactly one version with storage=true.
     */
    @JvmName("qqekhfnvggdtfieg")
    public suspend fun storage(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.storage = mapped
    }

    /**
     * @param value subresources specify what subresources this version of the defined custom resource have.
     */
    @JvmName("sxhsxarlaksiwwrw")
    public suspend fun subresources(`value`: CustomResourceSubresourcesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subresources = mapped
    }

    /**
     * @param argument subresources specify what subresources this version of the defined custom resource have.
     */
    @JvmName("fjprktghdhchxxjk")
    public suspend fun subresources(argument: suspend CustomResourceSubresourcesArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceSubresourcesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.subresources = mapped
    }

    internal fun build(): CustomResourceDefinitionVersionArgs = CustomResourceDefinitionVersionArgs(
        additionalPrinterColumns = additionalPrinterColumns,
        deprecated = deprecated,
        deprecationWarning = deprecationWarning,
        name = name ?: throw PulumiNullFieldException("name"),
        schema = schema,
        selectableFields = selectableFields,
        served = served ?: throw PulumiNullFieldException("served"),
        storage = storage ?: throw PulumiNullFieldException("storage"),
        subresources = subresources,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy