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

com.pulumi.kubernetes.apiextensions.v1beta1.kotlin.inputs.CustomResourceDefinitionVersionPatchArgs.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.apiextensions.v1beta1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceDefinitionVersionPatchArgs.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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version 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 and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).
 * @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. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).
 */
public data class CustomResourceDefinitionVersionPatchArgs(
    public val additionalPrinterColumns: Output>? =
        null,
    public val deprecated: Output? = null,
    public val deprecationWarning: Output? = null,
    public val name: Output? = null,
    public val schema: Output? = null,
    public val served: Output? = null,
    public val storage: Output? = null,
    public val subresources: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceDefinitionVersionPatchArgs =
        com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceDefinitionVersionPatchArgs.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() }) }))
            .served(served?.applyValue({ args0 -> args0 }))
            .storage(storage?.applyValue({ args0 -> args0 }))
            .subresources(subresources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [CustomResourceDefinitionVersionPatchArgs].
 */
@PulumiTagMarker
public class CustomResourceDefinitionVersionPatchArgsBuilder 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 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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("hhvgnvrpbsmvusfy")
    public suspend fun additionalPrinterColumns(`value`: Output>) {
        this.additionalPrinterColumns = value
    }

    @JvmName("ikxcrwslpwrgyrfs")
    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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("skykhasrrnbiyikj")
    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("edljckyaiqlqunii")
    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("elbxbrmmpshaewys")
    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("ybtxqtoepcsdbnhq")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).
     */
    @JvmName("lbohtyitorahtmhi")
    public suspend fun schema(`value`: Output) {
        this.schema = value
    }

    /**
     * @param value served is a flag enabling/disabling this version from being served via REST APIs
     */
    @JvmName("vvjeciqgjxyrsqff")
    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("legpeuohfoapsfbo")
    public suspend fun storage(`value`: Output) {
        this.storage = value
    }

    /**
     * @param value subresources specify what subresources this version of the defined custom resource have. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).
     */
    @JvmName("kifgafjbwnrfewto")
    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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("dakymbtmmmolyjyr")
    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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("yhyrxbqhqegoiycu")
    public suspend fun additionalPrinterColumns(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CustomResourceColumnDefinitionPatchArgsBuilder().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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("vwaxdmafagsmrcbr")
    public suspend fun additionalPrinterColumns(vararg argument: suspend CustomResourceColumnDefinitionPatchArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CustomResourceColumnDefinitionPatchArgsBuilder().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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("cqjrhgaschdiaxiw")
    public suspend fun additionalPrinterColumns(argument: suspend CustomResourceColumnDefinitionPatchArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CustomResourceColumnDefinitionPatchArgsBuilder().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. Top-level and per-version columns are mutually exclusive. Per-version columns must not all be set to identical values (top-level columns should be used instead). If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("jpfdfadbjkujapeh")
    public suspend fun additionalPrinterColumns(vararg values: CustomResourceColumnDefinitionPatchArgs) {
        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("tukddosyyxygjfwr")
    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("huhgexocktaqtvki")
    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("jalbyhiqimqktygy")
    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 and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).
     */
    @JvmName("tfisjuwwvsepuglk")
    public suspend fun schema(`value`: CustomResourceValidationPatchArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.schema = mapped
    }

    /**
     * @param argument schema describes the schema used for validation and pruning of this version of the custom resource. Top-level and per-version schemas are mutually exclusive. Per-version schemas must not all be set to identical values (top-level validation schema should be used instead).
     */
    @JvmName("hfmnesqeqsyfosba")
    public suspend fun schema(argument: suspend CustomResourceValidationPatchArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceValidationPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.schema = mapped
    }

    /**
     * @param value served is a flag enabling/disabling this version from being served via REST APIs
     */
    @JvmName("nbwuxgmtcgwtcjps")
    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("osmqloqnjuiskfff")
    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. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).
     */
    @JvmName("dlvjhriapukgkhia")
    public suspend fun subresources(`value`: CustomResourceSubresourcesPatchArgs?) {
        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. Top-level and per-version subresources are mutually exclusive. Per-version subresources must not all be set to identical values (top-level subresources should be used instead).
     */
    @JvmName("pcmvkhopkinereqo")
    public suspend fun subresources(argument: suspend CustomResourceSubresourcesPatchArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceSubresourcesPatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.subresources = mapped
    }

    internal fun build(): CustomResourceDefinitionVersionPatchArgs =
        CustomResourceDefinitionVersionPatchArgs(
            additionalPrinterColumns = additionalPrinterColumns,
            deprecated = deprecated,
            deprecationWarning = deprecationWarning,
            name = name,
            schema = schema,
            served = served,
            storage = storage,
            subresources = subresources,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy