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

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

/**
 * CustomResourceDefinitionSpec describes how a user wants their resource to appear
 * @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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
 * @property conversion conversion defines conversion settings for the CRD.
 * @property group group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).
 * @property names names specify the resource and kind names for the custom resource.
 * @property preserveUnknownFields preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.
 * @property scope scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
 * @property subresources subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.
 * @property validation validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.
 * @property version version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.
 * @property versions versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
 */
public data class CustomResourceDefinitionSpecArgs(
    public val additionalPrinterColumns: Output>? = null,
    public val conversion: Output? = null,
    public val group: Output,
    public val names: Output,
    public val preserveUnknownFields: Output? = null,
    public val scope: Output,
    public val subresources: Output? = null,
    public val validation: Output? = null,
    public val version: Output? = null,
    public val versions: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceDefinitionSpecArgs =
        com.pulumi.kubernetes.apiextensions.v1beta1.inputs.CustomResourceDefinitionSpecArgs.builder()
            .additionalPrinterColumns(
                additionalPrinterColumns?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .conversion(conversion?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .group(group.applyValue({ args0 -> args0 }))
            .names(names.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .preserveUnknownFields(preserveUnknownFields?.applyValue({ args0 -> args0 }))
            .scope(scope.applyValue({ args0 -> args0 }))
            .subresources(subresources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .validation(validation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .version(version?.applyValue({ args0 -> args0 }))
            .versions(
                versions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var conversion: Output? = null

    private var group: Output? = null

    private var names: Output? = null

    private var preserveUnknownFields: Output? = null

    private var scope: Output? = null

    private var subresources: Output? = null

    private var validation: Output? = null

    private var version: Output? = null

    private var versions: 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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("mstbdvpnjugajxnj")
    public suspend fun additionalPrinterColumns(`value`: Output>) {
        this.additionalPrinterColumns = value
    }

    @JvmName("aespkvppmmcemxad")
    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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("lwkthmqwittwukmc")
    public suspend fun additionalPrinterColumns(values: List>) {
        this.additionalPrinterColumns = Output.all(values)
    }

    /**
     * @param value conversion defines conversion settings for the CRD.
     */
    @JvmName("trdgcbfyflkooibc")
    public suspend fun conversion(`value`: Output) {
        this.conversion = value
    }

    /**
     * @param value group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).
     */
    @JvmName("pjldmjnahkoygbax")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value names specify the resource and kind names for the custom resource.
     */
    @JvmName("ofwhjuheolysgrkc")
    public suspend fun names(`value`: Output) {
        this.names = value
    }

    /**
     * @param value preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.
     */
    @JvmName("vottcqfxtlgwfmpe")
    public suspend fun preserveUnknownFields(`value`: Output) {
        this.preserveUnknownFields = value
    }

    /**
     * @param value scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
     */
    @JvmName("mjfmeaymqcrxeshl")
    public suspend fun scope(`value`: Output) {
        this.scope = value
    }

    /**
     * @param value subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.
     */
    @JvmName("aemmcfuxhwaelmsh")
    public suspend fun subresources(`value`: Output) {
        this.subresources = value
    }

    /**
     * @param value validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.
     */
    @JvmName("rrqirkauqudchose")
    public suspend fun validation(`value`: Output) {
        this.validation = value
    }

    /**
     * @param value version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.
     */
    @JvmName("dylliikybyettjri")
    public suspend fun version(`value`: Output) {
        this.version = value
    }

    /**
     * @param value versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
     */
    @JvmName("novruxkfxeytpacq")
    public suspend fun versions(`value`: Output>) {
        this.versions = value
    }

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

    /**
     * @param values versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
     */
    @JvmName("hrypfvclwvalvjpv")
    public suspend fun versions(values: List>) {
        this.versions = Output.all(values)
    }

    /**
     * @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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("jsnobdwpklalvsnc")
    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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("ugqcnonblfsqpgqj")
    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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("butqrwokqpkvedif")
    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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("mkxrqjnkuutdvykj")
    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 present, this field configures columns for all versions. Top-level and per-version columns are mutually exclusive. If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used.
     */
    @JvmName("nwhdnpfcwdcrpldm")
    public suspend fun additionalPrinterColumns(vararg values: CustomResourceColumnDefinitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.additionalPrinterColumns = mapped
    }

    /**
     * @param value conversion defines conversion settings for the CRD.
     */
    @JvmName("hdcmeodjchhhtmbr")
    public suspend fun conversion(`value`: CustomResourceConversionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.conversion = mapped
    }

    /**
     * @param argument conversion defines conversion settings for the CRD.
     */
    @JvmName("rkxbeedacycwntst")
    public suspend fun conversion(argument: suspend CustomResourceConversionArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceConversionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.conversion = mapped
    }

    /**
     * @param value group is the API group of the defined custom resource. The custom resources are served under `/apis//...`. Must match the name of the CustomResourceDefinition (in the form `.`).
     */
    @JvmName("subeaqfakhdlhsiv")
    public suspend fun group(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param value names specify the resource and kind names for the custom resource.
     */
    @JvmName("pcumqqebhpiehkrk")
    public suspend fun names(`value`: CustomResourceDefinitionNamesArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.names = mapped
    }

    /**
     * @param argument names specify the resource and kind names for the custom resource.
     */
    @JvmName("tkapyxcluuhrlkcl")
    public suspend fun names(argument: suspend CustomResourceDefinitionNamesArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceDefinitionNamesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.names = mapped
    }

    /**
     * @param value preserveUnknownFields indicates that object fields which are not specified in the OpenAPI schema should be preserved when persisting to storage. apiVersion, kind, metadata and known fields inside metadata are always preserved. If false, schemas must be defined for all versions. Defaults to true in v1beta for backwards compatibility. Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. See https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/#pruning-versus-preserving-unknown-fields for details.
     */
    @JvmName("ggymvibmppxsjqwl")
    public suspend fun preserveUnknownFields(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preserveUnknownFields = mapped
    }

    /**
     * @param value scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
     */
    @JvmName("egguieqffjbrqcat")
    public suspend fun scope(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scope = mapped
    }

    /**
     * @param value subresources specify what subresources the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.
     */
    @JvmName("myhacsqowuocdrsh")
    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 the defined custom resource has. If present, this field configures subresources for all versions. Top-level and per-version subresources are mutually exclusive.
     */
    @JvmName("mmbrywkkgftsmsay")
    public suspend fun subresources(argument: suspend CustomResourceSubresourcesArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceSubresourcesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.subresources = mapped
    }

    /**
     * @param value validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.
     */
    @JvmName("whausvdlyiamioiy")
    public suspend fun validation(`value`: CustomResourceValidationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validation = mapped
    }

    /**
     * @param argument validation describes the schema used for validation and pruning of the custom resource. If present, this validation schema is used to validate all versions. Top-level and per-version schemas are mutually exclusive.
     */
    @JvmName("iesjareiflbsicns")
    public suspend fun validation(argument: suspend CustomResourceValidationArgsBuilder.() -> Unit) {
        val toBeMapped = CustomResourceValidationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.validation = mapped
    }

    /**
     * @param value version is the API version of the defined custom resource. The custom resources are served under `/apis///...`. Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. Optional if `versions` is specified. Deprecated: use `versions` instead.
     */
    @JvmName("uygwembhvyilbins")
    public suspend fun version(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.version = mapped
    }

    /**
     * @param value versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
     */
    @JvmName("kukpnrwwplcxapys")
    public suspend fun versions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.versions = mapped
    }

    /**
     * @param argument versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
     */
    @JvmName("sdecqivjijiseybb")
    public suspend fun versions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CustomResourceDefinitionVersionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.versions = mapped
    }

    /**
     * @param argument versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
     */
    @JvmName("ldnanylrqqmvtnem")
    public suspend fun versions(vararg argument: suspend CustomResourceDefinitionVersionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CustomResourceDefinitionVersionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.versions = mapped
    }

    /**
     * @param argument versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
     */
    @JvmName("jvlfkaqinxpuyahw")
    public suspend fun versions(argument: suspend CustomResourceDefinitionVersionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            CustomResourceDefinitionVersionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.versions = mapped
    }

    /**
     * @param values versions is the list of all API versions of the defined custom resource. Optional if `version` is specified. The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. Version names are used to compute the order in which served versions are listed in API discovery. If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10.
     */
    @JvmName("frgijbcxuewodtqj")
    public suspend fun versions(vararg values: CustomResourceDefinitionVersionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.versions = mapped
    }

    internal fun build(): CustomResourceDefinitionSpecArgs = CustomResourceDefinitionSpecArgs(
        additionalPrinterColumns = additionalPrinterColumns,
        conversion = conversion,
        group = group ?: throw PulumiNullFieldException("group"),
        names = names ?: throw PulumiNullFieldException("names"),
        preserveUnknownFields = preserveUnknownFields,
        scope = scope ?: throw PulumiNullFieldException("scope"),
        subresources = subresources,
        validation = validation,
        version = version,
        versions = versions,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy