Package org.cdk8s.plus25.k8s
Class CustomResourceDefinitionVersion.Builder
- java.lang.Object
-
- org.cdk8s.plus25.k8s.CustomResourceDefinitionVersion.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<CustomResourceDefinitionVersion>
- Enclosing interface:
- CustomResourceDefinitionVersion
@Stability(Stable) public static final class CustomResourceDefinitionVersion.Builder extends Object implements software.amazon.jsii.Builder<CustomResourceDefinitionVersion>
A builder forCustomResourceDefinitionVersion
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
name
@Stability(Stable) public CustomResourceDefinitionVersion.Builder name(String name)
Sets the value ofCustomResourceDefinitionVersion.getName()- Parameters:
name- name is the version name, e.g. “v1”, “v2beta1”, etc. The custom resources are served under this version at/apis/<group>/<version>/...ifservedis true. This parameter is required.- Returns:
this
-
served
@Stability(Stable) public CustomResourceDefinitionVersion.Builder served(Boolean served)
Sets the value ofCustomResourceDefinitionVersion.getServed()- Parameters:
served- served is a flag enabling/disabling this version from being served via REST APIs. This parameter is required.- Returns:
this
-
storage
@Stability(Stable) public CustomResourceDefinitionVersion.Builder storage(Boolean storage)
Sets the value ofCustomResourceDefinitionVersion.getStorage()- Parameters:
storage- storage indicates this version should be used when persisting custom resources to storage. This parameter is required. There must be exactly one version with storage=true.- Returns:
this
-
additionalPrinterColumns
@Stability(Stable) public CustomResourceDefinitionVersion.Builder additionalPrinterColumns(List<? extends CustomResourceColumnDefinition> additionalPrinterColumns)
Sets the value ofCustomResourceDefinitionVersion.getAdditionalPrinterColumns()- Parameters:
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.- Returns:
this
-
deprecated
@Stability(Stable) public CustomResourceDefinitionVersion.Builder deprecated(Boolean deprecated)
Sets the value ofCustomResourceDefinitionVersion.getDeprecated()- Parameters:
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.- Returns:
this
-
deprecationWarning
@Stability(Stable) public CustomResourceDefinitionVersion.Builder deprecationWarning(String deprecationWarning)
Sets the value ofCustomResourceDefinitionVersion.getDeprecationWarning()- Parameters:
deprecationWarning- deprecationWarning overrides the default warning returned to API clients. May only be set whendeprecatedis 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.- Returns:
this
-
schema
@Stability(Stable) public CustomResourceDefinitionVersion.Builder schema(CustomResourceValidation schema)
Sets the value ofCustomResourceDefinitionVersion.getSchema()- Parameters:
schema- schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource.- Returns:
this
-
subresources
@Stability(Stable) public CustomResourceDefinitionVersion.Builder subresources(CustomResourceSubresources subresources)
Sets the value ofCustomResourceDefinitionVersion.getSubresources()- Parameters:
subresources- subresources specify what subresources this version of the defined custom resource have.- Returns:
this
-
build
@Stability(Stable) public CustomResourceDefinitionVersion build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CustomResourceDefinitionVersion>- Returns:
- a new instance of
CustomResourceDefinitionVersion - Throws:
NullPointerException- if any required attribute was not provided
-
-