com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceDefinitionSpecPatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.kubernetes.apiextensions.v1beta1.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceColumnDefinitionPatch;
import com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceConversionPatch;
import com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceDefinitionNamesPatch;
import com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceDefinitionVersionPatch;
import com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceSubresourcesPatch;
import com.pulumi.kubernetes.apiextensions.v1beta1.outputs.CustomResourceValidationPatch;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class CustomResourceDefinitionSpecPatch {
/**
* @return 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.
*
*/
private @Nullable List additionalPrinterColumns;
/**
* @return conversion defines conversion settings for the CRD.
*
*/
private @Nullable CustomResourceConversionPatch conversion;
/**
* @return group is the API group of the defined custom resource. The custom resources are served under `/apis/<group>/...`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
*
*/
private @Nullable String group;
/**
* @return names specify the resource and kind names for the custom resource.
*
*/
private @Nullable CustomResourceDefinitionNamesPatch names;
/**
* @return 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.
*
*/
private @Nullable Boolean preserveUnknownFields;
/**
* @return scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
*
*/
private @Nullable String scope;
/**
* @return 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.
*
*/
private @Nullable CustomResourceSubresourcesPatch subresources;
/**
* @return 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.
*
*/
private @Nullable CustomResourceValidationPatch validation;
/**
* @return version is the API version of the defined custom resource. The custom resources are served under `/apis/<group>/<version>/...`. 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.
*
*/
private @Nullable String version;
/**
* @return 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.
*
*/
private @Nullable List versions;
private CustomResourceDefinitionSpecPatch() {}
/**
* @return 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.
*
*/
public List additionalPrinterColumns() {
return this.additionalPrinterColumns == null ? List.of() : this.additionalPrinterColumns;
}
/**
* @return conversion defines conversion settings for the CRD.
*
*/
public Optional conversion() {
return Optional.ofNullable(this.conversion);
}
/**
* @return group is the API group of the defined custom resource. The custom resources are served under `/apis/<group>/...`. Must match the name of the CustomResourceDefinition (in the form `<names.plural>.<group>`).
*
*/
public Optional group() {
return Optional.ofNullable(this.group);
}
/**
* @return names specify the resource and kind names for the custom resource.
*
*/
public Optional names() {
return Optional.ofNullable(this.names);
}
/**
* @return 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.
*
*/
public Optional preserveUnknownFields() {
return Optional.ofNullable(this.preserveUnknownFields);
}
/**
* @return scope indicates whether the defined custom resource is cluster- or namespace-scoped. Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`.
*
*/
public Optional scope() {
return Optional.ofNullable(this.scope);
}
/**
* @return 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.
*
*/
public Optional subresources() {
return Optional.ofNullable(this.subresources);
}
/**
* @return 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.
*
*/
public Optional validation() {
return Optional.ofNullable(this.validation);
}
/**
* @return version is the API version of the defined custom resource. The custom resources are served under `/apis/<group>/<version>/...`. 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.
*
*/
public Optional version() {
return Optional.ofNullable(this.version);
}
/**
* @return 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 List versions() {
return this.versions == null ? List.of() : this.versions;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(CustomResourceDefinitionSpecPatch defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List additionalPrinterColumns;
private @Nullable CustomResourceConversionPatch conversion;
private @Nullable String group;
private @Nullable CustomResourceDefinitionNamesPatch names;
private @Nullable Boolean preserveUnknownFields;
private @Nullable String scope;
private @Nullable CustomResourceSubresourcesPatch subresources;
private @Nullable CustomResourceValidationPatch validation;
private @Nullable String version;
private @Nullable List versions;
public Builder() {}
public Builder(CustomResourceDefinitionSpecPatch defaults) {
Objects.requireNonNull(defaults);
this.additionalPrinterColumns = defaults.additionalPrinterColumns;
this.conversion = defaults.conversion;
this.group = defaults.group;
this.names = defaults.names;
this.preserveUnknownFields = defaults.preserveUnknownFields;
this.scope = defaults.scope;
this.subresources = defaults.subresources;
this.validation = defaults.validation;
this.version = defaults.version;
this.versions = defaults.versions;
}
@CustomType.Setter
public Builder additionalPrinterColumns(@Nullable List additionalPrinterColumns) {
this.additionalPrinterColumns = additionalPrinterColumns;
return this;
}
public Builder additionalPrinterColumns(CustomResourceColumnDefinitionPatch... additionalPrinterColumns) {
return additionalPrinterColumns(List.of(additionalPrinterColumns));
}
@CustomType.Setter
public Builder conversion(@Nullable CustomResourceConversionPatch conversion) {
this.conversion = conversion;
return this;
}
@CustomType.Setter
public Builder group(@Nullable String group) {
this.group = group;
return this;
}
@CustomType.Setter
public Builder names(@Nullable CustomResourceDefinitionNamesPatch names) {
this.names = names;
return this;
}
@CustomType.Setter
public Builder preserveUnknownFields(@Nullable Boolean preserveUnknownFields) {
this.preserveUnknownFields = preserveUnknownFields;
return this;
}
@CustomType.Setter
public Builder scope(@Nullable String scope) {
this.scope = scope;
return this;
}
@CustomType.Setter
public Builder subresources(@Nullable CustomResourceSubresourcesPatch subresources) {
this.subresources = subresources;
return this;
}
@CustomType.Setter
public Builder validation(@Nullable CustomResourceValidationPatch validation) {
this.validation = validation;
return this;
}
@CustomType.Setter
public Builder version(@Nullable String version) {
this.version = version;
return this;
}
@CustomType.Setter
public Builder versions(@Nullable List versions) {
this.versions = versions;
return this;
}
public Builder versions(CustomResourceDefinitionVersionPatch... versions) {
return versions(List.of(versions));
}
public CustomResourceDefinitionSpecPatch build() {
final var _resultValue = new CustomResourceDefinitionSpecPatch();
_resultValue.additionalPrinterColumns = additionalPrinterColumns;
_resultValue.conversion = conversion;
_resultValue.group = group;
_resultValue.names = names;
_resultValue.preserveUnknownFields = preserveUnknownFields;
_resultValue.scope = scope;
_resultValue.subresources = subresources;
_resultValue.validation = validation;
_resultValue.version = version;
_resultValue.versions = versions;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy