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

com.pulumi.kubernetes.apiextensions.v1.kotlin.outputs.CustomResourceDefinitionVersion.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.outputs

import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 * 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 CustomResourceDefinitionVersion(
    public val additionalPrinterColumns: List? = null,
    public val deprecated: Boolean? = null,
    public val deprecationWarning: String? = null,
    public val name: String,
    public val schema: CustomResourceValidation? = null,
    public val selectableFields: List? = null,
    public val served: Boolean,
    public val storage: Boolean,
    public val subresources: CustomResourceSubresources? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.apiextensions.v1.outputs.CustomResourceDefinitionVersion): CustomResourceDefinitionVersion = CustomResourceDefinitionVersion(
            additionalPrinterColumns = javaType.additionalPrinterColumns().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.apiextensions.v1.kotlin.outputs.CustomResourceColumnDefinition.Companion.toKotlin(args0)
                })
            }),
            deprecated = javaType.deprecated().map({ args0 -> args0 }).orElse(null),
            deprecationWarning = javaType.deprecationWarning().map({ args0 -> args0 }).orElse(null),
            name = javaType.name(),
            schema = javaType.schema().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.apiextensions.v1.kotlin.outputs.CustomResourceValidation.Companion.toKotlin(args0)
                })
            }).orElse(null),
            selectableFields = javaType.selectableFields().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.apiextensions.v1.kotlin.outputs.SelectableField.Companion.toKotlin(args0)
                })
            }),
            served = javaType.served(),
            storage = javaType.storage(),
            subresources = javaType.subresources().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.kubernetes.apiextensions.v1.kotlin.outputs.CustomResourceSubresources.Companion.toKotlin(args0)
                })
            }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy