diff --git a/.circleci/config.yml b/.circleci/config.yml index 1cac67b..8ca41b4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,7 +15,7 @@ commands: steps: - aws-cli/setup - kubernetes/install-kubectl: - kubectl-version: v1.27.4 + kubectl-version: v1.29.2 - run: name: Set up cluster context command: aws eks update-kubeconfig --name << pipeline.parameters.cluster_name >> --alias << pipeline.parameters.cluster_name >> diff --git a/cdk8s.yaml b/cdk8s.yaml index 6cf2f07..bbb38ab 100644 --- a/cdk8s.yaml +++ b/cdk8s.yaml @@ -1,3 +1,3 @@ language: typescript imports: - - k8s@1.27.0 + - k8s@1.29.0 diff --git a/imports/k8s.ts b/imports/k8s.ts index 74dd00e..e3efc08 100644 --- a/imports/k8s.ts +++ b/imports/k8s.ts @@ -1,6 +1,6 @@ // generated by cdk8s -import { ApiObject, GroupVersionKind } from "cdk8s"; -import { Construct } from "constructs"; +import { ApiObject, GroupVersionKind } from 'cdk8s'; +import { Construct } from 'constructs'; /** * MutatingWebhookConfiguration describes the configuration of and admission webhook that accept or reject and may change the object. @@ -12,9 +12,9 @@ export class KubeMutatingWebhookConfiguration extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1", - kind: "MutatingWebhookConfiguration", - }; + apiVersion: 'admissionregistration.k8s.io/v1', + kind: 'MutatingWebhookConfiguration', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration". @@ -23,9 +23,7 @@ export class KubeMutatingWebhookConfiguration extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeMutatingWebhookConfigurationProps = {}, - ): any { + public static manifest(props: KubeMutatingWebhookConfigurationProps = {}): any { return { ...KubeMutatingWebhookConfiguration.GVK, ...toJson_KubeMutatingWebhookConfigurationProps(props), @@ -38,11 +36,7 @@ export class KubeMutatingWebhookConfiguration extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeMutatingWebhookConfigurationProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeMutatingWebhookConfigurationProps = {}) { super(scope, id, { ...KubeMutatingWebhookConfiguration.GVK, ...props, @@ -72,9 +66,9 @@ export class KubeMutatingWebhookConfigurationList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1", - kind: "MutatingWebhookConfigurationList", - }; + apiVersion: 'admissionregistration.k8s.io/v1', + kind: 'MutatingWebhookConfigurationList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList". @@ -83,9 +77,7 @@ export class KubeMutatingWebhookConfigurationList extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeMutatingWebhookConfigurationListProps, - ): any { + public static manifest(props: KubeMutatingWebhookConfigurationListProps): any { return { ...KubeMutatingWebhookConfigurationList.GVK, ...toJson_KubeMutatingWebhookConfigurationListProps(props), @@ -98,11 +90,7 @@ export class KubeMutatingWebhookConfigurationList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeMutatingWebhookConfigurationListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeMutatingWebhookConfigurationListProps) { super(scope, id, { ...KubeMutatingWebhookConfigurationList.GVK, ...props, @@ -132,9 +120,9 @@ export class KubeValidatingWebhookConfiguration extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1", - kind: "ValidatingWebhookConfiguration", - }; + apiVersion: 'admissionregistration.k8s.io/v1', + kind: 'ValidatingWebhookConfiguration', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration". @@ -143,9 +131,7 @@ export class KubeValidatingWebhookConfiguration extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeValidatingWebhookConfigurationProps = {}, - ): any { + public static manifest(props: KubeValidatingWebhookConfigurationProps = {}): any { return { ...KubeValidatingWebhookConfiguration.GVK, ...toJson_KubeValidatingWebhookConfigurationProps(props), @@ -158,11 +144,7 @@ export class KubeValidatingWebhookConfiguration extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeValidatingWebhookConfigurationProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeValidatingWebhookConfigurationProps = {}) { super(scope, id, { ...KubeValidatingWebhookConfiguration.GVK, ...props, @@ -192,9 +174,9 @@ export class KubeValidatingWebhookConfigurationList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1", - kind: "ValidatingWebhookConfigurationList", - }; + apiVersion: 'admissionregistration.k8s.io/v1', + kind: 'ValidatingWebhookConfigurationList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList". @@ -203,9 +185,7 @@ export class KubeValidatingWebhookConfigurationList extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeValidatingWebhookConfigurationListProps, - ): any { + public static manifest(props: KubeValidatingWebhookConfigurationListProps): any { return { ...KubeValidatingWebhookConfigurationList.GVK, ...toJson_KubeValidatingWebhookConfigurationListProps(props), @@ -218,11 +198,7 @@ export class KubeValidatingWebhookConfigurationList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeValidatingWebhookConfigurationListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeValidatingWebhookConfigurationListProps) { super(scope, id, { ...KubeValidatingWebhookConfigurationList.GVK, ...props, @@ -252,9 +228,9 @@ export class KubeValidatingAdmissionPolicyV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1alpha1", - kind: "ValidatingAdmissionPolicy", - }; + apiVersion: 'admissionregistration.k8s.io/v1alpha1', + kind: 'ValidatingAdmissionPolicy', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy". @@ -263,9 +239,7 @@ export class KubeValidatingAdmissionPolicyV1Alpha1 extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeValidatingAdmissionPolicyV1Alpha1Props = {}, - ): any { + public static manifest(props: KubeValidatingAdmissionPolicyV1Alpha1Props = {}): any { return { ...KubeValidatingAdmissionPolicyV1Alpha1.GVK, ...toJson_KubeValidatingAdmissionPolicyV1Alpha1Props(props), @@ -278,11 +252,7 @@ export class KubeValidatingAdmissionPolicyV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeValidatingAdmissionPolicyV1Alpha1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyV1Alpha1Props = {}) { super(scope, id, { ...KubeValidatingAdmissionPolicyV1Alpha1.GVK, ...props, @@ -304,6 +274,10 @@ export class KubeValidatingAdmissionPolicyV1Alpha1 extends ApiObject { /** * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. + +For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. + +The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. * * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding */ @@ -312,9 +286,9 @@ export class KubeValidatingAdmissionPolicyBindingV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1alpha1", - kind: "ValidatingAdmissionPolicyBinding", - }; + apiVersion: 'admissionregistration.k8s.io/v1alpha1', + kind: 'ValidatingAdmissionPolicyBinding', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding". @@ -323,9 +297,7 @@ export class KubeValidatingAdmissionPolicyBindingV1Alpha1 extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeValidatingAdmissionPolicyBindingV1Alpha1Props = {}, - ): any { + public static manifest(props: KubeValidatingAdmissionPolicyBindingV1Alpha1Props = {}): any { return { ...KubeValidatingAdmissionPolicyBindingV1Alpha1.GVK, ...toJson_KubeValidatingAdmissionPolicyBindingV1Alpha1Props(props), @@ -338,11 +310,7 @@ export class KubeValidatingAdmissionPolicyBindingV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeValidatingAdmissionPolicyBindingV1Alpha1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyBindingV1Alpha1Props = {}) { super(scope, id, { ...KubeValidatingAdmissionPolicyBindingV1Alpha1.GVK, ...props, @@ -372,9 +340,9 @@ export class KubeValidatingAdmissionPolicyBindingListV1Alpha1 extends ApiObject * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1alpha1", - kind: "ValidatingAdmissionPolicyBindingList", - }; + apiVersion: 'admissionregistration.k8s.io/v1alpha1', + kind: 'ValidatingAdmissionPolicyBindingList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList". @@ -383,9 +351,7 @@ export class KubeValidatingAdmissionPolicyBindingListV1Alpha1 extends ApiObject * * @param props initialization props */ - public static manifest( - props: KubeValidatingAdmissionPolicyBindingListV1Alpha1Props = {}, - ): any { + public static manifest(props: KubeValidatingAdmissionPolicyBindingListV1Alpha1Props = {}): any { return { ...KubeValidatingAdmissionPolicyBindingListV1Alpha1.GVK, ...toJson_KubeValidatingAdmissionPolicyBindingListV1Alpha1Props(props), @@ -398,11 +364,7 @@ export class KubeValidatingAdmissionPolicyBindingListV1Alpha1 extends ApiObject * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeValidatingAdmissionPolicyBindingListV1Alpha1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyBindingListV1Alpha1Props = {}) { super(scope, id, { ...KubeValidatingAdmissionPolicyBindingListV1Alpha1.GVK, ...props, @@ -432,9 +394,9 @@ export class KubeValidatingAdmissionPolicyListV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "admissionregistration.k8s.io/v1alpha1", - kind: "ValidatingAdmissionPolicyList", - }; + apiVersion: 'admissionregistration.k8s.io/v1alpha1', + kind: 'ValidatingAdmissionPolicyList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList". @@ -443,9 +405,7 @@ export class KubeValidatingAdmissionPolicyListV1Alpha1 extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeValidatingAdmissionPolicyListV1Alpha1Props = {}, - ): any { + public static manifest(props: KubeValidatingAdmissionPolicyListV1Alpha1Props = {}): any { return { ...KubeValidatingAdmissionPolicyListV1Alpha1.GVK, ...toJson_KubeValidatingAdmissionPolicyListV1Alpha1Props(props), @@ -458,11 +418,7 @@ export class KubeValidatingAdmissionPolicyListV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeValidatingAdmissionPolicyListV1Alpha1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyListV1Alpha1Props = {}) { super(scope, id, { ...KubeValidatingAdmissionPolicyListV1Alpha1.GVK, ...props, @@ -482,6 +438,226 @@ export class KubeValidatingAdmissionPolicyListV1Alpha1 extends ApiObject { } } +/** + * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy + */ +export class KubeValidatingAdmissionPolicyV1Beta1 extends ApiObject { + /** + * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy" + */ + public static readonly GVK: GroupVersionKind = { + apiVersion: 'admissionregistration.k8s.io/v1beta1', + kind: 'ValidatingAdmissionPolicy', + } + + /** + * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy". + * + * This can be used to inline resource manifests inside other objects (e.g. as templates). + * + * @param props initialization props + */ + public static manifest(props: KubeValidatingAdmissionPolicyV1Beta1Props = {}): any { + return { + ...KubeValidatingAdmissionPolicyV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyV1Beta1Props(props), + }; + } + + /** + * Defines a "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy" API object + * @param scope the scope in which to define this object + * @param id a scope-local name for the object + * @param props initialization props + */ + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyV1Beta1Props = {}) { + super(scope, id, { + ...KubeValidatingAdmissionPolicyV1Beta1.GVK, + ...props, + }); + } + + /** + * Renders the object to Kubernetes JSON. + */ + public toJson(): any { + const resolved = super.toJson(); + + return { + ...KubeValidatingAdmissionPolicyV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyV1Beta1Props(resolved), + }; + } +} + +/** + * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. + +For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. + +The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding + */ +export class KubeValidatingAdmissionPolicyBindingV1Beta1 extends ApiObject { + /** + * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding" + */ + public static readonly GVK: GroupVersionKind = { + apiVersion: 'admissionregistration.k8s.io/v1beta1', + kind: 'ValidatingAdmissionPolicyBinding', + } + + /** + * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding". + * + * This can be used to inline resource manifests inside other objects (e.g. as templates). + * + * @param props initialization props + */ + public static manifest(props: KubeValidatingAdmissionPolicyBindingV1Beta1Props = {}): any { + return { + ...KubeValidatingAdmissionPolicyBindingV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyBindingV1Beta1Props(props), + }; + } + + /** + * Defines a "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding" API object + * @param scope the scope in which to define this object + * @param id a scope-local name for the object + * @param props initialization props + */ + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyBindingV1Beta1Props = {}) { + super(scope, id, { + ...KubeValidatingAdmissionPolicyBindingV1Beta1.GVK, + ...props, + }); + } + + /** + * Renders the object to Kubernetes JSON. + */ + public toJson(): any { + const resolved = super.toJson(); + + return { + ...KubeValidatingAdmissionPolicyBindingV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyBindingV1Beta1Props(resolved), + }; + } +} + +/** + * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList + */ +export class KubeValidatingAdmissionPolicyBindingListV1Beta1 extends ApiObject { + /** + * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList" + */ + public static readonly GVK: GroupVersionKind = { + apiVersion: 'admissionregistration.k8s.io/v1beta1', + kind: 'ValidatingAdmissionPolicyBindingList', + } + + /** + * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList". + * + * This can be used to inline resource manifests inside other objects (e.g. as templates). + * + * @param props initialization props + */ + public static manifest(props: KubeValidatingAdmissionPolicyBindingListV1Beta1Props = {}): any { + return { + ...KubeValidatingAdmissionPolicyBindingListV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyBindingListV1Beta1Props(props), + }; + } + + /** + * Defines a "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList" API object + * @param scope the scope in which to define this object + * @param id a scope-local name for the object + * @param props initialization props + */ + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyBindingListV1Beta1Props = {}) { + super(scope, id, { + ...KubeValidatingAdmissionPolicyBindingListV1Beta1.GVK, + ...props, + }); + } + + /** + * Renders the object to Kubernetes JSON. + */ + public toJson(): any { + const resolved = super.toJson(); + + return { + ...KubeValidatingAdmissionPolicyBindingListV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyBindingListV1Beta1Props(resolved), + }; + } +} + +/** + * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList + */ +export class KubeValidatingAdmissionPolicyListV1Beta1 extends ApiObject { + /** + * Returns the apiVersion and kind for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList" + */ + public static readonly GVK: GroupVersionKind = { + apiVersion: 'admissionregistration.k8s.io/v1beta1', + kind: 'ValidatingAdmissionPolicyList', + } + + /** + * Renders a Kubernetes manifest for "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList". + * + * This can be used to inline resource manifests inside other objects (e.g. as templates). + * + * @param props initialization props + */ + public static manifest(props: KubeValidatingAdmissionPolicyListV1Beta1Props = {}): any { + return { + ...KubeValidatingAdmissionPolicyListV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyListV1Beta1Props(props), + }; + } + + /** + * Defines a "io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList" API object + * @param scope the scope in which to define this object + * @param id a scope-local name for the object + * @param props initialization props + */ + public constructor(scope: Construct, id: string, props: KubeValidatingAdmissionPolicyListV1Beta1Props = {}) { + super(scope, id, { + ...KubeValidatingAdmissionPolicyListV1Beta1.GVK, + ...props, + }); + } + + /** + * Renders the object to Kubernetes JSON. + */ + public toJson(): any { + const resolved = super.toJson(); + + return { + ...KubeValidatingAdmissionPolicyListV1Beta1.GVK, + ...toJson_KubeValidatingAdmissionPolicyListV1Beta1Props(resolved), + }; + } +} + /** * Storage version of a specific resource. * @@ -492,9 +668,9 @@ export class KubeStorageVersionV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apiserverinternal.v1alpha1.StorageVersion" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "internal.apiserver.k8s.io/v1alpha1", - kind: "StorageVersion", - }; + apiVersion: 'internal.apiserver.k8s.io/v1alpha1', + kind: 'StorageVersion', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apiserverinternal.v1alpha1.StorageVersion". @@ -516,11 +692,7 @@ export class KubeStorageVersionV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeStorageVersionV1Alpha1Props, - ) { + public constructor(scope: Construct, id: string, props: KubeStorageVersionV1Alpha1Props) { super(scope, id, { ...KubeStorageVersionV1Alpha1.GVK, ...props, @@ -550,9 +722,9 @@ export class KubeStorageVersionListV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "internal.apiserver.k8s.io/v1alpha1", - kind: "StorageVersionList", - }; + apiVersion: 'internal.apiserver.k8s.io/v1alpha1', + kind: 'StorageVersionList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList". @@ -574,11 +746,7 @@ export class KubeStorageVersionListV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeStorageVersionListV1Alpha1Props, - ) { + public constructor(scope: Construct, id: string, props: KubeStorageVersionListV1Alpha1Props) { super(scope, id, { ...KubeStorageVersionListV1Alpha1.GVK, ...props, @@ -608,9 +776,9 @@ export class KubeControllerRevision extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.ControllerRevision" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "ControllerRevision", - }; + apiVersion: 'apps/v1', + kind: 'ControllerRevision', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ControllerRevision". @@ -632,11 +800,7 @@ export class KubeControllerRevision extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeControllerRevisionProps, - ) { + public constructor(scope: Construct, id: string, props: KubeControllerRevisionProps) { super(scope, id, { ...KubeControllerRevision.GVK, ...props, @@ -666,9 +830,9 @@ export class KubeControllerRevisionList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.ControllerRevisionList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "ControllerRevisionList", - }; + apiVersion: 'apps/v1', + kind: 'ControllerRevisionList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ControllerRevisionList". @@ -690,11 +854,7 @@ export class KubeControllerRevisionList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeControllerRevisionListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeControllerRevisionListProps) { super(scope, id, { ...KubeControllerRevisionList.GVK, ...props, @@ -724,9 +884,9 @@ export class KubeDaemonSet extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.DaemonSet" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "DaemonSet", - }; + apiVersion: 'apps/v1', + kind: 'DaemonSet', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.DaemonSet". @@ -748,11 +908,7 @@ export class KubeDaemonSet extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeDaemonSetProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeDaemonSetProps = {}) { super(scope, id, { ...KubeDaemonSet.GVK, ...props, @@ -782,9 +938,9 @@ export class KubeDaemonSetList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.DaemonSetList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "DaemonSetList", - }; + apiVersion: 'apps/v1', + kind: 'DaemonSetList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.DaemonSetList". @@ -806,11 +962,7 @@ export class KubeDaemonSetList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeDaemonSetListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeDaemonSetListProps) { super(scope, id, { ...KubeDaemonSetList.GVK, ...props, @@ -840,9 +992,9 @@ export class KubeDeployment extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.Deployment" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "Deployment", - }; + apiVersion: 'apps/v1', + kind: 'Deployment', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.Deployment". @@ -864,11 +1016,7 @@ export class KubeDeployment extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeDeploymentProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeDeploymentProps = {}) { super(scope, id, { ...KubeDeployment.GVK, ...props, @@ -898,9 +1046,9 @@ export class KubeDeploymentList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.DeploymentList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "DeploymentList", - }; + apiVersion: 'apps/v1', + kind: 'DeploymentList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.DeploymentList". @@ -922,11 +1070,7 @@ export class KubeDeploymentList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeDeploymentListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeDeploymentListProps) { super(scope, id, { ...KubeDeploymentList.GVK, ...props, @@ -956,9 +1100,9 @@ export class KubeReplicaSet extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.ReplicaSet" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "ReplicaSet", - }; + apiVersion: 'apps/v1', + kind: 'ReplicaSet', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ReplicaSet". @@ -980,11 +1124,7 @@ export class KubeReplicaSet extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeReplicaSetProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeReplicaSetProps = {}) { super(scope, id, { ...KubeReplicaSet.GVK, ...props, @@ -1014,9 +1154,9 @@ export class KubeReplicaSetList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.ReplicaSetList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "ReplicaSetList", - }; + apiVersion: 'apps/v1', + kind: 'ReplicaSetList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.ReplicaSetList". @@ -1038,11 +1178,7 @@ export class KubeReplicaSetList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeReplicaSetListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeReplicaSetListProps) { super(scope, id, { ...KubeReplicaSetList.GVK, ...props, @@ -1076,9 +1212,9 @@ export class KubeStatefulSet extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.StatefulSet" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "StatefulSet", - }; + apiVersion: 'apps/v1', + kind: 'StatefulSet', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.StatefulSet". @@ -1100,11 +1236,7 @@ export class KubeStatefulSet extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeStatefulSetProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeStatefulSetProps = {}) { super(scope, id, { ...KubeStatefulSet.GVK, ...props, @@ -1134,9 +1266,9 @@ export class KubeStatefulSetList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.apps.v1.StatefulSetList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apps/v1", - kind: "StatefulSetList", - }; + apiVersion: 'apps/v1', + kind: 'StatefulSetList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.apps.v1.StatefulSetList". @@ -1158,11 +1290,7 @@ export class KubeStatefulSetList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeStatefulSetListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeStatefulSetListProps) { super(scope, id, { ...KubeStatefulSetList.GVK, ...props, @@ -1182,6 +1310,60 @@ export class KubeStatefulSetList extends ApiObject { } } +/** + * SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. + * + * @schema io.k8s.api.authentication.v1.SelfSubjectReview + */ +export class KubeSelfSubjectReview extends ApiObject { + /** + * Returns the apiVersion and kind for "io.k8s.api.authentication.v1.SelfSubjectReview" + */ + public static readonly GVK: GroupVersionKind = { + apiVersion: 'authentication.k8s.io/v1', + kind: 'SelfSubjectReview', + } + + /** + * Renders a Kubernetes manifest for "io.k8s.api.authentication.v1.SelfSubjectReview". + * + * This can be used to inline resource manifests inside other objects (e.g. as templates). + * + * @param props initialization props + */ + public static manifest(props: KubeSelfSubjectReviewProps = {}): any { + return { + ...KubeSelfSubjectReview.GVK, + ...toJson_KubeSelfSubjectReviewProps(props), + }; + } + + /** + * Defines a "io.k8s.api.authentication.v1.SelfSubjectReview" API object + * @param scope the scope in which to define this object + * @param id a scope-local name for the object + * @param props initialization props + */ + public constructor(scope: Construct, id: string, props: KubeSelfSubjectReviewProps = {}) { + super(scope, id, { + ...KubeSelfSubjectReview.GVK, + ...props, + }); + } + + /** + * Renders the object to Kubernetes JSON. + */ + public toJson(): any { + const resolved = super.toJson(); + + return { + ...KubeSelfSubjectReview.GVK, + ...toJson_KubeSelfSubjectReviewProps(resolved), + }; + } +} + /** * TokenRequest requests a token for a given service account. * @@ -1192,9 +1374,9 @@ export class KubeTokenRequest extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authentication.v1.TokenRequest" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authentication.k8s.io/v1", - kind: "TokenRequest", - }; + apiVersion: 'authentication.k8s.io/v1', + kind: 'TokenRequest', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authentication.v1.TokenRequest". @@ -1216,11 +1398,7 @@ export class KubeTokenRequest extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeTokenRequestProps, - ) { + public constructor(scope: Construct, id: string, props: KubeTokenRequestProps) { super(scope, id, { ...KubeTokenRequest.GVK, ...props, @@ -1250,9 +1428,9 @@ export class KubeTokenReview extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authentication.v1.TokenReview" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authentication.k8s.io/v1", - kind: "TokenReview", - }; + apiVersion: 'authentication.k8s.io/v1', + kind: 'TokenReview', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authentication.v1.TokenReview". @@ -1274,11 +1452,7 @@ export class KubeTokenReview extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeTokenReviewProps, - ) { + public constructor(scope: Construct, id: string, props: KubeTokenReviewProps) { super(scope, id, { ...KubeTokenReview.GVK, ...props, @@ -1308,9 +1482,9 @@ export class KubeSelfSubjectReviewV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authentication.v1alpha1.SelfSubjectReview" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authentication.k8s.io/v1alpha1", - kind: "SelfSubjectReview", - }; + apiVersion: 'authentication.k8s.io/v1alpha1', + kind: 'SelfSubjectReview', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authentication.v1alpha1.SelfSubjectReview". @@ -1332,11 +1506,7 @@ export class KubeSelfSubjectReviewV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeSelfSubjectReviewV1Alpha1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeSelfSubjectReviewV1Alpha1Props = {}) { super(scope, id, { ...KubeSelfSubjectReviewV1Alpha1.GVK, ...props, @@ -1366,9 +1536,9 @@ export class KubeSelfSubjectReviewV1Beta1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authentication.v1beta1.SelfSubjectReview" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authentication.k8s.io/v1beta1", - kind: "SelfSubjectReview", - }; + apiVersion: 'authentication.k8s.io/v1beta1', + kind: 'SelfSubjectReview', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authentication.v1beta1.SelfSubjectReview". @@ -1390,11 +1560,7 @@ export class KubeSelfSubjectReviewV1Beta1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeSelfSubjectReviewV1Beta1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeSelfSubjectReviewV1Beta1Props = {}) { super(scope, id, { ...KubeSelfSubjectReviewV1Beta1.GVK, ...props, @@ -1424,9 +1590,9 @@ export class KubeLocalSubjectAccessReview extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authorization.v1.LocalSubjectAccessReview" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authorization.k8s.io/v1", - kind: "LocalSubjectAccessReview", - }; + apiVersion: 'authorization.k8s.io/v1', + kind: 'LocalSubjectAccessReview', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.LocalSubjectAccessReview". @@ -1448,11 +1614,7 @@ export class KubeLocalSubjectAccessReview extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeLocalSubjectAccessReviewProps, - ) { + public constructor(scope: Construct, id: string, props: KubeLocalSubjectAccessReviewProps) { super(scope, id, { ...KubeLocalSubjectAccessReview.GVK, ...props, @@ -1482,9 +1644,9 @@ export class KubeSelfSubjectAccessReview extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authorization.v1.SelfSubjectAccessReview" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authorization.k8s.io/v1", - kind: "SelfSubjectAccessReview", - }; + apiVersion: 'authorization.k8s.io/v1', + kind: 'SelfSubjectAccessReview', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.SelfSubjectAccessReview". @@ -1506,11 +1668,7 @@ export class KubeSelfSubjectAccessReview extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeSelfSubjectAccessReviewProps, - ) { + public constructor(scope: Construct, id: string, props: KubeSelfSubjectAccessReviewProps) { super(scope, id, { ...KubeSelfSubjectAccessReview.GVK, ...props, @@ -1540,9 +1698,9 @@ export class KubeSelfSubjectRulesReview extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authorization.v1.SelfSubjectRulesReview" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authorization.k8s.io/v1", - kind: "SelfSubjectRulesReview", - }; + apiVersion: 'authorization.k8s.io/v1', + kind: 'SelfSubjectRulesReview', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.SelfSubjectRulesReview". @@ -1564,11 +1722,7 @@ export class KubeSelfSubjectRulesReview extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeSelfSubjectRulesReviewProps, - ) { + public constructor(scope: Construct, id: string, props: KubeSelfSubjectRulesReviewProps) { super(scope, id, { ...KubeSelfSubjectRulesReview.GVK, ...props, @@ -1598,9 +1752,9 @@ export class KubeSubjectAccessReview extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.authorization.v1.SubjectAccessReview" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "authorization.k8s.io/v1", - kind: "SubjectAccessReview", - }; + apiVersion: 'authorization.k8s.io/v1', + kind: 'SubjectAccessReview', + } /** * Renders a Kubernetes manifest for "io.k8s.api.authorization.v1.SubjectAccessReview". @@ -1622,11 +1776,7 @@ export class KubeSubjectAccessReview extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeSubjectAccessReviewProps, - ) { + public constructor(scope: Construct, id: string, props: KubeSubjectAccessReviewProps) { super(scope, id, { ...KubeSubjectAccessReview.GVK, ...props, @@ -1656,9 +1806,9 @@ export class KubeHorizontalPodAutoscaler extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "autoscaling/v1", - kind: "HorizontalPodAutoscaler", - }; + apiVersion: 'autoscaling/v1', + kind: 'HorizontalPodAutoscaler', + } /** * Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler". @@ -1680,11 +1830,7 @@ export class KubeHorizontalPodAutoscaler extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeHorizontalPodAutoscalerProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeHorizontalPodAutoscalerProps = {}) { super(scope, id, { ...KubeHorizontalPodAutoscaler.GVK, ...props, @@ -1714,9 +1860,9 @@ export class KubeHorizontalPodAutoscalerList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "autoscaling/v1", - kind: "HorizontalPodAutoscalerList", - }; + apiVersion: 'autoscaling/v1', + kind: 'HorizontalPodAutoscalerList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList". @@ -1738,11 +1884,7 @@ export class KubeHorizontalPodAutoscalerList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeHorizontalPodAutoscalerListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeHorizontalPodAutoscalerListProps) { super(scope, id, { ...KubeHorizontalPodAutoscalerList.GVK, ...props, @@ -1772,9 +1914,9 @@ export class KubeScale extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.autoscaling.v1.Scale" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "autoscaling/v1", - kind: "Scale", - }; + apiVersion: 'autoscaling/v1', + kind: 'Scale', + } /** * Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v1.Scale". @@ -1826,9 +1968,9 @@ export class KubeHorizontalPodAutoscalerV2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "autoscaling/v2", - kind: "HorizontalPodAutoscaler", - }; + apiVersion: 'autoscaling/v2', + kind: 'HorizontalPodAutoscaler', + } /** * Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler". @@ -1850,11 +1992,7 @@ export class KubeHorizontalPodAutoscalerV2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeHorizontalPodAutoscalerV2Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeHorizontalPodAutoscalerV2Props = {}) { super(scope, id, { ...KubeHorizontalPodAutoscalerV2.GVK, ...props, @@ -1884,9 +2022,9 @@ export class KubeHorizontalPodAutoscalerListV2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "autoscaling/v2", - kind: "HorizontalPodAutoscalerList", - }; + apiVersion: 'autoscaling/v2', + kind: 'HorizontalPodAutoscalerList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList". @@ -1908,11 +2046,7 @@ export class KubeHorizontalPodAutoscalerListV2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeHorizontalPodAutoscalerListV2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeHorizontalPodAutoscalerListV2Props) { super(scope, id, { ...KubeHorizontalPodAutoscalerListV2.GVK, ...props, @@ -1942,9 +2076,9 @@ export class KubeCronJob extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.batch.v1.CronJob" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "batch/v1", - kind: "CronJob", - }; + apiVersion: 'batch/v1', + kind: 'CronJob', + } /** * Renders a Kubernetes manifest for "io.k8s.api.batch.v1.CronJob". @@ -1966,11 +2100,7 @@ export class KubeCronJob extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCronJobProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeCronJobProps = {}) { super(scope, id, { ...KubeCronJob.GVK, ...props, @@ -2000,9 +2130,9 @@ export class KubeCronJobList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.batch.v1.CronJobList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "batch/v1", - kind: "CronJobList", - }; + apiVersion: 'batch/v1', + kind: 'CronJobList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.batch.v1.CronJobList". @@ -2024,11 +2154,7 @@ export class KubeCronJobList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCronJobListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCronJobListProps) { super(scope, id, { ...KubeCronJobList.GVK, ...props, @@ -2058,9 +2184,9 @@ export class KubeJob extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.batch.v1.Job" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "batch/v1", - kind: "Job", - }; + apiVersion: 'batch/v1', + kind: 'Job', + } /** * Renders a Kubernetes manifest for "io.k8s.api.batch.v1.Job". @@ -2112,9 +2238,9 @@ export class KubeJobList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.batch.v1.JobList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "batch/v1", - kind: "JobList", - }; + apiVersion: 'batch/v1', + kind: 'JobList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.batch.v1.JobList". @@ -2172,9 +2298,9 @@ export class KubeCertificateSigningRequest extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.certificates.v1.CertificateSigningRequest" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "certificates.k8s.io/v1", - kind: "CertificateSigningRequest", - }; + apiVersion: 'certificates.k8s.io/v1', + kind: 'CertificateSigningRequest', + } /** * Renders a Kubernetes manifest for "io.k8s.api.certificates.v1.CertificateSigningRequest". @@ -2196,11 +2322,7 @@ export class KubeCertificateSigningRequest extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCertificateSigningRequestProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCertificateSigningRequestProps) { super(scope, id, { ...KubeCertificateSigningRequest.GVK, ...props, @@ -2230,9 +2352,9 @@ export class KubeCertificateSigningRequestList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.certificates.v1.CertificateSigningRequestList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "certificates.k8s.io/v1", - kind: "CertificateSigningRequestList", - }; + apiVersion: 'certificates.k8s.io/v1', + kind: 'CertificateSigningRequestList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.certificates.v1.CertificateSigningRequestList". @@ -2254,11 +2376,7 @@ export class KubeCertificateSigningRequestList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCertificateSigningRequestListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCertificateSigningRequestListProps) { super(scope, id, { ...KubeCertificateSigningRequestList.GVK, ...props, @@ -2292,9 +2410,9 @@ export class KubeClusterTrustBundleV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.certificates.v1alpha1.ClusterTrustBundle" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "certificates.k8s.io/v1alpha1", - kind: "ClusterTrustBundle", - }; + apiVersion: 'certificates.k8s.io/v1alpha1', + kind: 'ClusterTrustBundle', + } /** * Renders a Kubernetes manifest for "io.k8s.api.certificates.v1alpha1.ClusterTrustBundle". @@ -2316,11 +2434,7 @@ export class KubeClusterTrustBundleV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterTrustBundleV1Alpha1Props, - ) { + public constructor(scope: Construct, id: string, props: KubeClusterTrustBundleV1Alpha1Props) { super(scope, id, { ...KubeClusterTrustBundleV1Alpha1.GVK, ...props, @@ -2350,9 +2464,9 @@ export class KubeClusterTrustBundleListV1Alpha1 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "certificates.k8s.io/v1alpha1", - kind: "ClusterTrustBundleList", - }; + apiVersion: 'certificates.k8s.io/v1alpha1', + kind: 'ClusterTrustBundleList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList". @@ -2374,11 +2488,7 @@ export class KubeClusterTrustBundleListV1Alpha1 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterTrustBundleListV1Alpha1Props, - ) { + public constructor(scope: Construct, id: string, props: KubeClusterTrustBundleListV1Alpha1Props) { super(scope, id, { ...KubeClusterTrustBundleListV1Alpha1.GVK, ...props, @@ -2408,9 +2518,9 @@ export class KubeLease extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.coordination.v1.Lease" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "coordination.k8s.io/v1", - kind: "Lease", - }; + apiVersion: 'coordination.k8s.io/v1', + kind: 'Lease', + } /** * Renders a Kubernetes manifest for "io.k8s.api.coordination.v1.Lease". @@ -2462,9 +2572,9 @@ export class KubeLeaseList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.coordination.v1.LeaseList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "coordination.k8s.io/v1", - kind: "LeaseList", - }; + apiVersion: 'coordination.k8s.io/v1', + kind: 'LeaseList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.coordination.v1.LeaseList". @@ -2516,9 +2626,9 @@ export class KubeBinding extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.Binding" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Binding", - }; + apiVersion: 'v1', + kind: 'Binding', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.Binding". @@ -2570,9 +2680,9 @@ export class KubeComponentStatus extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ComponentStatus" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ComponentStatus", - }; + apiVersion: 'v1', + kind: 'ComponentStatus', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ComponentStatus". @@ -2594,11 +2704,7 @@ export class KubeComponentStatus extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeComponentStatusProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeComponentStatusProps = {}) { super(scope, id, { ...KubeComponentStatus.GVK, ...props, @@ -2628,9 +2734,9 @@ export class KubeComponentStatusList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ComponentStatusList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ComponentStatusList", - }; + apiVersion: 'v1', + kind: 'ComponentStatusList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ComponentStatusList". @@ -2652,11 +2758,7 @@ export class KubeComponentStatusList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeComponentStatusListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeComponentStatusListProps) { super(scope, id, { ...KubeComponentStatusList.GVK, ...props, @@ -2686,9 +2788,9 @@ export class KubeConfigMap extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ConfigMap" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ConfigMap", - }; + apiVersion: 'v1', + kind: 'ConfigMap', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ConfigMap". @@ -2710,11 +2812,7 @@ export class KubeConfigMap extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeConfigMapProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeConfigMapProps = {}) { super(scope, id, { ...KubeConfigMap.GVK, ...props, @@ -2744,9 +2842,9 @@ export class KubeConfigMapList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ConfigMapList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ConfigMapList", - }; + apiVersion: 'v1', + kind: 'ConfigMapList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ConfigMapList". @@ -2768,11 +2866,7 @@ export class KubeConfigMapList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeConfigMapListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeConfigMapListProps) { super(scope, id, { ...KubeConfigMapList.GVK, ...props, @@ -2814,9 +2908,9 @@ export class KubeEndpoints extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.Endpoints" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Endpoints", - }; + apiVersion: 'v1', + kind: 'Endpoints', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.Endpoints". @@ -2838,11 +2932,7 @@ export class KubeEndpoints extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeEndpointsProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeEndpointsProps = {}) { super(scope, id, { ...KubeEndpoints.GVK, ...props, @@ -2872,9 +2962,9 @@ export class KubeEndpointsList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.EndpointsList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "EndpointsList", - }; + apiVersion: 'v1', + kind: 'EndpointsList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.EndpointsList". @@ -2896,11 +2986,7 @@ export class KubeEndpointsList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeEndpointsListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeEndpointsListProps) { super(scope, id, { ...KubeEndpointsList.GVK, ...props, @@ -2930,9 +3016,9 @@ export class KubeEvent extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.events.v1.Event" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "events.k8s.io/v1", - kind: "Event", - }; + apiVersion: 'events.k8s.io/v1', + kind: 'Event', + } /** * Renders a Kubernetes manifest for "io.k8s.api.events.v1.Event". @@ -2984,9 +3070,9 @@ export class KubeEventList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.events.v1.EventList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "events.k8s.io/v1", - kind: "EventList", - }; + apiVersion: 'events.k8s.io/v1', + kind: 'EventList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.events.v1.EventList". @@ -3038,9 +3124,9 @@ export class KubeLimitRange extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.LimitRange" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "LimitRange", - }; + apiVersion: 'v1', + kind: 'LimitRange', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.LimitRange". @@ -3062,11 +3148,7 @@ export class KubeLimitRange extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeLimitRangeProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeLimitRangeProps = {}) { super(scope, id, { ...KubeLimitRange.GVK, ...props, @@ -3096,9 +3178,9 @@ export class KubeLimitRangeList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.LimitRangeList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "LimitRangeList", - }; + apiVersion: 'v1', + kind: 'LimitRangeList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.LimitRangeList". @@ -3120,11 +3202,7 @@ export class KubeLimitRangeList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeLimitRangeListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeLimitRangeListProps) { super(scope, id, { ...KubeLimitRangeList.GVK, ...props, @@ -3154,9 +3232,9 @@ export class KubeNamespace extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.Namespace" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Namespace", - }; + apiVersion: 'v1', + kind: 'Namespace', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.Namespace". @@ -3178,11 +3256,7 @@ export class KubeNamespace extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeNamespaceProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeNamespaceProps = {}) { super(scope, id, { ...KubeNamespace.GVK, ...props, @@ -3212,9 +3286,9 @@ export class KubeNamespaceList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.NamespaceList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "NamespaceList", - }; + apiVersion: 'v1', + kind: 'NamespaceList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.NamespaceList". @@ -3236,11 +3310,7 @@ export class KubeNamespaceList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeNamespaceListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeNamespaceListProps) { super(scope, id, { ...KubeNamespaceList.GVK, ...props, @@ -3270,9 +3340,9 @@ export class KubeNode extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.Node" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Node", - }; + apiVersion: 'v1', + kind: 'Node', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.Node". @@ -3324,9 +3394,9 @@ export class KubeNodeList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.NodeList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "NodeList", - }; + apiVersion: 'v1', + kind: 'NodeList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.NodeList". @@ -3378,9 +3448,9 @@ export class KubePersistentVolume extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.PersistentVolume" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "PersistentVolume", - }; + apiVersion: 'v1', + kind: 'PersistentVolume', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolume". @@ -3402,11 +3472,7 @@ export class KubePersistentVolume extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePersistentVolumeProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubePersistentVolumeProps = {}) { super(scope, id, { ...KubePersistentVolume.GVK, ...props, @@ -3436,9 +3502,9 @@ export class KubePersistentVolumeClaim extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.PersistentVolumeClaim" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "PersistentVolumeClaim", - }; + apiVersion: 'v1', + kind: 'PersistentVolumeClaim', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolumeClaim". @@ -3460,11 +3526,7 @@ export class KubePersistentVolumeClaim extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePersistentVolumeClaimProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubePersistentVolumeClaimProps = {}) { super(scope, id, { ...KubePersistentVolumeClaim.GVK, ...props, @@ -3494,9 +3556,9 @@ export class KubePersistentVolumeClaimList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.PersistentVolumeClaimList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "PersistentVolumeClaimList", - }; + apiVersion: 'v1', + kind: 'PersistentVolumeClaimList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolumeClaimList". @@ -3518,11 +3580,7 @@ export class KubePersistentVolumeClaimList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePersistentVolumeClaimListProps, - ) { + public constructor(scope: Construct, id: string, props: KubePersistentVolumeClaimListProps) { super(scope, id, { ...KubePersistentVolumeClaimList.GVK, ...props, @@ -3552,9 +3610,9 @@ export class KubePersistentVolumeList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.PersistentVolumeList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "PersistentVolumeList", - }; + apiVersion: 'v1', + kind: 'PersistentVolumeList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.PersistentVolumeList". @@ -3576,11 +3634,7 @@ export class KubePersistentVolumeList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePersistentVolumeListProps, - ) { + public constructor(scope: Construct, id: string, props: KubePersistentVolumeListProps) { super(scope, id, { ...KubePersistentVolumeList.GVK, ...props, @@ -3610,9 +3664,9 @@ export class KubePod extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.Pod" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Pod", - }; + apiVersion: 'v1', + kind: 'Pod', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.Pod". @@ -3664,9 +3718,9 @@ export class KubePodList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.PodList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "PodList", - }; + apiVersion: 'v1', + kind: 'PodList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.PodList". @@ -3718,9 +3772,9 @@ export class KubePodTemplate extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.PodTemplate" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "PodTemplate", - }; + apiVersion: 'v1', + kind: 'PodTemplate', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.PodTemplate". @@ -3742,11 +3796,7 @@ export class KubePodTemplate extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePodTemplateProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubePodTemplateProps = {}) { super(scope, id, { ...KubePodTemplate.GVK, ...props, @@ -3776,9 +3826,9 @@ export class KubePodTemplateList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.PodTemplateList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "PodTemplateList", - }; + apiVersion: 'v1', + kind: 'PodTemplateList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.PodTemplateList". @@ -3800,11 +3850,7 @@ export class KubePodTemplateList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePodTemplateListProps, - ) { + public constructor(scope: Construct, id: string, props: KubePodTemplateListProps) { super(scope, id, { ...KubePodTemplateList.GVK, ...props, @@ -3834,9 +3880,9 @@ export class KubeReplicationController extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ReplicationController" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ReplicationController", - }; + apiVersion: 'v1', + kind: 'ReplicationController', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ReplicationController". @@ -3858,11 +3904,7 @@ export class KubeReplicationController extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeReplicationControllerProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeReplicationControllerProps = {}) { super(scope, id, { ...KubeReplicationController.GVK, ...props, @@ -3892,9 +3934,9 @@ export class KubeReplicationControllerList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ReplicationControllerList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ReplicationControllerList", - }; + apiVersion: 'v1', + kind: 'ReplicationControllerList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ReplicationControllerList". @@ -3916,11 +3958,7 @@ export class KubeReplicationControllerList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeReplicationControllerListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeReplicationControllerListProps) { super(scope, id, { ...KubeReplicationControllerList.GVK, ...props, @@ -3950,9 +3988,9 @@ export class KubeResourceQuota extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ResourceQuota" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ResourceQuota", - }; + apiVersion: 'v1', + kind: 'ResourceQuota', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ResourceQuota". @@ -3974,11 +4012,7 @@ export class KubeResourceQuota extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceQuotaProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceQuotaProps = {}) { super(scope, id, { ...KubeResourceQuota.GVK, ...props, @@ -4008,9 +4042,9 @@ export class KubeResourceQuotaList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ResourceQuotaList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ResourceQuotaList", - }; + apiVersion: 'v1', + kind: 'ResourceQuotaList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ResourceQuotaList". @@ -4032,11 +4066,7 @@ export class KubeResourceQuotaList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceQuotaListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceQuotaListProps) { super(scope, id, { ...KubeResourceQuotaList.GVK, ...props, @@ -4066,9 +4096,9 @@ export class KubeSecret extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.Secret" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Secret", - }; + apiVersion: 'v1', + kind: 'Secret', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.Secret". @@ -4090,11 +4120,7 @@ export class KubeSecret extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeSecretProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeSecretProps = {}) { super(scope, id, { ...KubeSecret.GVK, ...props, @@ -4124,9 +4150,9 @@ export class KubeSecretList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.SecretList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "SecretList", - }; + apiVersion: 'v1', + kind: 'SecretList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.SecretList". @@ -4178,9 +4204,9 @@ export class KubeService extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.Service" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Service", - }; + apiVersion: 'v1', + kind: 'Service', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.Service". @@ -4202,11 +4228,7 @@ export class KubeService extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeServiceProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeServiceProps = {}) { super(scope, id, { ...KubeService.GVK, ...props, @@ -4236,9 +4258,9 @@ export class KubeServiceAccount extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ServiceAccount" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ServiceAccount", - }; + apiVersion: 'v1', + kind: 'ServiceAccount', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceAccount". @@ -4260,11 +4282,7 @@ export class KubeServiceAccount extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeServiceAccountProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeServiceAccountProps = {}) { super(scope, id, { ...KubeServiceAccount.GVK, ...props, @@ -4294,9 +4312,9 @@ export class KubeServiceAccountList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ServiceAccountList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ServiceAccountList", - }; + apiVersion: 'v1', + kind: 'ServiceAccountList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceAccountList". @@ -4318,11 +4336,7 @@ export class KubeServiceAccountList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeServiceAccountListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeServiceAccountListProps) { super(scope, id, { ...KubeServiceAccountList.GVK, ...props, @@ -4352,9 +4366,9 @@ export class KubeServiceList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.core.v1.ServiceList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "ServiceList", - }; + apiVersion: 'v1', + kind: 'ServiceList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.core.v1.ServiceList". @@ -4376,11 +4390,7 @@ export class KubeServiceList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeServiceListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeServiceListProps) { super(scope, id, { ...KubeServiceList.GVK, ...props, @@ -4410,9 +4420,9 @@ export class KubeEndpointSlice extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.discovery.v1.EndpointSlice" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "discovery.k8s.io/v1", - kind: "EndpointSlice", - }; + apiVersion: 'discovery.k8s.io/v1', + kind: 'EndpointSlice', + } /** * Renders a Kubernetes manifest for "io.k8s.api.discovery.v1.EndpointSlice". @@ -4434,11 +4444,7 @@ export class KubeEndpointSlice extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeEndpointSliceProps, - ) { + public constructor(scope: Construct, id: string, props: KubeEndpointSliceProps) { super(scope, id, { ...KubeEndpointSlice.GVK, ...props, @@ -4468,9 +4474,9 @@ export class KubeEndpointSliceList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.discovery.v1.EndpointSliceList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "discovery.k8s.io/v1", - kind: "EndpointSliceList", - }; + apiVersion: 'discovery.k8s.io/v1', + kind: 'EndpointSliceList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.discovery.v1.EndpointSliceList". @@ -4492,11 +4498,7 @@ export class KubeEndpointSliceList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeEndpointSliceListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeEndpointSliceListProps) { super(scope, id, { ...KubeEndpointSliceList.GVK, ...props, @@ -4519,44 +4521,40 @@ export class KubeEndpointSliceList extends ApiObject { /** * FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchema + * @schema io.k8s.api.flowcontrol.v1.FlowSchema */ -export class KubeFlowSchemaV1Beta2 extends ApiObject { +export class KubeFlowSchema extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta2.FlowSchema" + * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1.FlowSchema" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta2", - kind: "FlowSchema", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1', + kind: 'FlowSchema', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta2.FlowSchema". + * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1.FlowSchema". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest(props: KubeFlowSchemaV1Beta2Props = {}): any { + public static manifest(props: KubeFlowSchemaProps = {}): any { return { - ...KubeFlowSchemaV1Beta2.GVK, - ...toJson_KubeFlowSchemaV1Beta2Props(props), + ...KubeFlowSchema.GVK, + ...toJson_KubeFlowSchemaProps(props), }; } /** - * Defines a "io.k8s.api.flowcontrol.v1beta2.FlowSchema" API object + * Defines a "io.k8s.api.flowcontrol.v1.FlowSchema" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeFlowSchemaV1Beta2Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeFlowSchemaProps = {}) { super(scope, id, { - ...KubeFlowSchemaV1Beta2.GVK, + ...KubeFlowSchema.GVK, ...props, }); } @@ -4568,8 +4566,8 @@ export class KubeFlowSchemaV1Beta2 extends ApiObject { const resolved = super.toJson(); return { - ...KubeFlowSchemaV1Beta2.GVK, - ...toJson_KubeFlowSchemaV1Beta2Props(resolved), + ...KubeFlowSchema.GVK, + ...toJson_KubeFlowSchemaProps(resolved), }; } } @@ -4577,44 +4575,40 @@ export class KubeFlowSchemaV1Beta2 extends ApiObject { /** * FlowSchemaList is a list of FlowSchema objects. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaList + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaList */ -export class KubeFlowSchemaListV1Beta2 extends ApiObject { +export class KubeFlowSchemaList extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta2.FlowSchemaList" + * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1.FlowSchemaList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta2", - kind: "FlowSchemaList", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1', + kind: 'FlowSchemaList', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta2.FlowSchemaList". + * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1.FlowSchemaList". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest(props: KubeFlowSchemaListV1Beta2Props): any { + public static manifest(props: KubeFlowSchemaListProps): any { return { - ...KubeFlowSchemaListV1Beta2.GVK, - ...toJson_KubeFlowSchemaListV1Beta2Props(props), + ...KubeFlowSchemaList.GVK, + ...toJson_KubeFlowSchemaListProps(props), }; } /** - * Defines a "io.k8s.api.flowcontrol.v1beta2.FlowSchemaList" API object + * Defines a "io.k8s.api.flowcontrol.v1.FlowSchemaList" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeFlowSchemaListV1Beta2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeFlowSchemaListProps) { super(scope, id, { - ...KubeFlowSchemaListV1Beta2.GVK, + ...KubeFlowSchemaList.GVK, ...props, }); } @@ -4626,8 +4620,8 @@ export class KubeFlowSchemaListV1Beta2 extends ApiObject { const resolved = super.toJson(); return { - ...KubeFlowSchemaListV1Beta2.GVK, - ...toJson_KubeFlowSchemaListV1Beta2Props(resolved), + ...KubeFlowSchemaList.GVK, + ...toJson_KubeFlowSchemaListProps(resolved), }; } } @@ -4635,46 +4629,40 @@ export class KubeFlowSchemaListV1Beta2 extends ApiObject { /** * PriorityLevelConfiguration represents the configuration of a priority level. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration */ -export class KubePriorityLevelConfigurationV1Beta2 extends ApiObject { +export class KubePriorityLevelConfiguration extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration" + * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta2", - kind: "PriorityLevelConfiguration", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1', + kind: 'PriorityLevelConfiguration', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration". + * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest( - props: KubePriorityLevelConfigurationV1Beta2Props = {}, - ): any { + public static manifest(props: KubePriorityLevelConfigurationProps = {}): any { return { - ...KubePriorityLevelConfigurationV1Beta2.GVK, - ...toJson_KubePriorityLevelConfigurationV1Beta2Props(props), + ...KubePriorityLevelConfiguration.GVK, + ...toJson_KubePriorityLevelConfigurationProps(props), }; } /** - * Defines a "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration" API object + * Defines a "io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePriorityLevelConfigurationV1Beta2Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubePriorityLevelConfigurationProps = {}) { super(scope, id, { - ...KubePriorityLevelConfigurationV1Beta2.GVK, + ...KubePriorityLevelConfiguration.GVK, ...props, }); } @@ -4686,8 +4674,8 @@ export class KubePriorityLevelConfigurationV1Beta2 extends ApiObject { const resolved = super.toJson(); return { - ...KubePriorityLevelConfigurationV1Beta2.GVK, - ...toJson_KubePriorityLevelConfigurationV1Beta2Props(resolved), + ...KubePriorityLevelConfiguration.GVK, + ...toJson_KubePriorityLevelConfigurationProps(resolved), }; } } @@ -4695,46 +4683,40 @@ export class KubePriorityLevelConfigurationV1Beta2 extends ApiObject { /** * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList */ -export class KubePriorityLevelConfigurationListV1Beta2 extends ApiObject { +export class KubePriorityLevelConfigurationList extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList" + * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta2", - kind: "PriorityLevelConfigurationList", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1', + kind: 'PriorityLevelConfigurationList', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList". + * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest( - props: KubePriorityLevelConfigurationListV1Beta2Props, - ): any { + public static manifest(props: KubePriorityLevelConfigurationListProps): any { return { - ...KubePriorityLevelConfigurationListV1Beta2.GVK, - ...toJson_KubePriorityLevelConfigurationListV1Beta2Props(props), + ...KubePriorityLevelConfigurationList.GVK, + ...toJson_KubePriorityLevelConfigurationListProps(props), }; } /** - * Defines a "io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList" API object + * Defines a "io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePriorityLevelConfigurationListV1Beta2Props, - ) { + public constructor(scope: Construct, id: string, props: KubePriorityLevelConfigurationListProps) { super(scope, id, { - ...KubePriorityLevelConfigurationListV1Beta2.GVK, + ...KubePriorityLevelConfigurationList.GVK, ...props, }); } @@ -4746,8 +4728,8 @@ export class KubePriorityLevelConfigurationListV1Beta2 extends ApiObject { const resolved = super.toJson(); return { - ...KubePriorityLevelConfigurationListV1Beta2.GVK, - ...toJson_KubePriorityLevelConfigurationListV1Beta2Props(resolved), + ...KubePriorityLevelConfigurationList.GVK, + ...toJson_KubePriorityLevelConfigurationListProps(resolved), }; } } @@ -4762,9 +4744,9 @@ export class KubeFlowSchemaV1Beta3 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta3.FlowSchema" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta3", - kind: "FlowSchema", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1beta3', + kind: 'FlowSchema', + } /** * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta3.FlowSchema". @@ -4786,11 +4768,7 @@ export class KubeFlowSchemaV1Beta3 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeFlowSchemaV1Beta3Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeFlowSchemaV1Beta3Props = {}) { super(scope, id, { ...KubeFlowSchemaV1Beta3.GVK, ...props, @@ -4820,9 +4798,9 @@ export class KubeFlowSchemaListV1Beta3 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta3.FlowSchemaList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta3", - kind: "FlowSchemaList", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1beta3', + kind: 'FlowSchemaList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta3.FlowSchemaList". @@ -4844,11 +4822,7 @@ export class KubeFlowSchemaListV1Beta3 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeFlowSchemaListV1Beta3Props, - ) { + public constructor(scope: Construct, id: string, props: KubeFlowSchemaListV1Beta3Props) { super(scope, id, { ...KubeFlowSchemaListV1Beta3.GVK, ...props, @@ -4878,9 +4852,9 @@ export class KubePriorityLevelConfigurationV1Beta3 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta3", - kind: "PriorityLevelConfiguration", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1beta3', + kind: 'PriorityLevelConfiguration', + } /** * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration". @@ -4889,9 +4863,7 @@ export class KubePriorityLevelConfigurationV1Beta3 extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubePriorityLevelConfigurationV1Beta3Props = {}, - ): any { + public static manifest(props: KubePriorityLevelConfigurationV1Beta3Props = {}): any { return { ...KubePriorityLevelConfigurationV1Beta3.GVK, ...toJson_KubePriorityLevelConfigurationV1Beta3Props(props), @@ -4904,11 +4876,7 @@ export class KubePriorityLevelConfigurationV1Beta3 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePriorityLevelConfigurationV1Beta3Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubePriorityLevelConfigurationV1Beta3Props = {}) { super(scope, id, { ...KubePriorityLevelConfigurationV1Beta3.GVK, ...props, @@ -4938,9 +4906,9 @@ export class KubePriorityLevelConfigurationListV1Beta3 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "flowcontrol.apiserver.k8s.io/v1beta3", - kind: "PriorityLevelConfigurationList", - }; + apiVersion: 'flowcontrol.apiserver.k8s.io/v1beta3', + kind: 'PriorityLevelConfigurationList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList". @@ -4949,9 +4917,7 @@ export class KubePriorityLevelConfigurationListV1Beta3 extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubePriorityLevelConfigurationListV1Beta3Props, - ): any { + public static manifest(props: KubePriorityLevelConfigurationListV1Beta3Props): any { return { ...KubePriorityLevelConfigurationListV1Beta3.GVK, ...toJson_KubePriorityLevelConfigurationListV1Beta3Props(props), @@ -4964,11 +4930,7 @@ export class KubePriorityLevelConfigurationListV1Beta3 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePriorityLevelConfigurationListV1Beta3Props, - ) { + public constructor(scope: Construct, id: string, props: KubePriorityLevelConfigurationListV1Beta3Props) { super(scope, id, { ...KubePriorityLevelConfigurationListV1Beta3.GVK, ...props, @@ -4998,9 +4960,9 @@ export class KubeIngress extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.networking.v1.Ingress" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1", - kind: "Ingress", - }; + apiVersion: 'networking.k8s.io/v1', + kind: 'Ingress', + } /** * Renders a Kubernetes manifest for "io.k8s.api.networking.v1.Ingress". @@ -5022,11 +4984,7 @@ export class KubeIngress extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeIngressProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeIngressProps = {}) { super(scope, id, { ...KubeIngress.GVK, ...props, @@ -5056,9 +5014,9 @@ export class KubeIngressClass extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.networking.v1.IngressClass" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1", - kind: "IngressClass", - }; + apiVersion: 'networking.k8s.io/v1', + kind: 'IngressClass', + } /** * Renders a Kubernetes manifest for "io.k8s.api.networking.v1.IngressClass". @@ -5080,11 +5038,7 @@ export class KubeIngressClass extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeIngressClassProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeIngressClassProps = {}) { super(scope, id, { ...KubeIngressClass.GVK, ...props, @@ -5114,9 +5068,9 @@ export class KubeIngressClassList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.networking.v1.IngressClassList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1", - kind: "IngressClassList", - }; + apiVersion: 'networking.k8s.io/v1', + kind: 'IngressClassList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.networking.v1.IngressClassList". @@ -5138,11 +5092,7 @@ export class KubeIngressClassList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeIngressClassListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeIngressClassListProps) { super(scope, id, { ...KubeIngressClassList.GVK, ...props, @@ -5172,9 +5122,9 @@ export class KubeIngressList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.networking.v1.IngressList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1", - kind: "IngressList", - }; + apiVersion: 'networking.k8s.io/v1', + kind: 'IngressList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.networking.v1.IngressList". @@ -5196,11 +5146,7 @@ export class KubeIngressList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeIngressListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeIngressListProps) { super(scope, id, { ...KubeIngressList.GVK, ...props, @@ -5230,9 +5176,9 @@ export class KubeNetworkPolicy extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.networking.v1.NetworkPolicy" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1", - kind: "NetworkPolicy", - }; + apiVersion: 'networking.k8s.io/v1', + kind: 'NetworkPolicy', + } /** * Renders a Kubernetes manifest for "io.k8s.api.networking.v1.NetworkPolicy". @@ -5254,11 +5200,7 @@ export class KubeNetworkPolicy extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeNetworkPolicyProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeNetworkPolicyProps = {}) { super(scope, id, { ...KubeNetworkPolicy.GVK, ...props, @@ -5288,9 +5230,9 @@ export class KubeNetworkPolicyList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.networking.v1.NetworkPolicyList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1", - kind: "NetworkPolicyList", - }; + apiVersion: 'networking.k8s.io/v1', + kind: 'NetworkPolicyList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.networking.v1.NetworkPolicyList". @@ -5312,11 +5254,7 @@ export class KubeNetworkPolicyList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeNetworkPolicyListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeNetworkPolicyListProps) { super(scope, id, { ...KubeNetworkPolicyList.GVK, ...props, @@ -5337,46 +5275,42 @@ export class KubeNetworkPolicyList extends ApiObject { } /** - * ClusterCIDR represents a single configuration for per-Node Pod CIDR allocations when the MultiCIDRRangeAllocator is enabled (see the config for kube-controller-manager). A cluster may have any number of ClusterCIDR resources, all of which will be considered when allocating a CIDR for a Node. A ClusterCIDR is eligible to be used for a given Node when the node selector matches the node in question and has free CIDRs to allocate. In case of multiple matching ClusterCIDR resources, the allocator will attempt to break ties using internal heuristics, but any ClusterCIDR whose node selector matches the Node may be used. + * IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDR + * @schema io.k8s.api.networking.v1alpha1.IPAddress */ -export class KubeClusterCidrv1Alpha1 extends ApiObject { +export class KubeIpAddressV1Alpha1 extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.ClusterCIDR" + * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.IPAddress" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1alpha1", - kind: "ClusterCIDR", - }; + apiVersion: 'networking.k8s.io/v1alpha1', + kind: 'IPAddress', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.ClusterCIDR". + * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.IPAddress". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest(props: KubeClusterCidrv1Alpha1Props = {}): any { + public static manifest(props: KubeIpAddressV1Alpha1Props = {}): any { return { - ...KubeClusterCidrv1Alpha1.GVK, - ...toJson_KubeClusterCidrv1Alpha1Props(props), + ...KubeIpAddressV1Alpha1.GVK, + ...toJson_KubeIpAddressV1Alpha1Props(props), }; } /** - * Defines a "io.k8s.api.networking.v1alpha1.ClusterCIDR" API object + * Defines a "io.k8s.api.networking.v1alpha1.IPAddress" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterCidrv1Alpha1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeIpAddressV1Alpha1Props = {}) { super(scope, id, { - ...KubeClusterCidrv1Alpha1.GVK, + ...KubeIpAddressV1Alpha1.GVK, ...props, }); } @@ -5388,53 +5322,49 @@ export class KubeClusterCidrv1Alpha1 extends ApiObject { const resolved = super.toJson(); return { - ...KubeClusterCidrv1Alpha1.GVK, - ...toJson_KubeClusterCidrv1Alpha1Props(resolved), + ...KubeIpAddressV1Alpha1.GVK, + ...toJson_KubeIpAddressV1Alpha1Props(resolved), }; } } /** - * ClusterCIDRList contains a list of ClusterCIDR. + * IPAddressList contains a list of IPAddress. * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRList + * @schema io.k8s.api.networking.v1alpha1.IPAddressList */ -export class KubeClusterCidrListV1Alpha1 extends ApiObject { +export class KubeIpAddressListV1Alpha1 extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.ClusterCIDRList" + * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.IPAddressList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1alpha1", - kind: "ClusterCIDRList", - }; + apiVersion: 'networking.k8s.io/v1alpha1', + kind: 'IPAddressList', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.ClusterCIDRList". + * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.IPAddressList". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest(props: KubeClusterCidrListV1Alpha1Props): any { + public static manifest(props: KubeIpAddressListV1Alpha1Props): any { return { - ...KubeClusterCidrListV1Alpha1.GVK, - ...toJson_KubeClusterCidrListV1Alpha1Props(props), + ...KubeIpAddressListV1Alpha1.GVK, + ...toJson_KubeIpAddressListV1Alpha1Props(props), }; } /** - * Defines a "io.k8s.api.networking.v1alpha1.ClusterCIDRList" API object + * Defines a "io.k8s.api.networking.v1alpha1.IPAddressList" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterCidrListV1Alpha1Props, - ) { + public constructor(scope: Construct, id: string, props: KubeIpAddressListV1Alpha1Props) { super(scope, id, { - ...KubeClusterCidrListV1Alpha1.GVK, + ...KubeIpAddressListV1Alpha1.GVK, ...props, }); } @@ -5446,53 +5376,49 @@ export class KubeClusterCidrListV1Alpha1 extends ApiObject { const resolved = super.toJson(); return { - ...KubeClusterCidrListV1Alpha1.GVK, - ...toJson_KubeClusterCidrListV1Alpha1Props(resolved), + ...KubeIpAddressListV1Alpha1.GVK, + ...toJson_KubeIpAddressListV1Alpha1Props(resolved), }; } } /** - * IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 + * ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects. * - * @schema io.k8s.api.networking.v1alpha1.IPAddress + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDR */ -export class KubeIpAddressV1Alpha1 extends ApiObject { +export class KubeServiceCidrv1Alpha1 extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.IPAddress" + * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.ServiceCIDR" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1alpha1", - kind: "IPAddress", - }; + apiVersion: 'networking.k8s.io/v1alpha1', + kind: 'ServiceCIDR', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.IPAddress". + * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.ServiceCIDR". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest(props: KubeIpAddressV1Alpha1Props = {}): any { + public static manifest(props: KubeServiceCidrv1Alpha1Props = {}): any { return { - ...KubeIpAddressV1Alpha1.GVK, - ...toJson_KubeIpAddressV1Alpha1Props(props), + ...KubeServiceCidrv1Alpha1.GVK, + ...toJson_KubeServiceCidrv1Alpha1Props(props), }; } /** - * Defines a "io.k8s.api.networking.v1alpha1.IPAddress" API object + * Defines a "io.k8s.api.networking.v1alpha1.ServiceCIDR" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeIpAddressV1Alpha1Props = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeServiceCidrv1Alpha1Props = {}) { super(scope, id, { - ...KubeIpAddressV1Alpha1.GVK, + ...KubeServiceCidrv1Alpha1.GVK, ...props, }); } @@ -5504,53 +5430,49 @@ export class KubeIpAddressV1Alpha1 extends ApiObject { const resolved = super.toJson(); return { - ...KubeIpAddressV1Alpha1.GVK, - ...toJson_KubeIpAddressV1Alpha1Props(resolved), + ...KubeServiceCidrv1Alpha1.GVK, + ...toJson_KubeServiceCidrv1Alpha1Props(resolved), }; } } /** - * IPAddressList contains a list of IPAddress. + * ServiceCIDRList contains a list of ServiceCIDR objects. * - * @schema io.k8s.api.networking.v1alpha1.IPAddressList + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDRList */ -export class KubeIpAddressListV1Alpha1 extends ApiObject { +export class KubeServiceCidrListV1Alpha1 extends ApiObject { /** - * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.IPAddressList" + * Returns the apiVersion and kind for "io.k8s.api.networking.v1alpha1.ServiceCIDRList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "networking.k8s.io/v1alpha1", - kind: "IPAddressList", - }; + apiVersion: 'networking.k8s.io/v1alpha1', + kind: 'ServiceCIDRList', + } /** - * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.IPAddressList". + * Renders a Kubernetes manifest for "io.k8s.api.networking.v1alpha1.ServiceCIDRList". * * This can be used to inline resource manifests inside other objects (e.g. as templates). * * @param props initialization props */ - public static manifest(props: KubeIpAddressListV1Alpha1Props): any { + public static manifest(props: KubeServiceCidrListV1Alpha1Props): any { return { - ...KubeIpAddressListV1Alpha1.GVK, - ...toJson_KubeIpAddressListV1Alpha1Props(props), + ...KubeServiceCidrListV1Alpha1.GVK, + ...toJson_KubeServiceCidrListV1Alpha1Props(props), }; } /** - * Defines a "io.k8s.api.networking.v1alpha1.IPAddressList" API object + * Defines a "io.k8s.api.networking.v1alpha1.ServiceCIDRList" API object * @param scope the scope in which to define this object * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeIpAddressListV1Alpha1Props, - ) { + public constructor(scope: Construct, id: string, props: KubeServiceCidrListV1Alpha1Props) { super(scope, id, { - ...KubeIpAddressListV1Alpha1.GVK, + ...KubeServiceCidrListV1Alpha1.GVK, ...props, }); } @@ -5562,8 +5484,8 @@ export class KubeIpAddressListV1Alpha1 extends ApiObject { const resolved = super.toJson(); return { - ...KubeIpAddressListV1Alpha1.GVK, - ...toJson_KubeIpAddressListV1Alpha1Props(resolved), + ...KubeServiceCidrListV1Alpha1.GVK, + ...toJson_KubeServiceCidrListV1Alpha1Props(resolved), }; } } @@ -5578,9 +5500,9 @@ export class KubeRuntimeClass extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.node.v1.RuntimeClass" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "node.k8s.io/v1", - kind: "RuntimeClass", - }; + apiVersion: 'node.k8s.io/v1', + kind: 'RuntimeClass', + } /** * Renders a Kubernetes manifest for "io.k8s.api.node.v1.RuntimeClass". @@ -5602,11 +5524,7 @@ export class KubeRuntimeClass extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeRuntimeClassProps, - ) { + public constructor(scope: Construct, id: string, props: KubeRuntimeClassProps) { super(scope, id, { ...KubeRuntimeClass.GVK, ...props, @@ -5636,9 +5554,9 @@ export class KubeRuntimeClassList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.node.v1.RuntimeClassList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "node.k8s.io/v1", - kind: "RuntimeClassList", - }; + apiVersion: 'node.k8s.io/v1', + kind: 'RuntimeClassList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.node.v1.RuntimeClassList". @@ -5660,11 +5578,7 @@ export class KubeRuntimeClassList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeRuntimeClassListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeRuntimeClassListProps) { super(scope, id, { ...KubeRuntimeClassList.GVK, ...props, @@ -5694,9 +5608,9 @@ export class KubeEviction extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.policy.v1.Eviction" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "policy/v1", - kind: "Eviction", - }; + apiVersion: 'policy/v1', + kind: 'Eviction', + } /** * Renders a Kubernetes manifest for "io.k8s.api.policy.v1.Eviction". @@ -5718,11 +5632,7 @@ export class KubeEviction extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeEvictionProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeEvictionProps = {}) { super(scope, id, { ...KubeEviction.GVK, ...props, @@ -5752,9 +5662,9 @@ export class KubePodDisruptionBudget extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.policy.v1.PodDisruptionBudget" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "policy/v1", - kind: "PodDisruptionBudget", - }; + apiVersion: 'policy/v1', + kind: 'PodDisruptionBudget', + } /** * Renders a Kubernetes manifest for "io.k8s.api.policy.v1.PodDisruptionBudget". @@ -5776,11 +5686,7 @@ export class KubePodDisruptionBudget extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePodDisruptionBudgetProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubePodDisruptionBudgetProps = {}) { super(scope, id, { ...KubePodDisruptionBudget.GVK, ...props, @@ -5810,9 +5716,9 @@ export class KubePodDisruptionBudgetList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.policy.v1.PodDisruptionBudgetList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "policy/v1", - kind: "PodDisruptionBudgetList", - }; + apiVersion: 'policy/v1', + kind: 'PodDisruptionBudgetList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.policy.v1.PodDisruptionBudgetList". @@ -5834,11 +5740,7 @@ export class KubePodDisruptionBudgetList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePodDisruptionBudgetListProps, - ) { + public constructor(scope: Construct, id: string, props: KubePodDisruptionBudgetListProps) { super(scope, id, { ...KubePodDisruptionBudgetList.GVK, ...props, @@ -5868,9 +5770,9 @@ export class KubeClusterRole extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.ClusterRole" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "ClusterRole", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'ClusterRole', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRole". @@ -5892,11 +5794,7 @@ export class KubeClusterRole extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterRoleProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeClusterRoleProps = {}) { super(scope, id, { ...KubeClusterRole.GVK, ...props, @@ -5926,9 +5824,9 @@ export class KubeClusterRoleBinding extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.ClusterRoleBinding" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "ClusterRoleBinding", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'ClusterRoleBinding', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRoleBinding". @@ -5950,11 +5848,7 @@ export class KubeClusterRoleBinding extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterRoleBindingProps, - ) { + public constructor(scope: Construct, id: string, props: KubeClusterRoleBindingProps) { super(scope, id, { ...KubeClusterRoleBinding.GVK, ...props, @@ -5984,9 +5878,9 @@ export class KubeClusterRoleBindingList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.ClusterRoleBindingList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "ClusterRoleBindingList", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'ClusterRoleBindingList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRoleBindingList". @@ -6008,11 +5902,7 @@ export class KubeClusterRoleBindingList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterRoleBindingListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeClusterRoleBindingListProps) { super(scope, id, { ...KubeClusterRoleBindingList.GVK, ...props, @@ -6042,9 +5932,9 @@ export class KubeClusterRoleList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.ClusterRoleList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "ClusterRoleList", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'ClusterRoleList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.ClusterRoleList". @@ -6066,11 +5956,7 @@ export class KubeClusterRoleList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeClusterRoleListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeClusterRoleListProps) { super(scope, id, { ...KubeClusterRoleList.GVK, ...props, @@ -6100,9 +5986,9 @@ export class KubeRole extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.Role" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "Role", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'Role', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.Role". @@ -6154,9 +6040,9 @@ export class KubeRoleBinding extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.RoleBinding" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "RoleBinding", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'RoleBinding', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.RoleBinding". @@ -6178,11 +6064,7 @@ export class KubeRoleBinding extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeRoleBindingProps, - ) { + public constructor(scope: Construct, id: string, props: KubeRoleBindingProps) { super(scope, id, { ...KubeRoleBinding.GVK, ...props, @@ -6212,9 +6094,9 @@ export class KubeRoleBindingList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.RoleBindingList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "RoleBindingList", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'RoleBindingList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.RoleBindingList". @@ -6236,11 +6118,7 @@ export class KubeRoleBindingList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeRoleBindingListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeRoleBindingListProps) { super(scope, id, { ...KubeRoleBindingList.GVK, ...props, @@ -6270,9 +6148,9 @@ export class KubeRoleList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.rbac.v1.RoleList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "rbac.authorization.k8s.io/v1", - kind: "RoleList", - }; + apiVersion: 'rbac.authorization.k8s.io/v1', + kind: 'RoleList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.rbac.v1.RoleList". @@ -6326,9 +6204,9 @@ export class KubePodSchedulingContextV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.PodSchedulingContext" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "PodSchedulingContext", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'PodSchedulingContext', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.PodSchedulingContext". @@ -6350,11 +6228,7 @@ export class KubePodSchedulingContextV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePodSchedulingContextV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubePodSchedulingContextV1Alpha2Props) { super(scope, id, { ...KubePodSchedulingContextV1Alpha2.GVK, ...props, @@ -6384,9 +6258,9 @@ export class KubePodSchedulingContextListV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.PodSchedulingContextList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "PodSchedulingContextList", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'PodSchedulingContextList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.PodSchedulingContextList". @@ -6395,9 +6269,7 @@ export class KubePodSchedulingContextListV1Alpha2 extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubePodSchedulingContextListV1Alpha2Props, - ): any { + public static manifest(props: KubePodSchedulingContextListV1Alpha2Props): any { return { ...KubePodSchedulingContextListV1Alpha2.GVK, ...toJson_KubePodSchedulingContextListV1Alpha2Props(props), @@ -6410,11 +6282,7 @@ export class KubePodSchedulingContextListV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePodSchedulingContextListV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubePodSchedulingContextListV1Alpha2Props) { super(scope, id, { ...KubePodSchedulingContextListV1Alpha2.GVK, ...props, @@ -6446,9 +6314,9 @@ export class KubeResourceClaimV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.ResourceClaim" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "ResourceClaim", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'ResourceClaim', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.ResourceClaim". @@ -6470,11 +6338,7 @@ export class KubeResourceClaimV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceClaimV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceClaimV1Alpha2Props) { super(scope, id, { ...KubeResourceClaimV1Alpha2.GVK, ...props, @@ -6504,9 +6368,9 @@ export class KubeResourceClaimListV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.ResourceClaimList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "ResourceClaimList", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'ResourceClaimList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.ResourceClaimList". @@ -6528,11 +6392,7 @@ export class KubeResourceClaimListV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceClaimListV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceClaimListV1Alpha2Props) { super(scope, id, { ...KubeResourceClaimListV1Alpha2.GVK, ...props, @@ -6562,9 +6422,9 @@ export class KubeResourceClaimTemplateV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.ResourceClaimTemplate" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "ResourceClaimTemplate", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'ResourceClaimTemplate', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.ResourceClaimTemplate". @@ -6586,11 +6446,7 @@ export class KubeResourceClaimTemplateV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceClaimTemplateV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceClaimTemplateV1Alpha2Props) { super(scope, id, { ...KubeResourceClaimTemplateV1Alpha2.GVK, ...props, @@ -6620,9 +6476,9 @@ export class KubeResourceClaimTemplateListV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "ResourceClaimTemplateList", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'ResourceClaimTemplateList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList". @@ -6631,9 +6487,7 @@ export class KubeResourceClaimTemplateListV1Alpha2 extends ApiObject { * * @param props initialization props */ - public static manifest( - props: KubeResourceClaimTemplateListV1Alpha2Props, - ): any { + public static manifest(props: KubeResourceClaimTemplateListV1Alpha2Props): any { return { ...KubeResourceClaimTemplateListV1Alpha2.GVK, ...toJson_KubeResourceClaimTemplateListV1Alpha2Props(props), @@ -6646,11 +6500,7 @@ export class KubeResourceClaimTemplateListV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceClaimTemplateListV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceClaimTemplateListV1Alpha2Props) { super(scope, id, { ...KubeResourceClaimTemplateListV1Alpha2.GVK, ...props, @@ -6682,9 +6532,9 @@ export class KubeResourceClassV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.ResourceClass" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "ResourceClass", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'ResourceClass', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.ResourceClass". @@ -6706,11 +6556,7 @@ export class KubeResourceClassV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceClassV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceClassV1Alpha2Props) { super(scope, id, { ...KubeResourceClassV1Alpha2.GVK, ...props, @@ -6740,9 +6586,9 @@ export class KubeResourceClassListV1Alpha2 extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.resource.v1alpha2.ResourceClassList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "resource.k8s.io/v1alpha2", - kind: "ResourceClassList", - }; + apiVersion: 'resource.k8s.io/v1alpha2', + kind: 'ResourceClassList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.resource.v1alpha2.ResourceClassList". @@ -6764,11 +6610,7 @@ export class KubeResourceClassListV1Alpha2 extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeResourceClassListV1Alpha2Props, - ) { + public constructor(scope: Construct, id: string, props: KubeResourceClassListV1Alpha2Props) { super(scope, id, { ...KubeResourceClassListV1Alpha2.GVK, ...props, @@ -6798,9 +6640,9 @@ export class KubePriorityClass extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.scheduling.v1.PriorityClass" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "scheduling.k8s.io/v1", - kind: "PriorityClass", - }; + apiVersion: 'scheduling.k8s.io/v1', + kind: 'PriorityClass', + } /** * Renders a Kubernetes manifest for "io.k8s.api.scheduling.v1.PriorityClass". @@ -6822,11 +6664,7 @@ export class KubePriorityClass extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePriorityClassProps, - ) { + public constructor(scope: Construct, id: string, props: KubePriorityClassProps) { super(scope, id, { ...KubePriorityClass.GVK, ...props, @@ -6856,9 +6694,9 @@ export class KubePriorityClassList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.scheduling.v1.PriorityClassList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "scheduling.k8s.io/v1", - kind: "PriorityClassList", - }; + apiVersion: 'scheduling.k8s.io/v1', + kind: 'PriorityClassList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.scheduling.v1.PriorityClassList". @@ -6880,11 +6718,7 @@ export class KubePriorityClassList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubePriorityClassListProps, - ) { + public constructor(scope: Construct, id: string, props: KubePriorityClassListProps) { super(scope, id, { ...KubePriorityClassList.GVK, ...props, @@ -6914,9 +6748,9 @@ export class KubeCsiDriver extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.CSIDriver" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "CSIDriver", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'CSIDriver', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIDriver". @@ -6968,9 +6802,9 @@ export class KubeCsiDriverList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.CSIDriverList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "CSIDriverList", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'CSIDriverList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIDriverList". @@ -6992,11 +6826,7 @@ export class KubeCsiDriverList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCsiDriverListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCsiDriverListProps) { super(scope, id, { ...KubeCsiDriverList.GVK, ...props, @@ -7026,9 +6856,9 @@ export class KubeCsiNode extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.CSINode" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "CSINode", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'CSINode', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSINode". @@ -7080,9 +6910,9 @@ export class KubeCsiNodeList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.CSINodeList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "CSINodeList", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'CSINodeList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSINodeList". @@ -7104,11 +6934,7 @@ export class KubeCsiNodeList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCsiNodeListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCsiNodeListProps) { super(scope, id, { ...KubeCsiNodeList.GVK, ...props, @@ -7146,9 +6972,9 @@ export class KubeCsiStorageCapacity extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.CSIStorageCapacity" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "CSIStorageCapacity", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'CSIStorageCapacity', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIStorageCapacity". @@ -7170,11 +6996,7 @@ export class KubeCsiStorageCapacity extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCsiStorageCapacityProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCsiStorageCapacityProps) { super(scope, id, { ...KubeCsiStorageCapacity.GVK, ...props, @@ -7204,9 +7026,9 @@ export class KubeCsiStorageCapacityList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.CSIStorageCapacityList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "CSIStorageCapacityList", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'CSIStorageCapacityList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.CSIStorageCapacityList". @@ -7228,11 +7050,7 @@ export class KubeCsiStorageCapacityList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCsiStorageCapacityListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCsiStorageCapacityListProps) { super(scope, id, { ...KubeCsiStorageCapacityList.GVK, ...props, @@ -7264,9 +7082,9 @@ export class KubeStorageClass extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.StorageClass" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "StorageClass", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'StorageClass', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.StorageClass". @@ -7288,11 +7106,7 @@ export class KubeStorageClass extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeStorageClassProps, - ) { + public constructor(scope: Construct, id: string, props: KubeStorageClassProps) { super(scope, id, { ...KubeStorageClass.GVK, ...props, @@ -7322,9 +7136,9 @@ export class KubeStorageClassList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.StorageClassList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "StorageClassList", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'StorageClassList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.StorageClassList". @@ -7346,11 +7160,7 @@ export class KubeStorageClassList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeStorageClassListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeStorageClassListProps) { super(scope, id, { ...KubeStorageClassList.GVK, ...props, @@ -7382,9 +7192,9 @@ export class KubeVolumeAttachment extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.VolumeAttachment" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "VolumeAttachment", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'VolumeAttachment', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.VolumeAttachment". @@ -7406,11 +7216,7 @@ export class KubeVolumeAttachment extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeVolumeAttachmentProps, - ) { + public constructor(scope: Construct, id: string, props: KubeVolumeAttachmentProps) { super(scope, id, { ...KubeVolumeAttachment.GVK, ...props, @@ -7440,9 +7246,9 @@ export class KubeVolumeAttachmentList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.api.storage.v1.VolumeAttachmentList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "storage.k8s.io/v1", - kind: "VolumeAttachmentList", - }; + apiVersion: 'storage.k8s.io/v1', + kind: 'VolumeAttachmentList', + } /** * Renders a Kubernetes manifest for "io.k8s.api.storage.v1.VolumeAttachmentList". @@ -7464,11 +7270,7 @@ export class KubeVolumeAttachmentList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeVolumeAttachmentListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeVolumeAttachmentListProps) { super(scope, id, { ...KubeVolumeAttachmentList.GVK, ...props, @@ -7489,18 +7291,126 @@ export class KubeVolumeAttachmentList extends ApiObject { } /** - * CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. + * VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning. * - * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClass + */ +export class KubeVolumeAttributesClassV1Alpha1 extends ApiObject { + /** + * Returns the apiVersion and kind for "io.k8s.api.storage.v1alpha1.VolumeAttributesClass" + */ + public static readonly GVK: GroupVersionKind = { + apiVersion: 'storage.k8s.io/v1alpha1', + kind: 'VolumeAttributesClass', + } + + /** + * Renders a Kubernetes manifest for "io.k8s.api.storage.v1alpha1.VolumeAttributesClass". + * + * This can be used to inline resource manifests inside other objects (e.g. as templates). + * + * @param props initialization props + */ + public static manifest(props: KubeVolumeAttributesClassV1Alpha1Props): any { + return { + ...KubeVolumeAttributesClassV1Alpha1.GVK, + ...toJson_KubeVolumeAttributesClassV1Alpha1Props(props), + }; + } + + /** + * Defines a "io.k8s.api.storage.v1alpha1.VolumeAttributesClass" API object + * @param scope the scope in which to define this object + * @param id a scope-local name for the object + * @param props initialization props + */ + public constructor(scope: Construct, id: string, props: KubeVolumeAttributesClassV1Alpha1Props) { + super(scope, id, { + ...KubeVolumeAttributesClassV1Alpha1.GVK, + ...props, + }); + } + + /** + * Renders the object to Kubernetes JSON. + */ + public toJson(): any { + const resolved = super.toJson(); + + return { + ...KubeVolumeAttributesClassV1Alpha1.GVK, + ...toJson_KubeVolumeAttributesClassV1Alpha1Props(resolved), + }; + } +} + +/** + * VolumeAttributesClassList is a collection of VolumeAttributesClass objects. + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClassList + */ +export class KubeVolumeAttributesClassListV1Alpha1 extends ApiObject { + /** + * Returns the apiVersion and kind for "io.k8s.api.storage.v1alpha1.VolumeAttributesClassList" + */ + public static readonly GVK: GroupVersionKind = { + apiVersion: 'storage.k8s.io/v1alpha1', + kind: 'VolumeAttributesClassList', + } + + /** + * Renders a Kubernetes manifest for "io.k8s.api.storage.v1alpha1.VolumeAttributesClassList". + * + * This can be used to inline resource manifests inside other objects (e.g. as templates). + * + * @param props initialization props + */ + public static manifest(props: KubeVolumeAttributesClassListV1Alpha1Props): any { + return { + ...KubeVolumeAttributesClassListV1Alpha1.GVK, + ...toJson_KubeVolumeAttributesClassListV1Alpha1Props(props), + }; + } + + /** + * Defines a "io.k8s.api.storage.v1alpha1.VolumeAttributesClassList" API object + * @param scope the scope in which to define this object + * @param id a scope-local name for the object + * @param props initialization props + */ + public constructor(scope: Construct, id: string, props: KubeVolumeAttributesClassListV1Alpha1Props) { + super(scope, id, { + ...KubeVolumeAttributesClassListV1Alpha1.GVK, + ...props, + }); + } + + /** + * Renders the object to Kubernetes JSON. + */ + public toJson(): any { + const resolved = super.toJson(); + + return { + ...KubeVolumeAttributesClassListV1Alpha1.GVK, + ...toJson_KubeVolumeAttributesClassListV1Alpha1Props(resolved), + }; + } +} + +/** + * CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format <.spec.name>.<.spec.group>. + * + * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition */ export class KubeCustomResourceDefinition extends ApiObject { /** * Returns the apiVersion and kind for "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apiextensions.k8s.io/v1", - kind: "CustomResourceDefinition", - }; + apiVersion: 'apiextensions.k8s.io/v1', + kind: 'CustomResourceDefinition', + } /** * Renders a Kubernetes manifest for "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition". @@ -7522,11 +7432,7 @@ export class KubeCustomResourceDefinition extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCustomResourceDefinitionProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCustomResourceDefinitionProps) { super(scope, id, { ...KubeCustomResourceDefinition.GVK, ...props, @@ -7556,9 +7462,9 @@ export class KubeCustomResourceDefinitionList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apiextensions.k8s.io/v1", - kind: "CustomResourceDefinitionList", - }; + apiVersion: 'apiextensions.k8s.io/v1', + kind: 'CustomResourceDefinitionList', + } /** * Renders a Kubernetes manifest for "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList". @@ -7580,11 +7486,7 @@ export class KubeCustomResourceDefinitionList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeCustomResourceDefinitionListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeCustomResourceDefinitionListProps) { super(scope, id, { ...KubeCustomResourceDefinitionList.GVK, ...props, @@ -7614,9 +7516,9 @@ export class KubeStatus extends ApiObject { * Returns the apiVersion and kind for "io.k8s.apimachinery.pkg.apis.meta.v1.Status" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "v1", - kind: "Status", - }; + apiVersion: 'v1', + kind: 'Status', + } /** * Renders a Kubernetes manifest for "io.k8s.apimachinery.pkg.apis.meta.v1.Status". @@ -7638,11 +7540,7 @@ export class KubeStatus extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeStatusProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeStatusProps = {}) { super(scope, id, { ...KubeStatus.GVK, ...props, @@ -7672,9 +7570,9 @@ export class KubeApiService extends ApiObject { * Returns the apiVersion and kind for "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apiregistration.k8s.io/v1", - kind: "APIService", - }; + apiVersion: 'apiregistration.k8s.io/v1', + kind: 'APIService', + } /** * Renders a Kubernetes manifest for "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService". @@ -7696,11 +7594,7 @@ export class KubeApiService extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeApiServiceProps = {}, - ) { + public constructor(scope: Construct, id: string, props: KubeApiServiceProps = {}) { super(scope, id, { ...KubeApiService.GVK, ...props, @@ -7730,9 +7624,9 @@ export class KubeApiServiceList extends ApiObject { * Returns the apiVersion and kind for "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList" */ public static readonly GVK: GroupVersionKind = { - apiVersion: "apiregistration.k8s.io/v1", - kind: "APIServiceList", - }; + apiVersion: 'apiregistration.k8s.io/v1', + kind: 'APIServiceList', + } /** * Renders a Kubernetes manifest for "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList". @@ -7754,11 +7648,7 @@ export class KubeApiServiceList extends ApiObject { * @param id a scope-local name for the object * @param props initialization props */ - public constructor( - scope: Construct, - id: string, - props: KubeApiServiceListProps, - ) { + public constructor(scope: Construct, id: string, props: KubeApiServiceListProps) { super(scope, id, { ...KubeApiServiceList.GVK, ...props, @@ -7797,27 +7687,21 @@ export interface KubeMutatingWebhookConfigurationProps { * @schema io.k8s.api.admissionregistration.v1.MutatingWebhookConfiguration#webhooks */ readonly webhooks?: MutatingWebhook[]; + } /** * Converts an object of type 'KubeMutatingWebhookConfigurationProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeMutatingWebhookConfigurationProps( - obj: KubeMutatingWebhookConfigurationProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeMutatingWebhookConfigurationProps(obj: KubeMutatingWebhookConfigurationProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - webhooks: obj.webhooks?.map((y) => toJson_MutatingWebhook(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'webhooks': obj.webhooks?.map(y => toJson_MutatingWebhook(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -7840,29 +7724,21 @@ export interface KubeMutatingWebhookConfigurationListProps { * @schema io.k8s.api.admissionregistration.v1.MutatingWebhookConfigurationList#items */ readonly items: KubeMutatingWebhookConfigurationProps[]; + } /** * Converts an object of type 'KubeMutatingWebhookConfigurationListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeMutatingWebhookConfigurationListProps( - obj: KubeMutatingWebhookConfigurationListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeMutatingWebhookConfigurationListProps(obj: KubeMutatingWebhookConfigurationListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubeMutatingWebhookConfigurationProps(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeMutatingWebhookConfigurationProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -7885,27 +7761,21 @@ export interface KubeValidatingWebhookConfigurationProps { * @schema io.k8s.api.admissionregistration.v1.ValidatingWebhookConfiguration#webhooks */ readonly webhooks?: ValidatingWebhook[]; + } /** * Converts an object of type 'KubeValidatingWebhookConfigurationProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeValidatingWebhookConfigurationProps( - obj: KubeValidatingWebhookConfigurationProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeValidatingWebhookConfigurationProps(obj: KubeValidatingWebhookConfigurationProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - webhooks: obj.webhooks?.map((y) => toJson_ValidatingWebhook(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'webhooks': obj.webhooks?.map(y => toJson_ValidatingWebhook(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -7928,29 +7798,21 @@ export interface KubeValidatingWebhookConfigurationListProps { * @schema io.k8s.api.admissionregistration.v1.ValidatingWebhookConfigurationList#items */ readonly items: KubeValidatingWebhookConfigurationProps[]; + } /** * Converts an object of type 'KubeValidatingWebhookConfigurationListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeValidatingWebhookConfigurationListProps( - obj: KubeValidatingWebhookConfigurationListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeValidatingWebhookConfigurationListProps(obj: KubeValidatingWebhookConfigurationListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubeValidatingWebhookConfigurationProps(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeValidatingWebhookConfigurationProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -7973,33 +7835,31 @@ export interface KubeValidatingAdmissionPolicyV1Alpha1Props { * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy#spec */ readonly spec?: ValidatingAdmissionPolicySpecV1Alpha1; + } /** * Converts an object of type 'KubeValidatingAdmissionPolicyV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeValidatingAdmissionPolicyV1Alpha1Props( - obj: KubeValidatingAdmissionPolicyV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeValidatingAdmissionPolicyV1Alpha1Props(obj: KubeValidatingAdmissionPolicyV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ValidatingAdmissionPolicySpecV1Alpha1(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ValidatingAdmissionPolicySpecV1Alpha1(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. * + * For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. + * + * The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. + * * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding */ export interface KubeValidatingAdmissionPolicyBindingV1Alpha1Props { @@ -8016,27 +7876,21 @@ export interface KubeValidatingAdmissionPolicyBindingV1Alpha1Props { * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding#spec */ readonly spec?: ValidatingAdmissionPolicyBindingSpecV1Alpha1; + } /** * Converts an object of type 'KubeValidatingAdmissionPolicyBindingV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeValidatingAdmissionPolicyBindingV1Alpha1Props( - obj: KubeValidatingAdmissionPolicyBindingV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeValidatingAdmissionPolicyBindingV1Alpha1Props(obj: KubeValidatingAdmissionPolicyBindingV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ValidatingAdmissionPolicyBindingSpecV1Alpha1(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ValidatingAdmissionPolicyBindingSpecV1Alpha1(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8059,29 +7913,21 @@ export interface KubeValidatingAdmissionPolicyBindingListV1Alpha1Props { * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingList#items */ readonly items?: KubeValidatingAdmissionPolicyBindingV1Alpha1Props[]; + } /** * Converts an object of type 'KubeValidatingAdmissionPolicyBindingListV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeValidatingAdmissionPolicyBindingListV1Alpha1Props( - obj: KubeValidatingAdmissionPolicyBindingListV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeValidatingAdmissionPolicyBindingListV1Alpha1Props(obj: KubeValidatingAdmissionPolicyBindingListV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubeValidatingAdmissionPolicyBindingV1Alpha1Props(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeValidatingAdmissionPolicyBindingV1Alpha1Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8104,29 +7950,173 @@ export interface KubeValidatingAdmissionPolicyListV1Alpha1Props { * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyList#items */ readonly items?: KubeValidatingAdmissionPolicyV1Alpha1Props[]; + } /** * Converts an object of type 'KubeValidatingAdmissionPolicyListV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeValidatingAdmissionPolicyListV1Alpha1Props( - obj: KubeValidatingAdmissionPolicyListV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeValidatingAdmissionPolicyListV1Alpha1Props(obj: KubeValidatingAdmissionPolicyListV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeValidatingAdmissionPolicyV1Alpha1Props(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ValidatingAdmissionPolicy describes the definition of an admission validation policy that accepts or rejects an object without changing it. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy + */ +export interface KubeValidatingAdmissionPolicyV1Beta1Props { + /** + * Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy#metadata + */ + readonly metadata?: ObjectMeta; + + /** + * Specification of the desired behavior of the ValidatingAdmissionPolicy. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy#spec + */ + readonly spec?: ValidatingAdmissionPolicySpecV1Beta1; + +} + +/** + * Converts an object of type 'KubeValidatingAdmissionPolicyV1Beta1Props' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_KubeValidatingAdmissionPolicyV1Beta1Props(obj: KubeValidatingAdmissionPolicyV1Beta1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ValidatingAdmissionPolicySpecV1Beta1(obj.spec), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ValidatingAdmissionPolicyBinding binds the ValidatingAdmissionPolicy with paramerized resources. ValidatingAdmissionPolicyBinding and parameter CRDs together define how cluster administrators configure policies for clusters. + * + * For a given admission request, each binding will cause its policy to be evaluated N times, where N is 1 for policies/bindings that don't use params, otherwise N is the number of parameters selected by the binding. + * + * The CEL expressions of a policy must have a computed CEL cost below the maximum CEL budget. Each evaluation of the policy is given an independent CEL cost budget. Adding/removing policies, bindings, or params can not affect whether a given (policy, binding, param) combination is within its own CEL budget. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding + */ +export interface KubeValidatingAdmissionPolicyBindingV1Beta1Props { + /** + * Standard object metadata; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding#metadata + */ + readonly metadata?: ObjectMeta; + + /** + * Specification of the desired behavior of the ValidatingAdmissionPolicyBinding. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding#spec + */ + readonly spec?: ValidatingAdmissionPolicyBindingSpecV1Beta1; + +} + +/** + * Converts an object of type 'KubeValidatingAdmissionPolicyBindingV1Beta1Props' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_KubeValidatingAdmissionPolicyBindingV1Beta1Props(obj: KubeValidatingAdmissionPolicyBindingV1Beta1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ValidatingAdmissionPolicyBindingSpecV1Beta1(obj.spec), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ValidatingAdmissionPolicyBindingList is a list of ValidatingAdmissionPolicyBinding. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList + */ +export interface KubeValidatingAdmissionPolicyBindingListV1Beta1Props { + /** + * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList#metadata + */ + readonly metadata?: ListMeta; + + /** + * List of PolicyBinding. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingList#items + */ + readonly items?: KubeValidatingAdmissionPolicyBindingV1Beta1Props[]; + +} + +/** + * Converts an object of type 'KubeValidatingAdmissionPolicyBindingListV1Beta1Props' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_KubeValidatingAdmissionPolicyBindingListV1Beta1Props(obj: KubeValidatingAdmissionPolicyBindingListV1Beta1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeValidatingAdmissionPolicyBindingV1Beta1Props(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ValidatingAdmissionPolicyList is a list of ValidatingAdmissionPolicy. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList + */ +export interface KubeValidatingAdmissionPolicyListV1Beta1Props { + /** + * Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList#metadata + */ + readonly metadata?: ListMeta; + + /** + * List of ValidatingAdmissionPolicy. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyList#items + */ + readonly items?: KubeValidatingAdmissionPolicyV1Beta1Props[]; + +} + +/** + * Converts an object of type 'KubeValidatingAdmissionPolicyListV1Beta1Props' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_KubeValidatingAdmissionPolicyListV1Beta1Props(obj: KubeValidatingAdmissionPolicyListV1Beta1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubeValidatingAdmissionPolicyV1Alpha1Props(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeValidatingAdmissionPolicyV1Beta1Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8149,27 +8139,21 @@ export interface KubeStorageVersionV1Alpha1Props { * @schema io.k8s.api.apiserverinternal.v1alpha1.StorageVersion#spec */ readonly spec: any; + } /** * Converts an object of type 'KubeStorageVersionV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeStorageVersionV1Alpha1Props( - obj: KubeStorageVersionV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeStorageVersionV1Alpha1Props(obj: KubeStorageVersionV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: obj.spec, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': obj.spec, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8192,27 +8176,21 @@ export interface KubeStorageVersionListV1Alpha1Props { * @schema io.k8s.api.apiserverinternal.v1alpha1.StorageVersionList#items */ readonly items: KubeStorageVersionV1Alpha1Props[]; + } /** * Converts an object of type 'KubeStorageVersionListV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeStorageVersionListV1Alpha1Props( - obj: KubeStorageVersionListV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeStorageVersionListV1Alpha1Props(obj: KubeStorageVersionListV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeStorageVersionV1Alpha1Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeStorageVersionV1Alpha1Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8242,28 +8220,22 @@ export interface KubeControllerRevisionProps { * @schema io.k8s.api.apps.v1.ControllerRevision#revision */ readonly revision: number; + } /** * Converts an object of type 'KubeControllerRevisionProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeControllerRevisionProps( - obj: KubeControllerRevisionProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeControllerRevisionProps(obj: KubeControllerRevisionProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - data: obj.data, - revision: obj.revision, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'data': obj.data, + 'revision': obj.revision, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8286,27 +8258,21 @@ export interface KubeControllerRevisionListProps { * @schema io.k8s.api.apps.v1.ControllerRevisionList#items */ readonly items: KubeControllerRevisionProps[]; + } /** * Converts an object of type 'KubeControllerRevisionListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeControllerRevisionListProps( - obj: KubeControllerRevisionListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeControllerRevisionListProps(obj: KubeControllerRevisionListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeControllerRevisionProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeControllerRevisionProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8329,27 +8295,21 @@ export interface KubeDaemonSetProps { * @schema io.k8s.api.apps.v1.DaemonSet#spec */ readonly spec?: DaemonSetSpec; + } /** * Converts an object of type 'KubeDaemonSetProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeDaemonSetProps( - obj: KubeDaemonSetProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeDaemonSetProps(obj: KubeDaemonSetProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_DaemonSetSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_DaemonSetSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8372,27 +8332,21 @@ export interface KubeDaemonSetListProps { * @schema io.k8s.api.apps.v1.DaemonSetList#items */ readonly items: KubeDaemonSetProps[]; + } /** * Converts an object of type 'KubeDaemonSetListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeDaemonSetListProps( - obj: KubeDaemonSetListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeDaemonSetListProps(obj: KubeDaemonSetListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeDaemonSetProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeDaemonSetProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8415,27 +8369,21 @@ export interface KubeDeploymentProps { * @schema io.k8s.api.apps.v1.Deployment#spec */ readonly spec?: DeploymentSpec; + } /** * Converts an object of type 'KubeDeploymentProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeDeploymentProps( - obj: KubeDeploymentProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeDeploymentProps(obj: KubeDeploymentProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_DeploymentSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_DeploymentSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8458,27 +8406,21 @@ export interface KubeDeploymentListProps { * @schema io.k8s.api.apps.v1.DeploymentList#items */ readonly items: KubeDeploymentProps[]; + } /** * Converts an object of type 'KubeDeploymentListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeDeploymentListProps( - obj: KubeDeploymentListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeDeploymentListProps(obj: KubeDeploymentListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeDeploymentProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeDeploymentProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8501,27 +8443,21 @@ export interface KubeReplicaSetProps { * @schema io.k8s.api.apps.v1.ReplicaSet#spec */ readonly spec?: ReplicaSetSpec; + } /** * Converts an object of type 'KubeReplicaSetProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeReplicaSetProps( - obj: KubeReplicaSetProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeReplicaSetProps(obj: KubeReplicaSetProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ReplicaSetSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ReplicaSetSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8544,27 +8480,21 @@ export interface KubeReplicaSetListProps { * @schema io.k8s.api.apps.v1.ReplicaSetList#items */ readonly items: KubeReplicaSetProps[]; + } /** * Converts an object of type 'KubeReplicaSetListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeReplicaSetListProps( - obj: KubeReplicaSetListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeReplicaSetListProps(obj: KubeReplicaSetListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeReplicaSetProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeReplicaSetProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8591,27 +8521,21 @@ export interface KubeStatefulSetProps { * @schema io.k8s.api.apps.v1.StatefulSet#spec */ readonly spec?: StatefulSetSpec; + } /** * Converts an object of type 'KubeStatefulSetProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeStatefulSetProps( - obj: KubeStatefulSetProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeStatefulSetProps(obj: KubeStatefulSetProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_StatefulSetSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_StatefulSetSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8634,79 +8558,96 @@ export interface KubeStatefulSetListProps { * @schema io.k8s.api.apps.v1.StatefulSetList#items */ readonly items: KubeStatefulSetProps[]; + } /** * Converts an object of type 'KubeStatefulSetListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeStatefulSetListProps( - obj: KubeStatefulSetListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeStatefulSetListProps(obj: KubeStatefulSetListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeStatefulSetProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeStatefulSetProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * TokenRequest requests a token for a given service account. + * SelfSubjectReview contains the user information that the kube-apiserver has about the user making this request. When using impersonation, users will receive the user info of the user being impersonated. If impersonation or request header authentication is used, any extra keys will have their case ignored and returned as lowercase. * - * @schema io.k8s.api.authentication.v1.TokenRequest + * @schema io.k8s.api.authentication.v1.SelfSubjectReview */ -export interface KubeTokenRequestProps { +export interface KubeSelfSubjectReviewProps { /** * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.authentication.v1.TokenRequest#metadata + * @schema io.k8s.api.authentication.v1.SelfSubjectReview#metadata */ readonly metadata?: ObjectMeta; - /** - * Spec holds information about the request being evaluated - * - * @schema io.k8s.api.authentication.v1.TokenRequest#spec - */ - readonly spec: TokenRequestSpec; } /** - * Converts an object of type 'KubeTokenRequestProps' to JSON representation. + * Converts an object of type 'KubeSelfSubjectReviewProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeTokenRequestProps( - obj: KubeTokenRequestProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSelfSubjectReviewProps(obj: KubeSelfSubjectReviewProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_TokenRequestSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. + * TokenRequest requests a token for a given service account. * - * @schema io.k8s.api.authentication.v1.TokenReview + * @schema io.k8s.api.authentication.v1.TokenRequest */ -export interface KubeTokenReviewProps { +export interface KubeTokenRequestProps { + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + * + * @schema io.k8s.api.authentication.v1.TokenRequest#metadata + */ + readonly metadata?: ObjectMeta; + + /** + * Spec holds information about the request being evaluated + * + * @schema io.k8s.api.authentication.v1.TokenRequest#spec + */ + readonly spec: TokenRequestSpec; + +} + +/** + * Converts an object of type 'KubeTokenRequestProps' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_KubeTokenRequestProps(obj: KubeTokenRequestProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_TokenRequestSpec(obj.spec), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver. + * + * @schema io.k8s.api.authentication.v1.TokenReview + */ +export interface KubeTokenReviewProps { /** * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * @@ -8720,27 +8661,21 @@ export interface KubeTokenReviewProps { * @schema io.k8s.api.authentication.v1.TokenReview#spec */ readonly spec: TokenReviewSpec; + } /** * Converts an object of type 'KubeTokenReviewProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeTokenReviewProps( - obj: KubeTokenReviewProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeTokenReviewProps(obj: KubeTokenReviewProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_TokenReviewSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_TokenReviewSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8756,26 +8691,20 @@ export interface KubeSelfSubjectReviewV1Alpha1Props { * @schema io.k8s.api.authentication.v1alpha1.SelfSubjectReview#metadata */ readonly metadata?: ObjectMeta; + } /** * Converts an object of type 'KubeSelfSubjectReviewV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeSelfSubjectReviewV1Alpha1Props( - obj: KubeSelfSubjectReviewV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSelfSubjectReviewV1Alpha1Props(obj: KubeSelfSubjectReviewV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), + 'metadata': toJson_ObjectMeta(obj.metadata), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8791,26 +8720,20 @@ export interface KubeSelfSubjectReviewV1Beta1Props { * @schema io.k8s.api.authentication.v1beta1.SelfSubjectReview#metadata */ readonly metadata?: ObjectMeta; + } /** * Converts an object of type 'KubeSelfSubjectReviewV1Beta1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeSelfSubjectReviewV1Beta1Props( - obj: KubeSelfSubjectReviewV1Beta1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSelfSubjectReviewV1Beta1Props(obj: KubeSelfSubjectReviewV1Beta1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), + 'metadata': toJson_ObjectMeta(obj.metadata), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8833,27 +8756,21 @@ export interface KubeLocalSubjectAccessReviewProps { * @schema io.k8s.api.authorization.v1.LocalSubjectAccessReview#spec */ readonly spec: SubjectAccessReviewSpec; + } /** * Converts an object of type 'KubeLocalSubjectAccessReviewProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeLocalSubjectAccessReviewProps( - obj: KubeLocalSubjectAccessReviewProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeLocalSubjectAccessReviewProps(obj: KubeLocalSubjectAccessReviewProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_SubjectAccessReviewSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_SubjectAccessReviewSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8876,27 +8793,21 @@ export interface KubeSelfSubjectAccessReviewProps { * @schema io.k8s.api.authorization.v1.SelfSubjectAccessReview#spec */ readonly spec: SelfSubjectAccessReviewSpec; + } /** * Converts an object of type 'KubeSelfSubjectAccessReviewProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeSelfSubjectAccessReviewProps( - obj: KubeSelfSubjectAccessReviewProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSelfSubjectAccessReviewProps(obj: KubeSelfSubjectAccessReviewProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_SelfSubjectAccessReviewSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_SelfSubjectAccessReviewSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8919,27 +8830,21 @@ export interface KubeSelfSubjectRulesReviewProps { * @schema io.k8s.api.authorization.v1.SelfSubjectRulesReview#spec */ readonly spec: SelfSubjectRulesReviewSpec; + } /** * Converts an object of type 'KubeSelfSubjectRulesReviewProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeSelfSubjectRulesReviewProps( - obj: KubeSelfSubjectRulesReviewProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSelfSubjectRulesReviewProps(obj: KubeSelfSubjectRulesReviewProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_SelfSubjectRulesReviewSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_SelfSubjectRulesReviewSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -8962,27 +8867,21 @@ export interface KubeSubjectAccessReviewProps { * @schema io.k8s.api.authorization.v1.SubjectAccessReview#spec */ readonly spec: SubjectAccessReviewSpec; + } /** * Converts an object of type 'KubeSubjectAccessReviewProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeSubjectAccessReviewProps( - obj: KubeSubjectAccessReviewProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSubjectAccessReviewProps(obj: KubeSubjectAccessReviewProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_SubjectAccessReviewSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_SubjectAccessReviewSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9005,27 +8904,21 @@ export interface KubeHorizontalPodAutoscalerProps { * @schema io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler#spec */ readonly spec?: HorizontalPodAutoscalerSpec; + } /** * Converts an object of type 'KubeHorizontalPodAutoscalerProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeHorizontalPodAutoscalerProps( - obj: KubeHorizontalPodAutoscalerProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeHorizontalPodAutoscalerProps(obj: KubeHorizontalPodAutoscalerProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_HorizontalPodAutoscalerSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_HorizontalPodAutoscalerSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9048,27 +8941,21 @@ export interface KubeHorizontalPodAutoscalerListProps { * @schema io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerList#items */ readonly items: KubeHorizontalPodAutoscalerProps[]; + } /** * Converts an object of type 'KubeHorizontalPodAutoscalerListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeHorizontalPodAutoscalerListProps( - obj: KubeHorizontalPodAutoscalerListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeHorizontalPodAutoscalerListProps(obj: KubeHorizontalPodAutoscalerListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeHorizontalPodAutoscalerProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeHorizontalPodAutoscalerProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9091,27 +8978,21 @@ export interface KubeScaleProps { * @schema io.k8s.api.autoscaling.v1.Scale#spec */ readonly spec?: ScaleSpec; + } /** * Converts an object of type 'KubeScaleProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeScaleProps( - obj: KubeScaleProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeScaleProps(obj: KubeScaleProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ScaleSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ScaleSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9134,27 +9015,21 @@ export interface KubeHorizontalPodAutoscalerV2Props { * @schema io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler#spec */ readonly spec?: HorizontalPodAutoscalerSpecV2; + } /** * Converts an object of type 'KubeHorizontalPodAutoscalerV2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeHorizontalPodAutoscalerV2Props( - obj: KubeHorizontalPodAutoscalerV2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeHorizontalPodAutoscalerV2Props(obj: KubeHorizontalPodAutoscalerV2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_HorizontalPodAutoscalerSpecV2(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_HorizontalPodAutoscalerSpecV2(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9177,27 +9052,21 @@ export interface KubeHorizontalPodAutoscalerListV2Props { * @schema io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerList#items */ readonly items: KubeHorizontalPodAutoscalerV2Props[]; + } /** * Converts an object of type 'KubeHorizontalPodAutoscalerListV2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeHorizontalPodAutoscalerListV2Props( - obj: KubeHorizontalPodAutoscalerListV2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeHorizontalPodAutoscalerListV2Props(obj: KubeHorizontalPodAutoscalerListV2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeHorizontalPodAutoscalerV2Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeHorizontalPodAutoscalerV2Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9220,27 +9089,21 @@ export interface KubeCronJobProps { * @schema io.k8s.api.batch.v1.CronJob#spec */ readonly spec?: CronJobSpec; + } /** * Converts an object of type 'KubeCronJobProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCronJobProps( - obj: KubeCronJobProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCronJobProps(obj: KubeCronJobProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_CronJobSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_CronJobSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9263,27 +9126,21 @@ export interface KubeCronJobListProps { * @schema io.k8s.api.batch.v1.CronJobList#items */ readonly items: KubeCronJobProps[]; + } /** * Converts an object of type 'KubeCronJobListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCronJobListProps( - obj: KubeCronJobListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCronJobListProps(obj: KubeCronJobListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeCronJobProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeCronJobProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9306,27 +9163,21 @@ export interface KubeJobProps { * @schema io.k8s.api.batch.v1.Job#spec */ readonly spec?: JobSpec; + } /** * Converts an object of type 'KubeJobProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeJobProps( - obj: KubeJobProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeJobProps(obj: KubeJobProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_JobSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_JobSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9349,27 +9200,21 @@ export interface KubeJobListProps { * @schema io.k8s.api.batch.v1.JobList#items */ readonly items: KubeJobProps[]; + } /** * Converts an object of type 'KubeJobListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeJobListProps( - obj: KubeJobListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeJobListProps(obj: KubeJobListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeJobProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeJobProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9396,27 +9241,21 @@ export interface KubeCertificateSigningRequestProps { * @schema io.k8s.api.certificates.v1.CertificateSigningRequest#spec */ readonly spec: CertificateSigningRequestSpec; + } /** * Converts an object of type 'KubeCertificateSigningRequestProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCertificateSigningRequestProps( - obj: KubeCertificateSigningRequestProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCertificateSigningRequestProps(obj: KubeCertificateSigningRequestProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_CertificateSigningRequestSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_CertificateSigningRequestSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9437,27 +9276,21 @@ export interface KubeCertificateSigningRequestListProps { * @schema io.k8s.api.certificates.v1.CertificateSigningRequestList#items */ readonly items: KubeCertificateSigningRequestProps[]; + } /** * Converts an object of type 'KubeCertificateSigningRequestListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCertificateSigningRequestListProps( - obj: KubeCertificateSigningRequestListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCertificateSigningRequestListProps(obj: KubeCertificateSigningRequestListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeCertificateSigningRequestProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeCertificateSigningRequestProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9484,27 +9317,21 @@ export interface KubeClusterTrustBundleV1Alpha1Props { * @schema io.k8s.api.certificates.v1alpha1.ClusterTrustBundle#spec */ readonly spec: ClusterTrustBundleSpecV1Alpha1; + } /** * Converts an object of type 'KubeClusterTrustBundleV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterTrustBundleV1Alpha1Props( - obj: KubeClusterTrustBundleV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeClusterTrustBundleV1Alpha1Props(obj: KubeClusterTrustBundleV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ClusterTrustBundleSpecV1Alpha1(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ClusterTrustBundleSpecV1Alpha1(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9527,27 +9354,21 @@ export interface KubeClusterTrustBundleListV1Alpha1Props { * @schema io.k8s.api.certificates.v1alpha1.ClusterTrustBundleList#items */ readonly items: KubeClusterTrustBundleV1Alpha1Props[]; + } /** * Converts an object of type 'KubeClusterTrustBundleListV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterTrustBundleListV1Alpha1Props( - obj: KubeClusterTrustBundleListV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeClusterTrustBundleListV1Alpha1Props(obj: KubeClusterTrustBundleListV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeClusterTrustBundleV1Alpha1Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeClusterTrustBundleV1Alpha1Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9570,27 +9391,21 @@ export interface KubeLeaseProps { * @schema io.k8s.api.coordination.v1.Lease#spec */ readonly spec?: LeaseSpec; + } /** * Converts an object of type 'KubeLeaseProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeLeaseProps( - obj: KubeLeaseProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeLeaseProps(obj: KubeLeaseProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_LeaseSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_LeaseSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9613,27 +9428,21 @@ export interface KubeLeaseListProps { * @schema io.k8s.api.coordination.v1.LeaseList#items */ readonly items: KubeLeaseProps[]; + } /** * Converts an object of type 'KubeLeaseListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeLeaseListProps( - obj: KubeLeaseListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeLeaseListProps(obj: KubeLeaseListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeLeaseProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeLeaseProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9656,27 +9465,21 @@ export interface KubeBindingProps { * @schema io.k8s.api.core.v1.Binding#target */ readonly target: ObjectReference; + } /** * Converts an object of type 'KubeBindingProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeBindingProps( - obj: KubeBindingProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeBindingProps(obj: KubeBindingProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - target: toJson_ObjectReference(obj.target), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'target': toJson_ObjectReference(obj.target), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9699,27 +9502,21 @@ export interface KubeComponentStatusProps { * @schema io.k8s.api.core.v1.ComponentStatus#conditions */ readonly conditions?: ComponentCondition[]; + } /** * Converts an object of type 'KubeComponentStatusProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeComponentStatusProps( - obj: KubeComponentStatusProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeComponentStatusProps(obj: KubeComponentStatusProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - conditions: obj.conditions?.map((y) => toJson_ComponentCondition(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'conditions': obj.conditions?.map(y => toJson_ComponentCondition(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9742,27 +9539,21 @@ export interface KubeComponentStatusListProps { * @schema io.k8s.api.core.v1.ComponentStatusList#items */ readonly items: KubeComponentStatusProps[]; + } /** * Converts an object of type 'KubeComponentStatusListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeComponentStatusListProps( - obj: KubeComponentStatusListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeComponentStatusListProps(obj: KubeComponentStatusListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeComponentStatusProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeComponentStatusProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9799,41 +9590,23 @@ export interface KubeConfigMapProps { * @schema io.k8s.api.core.v1.ConfigMap#immutable */ readonly immutable?: boolean; + } /** * Converts an object of type 'KubeConfigMapProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeConfigMapProps( - obj: KubeConfigMapProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeConfigMapProps(obj: KubeConfigMapProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - binaryData: - obj.binaryData === undefined - ? undefined - : Object.entries(obj.binaryData).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - data: - obj.data === undefined - ? undefined - : Object.entries(obj.data).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - immutable: obj.immutable, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'binaryData': ((obj.binaryData) === undefined) ? undefined : (Object.entries(obj.binaryData).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'data': ((obj.data) === undefined) ? undefined : (Object.entries(obj.data).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'immutable': obj.immutable, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9856,27 +9629,21 @@ export interface KubeConfigMapListProps { * @schema io.k8s.api.core.v1.ConfigMapList#items */ readonly items: KubeConfigMapProps[]; + } /** * Converts an object of type 'KubeConfigMapListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeConfigMapListProps( - obj: KubeConfigMapListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeConfigMapListProps(obj: KubeConfigMapListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeConfigMapProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeConfigMapProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9911,27 +9678,21 @@ export interface KubeEndpointsProps { * @schema io.k8s.api.core.v1.Endpoints#subsets */ readonly subsets?: EndpointSubset[]; + } /** * Converts an object of type 'KubeEndpointsProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeEndpointsProps( - obj: KubeEndpointsProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeEndpointsProps(obj: KubeEndpointsProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - subsets: obj.subsets?.map((y) => toJson_EndpointSubset(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'subsets': obj.subsets?.map(y => toJson_EndpointSubset(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -9954,27 +9715,21 @@ export interface KubeEndpointsListProps { * @schema io.k8s.api.core.v1.EndpointsList#items */ readonly items: KubeEndpointsProps[]; + } /** * Converts an object of type 'KubeEndpointsListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeEndpointsListProps( - obj: KubeEndpointsListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeEndpointsListProps(obj: KubeEndpointsListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeEndpointsProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeEndpointsProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10088,40 +9843,34 @@ export interface KubeEventProps { * @schema io.k8s.api.events.v1.Event#type */ readonly type?: string; + } /** * Converts an object of type 'KubeEventProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeEventProps( - obj: KubeEventProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeEventProps(obj: KubeEventProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - action: obj.action, - deprecatedCount: obj.deprecatedCount, - deprecatedFirstTimestamp: obj.deprecatedFirstTimestamp?.toISOString(), - deprecatedLastTimestamp: obj.deprecatedLastTimestamp?.toISOString(), - deprecatedSource: toJson_EventSource(obj.deprecatedSource), - eventTime: obj.eventTime?.toISOString(), - note: obj.note, - reason: obj.reason, - regarding: toJson_ObjectReference(obj.regarding), - related: toJson_ObjectReference(obj.related), - reportingController: obj.reportingController, - reportingInstance: obj.reportingInstance, - series: toJson_EventSeries(obj.series), - type: obj.type, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'action': obj.action, + 'deprecatedCount': obj.deprecatedCount, + 'deprecatedFirstTimestamp': obj.deprecatedFirstTimestamp?.toISOString(), + 'deprecatedLastTimestamp': obj.deprecatedLastTimestamp?.toISOString(), + 'deprecatedSource': toJson_EventSource(obj.deprecatedSource), + 'eventTime': obj.eventTime?.toISOString(), + 'note': obj.note, + 'reason': obj.reason, + 'regarding': toJson_ObjectReference(obj.regarding), + 'related': toJson_ObjectReference(obj.related), + 'reportingController': obj.reportingController, + 'reportingInstance': obj.reportingInstance, + 'series': toJson_EventSeries(obj.series), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10144,27 +9893,21 @@ export interface KubeEventListProps { * @schema io.k8s.api.events.v1.EventList#items */ readonly items: KubeEventProps[]; + } /** * Converts an object of type 'KubeEventListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeEventListProps( - obj: KubeEventListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeEventListProps(obj: KubeEventListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeEventProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeEventProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10187,27 +9930,21 @@ export interface KubeLimitRangeProps { * @schema io.k8s.api.core.v1.LimitRange#spec */ readonly spec?: LimitRangeSpec; + } /** * Converts an object of type 'KubeLimitRangeProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeLimitRangeProps( - obj: KubeLimitRangeProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeLimitRangeProps(obj: KubeLimitRangeProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_LimitRangeSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_LimitRangeSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10230,27 +9967,21 @@ export interface KubeLimitRangeListProps { * @schema io.k8s.api.core.v1.LimitRangeList#items */ readonly items: KubeLimitRangeProps[]; + } /** * Converts an object of type 'KubeLimitRangeListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeLimitRangeListProps( - obj: KubeLimitRangeListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeLimitRangeListProps(obj: KubeLimitRangeListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeLimitRangeProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeLimitRangeProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10273,27 +10004,21 @@ export interface KubeNamespaceProps { * @schema io.k8s.api.core.v1.Namespace#spec */ readonly spec?: NamespaceSpec; + } /** * Converts an object of type 'KubeNamespaceProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeNamespaceProps( - obj: KubeNamespaceProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeNamespaceProps(obj: KubeNamespaceProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_NamespaceSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_NamespaceSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10316,27 +10041,21 @@ export interface KubeNamespaceListProps { * @schema io.k8s.api.core.v1.NamespaceList#items */ readonly items: KubeNamespaceProps[]; + } /** * Converts an object of type 'KubeNamespaceListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeNamespaceListProps( - obj: KubeNamespaceListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeNamespaceListProps(obj: KubeNamespaceListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeNamespaceProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeNamespaceProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10359,27 +10078,21 @@ export interface KubeNodeProps { * @schema io.k8s.api.core.v1.Node#spec */ readonly spec?: NodeSpec; + } /** * Converts an object of type 'KubeNodeProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeNodeProps( - obj: KubeNodeProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeNodeProps(obj: KubeNodeProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_NodeSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_NodeSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10402,27 +10115,21 @@ export interface KubeNodeListProps { * @schema io.k8s.api.core.v1.NodeList#items */ readonly items: KubeNodeProps[]; + } /** * Converts an object of type 'KubeNodeListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeNodeListProps( - obj: KubeNodeListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeNodeListProps(obj: KubeNodeListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeNodeProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeNodeProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10445,27 +10152,21 @@ export interface KubePersistentVolumeProps { * @schema io.k8s.api.core.v1.PersistentVolume#spec */ readonly spec?: PersistentVolumeSpec; + } /** * Converts an object of type 'KubePersistentVolumeProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePersistentVolumeProps( - obj: KubePersistentVolumeProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePersistentVolumeProps(obj: KubePersistentVolumeProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PersistentVolumeSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PersistentVolumeSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10488,27 +10189,21 @@ export interface KubePersistentVolumeClaimProps { * @schema io.k8s.api.core.v1.PersistentVolumeClaim#spec */ readonly spec?: PersistentVolumeClaimSpec; + } /** * Converts an object of type 'KubePersistentVolumeClaimProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePersistentVolumeClaimProps( - obj: KubePersistentVolumeClaimProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePersistentVolumeClaimProps(obj: KubePersistentVolumeClaimProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PersistentVolumeClaimSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PersistentVolumeClaimSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10531,27 +10226,21 @@ export interface KubePersistentVolumeClaimListProps { * @schema io.k8s.api.core.v1.PersistentVolumeClaimList#items */ readonly items: KubePersistentVolumeClaimProps[]; + } /** * Converts an object of type 'KubePersistentVolumeClaimListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePersistentVolumeClaimListProps( - obj: KubePersistentVolumeClaimListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePersistentVolumeClaimListProps(obj: KubePersistentVolumeClaimListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubePersistentVolumeClaimProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePersistentVolumeClaimProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10574,27 +10263,21 @@ export interface KubePersistentVolumeListProps { * @schema io.k8s.api.core.v1.PersistentVolumeList#items */ readonly items: KubePersistentVolumeProps[]; + } /** * Converts an object of type 'KubePersistentVolumeListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePersistentVolumeListProps( - obj: KubePersistentVolumeListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePersistentVolumeListProps(obj: KubePersistentVolumeListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubePersistentVolumeProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePersistentVolumeProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10617,27 +10300,21 @@ export interface KubePodProps { * @schema io.k8s.api.core.v1.Pod#spec */ readonly spec?: PodSpec; + } /** * Converts an object of type 'KubePodProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodProps( - obj: KubePodProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodProps(obj: KubePodProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PodSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PodSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10660,27 +10337,21 @@ export interface KubePodListProps { * @schema io.k8s.api.core.v1.PodList#items */ readonly items: KubePodProps[]; + } /** * Converts an object of type 'KubePodListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodListProps( - obj: KubePodListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodListProps(obj: KubePodListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubePodProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePodProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10703,27 +10374,21 @@ export interface KubePodTemplateProps { * @schema io.k8s.api.core.v1.PodTemplate#template */ readonly template?: PodTemplateSpec; + } /** * Converts an object of type 'KubePodTemplateProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodTemplateProps( - obj: KubePodTemplateProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodTemplateProps(obj: KubePodTemplateProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - template: toJson_PodTemplateSpec(obj.template), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'template': toJson_PodTemplateSpec(obj.template), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10746,27 +10411,21 @@ export interface KubePodTemplateListProps { * @schema io.k8s.api.core.v1.PodTemplateList#items */ readonly items: KubePodTemplateProps[]; + } /** * Converts an object of type 'KubePodTemplateListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodTemplateListProps( - obj: KubePodTemplateListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodTemplateListProps(obj: KubePodTemplateListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubePodTemplateProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePodTemplateProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10789,27 +10448,21 @@ export interface KubeReplicationControllerProps { * @schema io.k8s.api.core.v1.ReplicationController#spec */ readonly spec?: ReplicationControllerSpec; + } /** * Converts an object of type 'KubeReplicationControllerProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeReplicationControllerProps( - obj: KubeReplicationControllerProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeReplicationControllerProps(obj: KubeReplicationControllerProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ReplicationControllerSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ReplicationControllerSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10832,27 +10485,21 @@ export interface KubeReplicationControllerListProps { * @schema io.k8s.api.core.v1.ReplicationControllerList#items */ readonly items: KubeReplicationControllerProps[]; + } /** * Converts an object of type 'KubeReplicationControllerListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeReplicationControllerListProps( - obj: KubeReplicationControllerListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeReplicationControllerListProps(obj: KubeReplicationControllerListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeReplicationControllerProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeReplicationControllerProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10875,27 +10522,21 @@ export interface KubeResourceQuotaProps { * @schema io.k8s.api.core.v1.ResourceQuota#spec */ readonly spec?: ResourceQuotaSpec; + } /** * Converts an object of type 'KubeResourceQuotaProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceQuotaProps( - obj: KubeResourceQuotaProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceQuotaProps(obj: KubeResourceQuotaProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ResourceQuotaSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ResourceQuotaSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10918,27 +10559,21 @@ export interface KubeResourceQuotaListProps { * @schema io.k8s.api.core.v1.ResourceQuotaList#items */ readonly items: KubeResourceQuotaProps[]; + } /** * Converts an object of type 'KubeResourceQuotaListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceQuotaListProps( - obj: KubeResourceQuotaListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceQuotaListProps(obj: KubeResourceQuotaListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeResourceQuotaProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeResourceQuotaProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -10982,42 +10617,24 @@ export interface KubeSecretProps { * @schema io.k8s.api.core.v1.Secret#type */ readonly type?: string; + } /** * Converts an object of type 'KubeSecretProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeSecretProps( - obj: KubeSecretProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSecretProps(obj: KubeSecretProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - data: - obj.data === undefined - ? undefined - : Object.entries(obj.data).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - immutable: obj.immutable, - stringData: - obj.stringData === undefined - ? undefined - : Object.entries(obj.stringData).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - type: obj.type, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'data': ((obj.data) === undefined) ? undefined : (Object.entries(obj.data).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'immutable': obj.immutable, + 'stringData': ((obj.stringData) === undefined) ? undefined : (Object.entries(obj.stringData).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11040,27 +10657,21 @@ export interface KubeSecretListProps { * @schema io.k8s.api.core.v1.SecretList#items */ readonly items: KubeSecretProps[]; + } /** * Converts an object of type 'KubeSecretListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeSecretListProps( - obj: KubeSecretListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeSecretListProps(obj: KubeSecretListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeSecretProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeSecretProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11083,27 +10694,21 @@ export interface KubeServiceProps { * @schema io.k8s.api.core.v1.Service#spec */ readonly spec?: ServiceSpec; + } /** * Converts an object of type 'KubeServiceProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeServiceProps( - obj: KubeServiceProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeServiceProps(obj: KubeServiceProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ServiceSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ServiceSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11140,31 +10745,23 @@ export interface KubeServiceAccountProps { * @schema io.k8s.api.core.v1.ServiceAccount#secrets */ readonly secrets?: ObjectReference[]; + } /** * Converts an object of type 'KubeServiceAccountProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeServiceAccountProps( - obj: KubeServiceAccountProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeServiceAccountProps(obj: KubeServiceAccountProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - automountServiceAccountToken: obj.automountServiceAccountToken, - imagePullSecrets: obj.imagePullSecrets?.map((y) => - toJson_LocalObjectReference(y), - ), - secrets: obj.secrets?.map((y) => toJson_ObjectReference(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'automountServiceAccountToken': obj.automountServiceAccountToken, + 'imagePullSecrets': obj.imagePullSecrets?.map(y => toJson_LocalObjectReference(y)), + 'secrets': obj.secrets?.map(y => toJson_ObjectReference(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11187,27 +10784,21 @@ export interface KubeServiceAccountListProps { * @schema io.k8s.api.core.v1.ServiceAccountList#items */ readonly items: KubeServiceAccountProps[]; + } /** * Converts an object of type 'KubeServiceAccountListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeServiceAccountListProps( - obj: KubeServiceAccountListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeServiceAccountListProps(obj: KubeServiceAccountListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeServiceAccountProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeServiceAccountProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11230,27 +10821,21 @@ export interface KubeServiceListProps { * @schema io.k8s.api.core.v1.ServiceList#items */ readonly items: KubeServiceProps[]; + } /** * Converts an object of type 'KubeServiceListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeServiceListProps( - obj: KubeServiceListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeServiceListProps(obj: KubeServiceListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeServiceProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeServiceProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11287,29 +10872,23 @@ export interface KubeEndpointSliceProps { * @schema io.k8s.api.discovery.v1.EndpointSlice#ports */ readonly ports?: EndpointPort[]; + } /** * Converts an object of type 'KubeEndpointSliceProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeEndpointSliceProps( - obj: KubeEndpointSliceProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeEndpointSliceProps(obj: KubeEndpointSliceProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - addressType: obj.addressType, - endpoints: obj.endpoints?.map((y) => toJson_Endpoint(y)), - ports: obj.ports?.map((y) => toJson_EndpointPort(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'addressType': obj.addressType, + 'endpoints': obj.endpoints?.map(y => toJson_Endpoint(y)), + 'ports': obj.ports?.map(y => toJson_EndpointPort(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11332,201 +10911,169 @@ export interface KubeEndpointSliceListProps { * @schema io.k8s.api.discovery.v1.EndpointSliceList#items */ readonly items: KubeEndpointSliceProps[]; + } /** * Converts an object of type 'KubeEndpointSliceListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeEndpointSliceListProps( - obj: KubeEndpointSliceListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeEndpointSliceListProps(obj: KubeEndpointSliceListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeEndpointSliceProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeEndpointSliceProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * FlowSchema defines the schema of a group of flows. Note that a flow is made up of a set of inbound API requests with similar attributes and is identified by a pair of strings: the name of the FlowSchema and a "flow distinguisher". * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchema + * @schema io.k8s.api.flowcontrol.v1.FlowSchema */ -export interface KubeFlowSchemaV1Beta2Props { +export interface KubeFlowSchemaProps { /** * `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchema#metadata + * @schema io.k8s.api.flowcontrol.v1.FlowSchema#metadata */ readonly metadata?: ObjectMeta; /** * `spec` is the specification of the desired behavior of a FlowSchema. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchema#spec + * @schema io.k8s.api.flowcontrol.v1.FlowSchema#spec */ - readonly spec?: FlowSchemaSpecV1Beta2; + readonly spec?: FlowSchemaSpec; + } /** - * Converts an object of type 'KubeFlowSchemaV1Beta2Props' to JSON representation. + * Converts an object of type 'KubeFlowSchemaProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeFlowSchemaV1Beta2Props( - obj: KubeFlowSchemaV1Beta2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeFlowSchemaProps(obj: KubeFlowSchemaProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_FlowSchemaSpecV1Beta2(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_FlowSchemaSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * FlowSchemaList is a list of FlowSchema objects. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaList + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaList */ -export interface KubeFlowSchemaListV1Beta2Props { +export interface KubeFlowSchemaListProps { /** * `metadata` is the standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaList#metadata + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaList#metadata */ readonly metadata?: ListMeta; /** * `items` is a list of FlowSchemas. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaList#items + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaList#items */ - readonly items: KubeFlowSchemaV1Beta2Props[]; + readonly items: KubeFlowSchemaProps[]; + } /** - * Converts an object of type 'KubeFlowSchemaListV1Beta2Props' to JSON representation. + * Converts an object of type 'KubeFlowSchemaListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeFlowSchemaListV1Beta2Props( - obj: KubeFlowSchemaListV1Beta2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeFlowSchemaListProps(obj: KubeFlowSchemaListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeFlowSchemaV1Beta2Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeFlowSchemaProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * PriorityLevelConfiguration represents the configuration of a priority level. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration */ -export interface KubePriorityLevelConfigurationV1Beta2Props { +export interface KubePriorityLevelConfigurationProps { /** * `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration#metadata + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration#metadata */ readonly metadata?: ObjectMeta; /** * `spec` is the specification of the desired behavior of a "request-priority". More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfiguration#spec + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfiguration#spec */ - readonly spec?: PriorityLevelConfigurationSpecV1Beta2; + readonly spec?: PriorityLevelConfigurationSpec; + } /** - * Converts an object of type 'KubePriorityLevelConfigurationV1Beta2Props' to JSON representation. + * Converts an object of type 'KubePriorityLevelConfigurationProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePriorityLevelConfigurationV1Beta2Props( - obj: KubePriorityLevelConfigurationV1Beta2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePriorityLevelConfigurationProps(obj: KubePriorityLevelConfigurationProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PriorityLevelConfigurationSpecV1Beta2(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PriorityLevelConfigurationSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * PriorityLevelConfigurationList is a list of PriorityLevelConfiguration objects. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList */ -export interface KubePriorityLevelConfigurationListV1Beta2Props { +export interface KubePriorityLevelConfigurationListProps { /** * `metadata` is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList#metadata + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList#metadata */ readonly metadata?: ListMeta; /** * `items` is a list of request-priorities. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationList#items + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationList#items */ - readonly items: KubePriorityLevelConfigurationV1Beta2Props[]; + readonly items: KubePriorityLevelConfigurationProps[]; + } /** - * Converts an object of type 'KubePriorityLevelConfigurationListV1Beta2Props' to JSON representation. + * Converts an object of type 'KubePriorityLevelConfigurationListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePriorityLevelConfigurationListV1Beta2Props( - obj: KubePriorityLevelConfigurationListV1Beta2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePriorityLevelConfigurationListProps(obj: KubePriorityLevelConfigurationListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubePriorityLevelConfigurationV1Beta2Props(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePriorityLevelConfigurationProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11549,27 +11096,21 @@ export interface KubeFlowSchemaV1Beta3Props { * @schema io.k8s.api.flowcontrol.v1beta3.FlowSchema#spec */ readonly spec?: FlowSchemaSpecV1Beta3; + } /** * Converts an object of type 'KubeFlowSchemaV1Beta3Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeFlowSchemaV1Beta3Props( - obj: KubeFlowSchemaV1Beta3Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeFlowSchemaV1Beta3Props(obj: KubeFlowSchemaV1Beta3Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_FlowSchemaSpecV1Beta3(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_FlowSchemaSpecV1Beta3(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11592,27 +11133,21 @@ export interface KubeFlowSchemaListV1Beta3Props { * @schema io.k8s.api.flowcontrol.v1beta3.FlowSchemaList#items */ readonly items: KubeFlowSchemaV1Beta3Props[]; + } /** * Converts an object of type 'KubeFlowSchemaListV1Beta3Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeFlowSchemaListV1Beta3Props( - obj: KubeFlowSchemaListV1Beta3Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeFlowSchemaListV1Beta3Props(obj: KubeFlowSchemaListV1Beta3Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeFlowSchemaV1Beta3Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeFlowSchemaV1Beta3Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11635,27 +11170,21 @@ export interface KubePriorityLevelConfigurationV1Beta3Props { * @schema io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfiguration#spec */ readonly spec?: PriorityLevelConfigurationSpecV1Beta3; + } /** * Converts an object of type 'KubePriorityLevelConfigurationV1Beta3Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePriorityLevelConfigurationV1Beta3Props( - obj: KubePriorityLevelConfigurationV1Beta3Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePriorityLevelConfigurationV1Beta3Props(obj: KubePriorityLevelConfigurationV1Beta3Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PriorityLevelConfigurationSpecV1Beta3(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PriorityLevelConfigurationSpecV1Beta3(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11678,29 +11207,21 @@ export interface KubePriorityLevelConfigurationListV1Beta3Props { * @schema io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationList#items */ readonly items: KubePriorityLevelConfigurationV1Beta3Props[]; + } /** * Converts an object of type 'KubePriorityLevelConfigurationListV1Beta3Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePriorityLevelConfigurationListV1Beta3Props( - obj: KubePriorityLevelConfigurationListV1Beta3Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePriorityLevelConfigurationListV1Beta3Props(obj: KubePriorityLevelConfigurationListV1Beta3Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubePriorityLevelConfigurationV1Beta3Props(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePriorityLevelConfigurationV1Beta3Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11723,27 +11244,21 @@ export interface KubeIngressProps { * @schema io.k8s.api.networking.v1.Ingress#spec */ readonly spec?: IngressSpec; + } /** * Converts an object of type 'KubeIngressProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeIngressProps( - obj: KubeIngressProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeIngressProps(obj: KubeIngressProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_IngressSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_IngressSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11766,27 +11281,21 @@ export interface KubeIngressClassProps { * @schema io.k8s.api.networking.v1.IngressClass#spec */ readonly spec?: IngressClassSpec; + } /** * Converts an object of type 'KubeIngressClassProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeIngressClassProps( - obj: KubeIngressClassProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeIngressClassProps(obj: KubeIngressClassProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_IngressClassSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_IngressClassSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11809,27 +11318,21 @@ export interface KubeIngressClassListProps { * @schema io.k8s.api.networking.v1.IngressClassList#items */ readonly items: KubeIngressClassProps[]; + } /** * Converts an object of type 'KubeIngressClassListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeIngressClassListProps( - obj: KubeIngressClassListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeIngressClassListProps(obj: KubeIngressClassListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeIngressClassProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeIngressClassProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11852,27 +11355,21 @@ export interface KubeIngressListProps { * @schema io.k8s.api.networking.v1.IngressList#items */ readonly items: KubeIngressProps[]; + } /** * Converts an object of type 'KubeIngressListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeIngressListProps( - obj: KubeIngressListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeIngressListProps(obj: KubeIngressListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeIngressProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeIngressProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11895,27 +11392,21 @@ export interface KubeNetworkPolicyProps { * @schema io.k8s.api.networking.v1.NetworkPolicy#spec */ readonly spec?: NetworkPolicySpec; + } /** * Converts an object of type 'KubeNetworkPolicyProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeNetworkPolicyProps( - obj: KubeNetworkPolicyProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeNetworkPolicyProps(obj: KubeNetworkPolicyProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_NetworkPolicySpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_NetworkPolicySpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -11938,199 +11429,169 @@ export interface KubeNetworkPolicyListProps { * @schema io.k8s.api.networking.v1.NetworkPolicyList#items */ readonly items: KubeNetworkPolicyProps[]; + } /** * Converts an object of type 'KubeNetworkPolicyListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeNetworkPolicyListProps( - obj: KubeNetworkPolicyListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeNetworkPolicyListProps(obj: KubeNetworkPolicyListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeNetworkPolicyProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeNetworkPolicyProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * ClusterCIDR represents a single configuration for per-Node Pod CIDR allocations when the MultiCIDRRangeAllocator is enabled (see the config for kube-controller-manager). A cluster may have any number of ClusterCIDR resources, all of which will be considered when allocating a CIDR for a Node. A ClusterCIDR is eligible to be used for a given Node when the node selector matches the node in question and has free CIDRs to allocate. In case of multiple matching ClusterCIDR resources, the allocator will attempt to break ties using internal heuristics, but any ClusterCIDR whose node selector matches the Node may be used. + * IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDR + * @schema io.k8s.api.networking.v1alpha1.IPAddress */ -export interface KubeClusterCidrv1Alpha1Props { +export interface KubeIpAddressV1Alpha1Props { /** * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDR#metadata + * @schema io.k8s.api.networking.v1alpha1.IPAddress#metadata */ readonly metadata?: ObjectMeta; /** - * spec is the desired state of the ClusterCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + * spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDR#spec + * @schema io.k8s.api.networking.v1alpha1.IPAddress#spec */ - readonly spec?: ClusterCidrSpecV1Alpha1; + readonly spec?: IpAddressSpecV1Alpha1; + } /** - * Converts an object of type 'KubeClusterCidrv1Alpha1Props' to JSON representation. + * Converts an object of type 'KubeIpAddressV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterCidrv1Alpha1Props( - obj: KubeClusterCidrv1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeIpAddressV1Alpha1Props(obj: KubeIpAddressV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ClusterCidrSpecV1Alpha1(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_IpAddressSpecV1Alpha1(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * ClusterCIDRList contains a list of ClusterCIDR. + * IPAddressList contains a list of IPAddress. * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRList + * @schema io.k8s.api.networking.v1alpha1.IPAddressList */ -export interface KubeClusterCidrListV1Alpha1Props { +export interface KubeIpAddressListV1Alpha1Props { /** * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRList#metadata + * @schema io.k8s.api.networking.v1alpha1.IPAddressList#metadata */ readonly metadata?: ListMeta; /** - * items is the list of ClusterCIDRs. + * items is the list of IPAddresses. * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRList#items + * @schema io.k8s.api.networking.v1alpha1.IPAddressList#items */ - readonly items: KubeClusterCidrv1Alpha1Props[]; + readonly items: KubeIpAddressV1Alpha1Props[]; + } /** - * Converts an object of type 'KubeClusterCidrListV1Alpha1Props' to JSON representation. + * Converts an object of type 'KubeIpAddressListV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterCidrListV1Alpha1Props( - obj: KubeClusterCidrListV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeIpAddressListV1Alpha1Props(obj: KubeIpAddressListV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeClusterCidrv1Alpha1Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeIpAddressV1Alpha1Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * IPAddress represents a single IP of a single IP Family. The object is designed to be used by APIs that operate on IP addresses. The object is used by the Service core API for allocation of IP addresses. An IP address can be represented in different formats, to guarantee the uniqueness of the IP, the name of the object is the IP address in canonical format, four decimal digits separated by dots suppressing leading zeros for IPv4 and the representation defined by RFC 5952 for IPv6. Valid: 192.168.1.5 or 2001:db8::1 or 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1 Invalid: 10.01.2.3 or 2001:db8:0:0:0::1 + * ServiceCIDR defines a range of IP addresses using CIDR format (e.g. 192.168.0.0/24 or 2001:db2::/64). This range is used to allocate ClusterIPs to Service objects. * - * @schema io.k8s.api.networking.v1alpha1.IPAddress + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDR */ -export interface KubeIpAddressV1Alpha1Props { +export interface KubeServiceCidrv1Alpha1Props { /** * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.networking.v1alpha1.IPAddress#metadata + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDR#metadata */ readonly metadata?: ObjectMeta; /** - * spec is the desired state of the IPAddress. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status + * spec is the desired state of the ServiceCIDR. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status * - * @schema io.k8s.api.networking.v1alpha1.IPAddress#spec + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDR#spec */ - readonly spec?: IpAddressSpecV1Alpha1; + readonly spec?: ServiceCidrSpecV1Alpha1; + } /** - * Converts an object of type 'KubeIpAddressV1Alpha1Props' to JSON representation. + * Converts an object of type 'KubeServiceCidrv1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeIpAddressV1Alpha1Props( - obj: KubeIpAddressV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeServiceCidrv1Alpha1Props(obj: KubeServiceCidrv1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_IpAddressSpecV1Alpha1(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ServiceCidrSpecV1Alpha1(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * IPAddressList contains a list of IPAddress. + * ServiceCIDRList contains a list of ServiceCIDR objects. * - * @schema io.k8s.api.networking.v1alpha1.IPAddressList + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDRList */ -export interface KubeIpAddressListV1Alpha1Props { +export interface KubeServiceCidrListV1Alpha1Props { /** * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata * - * @schema io.k8s.api.networking.v1alpha1.IPAddressList#metadata + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDRList#metadata */ readonly metadata?: ListMeta; /** - * items is the list of IPAddresses. + * items is the list of ServiceCIDRs. * - * @schema io.k8s.api.networking.v1alpha1.IPAddressList#items + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDRList#items */ - readonly items: KubeIpAddressV1Alpha1Props[]; + readonly items: KubeServiceCidrv1Alpha1Props[]; + } /** - * Converts an object of type 'KubeIpAddressListV1Alpha1Props' to JSON representation. + * Converts an object of type 'KubeServiceCidrListV1Alpha1Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeIpAddressListV1Alpha1Props( - obj: KubeIpAddressListV1Alpha1Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeServiceCidrListV1Alpha1Props(obj: KubeServiceCidrListV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeIpAddressV1Alpha1Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeServiceCidrv1Alpha1Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12168,29 +11629,23 @@ export interface KubeRuntimeClassProps { * @schema io.k8s.api.node.v1.RuntimeClass#scheduling */ readonly scheduling?: Scheduling; + } /** * Converts an object of type 'KubeRuntimeClassProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeRuntimeClassProps( - obj: KubeRuntimeClassProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeRuntimeClassProps(obj: KubeRuntimeClassProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - handler: obj.handler, - overhead: toJson_Overhead(obj.overhead), - scheduling: toJson_Scheduling(obj.scheduling), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'handler': obj.handler, + 'overhead': toJson_Overhead(obj.overhead), + 'scheduling': toJson_Scheduling(obj.scheduling), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12213,27 +11668,21 @@ export interface KubeRuntimeClassListProps { * @schema io.k8s.api.node.v1.RuntimeClassList#items */ readonly items: KubeRuntimeClassProps[]; + } /** * Converts an object of type 'KubeRuntimeClassListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeRuntimeClassListProps( - obj: KubeRuntimeClassListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeRuntimeClassListProps(obj: KubeRuntimeClassListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeRuntimeClassProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeRuntimeClassProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12256,27 +11705,21 @@ export interface KubeEvictionProps { * @schema io.k8s.api.policy.v1.Eviction#deleteOptions */ readonly deleteOptions?: DeleteOptions; + } /** * Converts an object of type 'KubeEvictionProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeEvictionProps( - obj: KubeEvictionProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeEvictionProps(obj: KubeEvictionProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - deleteOptions: toJson_DeleteOptions(obj.deleteOptions), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'deleteOptions': toJson_DeleteOptions(obj.deleteOptions), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12299,27 +11742,21 @@ export interface KubePodDisruptionBudgetProps { * @schema io.k8s.api.policy.v1.PodDisruptionBudget#spec */ readonly spec?: PodDisruptionBudgetSpec; + } /** * Converts an object of type 'KubePodDisruptionBudgetProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodDisruptionBudgetProps( - obj: KubePodDisruptionBudgetProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodDisruptionBudgetProps(obj: KubePodDisruptionBudgetProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PodDisruptionBudgetSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PodDisruptionBudgetSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12342,27 +11779,21 @@ export interface KubePodDisruptionBudgetListProps { * @schema io.k8s.api.policy.v1.PodDisruptionBudgetList#items */ readonly items: KubePodDisruptionBudgetProps[]; + } /** * Converts an object of type 'KubePodDisruptionBudgetListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodDisruptionBudgetListProps( - obj: KubePodDisruptionBudgetListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodDisruptionBudgetListProps(obj: KubePodDisruptionBudgetListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubePodDisruptionBudgetProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePodDisruptionBudgetProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12392,28 +11823,22 @@ export interface KubeClusterRoleProps { * @schema io.k8s.api.rbac.v1.ClusterRole#rules */ readonly rules?: PolicyRule[]; + } /** * Converts an object of type 'KubeClusterRoleProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterRoleProps( - obj: KubeClusterRoleProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeClusterRoleProps(obj: KubeClusterRoleProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - aggregationRule: toJson_AggregationRule(obj.aggregationRule), - rules: obj.rules?.map((y) => toJson_PolicyRule(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'aggregationRule': toJson_AggregationRule(obj.aggregationRule), + 'rules': obj.rules?.map(y => toJson_PolicyRule(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12431,7 +11856,7 @@ export interface KubeClusterRoleBindingProps { readonly metadata?: ObjectMeta; /** - * RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. + * RoleRef can only reference a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable. * * @schema io.k8s.api.rbac.v1.ClusterRoleBinding#roleRef */ @@ -12443,28 +11868,22 @@ export interface KubeClusterRoleBindingProps { * @schema io.k8s.api.rbac.v1.ClusterRoleBinding#subjects */ readonly subjects?: Subject[]; + } /** * Converts an object of type 'KubeClusterRoleBindingProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterRoleBindingProps( - obj: KubeClusterRoleBindingProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeClusterRoleBindingProps(obj: KubeClusterRoleBindingProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - roleRef: toJson_RoleRef(obj.roleRef), - subjects: obj.subjects?.map((y) => toJson_Subject(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'roleRef': toJson_RoleRef(obj.roleRef), + 'subjects': obj.subjects?.map(y => toJson_Subject(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12487,27 +11906,21 @@ export interface KubeClusterRoleBindingListProps { * @schema io.k8s.api.rbac.v1.ClusterRoleBindingList#items */ readonly items: KubeClusterRoleBindingProps[]; + } /** * Converts an object of type 'KubeClusterRoleBindingListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterRoleBindingListProps( - obj: KubeClusterRoleBindingListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeClusterRoleBindingListProps(obj: KubeClusterRoleBindingListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeClusterRoleBindingProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeClusterRoleBindingProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12530,27 +11943,21 @@ export interface KubeClusterRoleListProps { * @schema io.k8s.api.rbac.v1.ClusterRoleList#items */ readonly items: KubeClusterRoleProps[]; + } /** * Converts an object of type 'KubeClusterRoleListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeClusterRoleListProps( - obj: KubeClusterRoleListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeClusterRoleListProps(obj: KubeClusterRoleListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeClusterRoleProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeClusterRoleProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12573,27 +11980,21 @@ export interface KubeRoleProps { * @schema io.k8s.api.rbac.v1.Role#rules */ readonly rules?: PolicyRule[]; + } /** * Converts an object of type 'KubeRoleProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeRoleProps( - obj: KubeRoleProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeRoleProps(obj: KubeRoleProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - rules: obj.rules?.map((y) => toJson_PolicyRule(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'rules': obj.rules?.map(y => toJson_PolicyRule(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12611,7 +12012,7 @@ export interface KubeRoleBindingProps { readonly metadata?: ObjectMeta; /** - * RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. + * RoleRef can reference a Role in the current namespace or a ClusterRole in the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. This field is immutable. * * @schema io.k8s.api.rbac.v1.RoleBinding#roleRef */ @@ -12623,28 +12024,22 @@ export interface KubeRoleBindingProps { * @schema io.k8s.api.rbac.v1.RoleBinding#subjects */ readonly subjects?: Subject[]; + } /** * Converts an object of type 'KubeRoleBindingProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeRoleBindingProps( - obj: KubeRoleBindingProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeRoleBindingProps(obj: KubeRoleBindingProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - roleRef: toJson_RoleRef(obj.roleRef), - subjects: obj.subjects?.map((y) => toJson_Subject(y)), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'roleRef': toJson_RoleRef(obj.roleRef), + 'subjects': obj.subjects?.map(y => toJson_Subject(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12667,27 +12062,21 @@ export interface KubeRoleBindingListProps { * @schema io.k8s.api.rbac.v1.RoleBindingList#items */ readonly items: KubeRoleBindingProps[]; + } /** * Converts an object of type 'KubeRoleBindingListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeRoleBindingListProps( - obj: KubeRoleBindingListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeRoleBindingListProps(obj: KubeRoleBindingListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeRoleBindingProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeRoleBindingProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12710,27 +12099,21 @@ export interface KubeRoleListProps { * @schema io.k8s.api.rbac.v1.RoleList#items */ readonly items: KubeRoleProps[]; + } /** * Converts an object of type 'KubeRoleListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeRoleListProps( - obj: KubeRoleListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeRoleListProps(obj: KubeRoleListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeRoleProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeRoleProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12755,27 +12138,21 @@ export interface KubePodSchedulingContextV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.PodSchedulingContext#spec */ readonly spec: PodSchedulingContextSpecV1Alpha2; + } /** * Converts an object of type 'KubePodSchedulingContextV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodSchedulingContextV1Alpha2Props( - obj: KubePodSchedulingContextV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodSchedulingContextV1Alpha2Props(obj: KubePodSchedulingContextV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PodSchedulingContextSpecV1Alpha2(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PodSchedulingContextSpecV1Alpha2(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12798,29 +12175,21 @@ export interface KubePodSchedulingContextListV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.PodSchedulingContextList#items */ readonly items: KubePodSchedulingContextV1Alpha2Props[]; + } /** * Converts an object of type 'KubePodSchedulingContextListV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePodSchedulingContextListV1Alpha2Props( - obj: KubePodSchedulingContextListV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePodSchedulingContextListV1Alpha2Props(obj: KubePodSchedulingContextListV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubePodSchedulingContextV1Alpha2Props(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePodSchedulingContextV1Alpha2Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12845,27 +12214,21 @@ export interface KubeResourceClaimV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.ResourceClaim#spec */ readonly spec: ResourceClaimSpecV1Alpha2; + } /** * Converts an object of type 'KubeResourceClaimV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceClaimV1Alpha2Props( - obj: KubeResourceClaimV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceClaimV1Alpha2Props(obj: KubeResourceClaimV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ResourceClaimSpecV1Alpha2(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ResourceClaimSpecV1Alpha2(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12888,27 +12251,21 @@ export interface KubeResourceClaimListV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.ResourceClaimList#items */ readonly items: KubeResourceClaimV1Alpha2Props[]; + } /** * Converts an object of type 'KubeResourceClaimListV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceClaimListV1Alpha2Props( - obj: KubeResourceClaimListV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceClaimListV1Alpha2Props(obj: KubeResourceClaimListV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeResourceClaimV1Alpha2Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeResourceClaimV1Alpha2Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12933,27 +12290,21 @@ export interface KubeResourceClaimTemplateV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.ResourceClaimTemplate#spec */ readonly spec: ResourceClaimTemplateSpecV1Alpha2; + } /** * Converts an object of type 'KubeResourceClaimTemplateV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceClaimTemplateV1Alpha2Props( - obj: KubeResourceClaimTemplateV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceClaimTemplateV1Alpha2Props(obj: KubeResourceClaimTemplateV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ResourceClaimTemplateSpecV1Alpha2(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ResourceClaimTemplateSpecV1Alpha2(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -12976,29 +12327,21 @@ export interface KubeResourceClaimTemplateListV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.ResourceClaimTemplateList#items */ readonly items: KubeResourceClaimTemplateV1Alpha2Props[]; + } /** * Converts an object of type 'KubeResourceClaimTemplateListV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceClaimTemplateListV1Alpha2Props( - obj: KubeResourceClaimTemplateListV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceClaimTemplateListV1Alpha2Props(obj: KubeResourceClaimTemplateListV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => - toJson_KubeResourceClaimTemplateV1Alpha2Props(y), - ), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeResourceClaimTemplateV1Alpha2Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13041,31 +12384,23 @@ export interface KubeResourceClassV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.ResourceClass#suitableNodes */ readonly suitableNodes?: NodeSelector; + } /** * Converts an object of type 'KubeResourceClassV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceClassV1Alpha2Props( - obj: KubeResourceClassV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceClassV1Alpha2Props(obj: KubeResourceClassV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - driverName: obj.driverName, - parametersRef: toJson_ResourceClassParametersReferenceV1Alpha2( - obj.parametersRef, - ), - suitableNodes: toJson_NodeSelector(obj.suitableNodes), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'driverName': obj.driverName, + 'parametersRef': toJson_ResourceClassParametersReferenceV1Alpha2(obj.parametersRef), + 'suitableNodes': toJson_NodeSelector(obj.suitableNodes), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13088,27 +12423,21 @@ export interface KubeResourceClassListV1Alpha2Props { * @schema io.k8s.api.resource.v1alpha2.ResourceClassList#items */ readonly items: KubeResourceClassV1Alpha2Props[]; + } /** * Converts an object of type 'KubeResourceClassListV1Alpha2Props' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeResourceClassListV1Alpha2Props( - obj: KubeResourceClassListV1Alpha2Props | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeResourceClassListV1Alpha2Props(obj: KubeResourceClassListV1Alpha2Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeResourceClassV1Alpha2Props(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeResourceClassV1Alpha2Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13153,30 +12482,24 @@ export interface KubePriorityClassProps { * @schema io.k8s.api.scheduling.v1.PriorityClass#value */ readonly value: number; + } /** * Converts an object of type 'KubePriorityClassProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePriorityClassProps( - obj: KubePriorityClassProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePriorityClassProps(obj: KubePriorityClassProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - description: obj.description, - globalDefault: obj.globalDefault, - preemptionPolicy: obj.preemptionPolicy, - value: obj.value, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'description': obj.description, + 'globalDefault': obj.globalDefault, + 'preemptionPolicy': obj.preemptionPolicy, + 'value': obj.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13199,27 +12522,21 @@ export interface KubePriorityClassListProps { * @schema io.k8s.api.scheduling.v1.PriorityClassList#items */ readonly items: KubePriorityClassProps[]; + } /** * Converts an object of type 'KubePriorityClassListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubePriorityClassListProps( - obj: KubePriorityClassListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubePriorityClassListProps(obj: KubePriorityClassListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubePriorityClassProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubePriorityClassProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13242,27 +12559,21 @@ export interface KubeCsiDriverProps { * @schema io.k8s.api.storage.v1.CSIDriver#spec */ readonly spec: CsiDriverSpec; + } /** * Converts an object of type 'KubeCsiDriverProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCsiDriverProps( - obj: KubeCsiDriverProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCsiDriverProps(obj: KubeCsiDriverProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_CsiDriverSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_CsiDriverSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13285,27 +12596,21 @@ export interface KubeCsiDriverListProps { * @schema io.k8s.api.storage.v1.CSIDriverList#items */ readonly items: KubeCsiDriverProps[]; + } /** * Converts an object of type 'KubeCsiDriverListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCsiDriverListProps( - obj: KubeCsiDriverListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCsiDriverListProps(obj: KubeCsiDriverListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeCsiDriverProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeCsiDriverProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13328,27 +12633,21 @@ export interface KubeCsiNodeProps { * @schema io.k8s.api.storage.v1.CSINode#spec */ readonly spec: CsiNodeSpec; + } /** * Converts an object of type 'KubeCsiNodeProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCsiNodeProps( - obj: KubeCsiNodeProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCsiNodeProps(obj: KubeCsiNodeProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_CsiNodeSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_CsiNodeSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13371,27 +12670,21 @@ export interface KubeCsiNodeListProps { * @schema io.k8s.api.storage.v1.CSINodeList#items */ readonly items: KubeCsiNodeProps[]; + } /** * Converts an object of type 'KubeCsiNodeListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCsiNodeListProps( - obj: KubeCsiNodeListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCsiNodeListProps(obj: KubeCsiNodeListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeCsiNodeProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeCsiNodeProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13451,30 +12744,24 @@ export interface KubeCsiStorageCapacityProps { * @schema io.k8s.api.storage.v1.CSIStorageCapacity#storageClassName */ readonly storageClassName: string; + } /** * Converts an object of type 'KubeCsiStorageCapacityProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCsiStorageCapacityProps( - obj: KubeCsiStorageCapacityProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCsiStorageCapacityProps(obj: KubeCsiStorageCapacityProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - capacity: obj.capacity?.value, - maximumVolumeSize: obj.maximumVolumeSize?.value, - nodeTopology: toJson_LabelSelector(obj.nodeTopology), - storageClassName: obj.storageClassName, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'capacity': obj.capacity?.value, + 'maximumVolumeSize': obj.maximumVolumeSize?.value, + 'nodeTopology': toJson_LabelSelector(obj.nodeTopology), + 'storageClassName': obj.storageClassName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13497,27 +12784,21 @@ export interface KubeCsiStorageCapacityListProps { * @schema io.k8s.api.storage.v1.CSIStorageCapacityList#items */ readonly items: KubeCsiStorageCapacityProps[]; + } /** * Converts an object of type 'KubeCsiStorageCapacityListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCsiStorageCapacityListProps( - obj: KubeCsiStorageCapacityListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCsiStorageCapacityListProps(obj: KubeCsiStorageCapacityListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeCsiStorageCapacityProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeCsiStorageCapacityProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13585,41 +12866,27 @@ export interface KubeStorageClassProps { * @schema io.k8s.api.storage.v1.StorageClass#volumeBindingMode */ readonly volumeBindingMode?: string; + } /** * Converts an object of type 'KubeStorageClassProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeStorageClassProps( - obj: KubeStorageClassProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeStorageClassProps(obj: KubeStorageClassProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - allowVolumeExpansion: obj.allowVolumeExpansion, - allowedTopologies: obj.allowedTopologies?.map((y) => - toJson_TopologySelectorTerm(y), - ), - mountOptions: obj.mountOptions?.map((y) => y), - parameters: - obj.parameters === undefined - ? undefined - : Object.entries(obj.parameters).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - provisioner: obj.provisioner, - reclaimPolicy: obj.reclaimPolicy, - volumeBindingMode: obj.volumeBindingMode, + 'metadata': toJson_ObjectMeta(obj.metadata), + 'allowVolumeExpansion': obj.allowVolumeExpansion, + 'allowedTopologies': obj.allowedTopologies?.map(y => toJson_TopologySelectorTerm(y)), + 'mountOptions': obj.mountOptions?.map(y => y), + 'parameters': ((obj.parameters) === undefined) ? undefined : (Object.entries(obj.parameters).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'provisioner': obj.provisioner, + 'reclaimPolicy': obj.reclaimPolicy, + 'volumeBindingMode': obj.volumeBindingMode, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13642,27 +12909,21 @@ export interface KubeStorageClassListProps { * @schema io.k8s.api.storage.v1.StorageClassList#items */ readonly items: KubeStorageClassProps[]; + } /** * Converts an object of type 'KubeStorageClassListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeStorageClassListProps( - obj: KubeStorageClassListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeStorageClassListProps(obj: KubeStorageClassListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeStorageClassProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeStorageClassProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13687,27 +12948,21 @@ export interface KubeVolumeAttachmentProps { * @schema io.k8s.api.storage.v1.VolumeAttachment#spec */ readonly spec: VolumeAttachmentSpec; + } /** * Converts an object of type 'KubeVolumeAttachmentProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeVolumeAttachmentProps( - obj: KubeVolumeAttachmentProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeVolumeAttachmentProps(obj: KubeVolumeAttachmentProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_VolumeAttachmentSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_VolumeAttachmentSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13730,27 +12985,105 @@ export interface KubeVolumeAttachmentListProps { * @schema io.k8s.api.storage.v1.VolumeAttachmentList#items */ readonly items: KubeVolumeAttachmentProps[]; + } /** * Converts an object of type 'KubeVolumeAttachmentListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeVolumeAttachmentListProps( - obj: KubeVolumeAttachmentListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeVolumeAttachmentListProps(obj: KubeVolumeAttachmentListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeVolumeAttachmentProps(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * VolumeAttributesClass represents a specification of mutable volume attributes defined by the CSI driver. The class can be specified during dynamic provisioning of PersistentVolumeClaims, and changed in the PersistentVolumeClaim spec after provisioning. + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClass + */ +export interface KubeVolumeAttributesClassV1Alpha1Props { + /** + * Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClass#metadata + */ + readonly metadata?: ObjectMeta; + + /** + * Name of the CSI driver This field is immutable. + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClass#driverName + */ + readonly driverName: string; + + /** + * parameters hold volume attributes defined by the CSI driver. These values are opaque to the Kubernetes and are passed directly to the CSI driver. The underlying storage provider supports changing these attributes on an existing volume, however the parameters field itself is immutable. To invoke a volume update, a new VolumeAttributesClass should be created with new parameters, and the PersistentVolumeClaim should be updated to reference the new VolumeAttributesClass. + * + * This field is required and must contain at least one key/value pair. The keys cannot be empty, and the maximum number of parameters is 512, with a cumulative max size of 256K. If the CSI driver rejects invalid parameters, the target PersistentVolumeClaim will be set to an "Infeasible" state in the modifyVolumeStatus field. + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClass#parameters + */ + readonly parameters?: { [key: string]: string }; + +} + +/** + * Converts an object of type 'KubeVolumeAttributesClassV1Alpha1Props' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_KubeVolumeAttributesClassV1Alpha1Props(obj: KubeVolumeAttributesClassV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'metadata': toJson_ObjectMeta(obj.metadata), + 'driverName': obj.driverName, + 'parameters': ((obj.parameters) === undefined) ? undefined : (Object.entries(obj.parameters).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * VolumeAttributesClassList is a collection of VolumeAttributesClass objects. + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClassList + */ +export interface KubeVolumeAttributesClassListV1Alpha1Props { + /** + * Standard list metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClassList#metadata + */ + readonly metadata?: ListMeta; + + /** + * items is the list of VolumeAttributesClass objects. + * + * @schema io.k8s.api.storage.v1alpha1.VolumeAttributesClassList#items + */ + readonly items: KubeVolumeAttributesClassV1Alpha1Props[]; + +} + +/** + * Converts an object of type 'KubeVolumeAttributesClassListV1Alpha1Props' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_KubeVolumeAttributesClassListV1Alpha1Props(obj: KubeVolumeAttributesClassListV1Alpha1Props | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeVolumeAttachmentProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeVolumeAttributesClassV1Alpha1Props(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13773,27 +13106,21 @@ export interface KubeCustomResourceDefinitionProps { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition#spec */ readonly spec: CustomResourceDefinitionSpec; + } /** * Converts an object of type 'KubeCustomResourceDefinitionProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCustomResourceDefinitionProps( - obj: KubeCustomResourceDefinitionProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCustomResourceDefinitionProps(obj: KubeCustomResourceDefinitionProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_CustomResourceDefinitionSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_CustomResourceDefinitionSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13816,27 +13143,21 @@ export interface KubeCustomResourceDefinitionListProps { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList#items */ readonly items: KubeCustomResourceDefinitionProps[]; + } /** * Converts an object of type 'KubeCustomResourceDefinitionListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeCustomResourceDefinitionListProps( - obj: KubeCustomResourceDefinitionListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeCustomResourceDefinitionListProps(obj: KubeCustomResourceDefinitionListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeCustomResourceDefinitionProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeCustomResourceDefinitionProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13880,30 +13201,24 @@ export interface KubeStatusProps { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.Status#reason */ readonly reason?: string; + } /** * Converts an object of type 'KubeStatusProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeStatusProps( - obj: KubeStatusProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeStatusProps(obj: KubeStatusProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - code: obj.code, - details: toJson_StatusDetails(obj.details), - message: obj.message, - reason: obj.reason, + 'metadata': toJson_ListMeta(obj.metadata), + 'code': obj.code, + 'details': toJson_StatusDetails(obj.details), + 'message': obj.message, + 'reason': obj.reason, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13926,27 +13241,21 @@ export interface KubeApiServiceProps { * @schema io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService#spec */ readonly spec?: ApiServiceSpec; + } /** * Converts an object of type 'KubeApiServiceProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeApiServiceProps( - obj: KubeApiServiceProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeApiServiceProps(obj: KubeApiServiceProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ApiServiceSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ApiServiceSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -13969,27 +13278,21 @@ export interface KubeApiServiceListProps { * @schema io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList#items */ readonly items: KubeApiServiceProps[]; + } /** * Converts an object of type 'KubeApiServiceListProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KubeApiServiceListProps( - obj: KubeApiServiceListProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KubeApiServiceListProps(obj: KubeApiServiceListProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ListMeta(obj.metadata), - items: obj.items?.map((y) => toJson_KubeApiServiceProps(y)), + 'metadata': toJson_ListMeta(obj.metadata), + 'items': obj.items?.map(y => toJson_KubeApiServiceProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14117,52 +13420,34 @@ export interface ObjectMeta { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#uid */ readonly uid?: string; + } /** * Converts an object of type 'ObjectMeta' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ObjectMeta( - obj: ObjectMeta | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - annotations: - obj.annotations === undefined - ? undefined - : Object.entries(obj.annotations).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - creationTimestamp: obj.creationTimestamp?.toISOString(), - deletionGracePeriodSeconds: obj.deletionGracePeriodSeconds, - deletionTimestamp: obj.deletionTimestamp?.toISOString(), - finalizers: obj.finalizers?.map((y) => y), - generateName: obj.generateName, - generation: obj.generation, - labels: - obj.labels === undefined - ? undefined - : Object.entries(obj.labels).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - managedFields: obj.managedFields?.map((y) => toJson_ManagedFieldsEntry(y)), - name: obj.name, - namespace: obj.namespace, - ownerReferences: obj.ownerReferences?.map((y) => toJson_OwnerReference(y)), - resourceVersion: obj.resourceVersion, - selfLink: obj.selfLink, - uid: obj.uid, - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); +export function toJson_ObjectMeta(obj: ObjectMeta | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'annotations': ((obj.annotations) === undefined) ? undefined : (Object.entries(obj.annotations).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'creationTimestamp': obj.creationTimestamp?.toISOString(), + 'deletionGracePeriodSeconds': obj.deletionGracePeriodSeconds, + 'deletionTimestamp': obj.deletionTimestamp?.toISOString(), + 'finalizers': obj.finalizers?.map(y => y), + 'generateName': obj.generateName, + 'generation': obj.generation, + 'labels': ((obj.labels) === undefined) ? undefined : (Object.entries(obj.labels).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'managedFields': obj.managedFields?.map(y => toJson_ManagedFieldsEntry(y)), + 'name': obj.name, + 'namespace': obj.namespace, + 'ownerReferences': obj.ownerReferences?.map(y => toJson_OwnerReference(y)), + 'resourceVersion': obj.resourceVersion, + 'selfLink': obj.selfLink, + 'uid': obj.uid, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14204,7 +13489,7 @@ export interface MutatingWebhook { * - If failurePolicy=Fail, reject the request * - If failurePolicy=Ignore, the error is ignored and the webhook is skipped * - * This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. + * This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. * * @schema io.k8s.api.admissionregistration.v1.MutatingWebhook#matchConditions */ @@ -14312,37 +13597,31 @@ export interface MutatingWebhook { * @schema io.k8s.api.admissionregistration.v1.MutatingWebhook#timeoutSeconds */ readonly timeoutSeconds?: number; + } /** * Converts an object of type 'MutatingWebhook' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_MutatingWebhook( - obj: MutatingWebhook | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_MutatingWebhook(obj: MutatingWebhook | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - admissionReviewVersions: obj.admissionReviewVersions?.map((y) => y), - clientConfig: toJson_WebhookClientConfig(obj.clientConfig), - failurePolicy: obj.failurePolicy, - matchConditions: obj.matchConditions?.map((y) => toJson_MatchCondition(y)), - matchPolicy: obj.matchPolicy, - name: obj.name, - namespaceSelector: toJson_LabelSelector(obj.namespaceSelector), - objectSelector: toJson_LabelSelector(obj.objectSelector), - reinvocationPolicy: obj.reinvocationPolicy, - rules: obj.rules?.map((y) => toJson_RuleWithOperations(y)), - sideEffects: obj.sideEffects, - timeoutSeconds: obj.timeoutSeconds, + 'admissionReviewVersions': obj.admissionReviewVersions?.map(y => y), + 'clientConfig': toJson_WebhookClientConfig(obj.clientConfig), + 'failurePolicy': obj.failurePolicy, + 'matchConditions': obj.matchConditions?.map(y => toJson_MatchCondition(y)), + 'matchPolicy': obj.matchPolicy, + 'name': obj.name, + 'namespaceSelector': toJson_LabelSelector(obj.namespaceSelector), + 'objectSelector': toJson_LabelSelector(obj.objectSelector), + 'reinvocationPolicy': obj.reinvocationPolicy, + 'rules': obj.rules?.map(y => toJson_RuleWithOperations(y)), + 'sideEffects': obj.sideEffects, + 'timeoutSeconds': obj.timeoutSeconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14379,29 +13658,23 @@ export interface ListMeta { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.ListMeta#selfLink */ readonly selfLink?: string; + } /** * Converts an object of type 'ListMeta' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ListMeta( - obj: ListMeta | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ListMeta(obj: ListMeta | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - continue: obj.continue, - remainingItemCount: obj.remainingItemCount, - resourceVersion: obj.resourceVersion, - selfLink: obj.selfLink, + 'continue': obj.continue, + 'remainingItemCount': obj.remainingItemCount, + 'resourceVersion': obj.resourceVersion, + 'selfLink': obj.selfLink, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14443,7 +13716,7 @@ export interface ValidatingWebhook { * - If failurePolicy=Fail, reject the request * - If failurePolicy=Ignore, the error is ignored and the webhook is skipped * - * This is an alpha feature and managed by the AdmissionWebhookMatchConditions feature gate. + * This is a beta feature and managed by the AdmissionWebhookMatchConditions feature gate. * * @schema io.k8s.api.admissionregistration.v1.ValidatingWebhook#matchConditions */ @@ -14537,36 +13810,30 @@ export interface ValidatingWebhook { * @schema io.k8s.api.admissionregistration.v1.ValidatingWebhook#timeoutSeconds */ readonly timeoutSeconds?: number; + } /** * Converts an object of type 'ValidatingWebhook' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ValidatingWebhook( - obj: ValidatingWebhook | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ValidatingWebhook(obj: ValidatingWebhook | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - admissionReviewVersions: obj.admissionReviewVersions?.map((y) => y), - clientConfig: toJson_WebhookClientConfig(obj.clientConfig), - failurePolicy: obj.failurePolicy, - matchConditions: obj.matchConditions?.map((y) => toJson_MatchCondition(y)), - matchPolicy: obj.matchPolicy, - name: obj.name, - namespaceSelector: toJson_LabelSelector(obj.namespaceSelector), - objectSelector: toJson_LabelSelector(obj.objectSelector), - rules: obj.rules?.map((y) => toJson_RuleWithOperations(y)), - sideEffects: obj.sideEffects, - timeoutSeconds: obj.timeoutSeconds, + 'admissionReviewVersions': obj.admissionReviewVersions?.map(y => y), + 'clientConfig': toJson_WebhookClientConfig(obj.clientConfig), + 'failurePolicy': obj.failurePolicy, + 'matchConditions': obj.matchConditions?.map(y => toJson_MatchCondition(y)), + 'matchPolicy': obj.matchPolicy, + 'name': obj.name, + 'namespaceSelector': toJson_LabelSelector(obj.namespaceSelector), + 'objectSelector': toJson_LabelSelector(obj.objectSelector), + 'rules': obj.rules?.map(y => toJson_RuleWithOperations(y)), + 'sideEffects': obj.sideEffects, + 'timeoutSeconds': obj.timeoutSeconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14635,35 +13902,35 @@ export interface ValidatingAdmissionPolicySpecV1Alpha1 { * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec#validations */ readonly validations?: ValidationV1Alpha1[]; + + /** + * Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. + * + * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec#variables + */ + readonly variables?: VariableV1Alpha1[]; + } /** * Converts an object of type 'ValidatingAdmissionPolicySpecV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ValidatingAdmissionPolicySpecV1Alpha1( - obj: ValidatingAdmissionPolicySpecV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ValidatingAdmissionPolicySpecV1Alpha1(obj: ValidatingAdmissionPolicySpecV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - auditAnnotations: obj.auditAnnotations?.map((y) => - toJson_AuditAnnotationV1Alpha1(y), - ), - failurePolicy: obj.failurePolicy, - matchConditions: obj.matchConditions?.map((y) => - toJson_MatchConditionV1Alpha1(y), - ), - matchConstraints: toJson_MatchResourcesV1Alpha1(obj.matchConstraints), - paramKind: toJson_ParamKindV1Alpha1(obj.paramKind), - validations: obj.validations?.map((y) => toJson_ValidationV1Alpha1(y)), + 'auditAnnotations': obj.auditAnnotations?.map(y => toJson_AuditAnnotationV1Alpha1(y)), + 'failurePolicy': obj.failurePolicy, + 'matchConditions': obj.matchConditions?.map(y => toJson_MatchConditionV1Alpha1(y)), + 'matchConstraints': toJson_MatchResourcesV1Alpha1(obj.matchConstraints), + 'paramKind': toJson_ParamKindV1Alpha1(obj.paramKind), + 'validations': obj.validations?.map(y => toJson_ValidationV1Alpha1(y)), + 'variables': obj.variables?.map(y => toJson_VariableV1Alpha1(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14681,7 +13948,7 @@ export interface ValidatingAdmissionPolicyBindingSpecV1Alpha1 { readonly matchResources?: MatchResourcesV1Alpha1; /** - * ParamRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. + * paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. * * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec#paramRef */ @@ -14718,29 +13985,191 @@ export interface ValidatingAdmissionPolicyBindingSpecV1Alpha1 { * @schema io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec#validationActions */ readonly validationActions?: string[]; + } /** * Converts an object of type 'ValidatingAdmissionPolicyBindingSpecV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ValidatingAdmissionPolicyBindingSpecV1Alpha1( - obj: ValidatingAdmissionPolicyBindingSpecV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ValidatingAdmissionPolicyBindingSpecV1Alpha1(obj: ValidatingAdmissionPolicyBindingSpecV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'matchResources': toJson_MatchResourcesV1Alpha1(obj.matchResources), + 'paramRef': toJson_ParamRefV1Alpha1(obj.paramRef), + 'policyName': obj.policyName, + 'validationActions': obj.validationActions?.map(y => y), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ValidatingAdmissionPolicySpec is the specification of the desired behavior of the AdmissionPolicy. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec + */ +export interface ValidatingAdmissionPolicySpecV1Beta1 { + /** + * auditAnnotations contains CEL expressions which are used to produce audit annotations for the audit event of the API request. validations and auditAnnotations may not both be empty; a least one of validations or auditAnnotations is required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec#auditAnnotations + */ + readonly auditAnnotations?: AuditAnnotationV1Beta1[]; + + /** + * failurePolicy defines how to handle failures for the admission policy. Failures can occur from CEL expression parse errors, type check errors, runtime errors and invalid or mis-configured policy definitions or bindings. + * + * A policy is invalid if spec.paramKind refers to a non-existent Kind. A binding is invalid if spec.paramRef.name refers to a non-existent resource. + * + * failurePolicy does not define how validations that evaluate to false are handled. + * + * When failurePolicy is set to Fail, ValidatingAdmissionPolicyBinding validationActions define how failures are enforced. + * + * Allowed values are Ignore or Fail. Defaults to Fail. + * + * @default Fail. + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec#failurePolicy + */ + readonly failurePolicy?: string; + + /** + * MatchConditions is a list of conditions that must be met for a request to be validated. Match conditions filter requests that have already been matched by the rules, namespaceSelector, and objectSelector. An empty list of matchConditions matches all requests. There are a maximum of 64 match conditions allowed. + * + * If a parameter object is provided, it can be accessed via the `params` handle in the same manner as validation expressions. + * + * The exact matching logic is (in order): + * 1. If ANY matchCondition evaluates to FALSE, the policy is skipped. + * 2. If ALL matchConditions evaluate to TRUE, the policy is evaluated. + * 3. If any matchCondition evaluates to an error (but none are FALSE): + * - If failurePolicy=Fail, reject the request + * - If failurePolicy=Ignore, the policy is skipped + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec#matchConditions + */ + readonly matchConditions?: MatchConditionV1Beta1[]; + + /** + * MatchConstraints specifies what resources this policy is designed to validate. The AdmissionPolicy cares about a request if it matches _all_ Constraints. However, in order to prevent clusters from being put into an unstable state that cannot be recovered from via the API ValidatingAdmissionPolicy cannot match ValidatingAdmissionPolicy and ValidatingAdmissionPolicyBinding. Required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec#matchConstraints + */ + readonly matchConstraints?: MatchResourcesV1Beta1; + + /** + * ParamKind specifies the kind of resources used to parameterize this policy. If absent, there are no parameters for this policy and the param CEL variable will not be provided to validation expressions. If ParamKind refers to a non-existent kind, this policy definition is mis-configured and the FailurePolicy is applied. If paramKind is specified but paramRef is unset in ValidatingAdmissionPolicyBinding, the params variable will be null. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec#paramKind + */ + readonly paramKind?: ParamKindV1Beta1; + + /** + * Validations contain CEL expressions which is used to apply the validation. Validations and AuditAnnotations may not both be empty; a minimum of one Validations or AuditAnnotations is required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec#validations + */ + readonly validations?: ValidationV1Beta1[]; + + /** + * Variables contain definitions of variables that can be used in composition of other expressions. Each variable is defined as a named CEL expression. The variables defined here will be available under `variables` in other expressions of the policy except MatchConditions because MatchConditions are evaluated before the rest of the policy. + * + * The expression of a variable can refer to other variables defined earlier in the list but not those after. Thus, Variables must be sorted by the order of first appearance and acyclic. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec#variables + */ + readonly variables?: VariableV1Beta1[]; + +} + +/** + * Converts an object of type 'ValidatingAdmissionPolicySpecV1Beta1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ValidatingAdmissionPolicySpecV1Beta1(obj: ValidatingAdmissionPolicySpecV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'auditAnnotations': obj.auditAnnotations?.map(y => toJson_AuditAnnotationV1Beta1(y)), + 'failurePolicy': obj.failurePolicy, + 'matchConditions': obj.matchConditions?.map(y => toJson_MatchConditionV1Beta1(y)), + 'matchConstraints': toJson_MatchResourcesV1Beta1(obj.matchConstraints), + 'paramKind': toJson_ParamKindV1Beta1(obj.paramKind), + 'validations': obj.validations?.map(y => toJson_ValidationV1Beta1(y)), + 'variables': obj.variables?.map(y => toJson_VariableV1Beta1(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ValidatingAdmissionPolicyBindingSpec is the specification of the ValidatingAdmissionPolicyBinding. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec + */ +export interface ValidatingAdmissionPolicyBindingSpecV1Beta1 { + /** + * MatchResources declares what resources match this binding and will be validated by it. Note that this is intersected with the policy's matchConstraints, so only requests that are matched by the policy can be selected by this. If this is unset, all resources matched by the policy are validated by this binding When resourceRules is unset, it does not constrain resource matching. If a resource is matched by the other fields of this object, it will be validated. Note that this is differs from ValidatingAdmissionPolicy matchConstraints, where resourceRules are required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec#matchResources + */ + readonly matchResources?: MatchResourcesV1Beta1; + + /** + * paramRef specifies the parameter resource used to configure the admission control policy. It should point to a resource of the type specified in ParamKind of the bound ValidatingAdmissionPolicy. If the policy specifies a ParamKind and the resource referred to by ParamRef does not exist, this binding is considered mis-configured and the FailurePolicy of the ValidatingAdmissionPolicy applied. If the policy does not specify a ParamKind then this field is ignored, and the rules are evaluated without a param. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec#paramRef + */ + readonly paramRef?: ParamRefV1Beta1; + + /** + * PolicyName references a ValidatingAdmissionPolicy name which the ValidatingAdmissionPolicyBinding binds to. If the referenced resource does not exist, this binding is considered invalid and will be ignored Required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec#policyName + */ + readonly policyName?: string; + + /** + * validationActions declares how Validations of the referenced ValidatingAdmissionPolicy are enforced. If a validation evaluates to false it is always enforced according to these actions. + * + * Failures defined by the ValidatingAdmissionPolicy's FailurePolicy are enforced according to these actions only if the FailurePolicy is set to Fail, otherwise the failures are ignored. This includes compilation errors, runtime errors and misconfigurations of the policy. + * + * validationActions is declared as a set of action values. Order does not matter. validationActions may not contain duplicates of the same action. + * + * The supported actions values are: + * + * "Deny" specifies that a validation failure results in a denied request. + * + * "Warn" specifies that a validation failure is reported to the request client in HTTP Warning headers, with a warning code of 299. Warnings can be sent both for allowed or denied admission responses. + * + * "Audit" specifies that a validation failure is included in the published audit event for the request. The audit event will contain a `validation.policy.admission.k8s.io/validation_failure` audit annotation with a value containing the details of the validation failures, formatted as a JSON list of objects, each with the following fields: - message: The validation failure message string - policy: The resource name of the ValidatingAdmissionPolicy - binding: The resource name of the ValidatingAdmissionPolicyBinding - expressionIndex: The index of the failed validations in the ValidatingAdmissionPolicy - validationActions: The enforcement actions enacted for the validation failure Example audit annotation: `"validation.policy.admission.k8s.io/validation_failure": "[{"message": "Invalid value", {"policy": "policy.example.com", {"binding": "policybinding.example.com", {"expressionIndex": "1", {"validationActions": ["Audit"]}]"` + * + * Clients should expect to handle additional values by ignoring any values not recognized. + * + * "Deny" and "Warn" may not be used together since this combination needlessly duplicates the validation failure both in the API response body and the HTTP warning headers. + * + * Required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec#validationActions + */ + readonly validationActions?: string[]; + +} + +/** + * Converts an object of type 'ValidatingAdmissionPolicyBindingSpecV1Beta1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ValidatingAdmissionPolicyBindingSpecV1Beta1(obj: ValidatingAdmissionPolicyBindingSpecV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - matchResources: toJson_MatchResourcesV1Alpha1(obj.matchResources), - paramRef: toJson_ParamRefV1Alpha1(obj.paramRef), - policyName: obj.policyName, - validationActions: obj.validationActions?.map((y) => y), + 'matchResources': toJson_MatchResourcesV1Beta1(obj.matchResources), + 'paramRef': toJson_ParamRefV1Beta1(obj.paramRef), + 'policyName': obj.policyName, + 'validationActions': obj.validationActions?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14786,30 +14215,24 @@ export interface DaemonSetSpec { * @schema io.k8s.api.apps.v1.DaemonSetSpec#updateStrategy */ readonly updateStrategy?: DaemonSetUpdateStrategy; + } /** * Converts an object of type 'DaemonSetSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DaemonSetSpec( - obj: DaemonSetSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DaemonSetSpec(obj: DaemonSetSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - minReadySeconds: obj.minReadySeconds, - revisionHistoryLimit: obj.revisionHistoryLimit, - selector: toJson_LabelSelector(obj.selector), - template: toJson_PodTemplateSpec(obj.template), - updateStrategy: toJson_DaemonSetUpdateStrategy(obj.updateStrategy), + 'minReadySeconds': obj.minReadySeconds, + 'revisionHistoryLimit': obj.revisionHistoryLimit, + 'selector': toJson_LabelSelector(obj.selector), + 'template': toJson_PodTemplateSpec(obj.template), + 'updateStrategy': toJson_DaemonSetUpdateStrategy(obj.updateStrategy), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14878,33 +14301,27 @@ export interface DeploymentSpec { * @schema io.k8s.api.apps.v1.DeploymentSpec#template */ readonly template: PodTemplateSpec; + } /** * Converts an object of type 'DeploymentSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DeploymentSpec( - obj: DeploymentSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DeploymentSpec(obj: DeploymentSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - minReadySeconds: obj.minReadySeconds, - paused: obj.paused, - progressDeadlineSeconds: obj.progressDeadlineSeconds, - replicas: obj.replicas, - revisionHistoryLimit: obj.revisionHistoryLimit, - selector: toJson_LabelSelector(obj.selector), - strategy: toJson_DeploymentStrategy(obj.strategy), - template: toJson_PodTemplateSpec(obj.template), + 'minReadySeconds': obj.minReadySeconds, + 'paused': obj.paused, + 'progressDeadlineSeconds': obj.progressDeadlineSeconds, + 'replicas': obj.replicas, + 'revisionHistoryLimit': obj.revisionHistoryLimit, + 'selector': toJson_LabelSelector(obj.selector), + 'strategy': toJson_DeploymentStrategy(obj.strategy), + 'template': toJson_PodTemplateSpec(obj.template), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -14943,29 +14360,23 @@ export interface ReplicaSetSpec { * @schema io.k8s.api.apps.v1.ReplicaSetSpec#template */ readonly template?: PodTemplateSpec; + } /** * Converts an object of type 'ReplicaSetSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ReplicaSetSpec( - obj: ReplicaSetSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ReplicaSetSpec(obj: ReplicaSetSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - minReadySeconds: obj.minReadySeconds, - replicas: obj.replicas, - selector: toJson_LabelSelector(obj.selector), - template: toJson_PodTemplateSpec(obj.template), + 'minReadySeconds': obj.minReadySeconds, + 'replicas': obj.replicas, + 'selector': toJson_LabelSelector(obj.selector), + 'template': toJson_PodTemplateSpec(obj.template), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15052,41 +14463,30 @@ export interface StatefulSetSpec { * @schema io.k8s.api.apps.v1.StatefulSetSpec#volumeClaimTemplates */ readonly volumeClaimTemplates?: KubePersistentVolumeClaimProps[]; + } /** * Converts an object of type 'StatefulSetSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StatefulSetSpec( - obj: StatefulSetSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StatefulSetSpec(obj: StatefulSetSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - minReadySeconds: obj.minReadySeconds, - ordinals: toJson_StatefulSetOrdinals(obj.ordinals), - persistentVolumeClaimRetentionPolicy: - toJson_StatefulSetPersistentVolumeClaimRetentionPolicy( - obj.persistentVolumeClaimRetentionPolicy, - ), - podManagementPolicy: obj.podManagementPolicy, - replicas: obj.replicas, - revisionHistoryLimit: obj.revisionHistoryLimit, - selector: toJson_LabelSelector(obj.selector), - serviceName: obj.serviceName, - template: toJson_PodTemplateSpec(obj.template), - updateStrategy: toJson_StatefulSetUpdateStrategy(obj.updateStrategy), - volumeClaimTemplates: obj.volumeClaimTemplates?.map((y) => - toJson_KubePersistentVolumeClaimProps(y), - ), + 'minReadySeconds': obj.minReadySeconds, + 'ordinals': toJson_StatefulSetOrdinals(obj.ordinals), + 'persistentVolumeClaimRetentionPolicy': toJson_StatefulSetPersistentVolumeClaimRetentionPolicy(obj.persistentVolumeClaimRetentionPolicy), + 'podManagementPolicy': obj.podManagementPolicy, + 'replicas': obj.replicas, + 'revisionHistoryLimit': obj.revisionHistoryLimit, + 'selector': toJson_LabelSelector(obj.selector), + 'serviceName': obj.serviceName, + 'template': toJson_PodTemplateSpec(obj.template), + 'updateStrategy': toJson_StatefulSetUpdateStrategy(obj.updateStrategy), + 'volumeClaimTemplates': obj.volumeClaimTemplates?.map(y => toJson_KubePersistentVolumeClaimProps(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15116,28 +14516,22 @@ export interface TokenRequestSpec { * @schema io.k8s.api.authentication.v1.TokenRequestSpec#expirationSeconds */ readonly expirationSeconds?: number; + } /** * Converts an object of type 'TokenRequestSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TokenRequestSpec( - obj: TokenRequestSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TokenRequestSpec(obj: TokenRequestSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - audiences: obj.audiences?.map((y) => y), - boundObjectRef: toJson_BoundObjectReference(obj.boundObjectRef), - expirationSeconds: obj.expirationSeconds, + 'audiences': obj.audiences?.map(y => y), + 'boundObjectRef': toJson_BoundObjectReference(obj.boundObjectRef), + 'expirationSeconds': obj.expirationSeconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15160,27 +14554,21 @@ export interface TokenReviewSpec { * @schema io.k8s.api.authentication.v1.TokenReviewSpec#token */ readonly token?: string; + } /** * Converts an object of type 'TokenReviewSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TokenReviewSpec( - obj: TokenReviewSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TokenReviewSpec(obj: TokenReviewSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - audiences: obj.audiences?.map((y) => y), - token: obj.token, + 'audiences': obj.audiences?.map(y => y), + 'token': obj.token, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15231,40 +14619,25 @@ export interface SubjectAccessReviewSpec { * @schema io.k8s.api.authorization.v1.SubjectAccessReviewSpec#user */ readonly user?: string; + } /** * Converts an object of type 'SubjectAccessReviewSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SubjectAccessReviewSpec( - obj: SubjectAccessReviewSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SubjectAccessReviewSpec(obj: SubjectAccessReviewSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - extra: - obj.extra === undefined - ? undefined - : Object.entries(obj.extra).reduce( - (r, i) => - i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.map((y) => y) }, - {}, - ), - groups: obj.groups?.map((y) => y), - nonResourceAttributes: toJson_NonResourceAttributes( - obj.nonResourceAttributes, - ), - resourceAttributes: toJson_ResourceAttributes(obj.resourceAttributes), - uid: obj.uid, - user: obj.user, + 'extra': ((obj.extra) === undefined) ? undefined : (Object.entries(obj.extra).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.map(y => y) }), {})), + 'groups': obj.groups?.map(y => y), + 'nonResourceAttributes': toJson_NonResourceAttributes(obj.nonResourceAttributes), + 'resourceAttributes': toJson_ResourceAttributes(obj.resourceAttributes), + 'uid': obj.uid, + 'user': obj.user, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15287,29 +14660,21 @@ export interface SelfSubjectAccessReviewSpec { * @schema io.k8s.api.authorization.v1.SelfSubjectAccessReviewSpec#resourceAttributes */ readonly resourceAttributes?: ResourceAttributes; + } /** * Converts an object of type 'SelfSubjectAccessReviewSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SelfSubjectAccessReviewSpec( - obj: SelfSubjectAccessReviewSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SelfSubjectAccessReviewSpec(obj: SelfSubjectAccessReviewSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nonResourceAttributes: toJson_NonResourceAttributes( - obj.nonResourceAttributes, - ), - resourceAttributes: toJson_ResourceAttributes(obj.resourceAttributes), + 'nonResourceAttributes': toJson_NonResourceAttributes(obj.nonResourceAttributes), + 'resourceAttributes': toJson_ResourceAttributes(obj.resourceAttributes), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15325,26 +14690,20 @@ export interface SelfSubjectRulesReviewSpec { * @schema io.k8s.api.authorization.v1.SelfSubjectRulesReviewSpec#namespace */ readonly namespace?: string; + } /** * Converts an object of type 'SelfSubjectRulesReviewSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SelfSubjectRulesReviewSpec( - obj: SelfSubjectRulesReviewSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SelfSubjectRulesReviewSpec(obj: SelfSubjectRulesReviewSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - namespace: obj.namespace, + 'namespace': obj.namespace, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15381,29 +14740,23 @@ export interface HorizontalPodAutoscalerSpec { * @schema io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec#targetCPUUtilizationPercentage */ readonly targetCpuUtilizationPercentage?: number; + } /** * Converts an object of type 'HorizontalPodAutoscalerSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HorizontalPodAutoscalerSpec( - obj: HorizontalPodAutoscalerSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HorizontalPodAutoscalerSpec(obj: HorizontalPodAutoscalerSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - maxReplicas: obj.maxReplicas, - minReplicas: obj.minReplicas, - scaleTargetRef: toJson_CrossVersionObjectReference(obj.scaleTargetRef), - targetCPUUtilizationPercentage: obj.targetCpuUtilizationPercentage, + 'maxReplicas': obj.maxReplicas, + 'minReplicas': obj.minReplicas, + 'scaleTargetRef': toJson_CrossVersionObjectReference(obj.scaleTargetRef), + 'targetCPUUtilizationPercentage': obj.targetCpuUtilizationPercentage, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15419,26 +14772,20 @@ export interface ScaleSpec { * @schema io.k8s.api.autoscaling.v1.ScaleSpec#replicas */ readonly replicas?: number; + } /** * Converts an object of type 'ScaleSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ScaleSpec( - obj: ScaleSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ScaleSpec(obj: ScaleSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - replicas: obj.replicas, + 'replicas': obj.replicas, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15482,30 +14829,24 @@ export interface HorizontalPodAutoscalerSpecV2 { * @schema io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec#scaleTargetRef */ readonly scaleTargetRef: CrossVersionObjectReferenceV2; + } /** * Converts an object of type 'HorizontalPodAutoscalerSpecV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HorizontalPodAutoscalerSpecV2( - obj: HorizontalPodAutoscalerSpecV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HorizontalPodAutoscalerSpecV2(obj: HorizontalPodAutoscalerSpecV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - behavior: toJson_HorizontalPodAutoscalerBehaviorV2(obj.behavior), - maxReplicas: obj.maxReplicas, - metrics: obj.metrics?.map((y) => toJson_MetricSpecV2(y)), - minReplicas: obj.minReplicas, - scaleTargetRef: toJson_CrossVersionObjectReferenceV2(obj.scaleTargetRef), + 'behavior': toJson_HorizontalPodAutoscalerBehaviorV2(obj.behavior), + 'maxReplicas': obj.maxReplicas, + 'metrics': obj.metrics?.map(y => toJson_MetricSpecV2(y)), + 'minReplicas': obj.minReplicas, + 'scaleTargetRef': toJson_CrossVersionObjectReferenceV2(obj.scaleTargetRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15575,33 +14916,27 @@ export interface CronJobSpec { * @schema io.k8s.api.batch.v1.CronJobSpec#timeZone */ readonly timeZone?: string; + } /** * Converts an object of type 'CronJobSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CronJobSpec( - obj: CronJobSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CronJobSpec(obj: CronJobSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - concurrencyPolicy: obj.concurrencyPolicy, - failedJobsHistoryLimit: obj.failedJobsHistoryLimit, - jobTemplate: toJson_JobTemplateSpec(obj.jobTemplate), - schedule: obj.schedule, - startingDeadlineSeconds: obj.startingDeadlineSeconds, - successfulJobsHistoryLimit: obj.successfulJobsHistoryLimit, - suspend: obj.suspend, - timeZone: obj.timeZone, + 'concurrencyPolicy': obj.concurrencyPolicy, + 'failedJobsHistoryLimit': obj.failedJobsHistoryLimit, + 'jobTemplate': toJson_JobTemplateSpec(obj.jobTemplate), + 'schedule': obj.schedule, + 'startingDeadlineSeconds': obj.startingDeadlineSeconds, + 'successfulJobsHistoryLimit': obj.successfulJobsHistoryLimit, + 'suspend': obj.suspend, + 'timeZone': obj.timeZone, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15626,6 +14961,13 @@ export interface JobSpec { */ readonly backoffLimit?: number; + /** + * Specifies the limit for the number of retries within an index before marking this index as failed. When enabled the number of failures per index is kept in the pod's batch.kubernetes.io/job-index-failure-count annotation. It can only be set when Job's completionMode=Indexed, and the Pod's restart policy is Never. The field is immutable. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). + * + * @schema io.k8s.api.batch.v1.JobSpec#backoffLimitPerIndex + */ + readonly backoffLimitPerIndex?: number; + /** * completionMode specifies how Pod completions are tracked. It can be `NonIndexed` (default) or `Indexed`. * @@ -15653,6 +14995,13 @@ export interface JobSpec { */ readonly manualSelector?: boolean; + /** + * Specifies the maximal number of failed indexes before marking the Job as failed, when backoffLimitPerIndex is set. Once the number of failed indexes exceeds this number the entire Job is marked as Failed and its execution is terminated. When left as null the job continues execution of all of its indexes and is marked with the `Complete` Job condition. It can only be specified when backoffLimitPerIndex is set. It can be null or up to completions. It is required and must be less than or equal to 10^4 when is completions greater than 10^5. This field is beta-level. It can be used when the `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). + * + * @schema io.k8s.api.batch.v1.JobSpec#maxFailedIndexes + */ + readonly maxFailedIndexes?: number; + /** * Specifies the maximum desired number of pods the job should run at any given time. The actual number of pods running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ * @@ -15663,12 +15012,24 @@ export interface JobSpec { /** * Specifies the policy of handling failed pods. In particular, it allows to specify the set of actions and conditions which need to be satisfied to take the associated action. If empty, the default behaviour applies - the counter of failed pods, represented by the jobs's .status.failed field, is incremented and it is checked against the backoffLimit. This field cannot be used in combination with restartPolicy=OnFailure. * - * This field is alpha-level. To use this field, you must enable the `JobPodFailurePolicy` feature gate (disabled by default). + * This field is beta-level. It can be used when the `JobPodFailurePolicy` feature gate is enabled (enabled by default). * * @schema io.k8s.api.batch.v1.JobSpec#podFailurePolicy */ readonly podFailurePolicy?: PodFailurePolicy; + /** + * podReplacementPolicy specifies when to create replacement Pods. Possible values are: - TerminatingOrFailed means that we recreate pods + * when they are terminating (has a metadata.deletionTimestamp) or failed. + * - Failed means to wait until a previously created Pod is fully terminated (has phase + * Failed or Succeeded) before creating a replacement Pod. + * + * When using podFailurePolicy, Failed is the the only allowed value. TerminatingOrFailed and Failed are allowed values when podFailurePolicy is not in use. This is an beta field. To use this, enable the JobPodReplacementPolicy feature toggle. This is on by default. + * + * @schema io.k8s.api.batch.v1.JobSpec#podReplacementPolicy + */ + readonly podReplacementPolicy?: string; + /** * A label query over pods that should match the pod count. Normally, the system sets this field for you. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors * @@ -15697,36 +15058,33 @@ export interface JobSpec { * @schema io.k8s.api.batch.v1.JobSpec#ttlSecondsAfterFinished */ readonly ttlSecondsAfterFinished?: number; + } /** * Converts an object of type 'JobSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_JobSpec( - obj: JobSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_JobSpec(obj: JobSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - activeDeadlineSeconds: obj.activeDeadlineSeconds, - backoffLimit: obj.backoffLimit, - completionMode: obj.completionMode, - completions: obj.completions, - manualSelector: obj.manualSelector, - parallelism: obj.parallelism, - podFailurePolicy: toJson_PodFailurePolicy(obj.podFailurePolicy), - selector: toJson_LabelSelector(obj.selector), - suspend: obj.suspend, - template: toJson_PodTemplateSpec(obj.template), - ttlSecondsAfterFinished: obj.ttlSecondsAfterFinished, + 'activeDeadlineSeconds': obj.activeDeadlineSeconds, + 'backoffLimit': obj.backoffLimit, + 'backoffLimitPerIndex': obj.backoffLimitPerIndex, + 'completionMode': obj.completionMode, + 'completions': obj.completions, + 'manualSelector': obj.manualSelector, + 'maxFailedIndexes': obj.maxFailedIndexes, + 'parallelism': obj.parallelism, + 'podFailurePolicy': toJson_PodFailurePolicy(obj.podFailurePolicy), + 'podReplacementPolicy': obj.podReplacementPolicy, + 'selector': toJson_LabelSelector(obj.selector), + 'suspend': obj.suspend, + 'template': toJson_PodTemplateSpec(obj.template), + 'ttlSecondsAfterFinished': obj.ttlSecondsAfterFinished, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15835,40 +15193,27 @@ export interface CertificateSigningRequestSpec { * @schema io.k8s.api.certificates.v1.CertificateSigningRequestSpec#username */ readonly username?: string; + } /** * Converts an object of type 'CertificateSigningRequestSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CertificateSigningRequestSpec( - obj: CertificateSigningRequestSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CertificateSigningRequestSpec(obj: CertificateSigningRequestSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - expirationSeconds: obj.expirationSeconds, - extra: - obj.extra === undefined - ? undefined - : Object.entries(obj.extra).reduce( - (r, i) => - i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.map((y) => y) }, - {}, - ), - groups: obj.groups?.map((y) => y), - request: obj.request, - signerName: obj.signerName, - uid: obj.uid, - usages: obj.usages?.map((y) => y), - username: obj.username, + 'expirationSeconds': obj.expirationSeconds, + 'extra': ((obj.extra) === undefined) ? undefined : (Object.entries(obj.extra).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.map(y => y) }), {})), + 'groups': obj.groups?.map(y => y), + 'request': obj.request, + 'signerName': obj.signerName, + 'uid': obj.uid, + 'usages': obj.usages?.map(y => y), + 'username': obj.username, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15903,27 +15248,21 @@ export interface ClusterTrustBundleSpecV1Alpha1 { * @schema io.k8s.api.certificates.v1alpha1.ClusterTrustBundleSpec#trustBundle */ readonly trustBundle: string; + } /** * Converts an object of type 'ClusterTrustBundleSpecV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ClusterTrustBundleSpecV1Alpha1( - obj: ClusterTrustBundleSpecV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ClusterTrustBundleSpecV1Alpha1(obj: ClusterTrustBundleSpecV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - signerName: obj.signerName, - trustBundle: obj.trustBundle, + 'signerName': obj.signerName, + 'trustBundle': obj.trustBundle, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -15967,30 +15306,24 @@ export interface LeaseSpec { * @schema io.k8s.api.coordination.v1.LeaseSpec#renewTime */ readonly renewTime?: Date; + } /** * Converts an object of type 'LeaseSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LeaseSpec( - obj: LeaseSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LeaseSpec(obj: LeaseSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - acquireTime: obj.acquireTime?.toISOString(), - holderIdentity: obj.holderIdentity, - leaseDurationSeconds: obj.leaseDurationSeconds, - leaseTransitions: obj.leaseTransitions, - renewTime: obj.renewTime?.toISOString(), + 'acquireTime': obj.acquireTime?.toISOString(), + 'holderIdentity': obj.holderIdentity, + 'leaseDurationSeconds': obj.leaseDurationSeconds, + 'leaseTransitions': obj.leaseTransitions, + 'renewTime': obj.renewTime?.toISOString(), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16048,32 +15381,26 @@ export interface ObjectReference { * @schema io.k8s.api.core.v1.ObjectReference#uid */ readonly uid?: string; + } /** * Converts an object of type 'ObjectReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ObjectReference( - obj: ObjectReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ObjectReference(obj: ObjectReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - fieldPath: obj.fieldPath, - kind: obj.kind, - name: obj.name, - namespace: obj.namespace, - resourceVersion: obj.resourceVersion, - uid: obj.uid, + 'apiVersion': obj.apiVersion, + 'fieldPath': obj.fieldPath, + 'kind': obj.kind, + 'name': obj.name, + 'namespace': obj.namespace, + 'resourceVersion': obj.resourceVersion, + 'uid': obj.uid, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16110,29 +15437,23 @@ export interface ComponentCondition { * @schema io.k8s.api.core.v1.ComponentCondition#type */ readonly type: string; + } /** * Converts an object of type 'ComponentCondition' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ComponentCondition( - obj: ComponentCondition | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ComponentCondition(obj: ComponentCondition | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - error: obj.error, - message: obj.message, - status: obj.status, - type: obj.type, + 'error': obj.error, + 'message': obj.message, + 'status': obj.status, + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16172,30 +15493,22 @@ export interface EndpointSubset { * @schema io.k8s.api.core.v1.EndpointSubset#ports */ readonly ports?: EndpointPort[]; + } /** * Converts an object of type 'EndpointSubset' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EndpointSubset( - obj: EndpointSubset | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EndpointSubset(obj: EndpointSubset | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - addresses: obj.addresses?.map((y) => toJson_EndpointAddress(y)), - notReadyAddresses: obj.notReadyAddresses?.map((y) => - toJson_EndpointAddress(y), - ), - ports: obj.ports?.map((y) => toJson_EndpointPort(y)), + 'addresses': obj.addresses?.map(y => toJson_EndpointAddress(y)), + 'notReadyAddresses': obj.notReadyAddresses?.map(y => toJson_EndpointAddress(y)), + 'ports': obj.ports?.map(y => toJson_EndpointPort(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16218,27 +15531,21 @@ export interface EventSource { * @schema io.k8s.api.core.v1.EventSource#host */ readonly host?: string; + } /** * Converts an object of type 'EventSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EventSource( - obj: EventSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EventSource(obj: EventSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - component: obj.component, - host: obj.host, + 'component': obj.component, + 'host': obj.host, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16261,27 +15568,21 @@ export interface EventSeries { * @schema io.k8s.api.events.v1.EventSeries#lastObservedTime */ readonly lastObservedTime: Date; + } /** * Converts an object of type 'EventSeries' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EventSeries( - obj: EventSeries | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EventSeries(obj: EventSeries | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - count: obj.count, - lastObservedTime: obj.lastObservedTime?.toISOString(), + 'count': obj.count, + 'lastObservedTime': obj.lastObservedTime?.toISOString(), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16297,26 +15598,20 @@ export interface LimitRangeSpec { * @schema io.k8s.api.core.v1.LimitRangeSpec#limits */ readonly limits: LimitRangeItem[]; + } /** * Converts an object of type 'LimitRangeSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LimitRangeSpec( - obj: LimitRangeSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LimitRangeSpec(obj: LimitRangeSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - limits: obj.limits?.map((y) => toJson_LimitRangeItem(y)), + 'limits': obj.limits?.map(y => toJson_LimitRangeItem(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16332,26 +15627,20 @@ export interface NamespaceSpec { * @schema io.k8s.api.core.v1.NamespaceSpec#finalizers */ readonly finalizers?: string[]; + } /** * Converts an object of type 'NamespaceSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NamespaceSpec( - obj: NamespaceSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NamespaceSpec(obj: NamespaceSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - finalizers: obj.finalizers?.map((y) => y), + 'finalizers': obj.finalizers?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16409,32 +15698,26 @@ export interface NodeSpec { * @schema io.k8s.api.core.v1.NodeSpec#unschedulable */ readonly unschedulable?: boolean; + } /** * Converts an object of type 'NodeSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NodeSpec( - obj: NodeSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NodeSpec(obj: NodeSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - configSource: toJson_NodeConfigSource(obj.configSource), - externalID: obj.externalId, - podCIDR: obj.podCidr, - podCIDRs: obj.podCidRs?.map((y) => y), - providerID: obj.providerId, - taints: obj.taints?.map((y) => toJson_Taint(y)), - unschedulable: obj.unschedulable, + 'configSource': toJson_NodeConfigSource(obj.configSource), + 'externalID': obj.externalId, + 'podCIDR': obj.podCidr, + 'podCIDRs': obj.podCidRs?.map(y => y), + 'providerID': obj.providerId, + 'taints': obj.taints?.map(y => toJson_Taint(y)), + 'unschedulable': obj.unschedulable, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16640,6 +15923,13 @@ export interface PersistentVolumeSpec { */ readonly storageos?: StorageOsPersistentVolumeSource; + /** + * Name of VolumeAttributesClass to which this persistent volume belongs. Empty value is not allowed. When this field is not set, it indicates that this volume does not belong to any VolumeAttributesClass. This field is mutable and can be changed by the CSI driver after a volume has been updated successfully to a new class. For an unbound PersistentVolume, the volumeAttributesClassName will be matched with unbound PersistentVolumeClaims during the binding process. This is an alpha field and requires enabling VolumeAttributesClass feature. + * + * @schema io.k8s.api.core.v1.PersistentVolumeSpec#volumeAttributesClassName + */ + readonly volumeAttributesClassName?: string; + /** * volumeMode defines if a volume is intended to be used with a formatted filesystem or to remain in raw block state. Value of Filesystem is implied when not included in spec. * @@ -16653,67 +15943,50 @@ export interface PersistentVolumeSpec { * @schema io.k8s.api.core.v1.PersistentVolumeSpec#vsphereVolume */ readonly vsphereVolume?: VsphereVirtualDiskVolumeSource; + } /** * Converts an object of type 'PersistentVolumeSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PersistentVolumeSpec( - obj: PersistentVolumeSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - accessModes: obj.accessModes?.map((y) => y), - awsElasticBlockStore: toJson_AwsElasticBlockStoreVolumeSource( - obj.awsElasticBlockStore, - ), - azureDisk: toJson_AzureDiskVolumeSource(obj.azureDisk), - azureFile: toJson_AzureFilePersistentVolumeSource(obj.azureFile), - capacity: - obj.capacity === undefined - ? undefined - : Object.entries(obj.capacity).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - cephfs: toJson_CephFsPersistentVolumeSource(obj.cephfs), - cinder: toJson_CinderPersistentVolumeSource(obj.cinder), - claimRef: toJson_ObjectReference(obj.claimRef), - csi: toJson_CsiPersistentVolumeSource(obj.csi), - fc: toJson_FcVolumeSource(obj.fc), - flexVolume: toJson_FlexPersistentVolumeSource(obj.flexVolume), - flocker: toJson_FlockerVolumeSource(obj.flocker), - gcePersistentDisk: toJson_GcePersistentDiskVolumeSource( - obj.gcePersistentDisk, - ), - glusterfs: toJson_GlusterfsPersistentVolumeSource(obj.glusterfs), - hostPath: toJson_HostPathVolumeSource(obj.hostPath), - iscsi: toJson_IscsiPersistentVolumeSource(obj.iscsi), - local: toJson_LocalVolumeSource(obj.local), - mountOptions: obj.mountOptions?.map((y) => y), - nfs: toJson_NfsVolumeSource(obj.nfs), - nodeAffinity: toJson_VolumeNodeAffinity(obj.nodeAffinity), - persistentVolumeReclaimPolicy: obj.persistentVolumeReclaimPolicy, - photonPersistentDisk: toJson_PhotonPersistentDiskVolumeSource( - obj.photonPersistentDisk, - ), - portworxVolume: toJson_PortworxVolumeSource(obj.portworxVolume), - quobyte: toJson_QuobyteVolumeSource(obj.quobyte), - rbd: toJson_RbdPersistentVolumeSource(obj.rbd), - scaleIO: toJson_ScaleIoPersistentVolumeSource(obj.scaleIo), - storageClassName: obj.storageClassName, - storageos: toJson_StorageOsPersistentVolumeSource(obj.storageos), - volumeMode: obj.volumeMode, - vsphereVolume: toJson_VsphereVirtualDiskVolumeSource(obj.vsphereVolume), - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); +export function toJson_PersistentVolumeSpec(obj: PersistentVolumeSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'accessModes': obj.accessModes?.map(y => y), + 'awsElasticBlockStore': toJson_AwsElasticBlockStoreVolumeSource(obj.awsElasticBlockStore), + 'azureDisk': toJson_AzureDiskVolumeSource(obj.azureDisk), + 'azureFile': toJson_AzureFilePersistentVolumeSource(obj.azureFile), + 'capacity': ((obj.capacity) === undefined) ? undefined : (Object.entries(obj.capacity).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'cephfs': toJson_CephFsPersistentVolumeSource(obj.cephfs), + 'cinder': toJson_CinderPersistentVolumeSource(obj.cinder), + 'claimRef': toJson_ObjectReference(obj.claimRef), + 'csi': toJson_CsiPersistentVolumeSource(obj.csi), + 'fc': toJson_FcVolumeSource(obj.fc), + 'flexVolume': toJson_FlexPersistentVolumeSource(obj.flexVolume), + 'flocker': toJson_FlockerVolumeSource(obj.flocker), + 'gcePersistentDisk': toJson_GcePersistentDiskVolumeSource(obj.gcePersistentDisk), + 'glusterfs': toJson_GlusterfsPersistentVolumeSource(obj.glusterfs), + 'hostPath': toJson_HostPathVolumeSource(obj.hostPath), + 'iscsi': toJson_IscsiPersistentVolumeSource(obj.iscsi), + 'local': toJson_LocalVolumeSource(obj.local), + 'mountOptions': obj.mountOptions?.map(y => y), + 'nfs': toJson_NfsVolumeSource(obj.nfs), + 'nodeAffinity': toJson_VolumeNodeAffinity(obj.nodeAffinity), + 'persistentVolumeReclaimPolicy': obj.persistentVolumeReclaimPolicy, + 'photonPersistentDisk': toJson_PhotonPersistentDiskVolumeSource(obj.photonPersistentDisk), + 'portworxVolume': toJson_PortworxVolumeSource(obj.portworxVolume), + 'quobyte': toJson_QuobyteVolumeSource(obj.quobyte), + 'rbd': toJson_RbdPersistentVolumeSource(obj.rbd), + 'scaleIO': toJson_ScaleIoPersistentVolumeSource(obj.scaleIo), + 'storageClassName': obj.storageClassName, + 'storageos': toJson_StorageOsPersistentVolumeSource(obj.storageos), + 'volumeAttributesClassName': obj.volumeAttributesClassName, + 'volumeMode': obj.volumeMode, + 'vsphereVolume': toJson_VsphereVirtualDiskVolumeSource(obj.vsphereVolume), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -16756,7 +16029,7 @@ export interface PersistentVolumeClaimSpec { * * @schema io.k8s.api.core.v1.PersistentVolumeClaimSpec#resources */ - readonly resources?: ResourceRequirements; + readonly resources?: VolumeResourceRequirements; /** * selector is a label query over volumes to consider for binding. @@ -16772,6 +16045,13 @@ export interface PersistentVolumeClaimSpec { */ readonly storageClassName?: string; + /** + * volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled. + * + * @schema io.k8s.api.core.v1.PersistentVolumeClaimSpec#volumeAttributesClassName + */ + readonly volumeAttributesClassName?: string; + /** * volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec. * @@ -16785,33 +16065,28 @@ export interface PersistentVolumeClaimSpec { * @schema io.k8s.api.core.v1.PersistentVolumeClaimSpec#volumeName */ readonly volumeName?: string; + } /** * Converts an object of type 'PersistentVolumeClaimSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PersistentVolumeClaimSpec( - obj: PersistentVolumeClaimSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PersistentVolumeClaimSpec(obj: PersistentVolumeClaimSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - accessModes: obj.accessModes?.map((y) => y), - dataSource: toJson_TypedLocalObjectReference(obj.dataSource), - dataSourceRef: toJson_TypedObjectReference(obj.dataSourceRef), - resources: toJson_ResourceRequirements(obj.resources), - selector: toJson_LabelSelector(obj.selector), - storageClassName: obj.storageClassName, - volumeMode: obj.volumeMode, - volumeName: obj.volumeName, + 'accessModes': obj.accessModes?.map(y => y), + 'dataSource': toJson_TypedLocalObjectReference(obj.dataSource), + 'dataSourceRef': toJson_TypedObjectReference(obj.dataSourceRef), + 'resources': toJson_VolumeResourceRequirements(obj.resources), + 'selector': toJson_LabelSelector(obj.selector), + 'storageClassName': obj.storageClassName, + 'volumeAttributesClassName': obj.volumeAttributesClassName, + 'volumeMode': obj.volumeMode, + 'volumeName': obj.volumeName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17117,84 +16392,58 @@ export interface PodSpec { * @schema io.k8s.api.core.v1.PodSpec#volumes */ readonly volumes?: Volume[]; + } /** * Converts an object of type 'PodSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodSpec( - obj: PodSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - activeDeadlineSeconds: obj.activeDeadlineSeconds, - affinity: toJson_Affinity(obj.affinity), - automountServiceAccountToken: obj.automountServiceAccountToken, - containers: obj.containers?.map((y) => toJson_Container(y)), - dnsConfig: toJson_PodDnsConfig(obj.dnsConfig), - dnsPolicy: obj.dnsPolicy, - enableServiceLinks: obj.enableServiceLinks, - ephemeralContainers: obj.ephemeralContainers?.map((y) => - toJson_EphemeralContainer(y), - ), - hostAliases: obj.hostAliases?.map((y) => toJson_HostAlias(y)), - hostIPC: obj.hostIpc, - hostNetwork: obj.hostNetwork, - hostPID: obj.hostPid, - hostUsers: obj.hostUsers, - hostname: obj.hostname, - imagePullSecrets: obj.imagePullSecrets?.map((y) => - toJson_LocalObjectReference(y), - ), - initContainers: obj.initContainers?.map((y) => toJson_Container(y)), - nodeName: obj.nodeName, - nodeSelector: - obj.nodeSelector === undefined - ? undefined - : Object.entries(obj.nodeSelector).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - os: toJson_PodOs(obj.os), - overhead: - obj.overhead === undefined - ? undefined - : Object.entries(obj.overhead).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - preemptionPolicy: obj.preemptionPolicy, - priority: obj.priority, - priorityClassName: obj.priorityClassName, - readinessGates: obj.readinessGates?.map((y) => toJson_PodReadinessGate(y)), - resourceClaims: obj.resourceClaims?.map((y) => toJson_PodResourceClaim(y)), - restartPolicy: obj.restartPolicy, - runtimeClassName: obj.runtimeClassName, - schedulerName: obj.schedulerName, - schedulingGates: obj.schedulingGates?.map((y) => - toJson_PodSchedulingGate(y), - ), - securityContext: toJson_PodSecurityContext(obj.securityContext), - serviceAccount: obj.serviceAccount, - serviceAccountName: obj.serviceAccountName, - setHostnameAsFQDN: obj.setHostnameAsFqdn, - shareProcessNamespace: obj.shareProcessNamespace, - subdomain: obj.subdomain, - terminationGracePeriodSeconds: obj.terminationGracePeriodSeconds, - tolerations: obj.tolerations?.map((y) => toJson_Toleration(y)), - topologySpreadConstraints: obj.topologySpreadConstraints?.map((y) => - toJson_TopologySpreadConstraint(y), - ), - volumes: obj.volumes?.map((y) => toJson_Volume(y)), - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); +export function toJson_PodSpec(obj: PodSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'activeDeadlineSeconds': obj.activeDeadlineSeconds, + 'affinity': toJson_Affinity(obj.affinity), + 'automountServiceAccountToken': obj.automountServiceAccountToken, + 'containers': obj.containers?.map(y => toJson_Container(y)), + 'dnsConfig': toJson_PodDnsConfig(obj.dnsConfig), + 'dnsPolicy': obj.dnsPolicy, + 'enableServiceLinks': obj.enableServiceLinks, + 'ephemeralContainers': obj.ephemeralContainers?.map(y => toJson_EphemeralContainer(y)), + 'hostAliases': obj.hostAliases?.map(y => toJson_HostAlias(y)), + 'hostIPC': obj.hostIpc, + 'hostNetwork': obj.hostNetwork, + 'hostPID': obj.hostPid, + 'hostUsers': obj.hostUsers, + 'hostname': obj.hostname, + 'imagePullSecrets': obj.imagePullSecrets?.map(y => toJson_LocalObjectReference(y)), + 'initContainers': obj.initContainers?.map(y => toJson_Container(y)), + 'nodeName': obj.nodeName, + 'nodeSelector': ((obj.nodeSelector) === undefined) ? undefined : (Object.entries(obj.nodeSelector).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'os': toJson_PodOs(obj.os), + 'overhead': ((obj.overhead) === undefined) ? undefined : (Object.entries(obj.overhead).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'preemptionPolicy': obj.preemptionPolicy, + 'priority': obj.priority, + 'priorityClassName': obj.priorityClassName, + 'readinessGates': obj.readinessGates?.map(y => toJson_PodReadinessGate(y)), + 'resourceClaims': obj.resourceClaims?.map(y => toJson_PodResourceClaim(y)), + 'restartPolicy': obj.restartPolicy, + 'runtimeClassName': obj.runtimeClassName, + 'schedulerName': obj.schedulerName, + 'schedulingGates': obj.schedulingGates?.map(y => toJson_PodSchedulingGate(y)), + 'securityContext': toJson_PodSecurityContext(obj.securityContext), + 'serviceAccount': obj.serviceAccount, + 'serviceAccountName': obj.serviceAccountName, + 'setHostnameAsFQDN': obj.setHostnameAsFqdn, + 'shareProcessNamespace': obj.shareProcessNamespace, + 'subdomain': obj.subdomain, + 'terminationGracePeriodSeconds': obj.terminationGracePeriodSeconds, + 'tolerations': obj.tolerations?.map(y => toJson_Toleration(y)), + 'topologySpreadConstraints': obj.topologySpreadConstraints?.map(y => toJson_TopologySpreadConstraint(y)), + 'volumes': obj.volumes?.map(y => toJson_Volume(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17217,27 +16466,21 @@ export interface PodTemplateSpec { * @schema io.k8s.api.core.v1.PodTemplateSpec#spec */ readonly spec?: PodSpec; + } /** * Converts an object of type 'PodTemplateSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodTemplateSpec( - obj: PodTemplateSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodTemplateSpec(obj: PodTemplateSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PodSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PodSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17276,35 +16519,23 @@ export interface ReplicationControllerSpec { * @schema io.k8s.api.core.v1.ReplicationControllerSpec#template */ readonly template?: PodTemplateSpec; + } /** * Converts an object of type 'ReplicationControllerSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ReplicationControllerSpec( - obj: ReplicationControllerSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ReplicationControllerSpec(obj: ReplicationControllerSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - minReadySeconds: obj.minReadySeconds, - replicas: obj.replicas, - selector: - obj.selector === undefined - ? undefined - : Object.entries(obj.selector).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - template: toJson_PodTemplateSpec(obj.template), + 'minReadySeconds': obj.minReadySeconds, + 'replicas': obj.replicas, + 'selector': ((obj.selector) === undefined) ? undefined : (Object.entries(obj.selector).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'template': toJson_PodTemplateSpec(obj.template), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17334,34 +16565,22 @@ export interface ResourceQuotaSpec { * @schema io.k8s.api.core.v1.ResourceQuotaSpec#scopes */ readonly scopes?: string[]; + } /** * Converts an object of type 'ResourceQuotaSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceQuotaSpec( - obj: ResourceQuotaSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceQuotaSpec(obj: ResourceQuotaSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - hard: - obj.hard === undefined - ? undefined - : Object.entries(obj.hard).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - scopeSelector: toJson_ScopeSelector(obj.scopeSelector), - scopes: obj.scopes?.map((y) => y), + 'hard': ((obj.hard) === undefined) ? undefined : (Object.entries(obj.hard).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'scopeSelector': toJson_ScopeSelector(obj.scopeSelector), + 'scopes': obj.scopes?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17454,7 +16673,7 @@ export interface ServiceSpec { readonly loadBalancerClass?: string; /** - * Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations, and it cannot support dual-stack. As of Kubernetes v1.24, users are encouraged to use implementation-specific annotations when available. This field may be removed in a future API version. + * Only applies to Service Type: LoadBalancer. This feature depends on whether the underlying cloud-provider supports specifying the loadBalancerIP when a load balancer is created. This field will be ignored if the cloud-provider does not support the feature. Deprecated: This field was under-specified and its meaning varies across implementations. Using it is non-portable and it may not support dual-stack. Users are encouraged to use implementation-specific annotations when available. * * @schema io.k8s.api.core.v1.ServiceSpec#loadBalancerIP */ @@ -17510,52 +16729,38 @@ export interface ServiceSpec { * @schema io.k8s.api.core.v1.ServiceSpec#type */ readonly type?: string; + } /** * Converts an object of type 'ServiceSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ServiceSpec( - obj: ServiceSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - allocateLoadBalancerNodePorts: obj.allocateLoadBalancerNodePorts, - clusterIP: obj.clusterIp, - clusterIPs: obj.clusterIPs?.map((y) => y), - externalIPs: obj.externalIPs?.map((y) => y), - externalName: obj.externalName, - externalTrafficPolicy: obj.externalTrafficPolicy, - healthCheckNodePort: obj.healthCheckNodePort, - internalTrafficPolicy: obj.internalTrafficPolicy, - ipFamilies: obj.ipFamilies?.map((y) => y), - ipFamilyPolicy: obj.ipFamilyPolicy, - loadBalancerClass: obj.loadBalancerClass, - loadBalancerIP: obj.loadBalancerIp, - loadBalancerSourceRanges: obj.loadBalancerSourceRanges?.map((y) => y), - ports: obj.ports?.map((y) => toJson_ServicePort(y)), - publishNotReadyAddresses: obj.publishNotReadyAddresses, - selector: - obj.selector === undefined - ? undefined - : Object.entries(obj.selector).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - sessionAffinity: obj.sessionAffinity, - sessionAffinityConfig: toJson_SessionAffinityConfig( - obj.sessionAffinityConfig, - ), - type: obj.type, - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); +export function toJson_ServiceSpec(obj: ServiceSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'allocateLoadBalancerNodePorts': obj.allocateLoadBalancerNodePorts, + 'clusterIP': obj.clusterIp, + 'clusterIPs': obj.clusterIPs?.map(y => y), + 'externalIPs': obj.externalIPs?.map(y => y), + 'externalName': obj.externalName, + 'externalTrafficPolicy': obj.externalTrafficPolicy, + 'healthCheckNodePort': obj.healthCheckNodePort, + 'internalTrafficPolicy': obj.internalTrafficPolicy, + 'ipFamilies': obj.ipFamilies?.map(y => y), + 'ipFamilyPolicy': obj.ipFamilyPolicy, + 'loadBalancerClass': obj.loadBalancerClass, + 'loadBalancerIP': obj.loadBalancerIp, + 'loadBalancerSourceRanges': obj.loadBalancerSourceRanges?.map(y => y), + 'ports': obj.ports?.map(y => toJson_ServicePort(y)), + 'publishNotReadyAddresses': obj.publishNotReadyAddresses, + 'selector': ((obj.selector) === undefined) ? undefined : (Object.entries(obj.selector).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'sessionAffinity': obj.sessionAffinity, + 'sessionAffinityConfig': toJson_SessionAffinityConfig(obj.sessionAffinityConfig), + 'type': obj.type, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17571,26 +16776,20 @@ export interface LocalObjectReference { * @schema io.k8s.api.core.v1.LocalObjectReference#name */ readonly name?: string; + } /** * Converts an object of type 'LocalObjectReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LocalObjectReference( - obj: LocalObjectReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LocalObjectReference(obj: LocalObjectReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17655,39 +16854,27 @@ export interface Endpoint { * @schema io.k8s.api.discovery.v1.Endpoint#zone */ readonly zone?: string; + } /** * Converts an object of type 'Endpoint' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Endpoint( - obj: Endpoint | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Endpoint(obj: Endpoint | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - addresses: obj.addresses?.map((y) => y), - conditions: toJson_EndpointConditions(obj.conditions), - deprecatedTopology: - obj.deprecatedTopology === undefined - ? undefined - : Object.entries(obj.deprecatedTopology).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - hints: toJson_EndpointHints(obj.hints), - hostname: obj.hostname, - nodeName: obj.nodeName, - targetRef: toJson_ObjectReference(obj.targetRef), - zone: obj.zone, + 'addresses': obj.addresses?.map(y => y), + 'conditions': toJson_EndpointConditions(obj.conditions), + 'deprecatedTopology': ((obj.deprecatedTopology) === undefined) ? undefined : (Object.entries(obj.deprecatedTopology).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'hints': toJson_EndpointHints(obj.hints), + 'hostname': obj.hostname, + 'nodeName': obj.nodeName, + 'targetRef': toJson_ObjectReference(obj.targetRef), + 'zone': obj.zone, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17703,7 +16890,9 @@ export interface EndpointPort { * * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). * * * Kubernetes-defined prefixed names: - * * 'kubernetes.io/h2c' - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540 + * * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- + * * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + * * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 * * * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. * @@ -17732,136 +16921,121 @@ export interface EndpointPort { * @schema io.k8s.api.core.v1.EndpointPort#protocol */ readonly protocol?: string; + } /** * Converts an object of type 'EndpointPort' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EndpointPort( - obj: EndpointPort | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EndpointPort(obj: EndpointPort | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - appProtocol: obj.appProtocol, - name: obj.name, - port: obj.port, - protocol: obj.protocol, + 'appProtocol': obj.appProtocol, + 'name': obj.name, + 'port': obj.port, + 'protocol': obj.protocol, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * FlowSchemaSpec describes how the FlowSchema's specification looks like. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaSpec */ -export interface FlowSchemaSpecV1Beta2 { +export interface FlowSchemaSpec { /** * `distinguisherMethod` defines how to compute the flow distinguisher for requests that match this schema. `nil` specifies that the distinguisher is disabled and thus will always be the empty string. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec#distinguisherMethod + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaSpec#distinguisherMethod */ - readonly distinguisherMethod?: FlowDistinguisherMethodV1Beta2; + readonly distinguisherMethod?: FlowDistinguisherMethod; /** * `matchingPrecedence` is used to choose among the FlowSchemas that match a given request. The chosen FlowSchema is among those with the numerically lowest (which we take to be logically highest) MatchingPrecedence. Each MatchingPrecedence value must be ranged in [1,10000]. Note that if the precedence is not specified, it will be set to 1000 as default. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec#matchingPrecedence + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaSpec#matchingPrecedence */ readonly matchingPrecedence?: number; /** * `priorityLevelConfiguration` should reference a PriorityLevelConfiguration in the cluster. If the reference cannot be resolved, the FlowSchema will be ignored and marked as invalid in its status. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec#priorityLevelConfiguration + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaSpec#priorityLevelConfiguration */ - readonly priorityLevelConfiguration: PriorityLevelConfigurationReferenceV1Beta2; + readonly priorityLevelConfiguration: PriorityLevelConfigurationReference; /** * `rules` describes which requests will match this flow schema. This FlowSchema matches a request if and only if at least one member of rules matches the request. if it is an empty slice, there will be no requests matching the FlowSchema. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowSchemaSpec#rules + * @schema io.k8s.api.flowcontrol.v1.FlowSchemaSpec#rules */ - readonly rules?: PolicyRulesWithSubjectsV1Beta2[]; + readonly rules?: PolicyRulesWithSubjects[]; + } /** - * Converts an object of type 'FlowSchemaSpecV1Beta2' to JSON representation. + * Converts an object of type 'FlowSchemaSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FlowSchemaSpecV1Beta2( - obj: FlowSchemaSpecV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FlowSchemaSpec(obj: FlowSchemaSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - distinguisherMethod: toJson_FlowDistinguisherMethodV1Beta2( - obj.distinguisherMethod, - ), - matchingPrecedence: obj.matchingPrecedence, - priorityLevelConfiguration: - toJson_PriorityLevelConfigurationReferenceV1Beta2( - obj.priorityLevelConfiguration, - ), - rules: obj.rules?.map((y) => toJson_PolicyRulesWithSubjectsV1Beta2(y)), + 'distinguisherMethod': toJson_FlowDistinguisherMethod(obj.distinguisherMethod), + 'matchingPrecedence': obj.matchingPrecedence, + 'priorityLevelConfiguration': toJson_PriorityLevelConfigurationReference(obj.priorityLevelConfiguration), + 'rules': obj.rules?.map(y => toJson_PolicyRulesWithSubjects(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * PriorityLevelConfigurationSpec specifies the configuration of a priority level. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec */ -export interface PriorityLevelConfigurationSpecV1Beta2 { +export interface PriorityLevelConfigurationSpec { + /** + * `exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `"Limited"`. This field MAY be non-empty if `type` is `"Exempt"`. If empty and `type` is `"Exempt"` then the default values for `ExemptPriorityLevelConfiguration` apply. + * + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec#exempt + */ + readonly exempt?: ExemptPriorityLevelConfiguration; + /** * `limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `"Limited"`. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec#limited + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec#limited */ - readonly limited?: LimitedPriorityLevelConfigurationV1Beta2; + readonly limited?: LimitedPriorityLevelConfiguration; /** * `type` indicates whether this priority level is subject to limitation on request execution. A value of `"Exempt"` means that requests of this priority level are not subject to a limit (and thus are never queued) and do not detract from the capacity made available to other priority levels. A value of `"Limited"` means that (a) requests of this priority level _are_ subject to limits and (b) some of the server's limited capacity is made available exclusively to this priority level. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec#type + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationSpec#type */ readonly type: string; + } /** - * Converts an object of type 'PriorityLevelConfigurationSpecV1Beta2' to JSON representation. + * Converts an object of type 'PriorityLevelConfigurationSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PriorityLevelConfigurationSpecV1Beta2( - obj: PriorityLevelConfigurationSpecV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PriorityLevelConfigurationSpec(obj: PriorityLevelConfigurationSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - limited: toJson_LimitedPriorityLevelConfigurationV1Beta2(obj.limited), - type: obj.type, + 'exempt': toJson_ExemptPriorityLevelConfiguration(obj.exempt), + 'limited': toJson_LimitedPriorityLevelConfiguration(obj.limited), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17898,34 +17072,23 @@ export interface FlowSchemaSpecV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.FlowSchemaSpec#rules */ readonly rules?: PolicyRulesWithSubjectsV1Beta3[]; + } /** * Converts an object of type 'FlowSchemaSpecV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FlowSchemaSpecV1Beta3( - obj: FlowSchemaSpecV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FlowSchemaSpecV1Beta3(obj: FlowSchemaSpecV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - distinguisherMethod: toJson_FlowDistinguisherMethodV1Beta3( - obj.distinguisherMethod, - ), - matchingPrecedence: obj.matchingPrecedence, - priorityLevelConfiguration: - toJson_PriorityLevelConfigurationReferenceV1Beta3( - obj.priorityLevelConfiguration, - ), - rules: obj.rules?.map((y) => toJson_PolicyRulesWithSubjectsV1Beta3(y)), + 'distinguisherMethod': toJson_FlowDistinguisherMethodV1Beta3(obj.distinguisherMethod), + 'matchingPrecedence': obj.matchingPrecedence, + 'priorityLevelConfiguration': toJson_PriorityLevelConfigurationReferenceV1Beta3(obj.priorityLevelConfiguration), + 'rules': obj.rules?.map(y => toJson_PolicyRulesWithSubjectsV1Beta3(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -17935,6 +17098,13 @@ export function toJson_FlowSchemaSpecV1Beta3( * @schema io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec */ export interface PriorityLevelConfigurationSpecV1Beta3 { + /** + * `exempt` specifies how requests are handled for an exempt priority level. This field MUST be empty if `type` is `"Limited"`. This field MAY be non-empty if `type` is `"Exempt"`. If empty and `type` is `"Exempt"` then the default values for `ExemptPriorityLevelConfiguration` apply. + * + * @schema io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec#exempt + */ + readonly exempt?: ExemptPriorityLevelConfigurationV1Beta3; + /** * `limited` specifies how requests are handled for a Limited priority level. This field must be non-empty if and only if `type` is `"Limited"`. * @@ -17948,27 +17118,22 @@ export interface PriorityLevelConfigurationSpecV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec#type */ readonly type: string; + } /** * Converts an object of type 'PriorityLevelConfigurationSpecV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PriorityLevelConfigurationSpecV1Beta3( - obj: PriorityLevelConfigurationSpecV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PriorityLevelConfigurationSpecV1Beta3(obj: PriorityLevelConfigurationSpecV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - limited: toJson_LimitedPriorityLevelConfigurationV1Beta3(obj.limited), - type: obj.type, + 'exempt': toJson_ExemptPriorityLevelConfigurationV1Beta3(obj.exempt), + 'limited': toJson_LimitedPriorityLevelConfigurationV1Beta3(obj.limited), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18005,29 +17170,23 @@ export interface IngressSpec { * @schema io.k8s.api.networking.v1.IngressSpec#tls */ readonly tls?: IngressTls[]; + } /** * Converts an object of type 'IngressSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IngressSpec( - obj: IngressSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IngressSpec(obj: IngressSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - defaultBackend: toJson_IngressBackend(obj.defaultBackend), - ingressClassName: obj.ingressClassName, - rules: obj.rules?.map((y) => toJson_IngressRule(y)), - tls: obj.tls?.map((y) => toJson_IngressTls(y)), + 'defaultBackend': toJson_IngressBackend(obj.defaultBackend), + 'ingressClassName': obj.ingressClassName, + 'rules': obj.rules?.map(y => toJson_IngressRule(y)), + 'tls': obj.tls?.map(y => toJson_IngressTls(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18050,27 +17209,21 @@ export interface IngressClassSpec { * @schema io.k8s.api.networking.v1.IngressClassSpec#parameters */ readonly parameters?: IngressClassParametersReference; + } /** * Converts an object of type 'IngressClassSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IngressClassSpec( - obj: IngressClassSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IngressClassSpec(obj: IngressClassSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - controller: obj.controller, - parameters: toJson_IngressClassParametersReference(obj.parameters), + 'controller': obj.controller, + 'parameters': toJson_IngressClassParametersReference(obj.parameters), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18107,123 +17260,81 @@ export interface NetworkPolicySpec { * @schema io.k8s.api.networking.v1.NetworkPolicySpec#policyTypes */ readonly policyTypes?: string[]; + } /** * Converts an object of type 'NetworkPolicySpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NetworkPolicySpec( - obj: NetworkPolicySpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NetworkPolicySpec(obj: NetworkPolicySpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - egress: obj.egress?.map((y) => toJson_NetworkPolicyEgressRule(y)), - ingress: obj.ingress?.map((y) => toJson_NetworkPolicyIngressRule(y)), - podSelector: toJson_LabelSelector(obj.podSelector), - policyTypes: obj.policyTypes?.map((y) => y), + 'egress': obj.egress?.map(y => toJson_NetworkPolicyEgressRule(y)), + 'ingress': obj.ingress?.map(y => toJson_NetworkPolicyIngressRule(y)), + 'podSelector': toJson_LabelSelector(obj.podSelector), + 'policyTypes': obj.policyTypes?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * ClusterCIDRSpec defines the desired state of ClusterCIDR. + * IPAddressSpec describe the attributes in an IP Address. * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRSpec + * @schema io.k8s.api.networking.v1alpha1.IPAddressSpec */ -export interface ClusterCidrSpecV1Alpha1 { - /** - * ipv4 defines an IPv4 IP block in CIDR notation(e.g. "10.0.0.0/8"). At least one of ipv4 and ipv6 must be specified. This field is immutable. - * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRSpec#ipv4 - */ - readonly ipv4?: string; - - /** - * ipv6 defines an IPv6 IP block in CIDR notation(e.g. "2001:db8::/64"). At least one of ipv4 and ipv6 must be specified. This field is immutable. - * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRSpec#ipv6 - */ - readonly ipv6?: string; - +export interface IpAddressSpecV1Alpha1 { /** - * nodeSelector defines which nodes the config is applicable to. An empty or nil nodeSelector selects all nodes. This field is immutable. + * ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object. * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRSpec#nodeSelector + * @schema io.k8s.api.networking.v1alpha1.IPAddressSpec#parentRef */ - readonly nodeSelector?: NodeSelector; + readonly parentRef?: ParentReferenceV1Alpha1; - /** - * perNodeHostBits defines the number of host bits to be configured per node. A subnet mask determines how much of the address is used for network bits and host bits. For example an IPv4 address of 192.168.0.0/24, splits the address into 24 bits for the network portion and 8 bits for the host portion. To allocate 256 IPs, set this field to 8 (a /24 mask for IPv4 or a /120 for IPv6). Minimum value is 4 (16 IPs). This field is immutable. - * - * @schema io.k8s.api.networking.v1alpha1.ClusterCIDRSpec#perNodeHostBits - */ - readonly perNodeHostBits: number; } /** - * Converts an object of type 'ClusterCidrSpecV1Alpha1' to JSON representation. + * Converts an object of type 'IpAddressSpecV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ClusterCidrSpecV1Alpha1( - obj: ClusterCidrSpecV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IpAddressSpecV1Alpha1(obj: IpAddressSpecV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - ipv4: obj.ipv4, - ipv6: obj.ipv6, - nodeSelector: toJson_NodeSelector(obj.nodeSelector), - perNodeHostBits: obj.perNodeHostBits, + 'parentRef': toJson_ParentReferenceV1Alpha1(obj.parentRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * IPAddressSpec describe the attributes in an IP Address. + * ServiceCIDRSpec define the CIDRs the user wants to use for allocating ClusterIPs for Services. * - * @schema io.k8s.api.networking.v1alpha1.IPAddressSpec + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDRSpec */ -export interface IpAddressSpecV1Alpha1 { +export interface ServiceCidrSpecV1Alpha1 { /** - * ParentRef references the resource that an IPAddress is attached to. An IPAddress must reference a parent object. + * CIDRs defines the IP blocks in CIDR notation (e.g. "192.168.0.0/24" or "2001:db8::/64") from which to assign service cluster IPs. Max of two CIDRs is allowed, one of each IP family. This field is immutable. * - * @schema io.k8s.api.networking.v1alpha1.IPAddressSpec#parentRef + * @schema io.k8s.api.networking.v1alpha1.ServiceCIDRSpec#cidrs */ - readonly parentRef?: ParentReferenceV1Alpha1; + readonly cidrs?: string[]; + } /** - * Converts an object of type 'IpAddressSpecV1Alpha1' to JSON representation. + * Converts an object of type 'ServiceCidrSpecV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IpAddressSpecV1Alpha1( - obj: IpAddressSpecV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ServiceCidrSpecV1Alpha1(obj: ServiceCidrSpecV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - parentRef: toJson_ParentReferenceV1Alpha1(obj.parentRef), + 'cidrs': obj.cidrs?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18239,32 +17350,20 @@ export interface Overhead { * @schema io.k8s.api.node.v1.Overhead#podFixed */ readonly podFixed?: { [key: string]: Quantity }; + } /** * Converts an object of type 'Overhead' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Overhead( - obj: Overhead | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Overhead(obj: Overhead | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - podFixed: - obj.podFixed === undefined - ? undefined - : Object.entries(obj.podFixed).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), + 'podFixed': ((obj.podFixed) === undefined) ? undefined : (Object.entries(obj.podFixed).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18287,33 +17386,21 @@ export interface Scheduling { * @schema io.k8s.api.node.v1.Scheduling#tolerations */ readonly tolerations?: Toleration[]; + } /** * Converts an object of type 'Scheduling' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Scheduling( - obj: Scheduling | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Scheduling(obj: Scheduling | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nodeSelector: - obj.nodeSelector === undefined - ? undefined - : Object.entries(obj.nodeSelector).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - tolerations: obj.tolerations?.map((y) => toJson_Toleration(y)), + 'nodeSelector': ((obj.nodeSelector) === undefined) ? undefined : (Object.entries(obj.nodeSelector).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'tolerations': obj.tolerations?.map(y => toJson_Toleration(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18372,32 +17459,26 @@ export interface DeleteOptions { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.DeleteOptions#propagationPolicy */ readonly propagationPolicy?: string; + } /** * Converts an object of type 'DeleteOptions' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DeleteOptions( - obj: DeleteOptions | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DeleteOptions(obj: DeleteOptions | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - dryRun: obj.dryRun?.map((y) => y), - gracePeriodSeconds: obj.gracePeriodSeconds, - kind: obj.kind, - orphanDependents: obj.orphanDependents, - preconditions: toJson_Preconditions(obj.preconditions), - propagationPolicy: obj.propagationPolicy, + 'apiVersion': obj.apiVersion, + 'dryRun': obj.dryRun?.map(y => y), + 'gracePeriodSeconds': obj.gracePeriodSeconds, + 'kind': obj.kind, + 'orphanDependents': obj.orphanDependents, + 'preconditions': toJson_Preconditions(obj.preconditions), + 'propagationPolicy': obj.propagationPolicy, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18444,29 +17525,23 @@ export interface PodDisruptionBudgetSpec { * @schema io.k8s.api.policy.v1.PodDisruptionBudgetSpec#unhealthyPodEvictionPolicy */ readonly unhealthyPodEvictionPolicy?: string; + } /** * Converts an object of type 'PodDisruptionBudgetSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodDisruptionBudgetSpec( - obj: PodDisruptionBudgetSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodDisruptionBudgetSpec(obj: PodDisruptionBudgetSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - maxUnavailable: obj.maxUnavailable?.value, - minAvailable: obj.minAvailable?.value, - selector: toJson_LabelSelector(obj.selector), - unhealthyPodEvictionPolicy: obj.unhealthyPodEvictionPolicy, + 'maxUnavailable': obj.maxUnavailable?.value, + 'minAvailable': obj.minAvailable?.value, + 'selector': toJson_LabelSelector(obj.selector), + 'unhealthyPodEvictionPolicy': obj.unhealthyPodEvictionPolicy, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18482,28 +17557,20 @@ export interface AggregationRule { * @schema io.k8s.api.rbac.v1.AggregationRule#clusterRoleSelectors */ readonly clusterRoleSelectors?: LabelSelector[]; + } /** * Converts an object of type 'AggregationRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_AggregationRule( - obj: AggregationRule | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_AggregationRule(obj: AggregationRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - clusterRoleSelectors: obj.clusterRoleSelectors?.map((y) => - toJson_LabelSelector(y), - ), + 'clusterRoleSelectors': obj.clusterRoleSelectors?.map(y => toJson_LabelSelector(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18547,30 +17614,24 @@ export interface PolicyRule { * @schema io.k8s.api.rbac.v1.PolicyRule#verbs */ readonly verbs: string[]; + } /** * Converts an object of type 'PolicyRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PolicyRule( - obj: PolicyRule | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PolicyRule(obj: PolicyRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroups: obj.apiGroups?.map((y) => y), - nonResourceURLs: obj.nonResourceUrLs?.map((y) => y), - resourceNames: obj.resourceNames?.map((y) => y), - resources: obj.resources?.map((y) => y), - verbs: obj.verbs?.map((y) => y), + 'apiGroups': obj.apiGroups?.map(y => y), + 'nonResourceURLs': obj.nonResourceUrLs?.map(y => y), + 'resourceNames': obj.resourceNames?.map(y => y), + 'resources': obj.resources?.map(y => y), + 'verbs': obj.verbs?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18600,28 +17661,22 @@ export interface RoleRef { * @schema io.k8s.api.rbac.v1.RoleRef#name */ readonly name: string; + } /** * Converts an object of type 'RoleRef' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_RoleRef( - obj: RoleRef | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_RoleRef(obj: RoleRef | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroup: obj.apiGroup, - kind: obj.kind, - name: obj.name, + 'apiGroup': obj.apiGroup, + 'kind': obj.kind, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18659,29 +17714,23 @@ export interface Subject { * @schema io.k8s.api.rbac.v1.Subject#namespace */ readonly namespace?: string; + } /** * Converts an object of type 'Subject' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Subject( - obj: Subject | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Subject(obj: Subject | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroup: obj.apiGroup, - kind: obj.kind, - name: obj.name, - namespace: obj.namespace, + 'apiGroup': obj.apiGroup, + 'kind': obj.kind, + 'name': obj.name, + 'namespace': obj.namespace, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18706,27 +17755,21 @@ export interface PodSchedulingContextSpecV1Alpha2 { * @schema io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec#selectedNode */ readonly selectedNode?: string; + } /** * Converts an object of type 'PodSchedulingContextSpecV1Alpha2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodSchedulingContextSpecV1Alpha2( - obj: PodSchedulingContextSpecV1Alpha2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodSchedulingContextSpecV1Alpha2(obj: PodSchedulingContextSpecV1Alpha2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - potentialNodes: obj.potentialNodes?.map((y) => y), - selectedNode: obj.selectedNode, + 'potentialNodes': obj.potentialNodes?.map(y => y), + 'selectedNode': obj.selectedNode, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18758,30 +17801,22 @@ export interface ResourceClaimSpecV1Alpha2 { * @schema io.k8s.api.resource.v1alpha2.ResourceClaimSpec#resourceClassName */ readonly resourceClassName: string; + } /** * Converts an object of type 'ResourceClaimSpecV1Alpha2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceClaimSpecV1Alpha2( - obj: ResourceClaimSpecV1Alpha2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceClaimSpecV1Alpha2(obj: ResourceClaimSpecV1Alpha2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - allocationMode: obj.allocationMode, - parametersRef: toJson_ResourceClaimParametersReferenceV1Alpha2( - obj.parametersRef, - ), - resourceClassName: obj.resourceClassName, + 'allocationMode': obj.allocationMode, + 'parametersRef': toJson_ResourceClaimParametersReferenceV1Alpha2(obj.parametersRef), + 'resourceClassName': obj.resourceClassName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18804,27 +17839,21 @@ export interface ResourceClaimTemplateSpecV1Alpha2 { * @schema io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec#spec */ readonly spec: ResourceClaimSpecV1Alpha2; + } /** * Converts an object of type 'ResourceClaimTemplateSpecV1Alpha2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceClaimTemplateSpecV1Alpha2( - obj: ResourceClaimTemplateSpecV1Alpha2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceClaimTemplateSpecV1Alpha2(obj: ResourceClaimTemplateSpecV1Alpha2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_ResourceClaimSpecV1Alpha2(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_ResourceClaimSpecV1Alpha2(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18861,29 +17890,23 @@ export interface ResourceClassParametersReferenceV1Alpha2 { * @schema io.k8s.api.resource.v1alpha2.ResourceClassParametersReference#namespace */ readonly namespace?: string; + } /** * Converts an object of type 'ResourceClassParametersReferenceV1Alpha2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceClassParametersReferenceV1Alpha2( - obj: ResourceClassParametersReferenceV1Alpha2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceClassParametersReferenceV1Alpha2(obj: ResourceClassParametersReferenceV1Alpha2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroup: obj.apiGroup, - kind: obj.kind, - name: obj.name, - namespace: obj.namespace, + 'apiGroup': obj.apiGroup, + 'kind': obj.kind, + 'name': obj.name, + 'namespace': obj.namespace, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18899,28 +17922,20 @@ export interface NodeSelector { * @schema io.k8s.api.core.v1.NodeSelector#nodeSelectorTerms */ readonly nodeSelectorTerms: NodeSelectorTerm[]; + } /** * Converts an object of type 'NodeSelector' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NodeSelector( - obj: NodeSelector | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NodeSelector(obj: NodeSelector | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nodeSelectorTerms: obj.nodeSelectorTerms?.map((y) => - toJson_NodeSelectorTerm(y), - ), + 'nodeSelectorTerms': obj.nodeSelectorTerms?.map(y => toJson_NodeSelectorTerm(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -18956,7 +17971,7 @@ export interface CsiDriverSpec { * * The CSI driver specifies podInfoOnMount as part of driver deployment. If true, Kubelet will pass pod information as VolumeContext in the CSI NodePublishVolume() calls. The CSI driver is responsible for parsing and validating the information passed in as VolumeContext. * - * The following VolumeConext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume + * The following VolumeContext will be passed if podInfoOnMount is set to true. This list might grow, but the prefix will be used. "csi.storage.k8s.io/pod.name": pod.Name "csi.storage.k8s.io/pod.namespace": pod.Namespace "csi.storage.k8s.io/pod.uid": string(pod.UID) "csi.storage.k8s.io/ephemeral": "true" if the volume is an ephemeral inline volume * defined by a CSIVolumeSource, otherwise "false" * * "csi.storage.k8s.io/ephemeral" is a new feature in Kubernetes 1.16. It is only required for drivers which support both the "Persistent" and "Ephemeral" VolumeLifecycleMode. Other drivers can leave pod info disabled and/or ignore this field. As Kubernetes 1.15 doesn't support this field, drivers can only support one mode when deployed on such a cluster and the deployment determines which mode that is, for example via a command line parameter of the driver. @@ -19031,33 +18046,27 @@ export interface CsiDriverSpec { * @schema io.k8s.api.storage.v1.CSIDriverSpec#volumeLifecycleModes */ readonly volumeLifecycleModes?: string[]; + } /** * Converts an object of type 'CsiDriverSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CsiDriverSpec( - obj: CsiDriverSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CsiDriverSpec(obj: CsiDriverSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - attachRequired: obj.attachRequired, - fsGroupPolicy: obj.fsGroupPolicy, - podInfoOnMount: obj.podInfoOnMount, - requiresRepublish: obj.requiresRepublish, - seLinuxMount: obj.seLinuxMount, - storageCapacity: obj.storageCapacity, - tokenRequests: obj.tokenRequests?.map((y) => toJson_TokenRequest(y)), - volumeLifecycleModes: obj.volumeLifecycleModes?.map((y) => y), + 'attachRequired': obj.attachRequired, + 'fsGroupPolicy': obj.fsGroupPolicy, + 'podInfoOnMount': obj.podInfoOnMount, + 'requiresRepublish': obj.requiresRepublish, + 'seLinuxMount': obj.seLinuxMount, + 'storageCapacity': obj.storageCapacity, + 'tokenRequests': obj.tokenRequests?.map(y => toJson_TokenRequest(y)), + 'volumeLifecycleModes': obj.volumeLifecycleModes?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19073,26 +18082,20 @@ export interface CsiNodeSpec { * @schema io.k8s.api.storage.v1.CSINodeSpec#drivers */ readonly drivers: CsiNodeDriver[]; + } /** * Converts an object of type 'CsiNodeSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CsiNodeSpec( - obj: CsiNodeSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CsiNodeSpec(obj: CsiNodeSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - drivers: obj.drivers?.map((y) => toJson_CsiNodeDriver(y)), + 'drivers': obj.drivers?.map(y => toJson_CsiNodeDriver(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19106,7 +18109,8 @@ export class Quantity { public static fromNumber(value: number): Quantity { return new Quantity(value); } - private constructor(public readonly value: string | number) {} + private constructor(public readonly value: string | number) { + } } /** @@ -19128,35 +18132,21 @@ export interface LabelSelector { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector#matchLabels */ readonly matchLabels?: { [key: string]: string }; + } /** * Converts an object of type 'LabelSelector' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LabelSelector( - obj: LabelSelector | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LabelSelector(obj: LabelSelector | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - matchExpressions: obj.matchExpressions?.map((y) => - toJson_LabelSelectorRequirement(y), - ), - matchLabels: - obj.matchLabels === undefined - ? undefined - : Object.entries(obj.matchLabels).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), + 'matchExpressions': obj.matchExpressions?.map(y => toJson_LabelSelectorRequirement(y)), + 'matchLabels': ((obj.matchLabels) === undefined) ? undefined : (Object.entries(obj.matchLabels).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19172,28 +18162,20 @@ export interface TopologySelectorTerm { * @schema io.k8s.api.core.v1.TopologySelectorTerm#matchLabelExpressions */ readonly matchLabelExpressions?: TopologySelectorLabelRequirement[]; + } /** * Converts an object of type 'TopologySelectorTerm' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TopologySelectorTerm( - obj: TopologySelectorTerm | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TopologySelectorTerm(obj: TopologySelectorTerm | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - matchLabelExpressions: obj.matchLabelExpressions?.map((y) => - toJson_TopologySelectorLabelRequirement(y), - ), + 'matchLabelExpressions': obj.matchLabelExpressions?.map(y => toJson_TopologySelectorLabelRequirement(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19223,28 +18205,22 @@ export interface VolumeAttachmentSpec { * @schema io.k8s.api.storage.v1.VolumeAttachmentSpec#source */ readonly source: VolumeAttachmentSource; + } /** * Converts an object of type 'VolumeAttachmentSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_VolumeAttachmentSpec( - obj: VolumeAttachmentSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeAttachmentSpec(obj: VolumeAttachmentSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - attacher: obj.attacher, - nodeName: obj.nodeName, - source: toJson_VolumeAttachmentSource(obj.source), + 'attacher': obj.attacher, + 'nodeName': obj.nodeName, + 'source': toJson_VolumeAttachmentSource(obj.source), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19295,33 +18271,25 @@ export interface CustomResourceDefinitionSpec { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec#versions */ readonly versions: CustomResourceDefinitionVersion[]; + } /** * Converts an object of type 'CustomResourceDefinitionSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceDefinitionSpec( - obj: CustomResourceDefinitionSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceDefinitionSpec(obj: CustomResourceDefinitionSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - conversion: toJson_CustomResourceConversion(obj.conversion), - group: obj.group, - names: toJson_CustomResourceDefinitionNames(obj.names), - preserveUnknownFields: obj.preserveUnknownFields, - scope: obj.scope, - versions: obj.versions?.map((y) => - toJson_CustomResourceDefinitionVersion(y), - ), + 'conversion': toJson_CustomResourceConversion(obj.conversion), + 'group': obj.group, + 'names': toJson_CustomResourceDefinitionNames(obj.names), + 'preserveUnknownFields': obj.preserveUnknownFields, + 'scope': obj.scope, + 'versions': obj.versions?.map(y => toJson_CustomResourceDefinitionVersion(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19372,31 +18340,25 @@ export interface StatusDetails { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.StatusDetails#uid */ readonly uid?: string; + } /** * Converts an object of type 'StatusDetails' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StatusDetails( - obj: StatusDetails | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StatusDetails(obj: StatusDetails | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - causes: obj.causes?.map((y) => toJson_StatusCause(y)), - group: obj.group, - kind: obj.kind, - name: obj.name, - retryAfterSeconds: obj.retryAfterSeconds, - uid: obj.uid, + 'causes': obj.causes?.map(y => toJson_StatusCause(y)), + 'group': obj.group, + 'kind': obj.kind, + 'name': obj.name, + 'retryAfterSeconds': obj.retryAfterSeconds, + 'uid': obj.uid, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19421,7 +18383,7 @@ export interface ApiServiceSpec { readonly group?: string; /** - * GroupPriorityMininum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMininum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s + * GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) We'd recommend something like: *.k8s.io (except extensions) at 18000 and PaaSes (OpenShift, Deis) are recommended to be in the 2000s * * @schema io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceSpec#groupPriorityMinimum */ @@ -19454,32 +18416,26 @@ export interface ApiServiceSpec { * @schema io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceSpec#versionPriority */ readonly versionPriority: number; + } /** * Converts an object of type 'ApiServiceSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ApiServiceSpec( - obj: ApiServiceSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ApiServiceSpec(obj: ApiServiceSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - caBundle: obj.caBundle, - group: obj.group, - groupPriorityMinimum: obj.groupPriorityMinimum, - insecureSkipTLSVerify: obj.insecureSkipTlsVerify, - service: toJson_ServiceReference(obj.service), - version: obj.version, - versionPriority: obj.versionPriority, + 'caBundle': obj.caBundle, + 'group': obj.group, + 'groupPriorityMinimum': obj.groupPriorityMinimum, + 'insecureSkipTLSVerify': obj.insecureSkipTlsVerify, + 'service': toJson_ServiceReference(obj.service), + 'version': obj.version, + 'versionPriority': obj.versionPriority, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19537,32 +18493,26 @@ export interface ManagedFieldsEntry { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry#time */ readonly time?: Date; + } /** * Converts an object of type 'ManagedFieldsEntry' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ManagedFieldsEntry( - obj: ManagedFieldsEntry | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ManagedFieldsEntry(obj: ManagedFieldsEntry | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - fieldsType: obj.fieldsType, - fieldsV1: obj.fieldsV1, - manager: obj.manager, - operation: obj.operation, - subresource: obj.subresource, - time: obj.time?.toISOString(), + 'apiVersion': obj.apiVersion, + 'fieldsType': obj.fieldsType, + 'fieldsV1': obj.fieldsV1, + 'manager': obj.manager, + 'operation': obj.operation, + 'subresource': obj.subresource, + 'time': obj.time?.toISOString(), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19614,31 +18564,25 @@ export interface OwnerReference { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference#uid */ readonly uid: string; + } /** * Converts an object of type 'OwnerReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_OwnerReference( - obj: OwnerReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_OwnerReference(obj: OwnerReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - blockOwnerDeletion: obj.blockOwnerDeletion, - controller: obj.controller, - kind: obj.kind, - name: obj.name, - uid: obj.uid, + 'apiVersion': obj.apiVersion, + 'blockOwnerDeletion': obj.blockOwnerDeletion, + 'controller': obj.controller, + 'kind': obj.kind, + 'name': obj.name, + 'uid': obj.uid, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19680,28 +18624,22 @@ export interface WebhookClientConfig { * @schema io.k8s.api.admissionregistration.v1.WebhookClientConfig#url */ readonly url?: string; + } /** * Converts an object of type 'WebhookClientConfig' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_WebhookClientConfig( - obj: WebhookClientConfig | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_WebhookClientConfig(obj: WebhookClientConfig | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - caBundle: obj.caBundle, - service: toJson_ServiceReference(obj.service), - url: obj.url, + 'caBundle': obj.caBundle, + 'service': toJson_ServiceReference(obj.service), + 'url': obj.url, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -19722,122 +18660,522 @@ export interface MatchCondition { * * Required. * - * @schema io.k8s.api.admissionregistration.v1.MatchCondition#expression + * @schema io.k8s.api.admissionregistration.v1.MatchCondition#expression + */ + readonly expression: string; + + /** + * Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') + * + * Required. + * + * @schema io.k8s.api.admissionregistration.v1.MatchCondition#name + */ + readonly name: string; + +} + +/** + * Converts an object of type 'MatchCondition' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_MatchCondition(obj: MatchCondition | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'expression': obj.expression, + 'name': obj.name, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. + * + * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations + */ +export interface RuleWithOperations { + /** + * APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. + * + * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#apiGroups + */ + readonly apiGroups?: string[]; + + /** + * APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. + * + * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#apiVersions + */ + readonly apiVersions?: string[]; + + /** + * Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. + * + * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#operations + */ + readonly operations?: string[]; + + /** + * Resources is a list of resources this rule applies to. + * + * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '_/scale' means all scale subresources. '_/*' means all resources and their subresources. + * + * If wildcard is present, the validation rule will ensure resources do not overlap with each other. + * + * Depending on the enclosing object, subresources might not be allowed. Required. + * + * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#resources + */ + readonly resources?: string[]; + + /** + * scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". + * + * @default . + * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#scope + */ + readonly scope?: string; + +} + +/** + * Converts an object of type 'RuleWithOperations' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_RuleWithOperations(obj: RuleWithOperations | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'apiGroups': obj.apiGroups?.map(y => y), + 'apiVersions': obj.apiVersions?.map(y => y), + 'operations': obj.operations?.map(y => y), + 'resources': obj.resources?.map(y => y), + 'scope': obj.scope, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * AuditAnnotation describes how to produce an audit annotation for an API request. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation + */ +export interface AuditAnnotationV1Alpha1 { + /** + * key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. + * + * The key is combined with the resource name of the ValidatingAdmissionPolicy to construct an audit annotation key: "{ValidatingAdmissionPolicy name}/{key}". + * + * If an admission webhook uses the same resource name as this ValidatingAdmissionPolicy and the same audit annotation key, the annotation key will be identical. In this case, the first annotation written with the key will be included in the audit event and all subsequent annotations with the same key will be discarded. + * + * Required. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation#key + */ + readonly key: string; + + /** + * valueExpression represents the expression which is evaluated by CEL to produce an audit annotation value. The expression must evaluate to either a string or null value. If the expression evaluates to a string, the audit annotation is included with the string value. If the expression evaluates to null or empty string the audit annotation will be omitted. The valueExpression may be no longer than 5kb in length. If the result of the valueExpression is more than 10kb in length, it will be truncated to 10kb. + * + * If multiple ValidatingAdmissionPolicyBinding resources match an API request, then the valueExpression will be evaluated for each binding. All unique values produced by the valueExpressions will be joined together in a comma-separated list. + * + * Required. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation#valueExpression + */ + readonly valueExpression: string; + +} + +/** + * Converts an object of type 'AuditAnnotationV1Alpha1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_AuditAnnotationV1Alpha1(obj: AuditAnnotationV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'key': obj.key, + 'valueExpression': obj.valueExpression, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchCondition + */ +export interface MatchConditionV1Alpha1 { + /** + * Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: + * + * 'object' - The object from the incoming request. The value is null for DELETE requests. 'oldObject' - The existing object. The value is null for CREATE requests. 'request' - Attributes of the admission request(/pkg/apis/admission/types.go#AdmissionRequest). 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + * See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + * 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + * request resource. + * Documentation on CEL: https://kubernetes.io/docs/reference/using-api/cel/ + * + * Required. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchCondition#expression + */ + readonly expression: string; + + /** + * Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') + * + * Required. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchCondition#name + */ + readonly name: string; + +} + +/** + * Converts an object of type 'MatchConditionV1Alpha1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_MatchConditionV1Alpha1(obj: MatchConditionV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'expression': obj.expression, + 'name': obj.name, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + * + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources + */ +export interface MatchResourcesV1Alpha1 { + /** + * ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) + * + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#excludeResourceRules + */ + readonly excludeResourceRules?: NamedRuleWithOperationsV1Alpha1[]; + + /** + * matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". + * + * - Exact: match a request only if it exactly matches a specified rule. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, but "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would not be sent to the ValidatingAdmissionPolicy. + * + * - Equivalent: match a request if modifies a resource listed in rules, even via another API group or version. For example, if deployments can be modified via apps/v1, apps/v1beta1, and extensions/v1beta1, and "rules" only included `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]`, a request to apps/v1beta1 or extensions/v1beta1 would be converted to apps/v1 and sent to the ValidatingAdmissionPolicy. + * + * Defaults to "Equivalent" + * + * @default Equivalent" + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#matchPolicy + */ + readonly matchPolicy?: string; + + /** + * NamespaceSelector decides whether to run the admission control policy on an object based on whether the namespace for that object matches the selector. If the object itself is a namespace, the matching is performed on object.metadata.labels. If the object is another cluster scoped resource, it never skips the policy. + * + * For example, to run the webhook on any objects whose namespace is not associated with "runlevel" of "0" or "1"; you will set the selector as follows: "namespaceSelector": { + * "matchExpressions": [ + * { + * "key": "runlevel", + * "operator": "NotIn", + * "values": [ + * "0", + * "1" + * ] + * } + * ] + * } + * + * If instead you want to only run the policy on any objects whose namespace is associated with the "environment" of "prod" or "staging"; you will set the selector as follows: "namespaceSelector": { + * "matchExpressions": [ + * { + * "key": "environment", + * "operator": "In", + * "values": [ + * "prod", + * "staging" + * ] + * } + * ] + * } + * + * See https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ for more examples of label selectors. + * + * Default to the empty LabelSelector, which matches everything. + * + * @default the empty LabelSelector, which matches everything. + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#namespaceSelector + */ + readonly namespaceSelector?: LabelSelector; + + /** + * ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. + * + * @default the empty LabelSelector, which matches everything. + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#objectSelector + */ + readonly objectSelector?: LabelSelector; + + /** + * ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#resourceRules + */ + readonly resourceRules?: NamedRuleWithOperationsV1Alpha1[]; + +} + +/** + * Converts an object of type 'MatchResourcesV1Alpha1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_MatchResourcesV1Alpha1(obj: MatchResourcesV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'excludeResourceRules': obj.excludeResourceRules?.map(y => toJson_NamedRuleWithOperationsV1Alpha1(y)), + 'matchPolicy': obj.matchPolicy, + 'namespaceSelector': toJson_LabelSelector(obj.namespaceSelector), + 'objectSelector': toJson_LabelSelector(obj.objectSelector), + 'resourceRules': obj.resourceRules?.map(y => toJson_NamedRuleWithOperationsV1Alpha1(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ParamKind is a tuple of Group Kind and Version. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamKind + */ +export interface ParamKindV1Alpha1 { + /** + * APIVersion is the API group version the resources belong to. In format of "group/version". Required. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamKind#apiVersion + */ + readonly apiVersion?: string; + + /** + * Kind is the API kind the resources belong to. Required. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamKind#kind + */ + readonly kind?: string; + +} + +/** + * Converts an object of type 'ParamKindV1Alpha1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ParamKindV1Alpha1(obj: ParamKindV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'apiVersion': obj.apiVersion, + 'kind': obj.kind, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * Validation specifies the CEL expression which is used to apply the validation. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.Validation + */ +export interface ValidationV1Alpha1 { + /** + * Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: + * + * - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + * For example, a variable named 'foo' can be accessed as 'variables.foo'. + * - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + * See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz + * - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the + * request resource. + * + * The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the object. No other metadata properties are accessible. + * + * Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. Accessible property names are escaped according to the following rules when accessed in the expression: - '__' escapes to '__underscores__' - '.' escapes to '__dot__' - '-' escapes to '__dash__' - '/' escapes to '__slash__' - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: + * "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", + * "import", "let", "loop", "package", "namespace", "return". + * Examples: + * - Expression accessing a property named "namespace": {"Expression": "object.__namespace__ > 0"} + * - Expression accessing a property named "x-prop": {"Expression": "object.x__dash__prop > 0"} + * - Expression accessing a property named "redact__d": {"Expression": "object.redact__underscores__d > 0"} + * + * Equality on arrays with list type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: + * - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and + * non-intersecting elements in `Y` are appended, retaining their partial order. + * - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values + * are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with + * non-intersecting keys are appended, retaining their partial order. + * Required. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#expression + */ + readonly expression: string; + + /** + * Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is "failed rule: {Rule}". e.g. "must be a URL with the host matching spec.host" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is "failed Expression: {Expression}". + * + * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#message + */ + readonly message?: string; + + /** + * messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: "object.x must be less than max ("+string(params.max)+")" + * + * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#messageExpression + */ + readonly messageExpression?: string; + + /** + * Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". If not set, StatusReasonInvalid is used in the response to the client. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#reason + */ + readonly reason?: string; + +} + +/** + * Converts an object of type 'ValidationV1Alpha1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ValidationV1Alpha1(obj: ValidationV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'expression': obj.expression, + 'message': obj.message, + 'messageExpression': obj.messageExpression, + 'reason': obj.reason, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * Variable is the definition of a variable that is used for composition. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.Variable + */ +export interface VariableV1Alpha1 { + /** + * Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.Variable#expression */ readonly expression: string; /** - * Name is an identifier for this match condition, used for strategic merging of MatchConditions, as well as providing an identifier for logging purposes. A good name should be descriptive of the associated expression. Name must be a qualified name consisting of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName') + * Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo` * - * Required. - * - * @schema io.k8s.api.admissionregistration.v1.MatchCondition#name + * @schema io.k8s.api.admissionregistration.v1alpha1.Variable#name */ readonly name: string; + } /** - * Converts an object of type 'MatchCondition' to JSON representation. + * Converts an object of type 'VariableV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_MatchCondition( - obj: MatchCondition | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VariableV1Alpha1(obj: VariableV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - expression: obj.expression, - name: obj.name, + 'expression': obj.expression, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * RuleWithOperations is a tuple of Operations and Resources. It is recommended to make sure that all the tuple expansions are valid. + * ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. * - * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef */ -export interface RuleWithOperations { +export interface ParamRefV1Alpha1 { /** - * APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. + * `name` is the name of the resource being referenced. * - * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#apiGroups + * `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef#name */ - readonly apiGroups?: string[]; + readonly name?: string; /** - * APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. + * namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. * - * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#apiVersions + * A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. + * + * - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. + * + * - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. + * + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef#namespace */ - readonly apiVersions?: string[]; + readonly namespace?: string; /** - * Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. + * `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. * - * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#operations + * Allowed values are `Allow` or `Deny` Default to `Deny` + * + * @default Deny` + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef#parameterNotFoundAction */ - readonly operations?: string[]; + readonly parameterNotFoundAction?: string; /** - * Resources is a list of resources this rule applies to. - * - * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '_/scale' means all scale subresources. '_/*' means all resources and their subresources. + * selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind. * - * If wildcard is present, the validation rule will ensure resources do not overlap with each other. + * If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together. * - * Depending on the enclosing object, subresources might not be allowed. Required. + * One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. * - * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#resources + * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef#selector */ - readonly resources?: string[]; + readonly selector?: LabelSelector; - /** - * scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". - * - * @default . - * @schema io.k8s.api.admissionregistration.v1.RuleWithOperations#scope - */ - readonly scope?: string; } /** - * Converts an object of type 'RuleWithOperations' to JSON representation. + * Converts an object of type 'ParamRefV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_RuleWithOperations( - obj: RuleWithOperations | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ParamRefV1Alpha1(obj: ParamRefV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroups: obj.apiGroups?.map((y) => y), - apiVersions: obj.apiVersions?.map((y) => y), - operations: obj.operations?.map((y) => y), - resources: obj.resources?.map((y) => y), - scope: obj.scope, + 'name': obj.name, + 'namespace': obj.namespace, + 'parameterNotFoundAction': obj.parameterNotFoundAction, + 'selector': toJson_LabelSelector(obj.selector), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * AuditAnnotation describes how to produce an audit annotation for an API request. * - * @schema io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation + * @schema io.k8s.api.admissionregistration.v1beta1.AuditAnnotation */ -export interface AuditAnnotationV1Alpha1 { +export interface AuditAnnotationV1Beta1 { /** * key specifies the audit annotation key. The audit annotation keys of a ValidatingAdmissionPolicy must be unique. The key must be a qualified name ([A-Za-z0-9][-A-Za-z0-9_.]*) no more than 63 bytes in length. * @@ -19847,7 +19185,7 @@ export interface AuditAnnotationV1Alpha1 { * * Required. * - * @schema io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation#key + * @schema io.k8s.api.admissionregistration.v1beta1.AuditAnnotation#key */ readonly key: string; @@ -19858,37 +19196,33 @@ export interface AuditAnnotationV1Alpha1 { * * Required. * - * @schema io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation#valueExpression + * @schema io.k8s.api.admissionregistration.v1beta1.AuditAnnotation#valueExpression */ readonly valueExpression: string; + } /** - * Converts an object of type 'AuditAnnotationV1Alpha1' to JSON representation. + * Converts an object of type 'AuditAnnotationV1Beta1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_AuditAnnotationV1Alpha1( - obj: AuditAnnotationV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_AuditAnnotationV1Beta1(obj: AuditAnnotationV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - key: obj.key, - valueExpression: obj.valueExpression, + 'key': obj.key, + 'valueExpression': obj.valueExpression, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchCondition + * MatchCondition represents a condition which must be fulfilled for a request to be sent to a webhook. + * + * @schema io.k8s.api.admissionregistration.v1beta1.MatchCondition */ -export interface MatchConditionV1Alpha1 { +export interface MatchConditionV1Beta1 { /** * Expression represents the expression which will be evaluated by CEL. Must evaluate to bool. CEL expressions have access to the contents of the AdmissionRequest and Authorizer, organized into CEL variables: * @@ -19900,7 +19234,7 @@ export interface MatchConditionV1Alpha1 { * * Required. * - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchCondition#expression + * @schema io.k8s.api.admissionregistration.v1beta1.MatchCondition#expression */ readonly expression: string; @@ -19909,45 +19243,39 @@ export interface MatchConditionV1Alpha1 { * * Required. * - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchCondition#name + * @schema io.k8s.api.admissionregistration.v1beta1.MatchCondition#name */ readonly name: string; + } /** - * Converts an object of type 'MatchConditionV1Alpha1' to JSON representation. + * Converts an object of type 'MatchConditionV1Beta1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_MatchConditionV1Alpha1( - obj: MatchConditionV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_MatchConditionV1Beta1(obj: MatchConditionV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - expression: obj.expression, - name: obj.name, + 'expression': obj.expression, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * MatchResources decides whether to run the admission control policy on an object based on whether it meets the match criteria. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) * - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources + * @schema io.k8s.api.admissionregistration.v1beta1.MatchResources */ -export interface MatchResourcesV1Alpha1 { +export interface MatchResourcesV1Beta1 { /** * ExcludeResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy should not care about. The exclude rules take precedence over include rules (if a resource matches both, it is excluded) * - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#excludeResourceRules + * @schema io.k8s.api.admissionregistration.v1beta1.MatchResources#excludeResourceRules */ - readonly excludeResourceRules?: NamedRuleWithOperationsV1Alpha1[]; + readonly excludeResourceRules?: NamedRuleWithOperationsV1Beta1[]; /** * matchPolicy defines how the "MatchResources" list is used to match incoming requests. Allowed values are "Exact" or "Equivalent". @@ -19959,7 +19287,7 @@ export interface MatchResourcesV1Alpha1 { * Defaults to "Equivalent" * * @default Equivalent" - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#matchPolicy + * @schema io.k8s.api.admissionregistration.v1beta1.MatchResources#matchPolicy */ readonly matchPolicy?: string; @@ -19997,7 +19325,7 @@ export interface MatchResourcesV1Alpha1 { * Default to the empty LabelSelector, which matches everything. * * @default the empty LabelSelector, which matches everything. - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#namespaceSelector + * @schema io.k8s.api.admissionregistration.v1beta1.MatchResources#namespaceSelector */ readonly namespaceSelector?: LabelSelector; @@ -20005,100 +19333,86 @@ export interface MatchResourcesV1Alpha1 { * ObjectSelector decides whether to run the validation based on if the object has matching labels. objectSelector is evaluated against both the oldObject and newObject that would be sent to the cel validation, and is considered to match if either object matches the selector. A null object (oldObject in the case of create, or newObject in the case of delete) or an object that cannot have labels (like a DeploymentRollback or a PodProxyOptions object) is not considered to match. Use the object selector only if the webhook is opt-in, because end users may skip the admission webhook by setting the labels. Default to the empty LabelSelector, which matches everything. * * @default the empty LabelSelector, which matches everything. - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#objectSelector + * @schema io.k8s.api.admissionregistration.v1beta1.MatchResources#objectSelector */ readonly objectSelector?: LabelSelector; /** * ResourceRules describes what operations on what resources/subresources the ValidatingAdmissionPolicy matches. The policy cares about an operation if it matches _any_ Rule. * - * @schema io.k8s.api.admissionregistration.v1alpha1.MatchResources#resourceRules + * @schema io.k8s.api.admissionregistration.v1beta1.MatchResources#resourceRules */ - readonly resourceRules?: NamedRuleWithOperationsV1Alpha1[]; + readonly resourceRules?: NamedRuleWithOperationsV1Beta1[]; + } /** - * Converts an object of type 'MatchResourcesV1Alpha1' to JSON representation. + * Converts an object of type 'MatchResourcesV1Beta1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_MatchResourcesV1Alpha1( - obj: MatchResourcesV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_MatchResourcesV1Beta1(obj: MatchResourcesV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - excludeResourceRules: obj.excludeResourceRules?.map((y) => - toJson_NamedRuleWithOperationsV1Alpha1(y), - ), - matchPolicy: obj.matchPolicy, - namespaceSelector: toJson_LabelSelector(obj.namespaceSelector), - objectSelector: toJson_LabelSelector(obj.objectSelector), - resourceRules: obj.resourceRules?.map((y) => - toJson_NamedRuleWithOperationsV1Alpha1(y), - ), + 'excludeResourceRules': obj.excludeResourceRules?.map(y => toJson_NamedRuleWithOperationsV1Beta1(y)), + 'matchPolicy': obj.matchPolicy, + 'namespaceSelector': toJson_LabelSelector(obj.namespaceSelector), + 'objectSelector': toJson_LabelSelector(obj.objectSelector), + 'resourceRules': obj.resourceRules?.map(y => toJson_NamedRuleWithOperationsV1Beta1(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * ParamKind is a tuple of Group Kind and Version. * - * @schema io.k8s.api.admissionregistration.v1alpha1.ParamKind + * @schema io.k8s.api.admissionregistration.v1beta1.ParamKind */ -export interface ParamKindV1Alpha1 { +export interface ParamKindV1Beta1 { /** * APIVersion is the API group version the resources belong to. In format of "group/version". Required. * - * @schema io.k8s.api.admissionregistration.v1alpha1.ParamKind#apiVersion + * @schema io.k8s.api.admissionregistration.v1beta1.ParamKind#apiVersion */ readonly apiVersion?: string; /** * Kind is the API kind the resources belong to. Required. * - * @schema io.k8s.api.admissionregistration.v1alpha1.ParamKind#kind + * @schema io.k8s.api.admissionregistration.v1beta1.ParamKind#kind */ readonly kind?: string; + } /** - * Converts an object of type 'ParamKindV1Alpha1' to JSON representation. + * Converts an object of type 'ParamKindV1Beta1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ParamKindV1Alpha1( - obj: ParamKindV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ParamKindV1Beta1(obj: ParamKindV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - kind: obj.kind, + 'apiVersion': obj.apiVersion, + 'kind': obj.kind, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * Validation specifies the CEL expression which is used to apply the validation. * - * @schema io.k8s.api.admissionregistration.v1alpha1.Validation + * @schema io.k8s.api.admissionregistration.v1beta1.Validation */ -export interface ValidationV1Alpha1 { +export interface ValidationV1Beta1 { /** * Expression represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec CEL expressions have access to the contents of the API request/response, organized into CEL variables as well as some other useful variables: * - * - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. + * - 'object' - The object from the incoming request. The value is null for DELETE requests. - 'oldObject' - The existing object. The value is null for CREATE requests. - 'request' - Attributes of the API request([ref](/pkg/apis/admission/types.go#AdmissionRequest)). - 'params' - Parameter resource referred to by the policy binding being evaluated. Only populated if the policy has a ParamKind. - 'namespaceObject' - The namespace object that the incoming object belongs to. The value is null for cluster-scoped resources. - 'variables' - Map of composited variables, from its name to its lazily evaluated value. + * For example, a variable named 'foo' can be accessed as 'variables.foo'. + * - 'authorizer' - A CEL Authorizer. May be used to perform authorization checks for the principal (user or service account) of the request. * See https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Authz * - 'authorizer.requestResource' - A CEL ResourceCheck constructed from the 'authorizer' and configured with the * request resource. @@ -20121,96 +19435,155 @@ export interface ValidationV1Alpha1 { * non-intersecting keys are appended, retaining their partial order. * Required. * - * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#expression + * @schema io.k8s.api.admissionregistration.v1beta1.Validation#expression */ readonly expression: string; /** * Message represents the message displayed when validation fails. The message is required if the Expression contains line breaks. The message must not contain line breaks. If unset, the message is "failed rule: {Rule}". e.g. "must be a URL with the host matching spec.host" If the Expression contains line breaks. Message is required. The message must not contain line breaks. If unset, the message is "failed Expression: {Expression}". * - * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#message + * @schema io.k8s.api.admissionregistration.v1beta1.Validation#message */ readonly message?: string; /** * messageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. Since messageExpression is used as a failure message, it must evaluate to a string. If both message and messageExpression are present on a validation, then messageExpression will be used if validation fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. messageExpression has access to all the same variables as the `expression` except for 'authorizer' and 'authorizer.requestResource'. Example: "object.x must be less than max ("+string(params.max)+")" * - * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#messageExpression + * @schema io.k8s.api.admissionregistration.v1beta1.Validation#messageExpression */ readonly messageExpression?: string; /** * Reason represents a machine-readable description of why this validation failed. If this is the first validation in the list to fail, this reason, as well as the corresponding HTTP response code, are used in the HTTP response to the client. The currently supported reasons are: "Unauthorized", "Forbidden", "Invalid", "RequestEntityTooLarge". If not set, StatusReasonInvalid is used in the response to the client. * - * @schema io.k8s.api.admissionregistration.v1alpha1.Validation#reason + * @schema io.k8s.api.admissionregistration.v1beta1.Validation#reason */ readonly reason?: string; + } /** - * Converts an object of type 'ValidationV1Alpha1' to JSON representation. + * Converts an object of type 'ValidationV1Beta1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ValidationV1Alpha1( - obj: ValidationV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ValidationV1Beta1(obj: ValidationV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - expression: obj.expression, - message: obj.message, - messageExpression: obj.messageExpression, - reason: obj.reason, + 'expression': obj.expression, + 'message': obj.message, + 'messageExpression': obj.messageExpression, + 'reason': obj.reason, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * ParamRef references a parameter resource + * Variable is the definition of a variable that is used for composition. A variable is defined as a named expression. * - * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef + * @schema io.k8s.api.admissionregistration.v1beta1.Variable */ -export interface ParamRefV1Alpha1 { +export interface VariableV1Beta1 { /** - * Name of the resource being referenced. + * Expression is the expression that will be evaluated as the value of the variable. The CEL expression has access to the same identifiers as the CEL expressions in Validation. * - * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef#name + * @schema io.k8s.api.admissionregistration.v1beta1.Variable#expression + */ + readonly expression: string; + + /** + * Name is the name of the variable. The name must be a valid CEL identifier and unique among all variables. The variable can be accessed in other expressions through `variables` For example, if name is "foo", the variable will be available as `variables.foo` + * + * @schema io.k8s.api.admissionregistration.v1beta1.Variable#name + */ + readonly name: string; + +} + +/** + * Converts an object of type 'VariableV1Beta1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_VariableV1Beta1(obj: VariableV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'expression': obj.expression, + 'name': obj.name, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ParamRef describes how to locate the params to be used as input to expressions of rules applied by a policy binding. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ParamRef + */ +export interface ParamRefV1Beta1 { + /** + * name is the name of the resource being referenced. + * + * One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. + * + * A single parameter used for all admission requests can be configured by setting the `name` field, leaving `selector` blank, and setting namespace if `paramKind` is namespace-scoped. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ParamRef#name */ readonly name?: string; /** - * Namespace of the referenced resource. Should be empty for the cluster-scoped resources + * namespace is the namespace of the referenced resource. Allows limiting the search for params to a specific namespace. Applies to both `name` and `selector` fields. * - * @schema io.k8s.api.admissionregistration.v1alpha1.ParamRef#namespace + * A per-namespace parameter may be used by specifying a namespace-scoped `paramKind` in the policy and leaving this field empty. + * + * - If `paramKind` is cluster-scoped, this field MUST be unset. Setting this field results in a configuration error. + * + * - If `paramKind` is namespace-scoped, the namespace of the object being evaluated for admission will be used when this field is left unset. Take care that if this is left empty the binding must not match any cluster-scoped resources, which will result in an error. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ParamRef#namespace */ readonly namespace?: string; + + /** + * `parameterNotFoundAction` controls the behavior of the binding when the resource exists, and name or selector is valid, but there are no parameters matched by the binding. If the value is set to `Allow`, then no matched parameters will be treated as successful validation by the binding. If set to `Deny`, then no matched parameters will be subject to the `failurePolicy` of the policy. + * + * Allowed values are `Allow` or `Deny` + * + * Required + * + * @schema io.k8s.api.admissionregistration.v1beta1.ParamRef#parameterNotFoundAction + */ + readonly parameterNotFoundAction?: string; + + /** + * selector can be used to match multiple param objects based on their labels. Supply selector: {} to match all resources of the ParamKind. + * + * If multiple params are found, they are all evaluated with the policy expressions and the results are ANDed together. + * + * One of `name` or `selector` must be set, but `name` and `selector` are mutually exclusive properties. If one is set, the other must be unset. + * + * @schema io.k8s.api.admissionregistration.v1beta1.ParamRef#selector + */ + readonly selector?: LabelSelector; + } /** - * Converts an object of type 'ParamRefV1Alpha1' to JSON representation. + * Converts an object of type 'ParamRefV1Beta1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ParamRefV1Alpha1( - obj: ParamRefV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ParamRefV1Beta1(obj: ParamRefV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - namespace: obj.namespace, + 'name': obj.name, + 'namespace': obj.namespace, + 'parameterNotFoundAction': obj.parameterNotFoundAction, + 'selector': toJson_LabelSelector(obj.selector), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20234,27 +19607,21 @@ export interface DaemonSetUpdateStrategy { * @schema io.k8s.api.apps.v1.DaemonSetUpdateStrategy#type */ readonly type?: string; + } /** * Converts an object of type 'DaemonSetUpdateStrategy' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DaemonSetUpdateStrategy( - obj: DaemonSetUpdateStrategy | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DaemonSetUpdateStrategy(obj: DaemonSetUpdateStrategy | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - rollingUpdate: toJson_RollingUpdateDaemonSet(obj.rollingUpdate), - type: obj.type, + 'rollingUpdate': toJson_RollingUpdateDaemonSet(obj.rollingUpdate), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20278,27 +19645,21 @@ export interface DeploymentStrategy { * @schema io.k8s.api.apps.v1.DeploymentStrategy#type */ readonly type?: string; + } /** * Converts an object of type 'DeploymentStrategy' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DeploymentStrategy( - obj: DeploymentStrategy | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DeploymentStrategy(obj: DeploymentStrategy | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - rollingUpdate: toJson_RollingUpdateDeployment(obj.rollingUpdate), - type: obj.type, + 'rollingUpdate': toJson_RollingUpdateDeployment(obj.rollingUpdate), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20317,26 +19678,20 @@ export interface StatefulSetOrdinals { * @schema io.k8s.api.apps.v1.StatefulSetOrdinals#start */ readonly start?: number; + } /** * Converts an object of type 'StatefulSetOrdinals' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StatefulSetOrdinals( - obj: StatefulSetOrdinals | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StatefulSetOrdinals(obj: StatefulSetOrdinals | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - start: obj.start, + 'start': obj.start, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20359,27 +19714,21 @@ export interface StatefulSetPersistentVolumeClaimRetentionPolicy { * @schema io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy#whenScaled */ readonly whenScaled?: string; + } /** * Converts an object of type 'StatefulSetPersistentVolumeClaimRetentionPolicy' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StatefulSetPersistentVolumeClaimRetentionPolicy( - obj: StatefulSetPersistentVolumeClaimRetentionPolicy | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StatefulSetPersistentVolumeClaimRetentionPolicy(obj: StatefulSetPersistentVolumeClaimRetentionPolicy | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - whenDeleted: obj.whenDeleted, - whenScaled: obj.whenScaled, + 'whenDeleted': obj.whenDeleted, + 'whenScaled': obj.whenScaled, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20403,27 +19752,21 @@ export interface StatefulSetUpdateStrategy { * @schema io.k8s.api.apps.v1.StatefulSetUpdateStrategy#type */ readonly type?: string; + } /** * Converts an object of type 'StatefulSetUpdateStrategy' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StatefulSetUpdateStrategy( - obj: StatefulSetUpdateStrategy | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StatefulSetUpdateStrategy(obj: StatefulSetUpdateStrategy | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - rollingUpdate: toJson_RollingUpdateStatefulSetStrategy(obj.rollingUpdate), - type: obj.type, + 'rollingUpdate': toJson_RollingUpdateStatefulSetStrategy(obj.rollingUpdate), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20460,29 +19803,23 @@ export interface BoundObjectReference { * @schema io.k8s.api.authentication.v1.BoundObjectReference#uid */ readonly uid?: string; + } /** * Converts an object of type 'BoundObjectReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_BoundObjectReference( - obj: BoundObjectReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_BoundObjectReference(obj: BoundObjectReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - kind: obj.kind, - name: obj.name, - uid: obj.uid, + 'apiVersion': obj.apiVersion, + 'kind': obj.kind, + 'name': obj.name, + 'uid': obj.uid, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20505,27 +19842,21 @@ export interface NonResourceAttributes { * @schema io.k8s.api.authorization.v1.NonResourceAttributes#verb */ readonly verb?: string; + } /** * Converts an object of type 'NonResourceAttributes' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NonResourceAttributes( - obj: NonResourceAttributes | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NonResourceAttributes(obj: NonResourceAttributes | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - path: obj.path, - verb: obj.verb, + 'path': obj.path, + 'verb': obj.verb, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20583,32 +19914,26 @@ export interface ResourceAttributes { * @schema io.k8s.api.authorization.v1.ResourceAttributes#version */ readonly version?: string; + } /** * Converts an object of type 'ResourceAttributes' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceAttributes( - obj: ResourceAttributes | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceAttributes(obj: ResourceAttributes | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - group: obj.group, - name: obj.name, - namespace: obj.namespace, - resource: obj.resource, - subresource: obj.subresource, - verb: obj.verb, - version: obj.version, + 'group': obj.group, + 'name': obj.name, + 'namespace': obj.namespace, + 'resource': obj.resource, + 'subresource': obj.subresource, + 'verb': obj.verb, + 'version': obj.version, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20638,28 +19963,22 @@ export interface CrossVersionObjectReference { * @schema io.k8s.api.autoscaling.v1.CrossVersionObjectReference#name */ readonly name: string; + } /** * Converts an object of type 'CrossVersionObjectReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CrossVersionObjectReference( - obj: CrossVersionObjectReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CrossVersionObjectReference(obj: CrossVersionObjectReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - kind: obj.kind, - name: obj.name, + 'apiVersion': obj.apiVersion, + 'kind': obj.kind, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20685,27 +20004,21 @@ export interface HorizontalPodAutoscalerBehaviorV2 { * @schema io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior#scaleUp */ readonly scaleUp?: HpaScalingRulesV2; + } /** * Converts an object of type 'HorizontalPodAutoscalerBehaviorV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HorizontalPodAutoscalerBehaviorV2( - obj: HorizontalPodAutoscalerBehaviorV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HorizontalPodAutoscalerBehaviorV2(obj: HorizontalPodAutoscalerBehaviorV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - scaleDown: toJson_HpaScalingRulesV2(obj.scaleDown), - scaleUp: toJson_HpaScalingRulesV2(obj.scaleUp), + 'scaleDown': toJson_HpaScalingRulesV2(obj.scaleDown), + 'scaleUp': toJson_HpaScalingRulesV2(obj.scaleUp), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20756,33 +20069,25 @@ export interface MetricSpecV2 { * @schema io.k8s.api.autoscaling.v2.MetricSpec#type */ readonly type: string; + } /** * Converts an object of type 'MetricSpecV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_MetricSpecV2( - obj: MetricSpecV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_MetricSpecV2(obj: MetricSpecV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - containerResource: toJson_ContainerResourceMetricSourceV2( - obj.containerResource, - ), - external: toJson_ExternalMetricSourceV2(obj.external), - object: toJson_ObjectMetricSourceV2(obj.object), - pods: toJson_PodsMetricSourceV2(obj.pods), - resource: toJson_ResourceMetricSourceV2(obj.resource), - type: obj.type, + 'containerResource': toJson_ContainerResourceMetricSourceV2(obj.containerResource), + 'external': toJson_ExternalMetricSourceV2(obj.external), + 'object': toJson_ObjectMetricSourceV2(obj.object), + 'pods': toJson_PodsMetricSourceV2(obj.pods), + 'resource': toJson_ResourceMetricSourceV2(obj.resource), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20812,28 +20117,22 @@ export interface CrossVersionObjectReferenceV2 { * @schema io.k8s.api.autoscaling.v2.CrossVersionObjectReference#name */ readonly name: string; + } /** * Converts an object of type 'CrossVersionObjectReferenceV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CrossVersionObjectReferenceV2( - obj: CrossVersionObjectReferenceV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CrossVersionObjectReferenceV2(obj: CrossVersionObjectReferenceV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - kind: obj.kind, - name: obj.name, + 'apiVersion': obj.apiVersion, + 'kind': obj.kind, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20856,27 +20155,21 @@ export interface JobTemplateSpec { * @schema io.k8s.api.batch.v1.JobTemplateSpec#spec */ readonly spec?: JobSpec; + } /** * Converts an object of type 'JobTemplateSpec' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_JobTemplateSpec( - obj: JobTemplateSpec | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_JobTemplateSpec(obj: JobTemplateSpec | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_JobSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_JobSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20892,26 +20185,20 @@ export interface PodFailurePolicy { * @schema io.k8s.api.batch.v1.PodFailurePolicy#rules */ readonly rules: PodFailurePolicyRule[]; + } /** * Converts an object of type 'PodFailurePolicy' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodFailurePolicy( - obj: PodFailurePolicy | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodFailurePolicy(obj: PodFailurePolicy | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - rules: obj.rules?.map((y) => toJson_PodFailurePolicyRule(y)), + 'rules': obj.rules?.map(y => toJson_PodFailurePolicyRule(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -20948,29 +20235,23 @@ export interface EndpointAddress { * @schema io.k8s.api.core.v1.EndpointAddress#targetRef */ readonly targetRef?: ObjectReference; + } /** * Converts an object of type 'EndpointAddress' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EndpointAddress( - obj: EndpointAddress | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EndpointAddress(obj: EndpointAddress | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - hostname: obj.hostname, - ip: obj.ip, - nodeName: obj.nodeName, - targetRef: toJson_ObjectReference(obj.targetRef), + 'hostname': obj.hostname, + 'ip': obj.ip, + 'nodeName': obj.nodeName, + 'targetRef': toJson_ObjectReference(obj.targetRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21021,61 +20302,25 @@ export interface LimitRangeItem { * @schema io.k8s.api.core.v1.LimitRangeItem#type */ readonly type: string; + } /** * Converts an object of type 'LimitRangeItem' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LimitRangeItem( - obj: LimitRangeItem | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - default: - obj.default === undefined - ? undefined - : Object.entries(obj.default).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - defaultRequest: - obj.defaultRequest === undefined - ? undefined - : Object.entries(obj.defaultRequest).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - max: - obj.max === undefined - ? undefined - : Object.entries(obj.max).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - maxLimitRequestRatio: - obj.maxLimitRequestRatio === undefined - ? undefined - : Object.entries(obj.maxLimitRequestRatio).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - min: - obj.min === undefined - ? undefined - : Object.entries(obj.min).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - type: obj.type, - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); +export function toJson_LimitRangeItem(obj: LimitRangeItem | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'default': ((obj.default) === undefined) ? undefined : (Object.entries(obj.default).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'defaultRequest': ((obj.defaultRequest) === undefined) ? undefined : (Object.entries(obj.defaultRequest).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'max': ((obj.max) === undefined) ? undefined : (Object.entries(obj.max).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'maxLimitRequestRatio': ((obj.maxLimitRequestRatio) === undefined) ? undefined : (Object.entries(obj.maxLimitRequestRatio).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'min': ((obj.min) === undefined) ? undefined : (Object.entries(obj.min).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'type': obj.type, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21091,26 +20336,20 @@ export interface NodeConfigSource { * @schema io.k8s.api.core.v1.NodeConfigSource#configMap */ readonly configMap?: ConfigMapNodeConfigSource; + } /** * Converts an object of type 'NodeConfigSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NodeConfigSource( - obj: NodeConfigSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NodeConfigSource(obj: NodeConfigSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - configMap: toJson_ConfigMapNodeConfigSource(obj.configMap), + 'configMap': toJson_ConfigMapNodeConfigSource(obj.configMap), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21147,29 +20386,23 @@ export interface Taint { * @schema io.k8s.api.core.v1.Taint#value */ readonly value?: string; + } /** * Converts an object of type 'Taint' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Taint( - obj: Taint | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Taint(obj: Taint | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - effect: obj.effect, - key: obj.key, - timeAdded: obj.timeAdded?.toISOString(), - value: obj.value, + 'effect': obj.effect, + 'key': obj.key, + 'timeAdded': obj.timeAdded?.toISOString(), + 'value': obj.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21208,29 +20441,23 @@ export interface AwsElasticBlockStoreVolumeSource { * @schema io.k8s.api.core.v1.AWSElasticBlockStoreVolumeSource#volumeID */ readonly volumeId: string; + } /** * Converts an object of type 'AwsElasticBlockStoreVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_AwsElasticBlockStoreVolumeSource( - obj: AwsElasticBlockStoreVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_AwsElasticBlockStoreVolumeSource(obj: AwsElasticBlockStoreVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - partition: obj.partition, - readOnly: obj.readOnly, - volumeID: obj.volumeId, + 'fsType': obj.fsType, + 'partition': obj.partition, + 'readOnly': obj.readOnly, + 'volumeID': obj.volumeId, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21282,31 +20509,25 @@ export interface AzureDiskVolumeSource { * @schema io.k8s.api.core.v1.AzureDiskVolumeSource#readOnly */ readonly readOnly?: boolean; + } /** * Converts an object of type 'AzureDiskVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_AzureDiskVolumeSource( - obj: AzureDiskVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_AzureDiskVolumeSource(obj: AzureDiskVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - cachingMode: obj.cachingMode, - diskName: obj.diskName, - diskURI: obj.diskUri, - fsType: obj.fsType, - kind: obj.kind, - readOnly: obj.readOnly, + 'cachingMode': obj.cachingMode, + 'diskName': obj.diskName, + 'diskURI': obj.diskUri, + 'fsType': obj.fsType, + 'kind': obj.kind, + 'readOnly': obj.readOnly, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21343,29 +20564,23 @@ export interface AzureFilePersistentVolumeSource { * @schema io.k8s.api.core.v1.AzureFilePersistentVolumeSource#shareName */ readonly shareName: string; + } /** * Converts an object of type 'AzureFilePersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_AzureFilePersistentVolumeSource( - obj: AzureFilePersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_AzureFilePersistentVolumeSource(obj: AzureFilePersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - readOnly: obj.readOnly, - secretName: obj.secretName, - secretNamespace: obj.secretNamespace, - shareName: obj.shareName, + 'readOnly': obj.readOnly, + 'secretName': obj.secretName, + 'secretNamespace': obj.secretNamespace, + 'shareName': obj.shareName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21417,31 +20632,25 @@ export interface CephFsPersistentVolumeSource { * @schema io.k8s.api.core.v1.CephFSPersistentVolumeSource#user */ readonly user?: string; + } /** * Converts an object of type 'CephFsPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CephFsPersistentVolumeSource( - obj: CephFsPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CephFsPersistentVolumeSource(obj: CephFsPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - monitors: obj.monitors?.map((y) => y), - path: obj.path, - readOnly: obj.readOnly, - secretFile: obj.secretFile, - secretRef: toJson_SecretReference(obj.secretRef), - user: obj.user, + 'monitors': obj.monitors?.map(y => y), + 'path': obj.path, + 'readOnly': obj.readOnly, + 'secretFile': obj.secretFile, + 'secretRef': toJson_SecretReference(obj.secretRef), + 'user': obj.user, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21479,29 +20688,23 @@ export interface CinderPersistentVolumeSource { * @schema io.k8s.api.core.v1.CinderPersistentVolumeSource#volumeID */ readonly volumeId: string; + } /** * Converts an object of type 'CinderPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CinderPersistentVolumeSource( - obj: CinderPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CinderPersistentVolumeSource(obj: CinderPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - readOnly: obj.readOnly, - secretRef: toJson_SecretReference(obj.secretRef), - volumeID: obj.volumeId, + 'fsType': obj.fsType, + 'readOnly': obj.readOnly, + 'secretRef': toJson_SecretReference(obj.secretRef), + 'volumeID': obj.volumeId, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21540,7 +20743,7 @@ export interface CsiPersistentVolumeSource { readonly fsType?: string; /** - * nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. This is a beta field which is enabled default by CSINodeExpandSecret feature gate. This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed. + * nodeExpandSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodeExpandVolume call. This field is optional, may be omitted if no secret is required. If the secret object contains more than one secret, all secrets are passed. * * @schema io.k8s.api.core.v1.CSIPersistentVolumeSource#nodeExpandSecretRef */ @@ -21581,45 +20784,29 @@ export interface CsiPersistentVolumeSource { * @schema io.k8s.api.core.v1.CSIPersistentVolumeSource#volumeHandle */ readonly volumeHandle: string; + } /** * Converts an object of type 'CsiPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CsiPersistentVolumeSource( - obj: CsiPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CsiPersistentVolumeSource(obj: CsiPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - controllerExpandSecretRef: toJson_SecretReference( - obj.controllerExpandSecretRef, - ), - controllerPublishSecretRef: toJson_SecretReference( - obj.controllerPublishSecretRef, - ), - driver: obj.driver, - fsType: obj.fsType, - nodeExpandSecretRef: toJson_SecretReference(obj.nodeExpandSecretRef), - nodePublishSecretRef: toJson_SecretReference(obj.nodePublishSecretRef), - nodeStageSecretRef: toJson_SecretReference(obj.nodeStageSecretRef), - readOnly: obj.readOnly, - volumeAttributes: - obj.volumeAttributes === undefined - ? undefined - : Object.entries(obj.volumeAttributes).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - volumeHandle: obj.volumeHandle, + 'controllerExpandSecretRef': toJson_SecretReference(obj.controllerExpandSecretRef), + 'controllerPublishSecretRef': toJson_SecretReference(obj.controllerPublishSecretRef), + 'driver': obj.driver, + 'fsType': obj.fsType, + 'nodeExpandSecretRef': toJson_SecretReference(obj.nodeExpandSecretRef), + 'nodePublishSecretRef': toJson_SecretReference(obj.nodePublishSecretRef), + 'nodeStageSecretRef': toJson_SecretReference(obj.nodeStageSecretRef), + 'readOnly': obj.readOnly, + 'volumeAttributes': ((obj.volumeAttributes) === undefined) ? undefined : (Object.entries(obj.volumeAttributes).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'volumeHandle': obj.volumeHandle, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21664,30 +20851,24 @@ export interface FcVolumeSource { * @schema io.k8s.api.core.v1.FCVolumeSource#wwids */ readonly wwids?: string[]; + } /** * Converts an object of type 'FcVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FcVolumeSource( - obj: FcVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FcVolumeSource(obj: FcVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - lun: obj.lun, - readOnly: obj.readOnly, - targetWWNs: obj.targetWwNs?.map((y) => y), - wwids: obj.wwids?.map((y) => y), + 'fsType': obj.fsType, + 'lun': obj.lun, + 'readOnly': obj.readOnly, + 'targetWWNs': obj.targetWwNs?.map(y => y), + 'wwids': obj.wwids?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21731,36 +20912,24 @@ export interface FlexPersistentVolumeSource { * @schema io.k8s.api.core.v1.FlexPersistentVolumeSource#secretRef */ readonly secretRef?: SecretReference; + } /** * Converts an object of type 'FlexPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FlexPersistentVolumeSource( - obj: FlexPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FlexPersistentVolumeSource(obj: FlexPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - driver: obj.driver, - fsType: obj.fsType, - options: - obj.options === undefined - ? undefined - : Object.entries(obj.options).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - readOnly: obj.readOnly, - secretRef: toJson_SecretReference(obj.secretRef), + 'driver': obj.driver, + 'fsType': obj.fsType, + 'options': ((obj.options) === undefined) ? undefined : (Object.entries(obj.options).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'readOnly': obj.readOnly, + 'secretRef': toJson_SecretReference(obj.secretRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21783,27 +20952,21 @@ export interface FlockerVolumeSource { * @schema io.k8s.api.core.v1.FlockerVolumeSource#datasetUUID */ readonly datasetUuid?: string; + } /** * Converts an object of type 'FlockerVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FlockerVolumeSource( - obj: FlockerVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FlockerVolumeSource(obj: FlockerVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - datasetName: obj.datasetName, - datasetUUID: obj.datasetUuid, + 'datasetName': obj.datasetName, + 'datasetUUID': obj.datasetUuid, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21843,29 +21006,23 @@ export interface GcePersistentDiskVolumeSource { * @schema io.k8s.api.core.v1.GCEPersistentDiskVolumeSource#readOnly */ readonly readOnly?: boolean; + } /** * Converts an object of type 'GcePersistentDiskVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_GcePersistentDiskVolumeSource( - obj: GcePersistentDiskVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_GcePersistentDiskVolumeSource(obj: GcePersistentDiskVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - partition: obj.partition, - pdName: obj.pdName, - readOnly: obj.readOnly, + 'fsType': obj.fsType, + 'partition': obj.partition, + 'pdName': obj.pdName, + 'readOnly': obj.readOnly, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21903,29 +21060,23 @@ export interface GlusterfsPersistentVolumeSource { * @schema io.k8s.api.core.v1.GlusterfsPersistentVolumeSource#readOnly */ readonly readOnly?: boolean; + } /** * Converts an object of type 'GlusterfsPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_GlusterfsPersistentVolumeSource( - obj: GlusterfsPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_GlusterfsPersistentVolumeSource(obj: GlusterfsPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - endpoints: obj.endpoints, - endpointsNamespace: obj.endpointsNamespace, - path: obj.path, - readOnly: obj.readOnly, + 'endpoints': obj.endpoints, + 'endpointsNamespace': obj.endpointsNamespace, + 'path': obj.path, + 'readOnly': obj.readOnly, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -21949,27 +21100,21 @@ export interface HostPathVolumeSource { * @schema io.k8s.api.core.v1.HostPathVolumeSource#type */ readonly type?: string; + } /** * Converts an object of type 'HostPathVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HostPathVolumeSource( - obj: HostPathVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HostPathVolumeSource(obj: HostPathVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - path: obj.path, - type: obj.type, + 'path': obj.path, + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22057,36 +21202,30 @@ export interface IscsiPersistentVolumeSource { * @schema io.k8s.api.core.v1.ISCSIPersistentVolumeSource#targetPortal */ readonly targetPortal: string; + } /** * Converts an object of type 'IscsiPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IscsiPersistentVolumeSource( - obj: IscsiPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IscsiPersistentVolumeSource(obj: IscsiPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - chapAuthDiscovery: obj.chapAuthDiscovery, - chapAuthSession: obj.chapAuthSession, - fsType: obj.fsType, - initiatorName: obj.initiatorName, - iqn: obj.iqn, - iscsiInterface: obj.iscsiInterface, - lun: obj.lun, - portals: obj.portals?.map((y) => y), - readOnly: obj.readOnly, - secretRef: toJson_SecretReference(obj.secretRef), - targetPortal: obj.targetPortal, + 'chapAuthDiscovery': obj.chapAuthDiscovery, + 'chapAuthSession': obj.chapAuthSession, + 'fsType': obj.fsType, + 'initiatorName': obj.initiatorName, + 'iqn': obj.iqn, + 'iscsiInterface': obj.iscsiInterface, + 'lun': obj.lun, + 'portals': obj.portals?.map(y => y), + 'readOnly': obj.readOnly, + 'secretRef': toJson_SecretReference(obj.secretRef), + 'targetPortal': obj.targetPortal, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22109,27 +21248,21 @@ export interface LocalVolumeSource { * @schema io.k8s.api.core.v1.LocalVolumeSource#path */ readonly path: string; + } /** * Converts an object of type 'LocalVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LocalVolumeSource( - obj: LocalVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LocalVolumeSource(obj: LocalVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - path: obj.path, + 'fsType': obj.fsType, + 'path': obj.path, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22160,28 +21293,22 @@ export interface NfsVolumeSource { * @schema io.k8s.api.core.v1.NFSVolumeSource#server */ readonly server: string; + } /** * Converts an object of type 'NfsVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NfsVolumeSource( - obj: NfsVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NfsVolumeSource(obj: NfsVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - path: obj.path, - readOnly: obj.readOnly, - server: obj.server, + 'path': obj.path, + 'readOnly': obj.readOnly, + 'server': obj.server, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22197,26 +21324,20 @@ export interface VolumeNodeAffinity { * @schema io.k8s.api.core.v1.VolumeNodeAffinity#required */ readonly required?: NodeSelector; + } /** * Converts an object of type 'VolumeNodeAffinity' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_VolumeNodeAffinity( - obj: VolumeNodeAffinity | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeNodeAffinity(obj: VolumeNodeAffinity | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - required: toJson_NodeSelector(obj.required), + 'required': toJson_NodeSelector(obj.required), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22239,27 +21360,21 @@ export interface PhotonPersistentDiskVolumeSource { * @schema io.k8s.api.core.v1.PhotonPersistentDiskVolumeSource#pdID */ readonly pdId: string; + } /** * Converts an object of type 'PhotonPersistentDiskVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PhotonPersistentDiskVolumeSource( - obj: PhotonPersistentDiskVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PhotonPersistentDiskVolumeSource(obj: PhotonPersistentDiskVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - pdID: obj.pdId, + 'fsType': obj.fsType, + 'pdID': obj.pdId, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22289,28 +21404,22 @@ export interface PortworxVolumeSource { * @schema io.k8s.api.core.v1.PortworxVolumeSource#volumeID */ readonly volumeId: string; + } /** * Converts an object of type 'PortworxVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PortworxVolumeSource( - obj: PortworxVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PortworxVolumeSource(obj: PortworxVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - readOnly: obj.readOnly, - volumeID: obj.volumeId, + 'fsType': obj.fsType, + 'readOnly': obj.readOnly, + 'volumeID': obj.volumeId, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22364,31 +21473,25 @@ export interface QuobyteVolumeSource { * @schema io.k8s.api.core.v1.QuobyteVolumeSource#volume */ readonly volume: string; + } /** * Converts an object of type 'QuobyteVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_QuobyteVolumeSource( - obj: QuobyteVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_QuobyteVolumeSource(obj: QuobyteVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - group: obj.group, - readOnly: obj.readOnly, - registry: obj.registry, - tenant: obj.tenant, - user: obj.user, - volume: obj.volume, + 'group': obj.group, + 'readOnly': obj.readOnly, + 'registry': obj.registry, + 'tenant': obj.tenant, + 'user': obj.user, + 'volume': obj.volume, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22458,33 +21561,27 @@ export interface RbdPersistentVolumeSource { * @schema io.k8s.api.core.v1.RBDPersistentVolumeSource#user */ readonly user?: string; + } /** * Converts an object of type 'RbdPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_RbdPersistentVolumeSource( - obj: RbdPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_RbdPersistentVolumeSource(obj: RbdPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - image: obj.image, - keyring: obj.keyring, - monitors: obj.monitors?.map((y) => y), - pool: obj.pool, - readOnly: obj.readOnly, - secretRef: toJson_SecretReference(obj.secretRef), - user: obj.user, + 'fsType': obj.fsType, + 'image': obj.image, + 'keyring': obj.keyring, + 'monitors': obj.monitors?.map(y => y), + 'pool': obj.pool, + 'readOnly': obj.readOnly, + 'secretRef': toJson_SecretReference(obj.secretRef), + 'user': obj.user, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22565,35 +21662,29 @@ export interface ScaleIoPersistentVolumeSource { * @schema io.k8s.api.core.v1.ScaleIOPersistentVolumeSource#volumeName */ readonly volumeName?: string; + } /** * Converts an object of type 'ScaleIoPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ScaleIoPersistentVolumeSource( - obj: ScaleIoPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ScaleIoPersistentVolumeSource(obj: ScaleIoPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - gateway: obj.gateway, - protectionDomain: obj.protectionDomain, - readOnly: obj.readOnly, - secretRef: toJson_SecretReference(obj.secretRef), - sslEnabled: obj.sslEnabled, - storageMode: obj.storageMode, - storagePool: obj.storagePool, - system: obj.system, - volumeName: obj.volumeName, + 'fsType': obj.fsType, + 'gateway': obj.gateway, + 'protectionDomain': obj.protectionDomain, + 'readOnly': obj.readOnly, + 'secretRef': toJson_SecretReference(obj.secretRef), + 'sslEnabled': obj.sslEnabled, + 'storageMode': obj.storageMode, + 'storagePool': obj.storagePool, + 'system': obj.system, + 'volumeName': obj.volumeName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22637,30 +21728,24 @@ export interface StorageOsPersistentVolumeSource { * @schema io.k8s.api.core.v1.StorageOSPersistentVolumeSource#volumeNamespace */ readonly volumeNamespace?: string; + } /** * Converts an object of type 'StorageOsPersistentVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StorageOsPersistentVolumeSource( - obj: StorageOsPersistentVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StorageOsPersistentVolumeSource(obj: StorageOsPersistentVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - readOnly: obj.readOnly, - secretRef: toJson_ObjectReference(obj.secretRef), - volumeName: obj.volumeName, - volumeNamespace: obj.volumeNamespace, + 'fsType': obj.fsType, + 'readOnly': obj.readOnly, + 'secretRef': toJson_ObjectReference(obj.secretRef), + 'volumeName': obj.volumeName, + 'volumeNamespace': obj.volumeNamespace, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22697,29 +21782,23 @@ export interface VsphereVirtualDiskVolumeSource { * @schema io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource#volumePath */ readonly volumePath: string; + } /** * Converts an object of type 'VsphereVirtualDiskVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_VsphereVirtualDiskVolumeSource( - obj: VsphereVirtualDiskVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VsphereVirtualDiskVolumeSource(obj: VsphereVirtualDiskVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - storagePolicyID: obj.storagePolicyId, - storagePolicyName: obj.storagePolicyName, - volumePath: obj.volumePath, + 'fsType': obj.fsType, + 'storagePolicyID': obj.storagePolicyId, + 'storagePolicyName': obj.storagePolicyName, + 'volumePath': obj.volumePath, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22749,28 +21828,22 @@ export interface TypedLocalObjectReference { * @schema io.k8s.api.core.v1.TypedLocalObjectReference#name */ readonly name: string; + } /** * Converts an object of type 'TypedLocalObjectReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TypedLocalObjectReference( - obj: TypedLocalObjectReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TypedLocalObjectReference(obj: TypedLocalObjectReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroup: obj.apiGroup, - kind: obj.kind, - name: obj.name, + 'apiGroup': obj.apiGroup, + 'kind': obj.kind, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22805,96 +21878,60 @@ export interface TypedObjectReference { * @schema io.k8s.api.core.v1.TypedObjectReference#namespace */ readonly namespace?: string; + } /** * Converts an object of type 'TypedObjectReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TypedObjectReference( - obj: TypedObjectReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TypedObjectReference(obj: TypedObjectReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroup: obj.apiGroup, - kind: obj.kind, - name: obj.name, - namespace: obj.namespace, - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); -} -/* eslint-enable max-len, quote-props */ - -/** - * ResourceRequirements describes the compute resource requirements. - * - * @schema io.k8s.api.core.v1.ResourceRequirements - */ -export interface ResourceRequirements { - /** - * Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. - * - * This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. - * - * This field is immutable. It can only be set for containers. - * - * @schema io.k8s.api.core.v1.ResourceRequirements#claims - */ - readonly claims?: ResourceClaim[]; + 'apiGroup': obj.apiGroup, + 'kind': obj.kind, + 'name': obj.name, + 'namespace': obj.namespace, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ +/** + * VolumeResourceRequirements describes the storage resource requirements for a volume. + * + * @schema io.k8s.api.core.v1.VolumeResourceRequirements + */ +export interface VolumeResourceRequirements { /** * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ * - * @schema io.k8s.api.core.v1.ResourceRequirements#limits + * @schema io.k8s.api.core.v1.VolumeResourceRequirements#limits */ readonly limits?: { [key: string]: Quantity }; /** * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ * - * @schema io.k8s.api.core.v1.ResourceRequirements#requests + * @schema io.k8s.api.core.v1.VolumeResourceRequirements#requests */ readonly requests?: { [key: string]: Quantity }; + } /** - * Converts an object of type 'ResourceRequirements' to JSON representation. + * Converts an object of type 'VolumeResourceRequirements' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceRequirements( - obj: ResourceRequirements | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeResourceRequirements(obj: VolumeResourceRequirements | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - claims: obj.claims?.map((y) => toJson_ResourceClaim(y)), - limits: - obj.limits === undefined - ? undefined - : Object.entries(obj.limits).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), - requests: - obj.requests === undefined - ? undefined - : Object.entries(obj.requests).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1]?.value }), - {}, - ), + 'limits': ((obj.limits) === undefined) ? undefined : (Object.entries(obj.limits).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'requests': ((obj.requests) === undefined) ? undefined : (Object.entries(obj.requests).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -22924,28 +21961,22 @@ export interface Affinity { * @schema io.k8s.api.core.v1.Affinity#podAntiAffinity */ readonly podAntiAffinity?: PodAntiAffinity; + } /** * Converts an object of type 'Affinity' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Affinity( - obj: Affinity | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Affinity(obj: Affinity | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nodeAffinity: toJson_NodeAffinity(obj.nodeAffinity), - podAffinity: toJson_PodAffinity(obj.podAffinity), - podAntiAffinity: toJson_PodAntiAffinity(obj.podAntiAffinity), + 'nodeAffinity': toJson_NodeAffinity(obj.nodeAffinity), + 'podAffinity': toJson_PodAffinity(obj.podAffinity), + 'podAntiAffinity': toJson_PodAntiAffinity(obj.podAntiAffinity), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23047,6 +22078,13 @@ export interface Container { */ readonly resources?: ResourceRequirements; + /** + * RestartPolicy defines the restart behavior of individual containers in a pod. This field may only be set for init containers, and the only allowed value is "Always". For non-init containers or when this field is not specified, the restart behavior is defined by the Pod's restart policy and the container type. Setting the RestartPolicy as "Always" for the init container will have the following effect: this init container will be continually restarted on exit until all regular containers have terminated. Once all regular containers have completed, all init containers with restartPolicy "Always" will be shut down. This lifecycle differs from normal init containers and is often referred to as a "sidecar" container. Although this init container still starts in the init container sequence, it does not wait for the container to complete before proceeding to the next init container. Instead, the next init container starts immediately after this init container is started, or after any startupProbe has successfully completed. + * + * @schema io.k8s.api.core.v1.Container#restartPolicy + */ + readonly restartPolicy?: string; + /** * SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ * @@ -23121,48 +22159,43 @@ export interface Container { * @schema io.k8s.api.core.v1.Container#workingDir */ readonly workingDir?: string; + } /** * Converts an object of type 'Container' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Container( - obj: Container | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Container(obj: Container | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - args: obj.args?.map((y) => y), - command: obj.command?.map((y) => y), - env: obj.env?.map((y) => toJson_EnvVar(y)), - envFrom: obj.envFrom?.map((y) => toJson_EnvFromSource(y)), - image: obj.image, - imagePullPolicy: obj.imagePullPolicy, - lifecycle: toJson_Lifecycle(obj.lifecycle), - livenessProbe: toJson_Probe(obj.livenessProbe), - name: obj.name, - ports: obj.ports?.map((y) => toJson_ContainerPort(y)), - readinessProbe: toJson_Probe(obj.readinessProbe), - resizePolicy: obj.resizePolicy?.map((y) => toJson_ContainerResizePolicy(y)), - resources: toJson_ResourceRequirements(obj.resources), - securityContext: toJson_SecurityContext(obj.securityContext), - startupProbe: toJson_Probe(obj.startupProbe), - stdin: obj.stdin, - stdinOnce: obj.stdinOnce, - terminationMessagePath: obj.terminationMessagePath, - terminationMessagePolicy: obj.terminationMessagePolicy, - tty: obj.tty, - volumeDevices: obj.volumeDevices?.map((y) => toJson_VolumeDevice(y)), - volumeMounts: obj.volumeMounts?.map((y) => toJson_VolumeMount(y)), - workingDir: obj.workingDir, + 'args': obj.args?.map(y => y), + 'command': obj.command?.map(y => y), + 'env': obj.env?.map(y => toJson_EnvVar(y)), + 'envFrom': obj.envFrom?.map(y => toJson_EnvFromSource(y)), + 'image': obj.image, + 'imagePullPolicy': obj.imagePullPolicy, + 'lifecycle': toJson_Lifecycle(obj.lifecycle), + 'livenessProbe': toJson_Probe(obj.livenessProbe), + 'name': obj.name, + 'ports': obj.ports?.map(y => toJson_ContainerPort(y)), + 'readinessProbe': toJson_Probe(obj.readinessProbe), + 'resizePolicy': obj.resizePolicy?.map(y => toJson_ContainerResizePolicy(y)), + 'resources': toJson_ResourceRequirements(obj.resources), + 'restartPolicy': obj.restartPolicy, + 'securityContext': toJson_SecurityContext(obj.securityContext), + 'startupProbe': toJson_Probe(obj.startupProbe), + 'stdin': obj.stdin, + 'stdinOnce': obj.stdinOnce, + 'terminationMessagePath': obj.terminationMessagePath, + 'terminationMessagePolicy': obj.terminationMessagePolicy, + 'tty': obj.tty, + 'volumeDevices': obj.volumeDevices?.map(y => toJson_VolumeDevice(y)), + 'volumeMounts': obj.volumeMounts?.map(y => toJson_VolumeMount(y)), + 'workingDir': obj.workingDir, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23192,28 +22225,22 @@ export interface PodDnsConfig { * @schema io.k8s.api.core.v1.PodDNSConfig#searches */ readonly searches?: string[]; + } /** * Converts an object of type 'PodDnsConfig' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodDnsConfig( - obj: PodDnsConfig | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodDnsConfig(obj: PodDnsConfig | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nameservers: obj.nameservers?.map((y) => y), - options: obj.options?.map((y) => toJson_PodDnsConfigOption(y)), - searches: obj.searches?.map((y) => y), + 'nameservers': obj.nameservers?.map(y => y), + 'options': obj.options?.map(y => toJson_PodDnsConfigOption(y)), + 'searches': obj.searches?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23317,6 +22344,13 @@ export interface EphemeralContainer { */ readonly resources?: ResourceRequirements; + /** + * Restart policy for the container to manage the restart behavior of each container within a pod. This may only be set for init containers. You cannot set this field on ephemeral containers. + * + * @schema io.k8s.api.core.v1.EphemeralContainer#restartPolicy + */ + readonly restartPolicy?: string; + /** * Optional: SecurityContext defines the security options the ephemeral container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. * @@ -23400,49 +22434,44 @@ export interface EphemeralContainer { * @schema io.k8s.api.core.v1.EphemeralContainer#workingDir */ readonly workingDir?: string; + } /** * Converts an object of type 'EphemeralContainer' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EphemeralContainer( - obj: EphemeralContainer | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EphemeralContainer(obj: EphemeralContainer | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - args: obj.args?.map((y) => y), - command: obj.command?.map((y) => y), - env: obj.env?.map((y) => toJson_EnvVar(y)), - envFrom: obj.envFrom?.map((y) => toJson_EnvFromSource(y)), - image: obj.image, - imagePullPolicy: obj.imagePullPolicy, - lifecycle: toJson_Lifecycle(obj.lifecycle), - livenessProbe: toJson_Probe(obj.livenessProbe), - name: obj.name, - ports: obj.ports?.map((y) => toJson_ContainerPort(y)), - readinessProbe: toJson_Probe(obj.readinessProbe), - resizePolicy: obj.resizePolicy?.map((y) => toJson_ContainerResizePolicy(y)), - resources: toJson_ResourceRequirements(obj.resources), - securityContext: toJson_SecurityContext(obj.securityContext), - startupProbe: toJson_Probe(obj.startupProbe), - stdin: obj.stdin, - stdinOnce: obj.stdinOnce, - targetContainerName: obj.targetContainerName, - terminationMessagePath: obj.terminationMessagePath, - terminationMessagePolicy: obj.terminationMessagePolicy, - tty: obj.tty, - volumeDevices: obj.volumeDevices?.map((y) => toJson_VolumeDevice(y)), - volumeMounts: obj.volumeMounts?.map((y) => toJson_VolumeMount(y)), - workingDir: obj.workingDir, + 'args': obj.args?.map(y => y), + 'command': obj.command?.map(y => y), + 'env': obj.env?.map(y => toJson_EnvVar(y)), + 'envFrom': obj.envFrom?.map(y => toJson_EnvFromSource(y)), + 'image': obj.image, + 'imagePullPolicy': obj.imagePullPolicy, + 'lifecycle': toJson_Lifecycle(obj.lifecycle), + 'livenessProbe': toJson_Probe(obj.livenessProbe), + 'name': obj.name, + 'ports': obj.ports?.map(y => toJson_ContainerPort(y)), + 'readinessProbe': toJson_Probe(obj.readinessProbe), + 'resizePolicy': obj.resizePolicy?.map(y => toJson_ContainerResizePolicy(y)), + 'resources': toJson_ResourceRequirements(obj.resources), + 'restartPolicy': obj.restartPolicy, + 'securityContext': toJson_SecurityContext(obj.securityContext), + 'startupProbe': toJson_Probe(obj.startupProbe), + 'stdin': obj.stdin, + 'stdinOnce': obj.stdinOnce, + 'targetContainerName': obj.targetContainerName, + 'terminationMessagePath': obj.terminationMessagePath, + 'terminationMessagePolicy': obj.terminationMessagePolicy, + 'tty': obj.tty, + 'volumeDevices': obj.volumeDevices?.map(y => toJson_VolumeDevice(y)), + 'volumeMounts': obj.volumeMounts?.map(y => toJson_VolumeMount(y)), + 'workingDir': obj.workingDir, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23465,27 +22494,21 @@ export interface HostAlias { * @schema io.k8s.api.core.v1.HostAlias#ip */ readonly ip?: string; + } /** * Converts an object of type 'HostAlias' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HostAlias( - obj: HostAlias | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HostAlias(obj: HostAlias | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - hostnames: obj.hostnames?.map((y) => y), - ip: obj.ip, + 'hostnames': obj.hostnames?.map(y => y), + 'ip': obj.ip, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23501,26 +22524,20 @@ export interface PodOs { * @schema io.k8s.api.core.v1.PodOS#name */ readonly name: string; + } /** * Converts an object of type 'PodOs' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodOs( - obj: PodOs | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodOs(obj: PodOs | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23536,26 +22553,20 @@ export interface PodReadinessGate { * @schema io.k8s.api.core.v1.PodReadinessGate#conditionType */ readonly conditionType: string; + } /** * Converts an object of type 'PodReadinessGate' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodReadinessGate( - obj: PodReadinessGate | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodReadinessGate(obj: PodReadinessGate | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - conditionType: obj.conditionType, + 'conditionType': obj.conditionType, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23578,27 +22589,21 @@ export interface PodResourceClaim { * @schema io.k8s.api.core.v1.PodResourceClaim#source */ readonly source?: ClaimSource; + } /** * Converts an object of type 'PodResourceClaim' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodResourceClaim( - obj: PodResourceClaim | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodResourceClaim(obj: PodResourceClaim | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - source: toJson_ClaimSource(obj.source), + 'name': obj.name, + 'source': toJson_ClaimSource(obj.source), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23614,26 +22619,20 @@ export interface PodSchedulingGate { * @schema io.k8s.api.core.v1.PodSchedulingGate#name */ readonly name: string; + } /** * Converts an object of type 'PodSchedulingGate' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodSchedulingGate( - obj: PodSchedulingGate | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodSchedulingGate(obj: PodSchedulingGate | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23717,35 +22716,29 @@ export interface PodSecurityContext { * @schema io.k8s.api.core.v1.PodSecurityContext#windowsOptions */ readonly windowsOptions?: WindowsSecurityContextOptions; + } /** * Converts an object of type 'PodSecurityContext' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodSecurityContext( - obj: PodSecurityContext | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodSecurityContext(obj: PodSecurityContext | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsGroup: obj.fsGroup, - fsGroupChangePolicy: obj.fsGroupChangePolicy, - runAsGroup: obj.runAsGroup, - runAsNonRoot: obj.runAsNonRoot, - runAsUser: obj.runAsUser, - seLinuxOptions: toJson_SeLinuxOptions(obj.seLinuxOptions), - seccompProfile: toJson_SeccompProfile(obj.seccompProfile), - supplementalGroups: obj.supplementalGroups?.map((y) => y), - sysctls: obj.sysctls?.map((y) => toJson_Sysctl(y)), - windowsOptions: toJson_WindowsSecurityContextOptions(obj.windowsOptions), + 'fsGroup': obj.fsGroup, + 'fsGroupChangePolicy': obj.fsGroupChangePolicy, + 'runAsGroup': obj.runAsGroup, + 'runAsNonRoot': obj.runAsNonRoot, + 'runAsUser': obj.runAsUser, + 'seLinuxOptions': toJson_SeLinuxOptions(obj.seLinuxOptions), + 'seccompProfile': toJson_SeccompProfile(obj.seccompProfile), + 'supplementalGroups': obj.supplementalGroups?.map(y => y), + 'sysctls': obj.sysctls?.map(y => toJson_Sysctl(y)), + 'windowsOptions': toJson_WindowsSecurityContextOptions(obj.windowsOptions), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23790,30 +22783,24 @@ export interface Toleration { * @schema io.k8s.api.core.v1.Toleration#value */ readonly value?: string; + } /** * Converts an object of type 'Toleration' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Toleration( - obj: Toleration | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Toleration(obj: Toleration | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - effect: obj.effect, - key: obj.key, - operator: obj.operator, - tolerationSeconds: obj.tolerationSeconds, - value: obj.value, + 'effect': obj.effect, + 'key': obj.key, + 'operator': obj.operator, + 'tolerationSeconds': obj.tolerationSeconds, + 'value': obj.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -23891,33 +22878,27 @@ export interface TopologySpreadConstraint { * @schema io.k8s.api.core.v1.TopologySpreadConstraint#whenUnsatisfiable */ readonly whenUnsatisfiable: string; + } /** * Converts an object of type 'TopologySpreadConstraint' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TopologySpreadConstraint( - obj: TopologySpreadConstraint | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TopologySpreadConstraint(obj: TopologySpreadConstraint | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - labelSelector: toJson_LabelSelector(obj.labelSelector), - matchLabelKeys: obj.matchLabelKeys?.map((y) => y), - maxSkew: obj.maxSkew, - minDomains: obj.minDomains, - nodeAffinityPolicy: obj.nodeAffinityPolicy, - nodeTaintsPolicy: obj.nodeTaintsPolicy, - topologyKey: obj.topologyKey, - whenUnsatisfiable: obj.whenUnsatisfiable, + 'labelSelector': toJson_LabelSelector(obj.labelSelector), + 'matchLabelKeys': obj.matchLabelKeys?.map(y => y), + 'maxSkew': obj.maxSkew, + 'minDomains': obj.minDomains, + 'nodeAffinityPolicy': obj.nodeAffinityPolicy, + 'nodeTaintsPolicy': obj.nodeTaintsPolicy, + 'topologyKey': obj.topologyKey, + 'whenUnsatisfiable': obj.whenUnsatisfiable, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24149,63 +23130,49 @@ export interface Volume { * @schema io.k8s.api.core.v1.Volume#vsphereVolume */ readonly vsphereVolume?: VsphereVirtualDiskVolumeSource; + } /** * Converts an object of type 'Volume' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Volume( - obj: Volume | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - awsElasticBlockStore: toJson_AwsElasticBlockStoreVolumeSource( - obj.awsElasticBlockStore, - ), - azureDisk: toJson_AzureDiskVolumeSource(obj.azureDisk), - azureFile: toJson_AzureFileVolumeSource(obj.azureFile), - cephfs: toJson_CephFsVolumeSource(obj.cephfs), - cinder: toJson_CinderVolumeSource(obj.cinder), - configMap: toJson_ConfigMapVolumeSource(obj.configMap), - csi: toJson_CsiVolumeSource(obj.csi), - downwardAPI: toJson_DownwardApiVolumeSource(obj.downwardApi), - emptyDir: toJson_EmptyDirVolumeSource(obj.emptyDir), - ephemeral: toJson_EphemeralVolumeSource(obj.ephemeral), - fc: toJson_FcVolumeSource(obj.fc), - flexVolume: toJson_FlexVolumeSource(obj.flexVolume), - flocker: toJson_FlockerVolumeSource(obj.flocker), - gcePersistentDisk: toJson_GcePersistentDiskVolumeSource( - obj.gcePersistentDisk, - ), - gitRepo: toJson_GitRepoVolumeSource(obj.gitRepo), - glusterfs: toJson_GlusterfsVolumeSource(obj.glusterfs), - hostPath: toJson_HostPathVolumeSource(obj.hostPath), - iscsi: toJson_IscsiVolumeSource(obj.iscsi), - name: obj.name, - nfs: toJson_NfsVolumeSource(obj.nfs), - persistentVolumeClaim: toJson_PersistentVolumeClaimVolumeSource( - obj.persistentVolumeClaim, - ), - photonPersistentDisk: toJson_PhotonPersistentDiskVolumeSource( - obj.photonPersistentDisk, - ), - portworxVolume: toJson_PortworxVolumeSource(obj.portworxVolume), - projected: toJson_ProjectedVolumeSource(obj.projected), - quobyte: toJson_QuobyteVolumeSource(obj.quobyte), - rbd: toJson_RbdVolumeSource(obj.rbd), - scaleIO: toJson_ScaleIoVolumeSource(obj.scaleIo), - secret: toJson_SecretVolumeSource(obj.secret), - storageos: toJson_StorageOsVolumeSource(obj.storageos), - vsphereVolume: toJson_VsphereVirtualDiskVolumeSource(obj.vsphereVolume), - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); +export function toJson_Volume(obj: Volume | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'awsElasticBlockStore': toJson_AwsElasticBlockStoreVolumeSource(obj.awsElasticBlockStore), + 'azureDisk': toJson_AzureDiskVolumeSource(obj.azureDisk), + 'azureFile': toJson_AzureFileVolumeSource(obj.azureFile), + 'cephfs': toJson_CephFsVolumeSource(obj.cephfs), + 'cinder': toJson_CinderVolumeSource(obj.cinder), + 'configMap': toJson_ConfigMapVolumeSource(obj.configMap), + 'csi': toJson_CsiVolumeSource(obj.csi), + 'downwardAPI': toJson_DownwardApiVolumeSource(obj.downwardApi), + 'emptyDir': toJson_EmptyDirVolumeSource(obj.emptyDir), + 'ephemeral': toJson_EphemeralVolumeSource(obj.ephemeral), + 'fc': toJson_FcVolumeSource(obj.fc), + 'flexVolume': toJson_FlexVolumeSource(obj.flexVolume), + 'flocker': toJson_FlockerVolumeSource(obj.flocker), + 'gcePersistentDisk': toJson_GcePersistentDiskVolumeSource(obj.gcePersistentDisk), + 'gitRepo': toJson_GitRepoVolumeSource(obj.gitRepo), + 'glusterfs': toJson_GlusterfsVolumeSource(obj.glusterfs), + 'hostPath': toJson_HostPathVolumeSource(obj.hostPath), + 'iscsi': toJson_IscsiVolumeSource(obj.iscsi), + 'name': obj.name, + 'nfs': toJson_NfsVolumeSource(obj.nfs), + 'persistentVolumeClaim': toJson_PersistentVolumeClaimVolumeSource(obj.persistentVolumeClaim), + 'photonPersistentDisk': toJson_PhotonPersistentDiskVolumeSource(obj.photonPersistentDisk), + 'portworxVolume': toJson_PortworxVolumeSource(obj.portworxVolume), + 'projected': toJson_ProjectedVolumeSource(obj.projected), + 'quobyte': toJson_QuobyteVolumeSource(obj.quobyte), + 'rbd': toJson_RbdVolumeSource(obj.rbd), + 'scaleIO': toJson_ScaleIoVolumeSource(obj.scaleIo), + 'secret': toJson_SecretVolumeSource(obj.secret), + 'storageos': toJson_StorageOsVolumeSource(obj.storageos), + 'vsphereVolume': toJson_VsphereVirtualDiskVolumeSource(obj.vsphereVolume), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24221,28 +23188,20 @@ export interface ScopeSelector { * @schema io.k8s.api.core.v1.ScopeSelector#matchExpressions */ readonly matchExpressions?: ScopedResourceSelectorRequirement[]; + } /** * Converts an object of type 'ScopeSelector' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ScopeSelector( - obj: ScopeSelector | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ScopeSelector(obj: ScopeSelector | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - matchExpressions: obj.matchExpressions?.map((y) => - toJson_ScopedResourceSelectorRequirement(y), - ), + 'matchExpressions': obj.matchExpressions?.map(y => toJson_ScopedResourceSelectorRequirement(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24253,7 +23212,16 @@ export function toJson_ScopeSelector( */ export interface ServicePort { /** - * The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. + * The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either: + * + * * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names). + * + * * Kubernetes-defined prefixed names: + * * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- + * * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455 + * * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455 + * + * * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol. * * @schema io.k8s.api.core.v1.ServicePort#appProtocol */ @@ -24294,31 +23262,25 @@ export interface ServicePort { * @schema io.k8s.api.core.v1.ServicePort#targetPort */ readonly targetPort?: IntOrString; + } /** * Converts an object of type 'ServicePort' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ServicePort( - obj: ServicePort | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ServicePort(obj: ServicePort | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - appProtocol: obj.appProtocol, - name: obj.name, - nodePort: obj.nodePort, - port: obj.port, - protocol: obj.protocol, - targetPort: obj.targetPort?.value, + 'appProtocol': obj.appProtocol, + 'name': obj.name, + 'nodePort': obj.nodePort, + 'port': obj.port, + 'protocol': obj.protocol, + 'targetPort': obj.targetPort?.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24334,26 +23296,20 @@ export interface SessionAffinityConfig { * @schema io.k8s.api.core.v1.SessionAffinityConfig#clientIP */ readonly clientIp?: ClientIpConfig; + } /** * Converts an object of type 'SessionAffinityConfig' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SessionAffinityConfig( - obj: SessionAffinityConfig | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SessionAffinityConfig(obj: SessionAffinityConfig | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - clientIP: toJson_ClientIpConfig(obj.clientIp), + 'clientIP': toJson_ClientIpConfig(obj.clientIp), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24383,28 +23339,22 @@ export interface EndpointConditions { * @schema io.k8s.api.discovery.v1.EndpointConditions#terminating */ readonly terminating?: boolean; + } /** * Converts an object of type 'EndpointConditions' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EndpointConditions( - obj: EndpointConditions | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EndpointConditions(obj: EndpointConditions | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - ready: obj.ready, - serving: obj.serving, - terminating: obj.terminating, + 'ready': obj.ready, + 'serving': obj.serving, + 'terminating': obj.terminating, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24420,173 +23370,177 @@ export interface EndpointHints { * @schema io.k8s.api.discovery.v1.EndpointHints#forZones */ readonly forZones?: ForZone[]; + } /** * Converts an object of type 'EndpointHints' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EndpointHints( - obj: EndpointHints | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EndpointHints(obj: EndpointHints | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - forZones: obj.forZones?.map((y) => toJson_ForZone(y)), + 'forZones': obj.forZones?.map(y => toJson_ForZone(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * FlowDistinguisherMethod specifies the method of a flow distinguisher. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod + * @schema io.k8s.api.flowcontrol.v1.FlowDistinguisherMethod */ -export interface FlowDistinguisherMethodV1Beta2 { +export interface FlowDistinguisherMethod { /** * `type` is the type of flow distinguisher method The supported types are "ByUser" and "ByNamespace". Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod#type + * @schema io.k8s.api.flowcontrol.v1.FlowDistinguisherMethod#type */ readonly type: string; + } /** - * Converts an object of type 'FlowDistinguisherMethodV1Beta2' to JSON representation. + * Converts an object of type 'FlowDistinguisherMethod' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FlowDistinguisherMethodV1Beta2( - obj: FlowDistinguisherMethodV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FlowDistinguisherMethod(obj: FlowDistinguisherMethod | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - type: obj.type, + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * PriorityLevelConfigurationReference contains information that points to the "request-priority" being used. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationReference */ -export interface PriorityLevelConfigurationReferenceV1Beta2 { +export interface PriorityLevelConfigurationReference { /** * `name` is the name of the priority level configuration being referenced Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationReference#name + * @schema io.k8s.api.flowcontrol.v1.PriorityLevelConfigurationReference#name */ readonly name: string; + } /** - * Converts an object of type 'PriorityLevelConfigurationReferenceV1Beta2' to JSON representation. + * Converts an object of type 'PriorityLevelConfigurationReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PriorityLevelConfigurationReferenceV1Beta2( - obj: PriorityLevelConfigurationReferenceV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PriorityLevelConfigurationReference(obj: PriorityLevelConfigurationReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * PolicyRulesWithSubjects prescribes a test that applies to a request to an apiserver. The test considers the subject making the request, the verb being requested, and the resource to be acted upon. This PolicyRulesWithSubjects matches a request if and only if both (a) at least one member of subjects matches the request and (b) at least one member of resourceRules or nonResourceRules matches the request. * - * @schema io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects + * @schema io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects */ -export interface PolicyRulesWithSubjectsV1Beta2 { +export interface PolicyRulesWithSubjects { /** * `nonResourceRules` is a list of NonResourcePolicyRules that identify matching requests according to their verb and the target non-resource URL. * - * @schema io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects#nonResourceRules + * @schema io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects#nonResourceRules */ - readonly nonResourceRules?: NonResourcePolicyRuleV1Beta2[]; + readonly nonResourceRules?: NonResourcePolicyRule[]; /** * `resourceRules` is a slice of ResourcePolicyRules that identify matching requests according to their verb and the target resource. At least one of `resourceRules` and `nonResourceRules` has to be non-empty. * - * @schema io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects#resourceRules + * @schema io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects#resourceRules */ - readonly resourceRules?: ResourcePolicyRuleV1Beta2[]; + readonly resourceRules?: ResourcePolicyRule[]; /** * subjects is the list of normal user, serviceaccount, or group that this rule cares about. There must be at least one member in this slice. A slice that includes both the system:authenticated and system:unauthenticated user groups matches every request. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.PolicyRulesWithSubjects#subjects + * @schema io.k8s.api.flowcontrol.v1.PolicyRulesWithSubjects#subjects */ - readonly subjects: SubjectV1Beta2[]; + readonly subjects: Subject[]; + } /** - * Converts an object of type 'PolicyRulesWithSubjectsV1Beta2' to JSON representation. + * Converts an object of type 'PolicyRulesWithSubjects' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PolicyRulesWithSubjectsV1Beta2( - obj: PolicyRulesWithSubjectsV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PolicyRulesWithSubjects(obj: PolicyRulesWithSubjects | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nonResourceRules: obj.nonResourceRules?.map((y) => - toJson_NonResourcePolicyRuleV1Beta2(y), - ), - resourceRules: obj.resourceRules?.map((y) => - toJson_ResourcePolicyRuleV1Beta2(y), - ), - subjects: obj.subjects?.map((y) => toJson_SubjectV1Beta2(y)), + 'nonResourceRules': obj.nonResourceRules?.map(y => toJson_NonResourcePolicyRule(y)), + 'resourceRules': obj.resourceRules?.map(y => toJson_ResourcePolicyRule(y)), + 'subjects': obj.subjects?.map(y => toJson_Subject(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** - * LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: - * - How are requests for this priority level limited? - * - What should be done with requests that exceed the limit? + * ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`. * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration + * @schema io.k8s.api.flowcontrol.v1.ExemptPriorityLevelConfiguration */ -export interface LimitedPriorityLevelConfigurationV1Beta2 { +export interface ExemptPriorityLevelConfiguration { + /** + * `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + * + * LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + * + * @schema io.k8s.api.flowcontrol.v1.ExemptPriorityLevelConfiguration#lendablePercent + */ + readonly lendablePercent?: number; + /** - * `assuredConcurrencyShares` (ACS) configures the execution limit, which is a limit on the number of requests of this priority level that may be exeucting at a given time. ACS must be a positive number. The server's concurrency limit (SCL) is divided among the concurrency-controlled priority levels in proportion to their assured concurrency shares. This produces the assured concurrency value (ACV) --- the number of requests that may be executing at a time --- for each such priority level: + * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: * - * ACV(l) = ceil( SCL * ACS(l) / ( sum[priority levels k] ACS(k) ) ) + * NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) * - * bigger numbers of ACS mean more reserved concurrent requests (at the expense of every other PL). This field has a default value of 30. + * Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration#assuredConcurrencyShares + * @schema io.k8s.api.flowcontrol.v1.ExemptPriorityLevelConfiguration#nominalConcurrencyShares */ - readonly assuredConcurrencyShares?: number; + readonly nominalConcurrencyShares?: number; + +} + +/** + * Converts an object of type 'ExemptPriorityLevelConfiguration' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ExemptPriorityLevelConfiguration(obj: ExemptPriorityLevelConfiguration | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'lendablePercent': obj.lendablePercent, + 'nominalConcurrencyShares': obj.nominalConcurrencyShares, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ +/** + * LimitedPriorityLevelConfiguration specifies how to handle requests that are subject to limits. It addresses two issues: + * - How are requests for this priority level limited? + * - What should be done with requests that exceed the limit? + * + * @schema io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration + */ +export interface LimitedPriorityLevelConfiguration { /** * `borrowingLimitPercent`, if present, configures a limit on how many seats this priority level can borrow from other priority levels. The limit is known as this level's BorrowingConcurrencyLimit (BorrowingCL) and is a limit on the total number of seats that this level may borrow at any one time. This field holds the ratio of that limit to the level's nominal concurrency limit. When this field is non-nil, it must hold a non-negative integer and the limit is calculated as follows. * @@ -24594,7 +23548,7 @@ export interface LimitedPriorityLevelConfigurationV1Beta2 { * * The value of this field can be more than 100, implying that this priority level can borrow a number of seats that is greater than its own nominal concurrency limit (NominalCL). When this field is left `nil`, the limit is effectively infinite. * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration#borrowingLimitPercent + * @schema io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration#borrowingLimitPercent */ readonly borrowingLimitPercent?: number; @@ -24603,39 +23557,48 @@ export interface LimitedPriorityLevelConfigurationV1Beta2 { * * LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration#lendablePercent + * @schema io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration#lendablePercent */ readonly lendablePercent?: number; /** * `limitResponse` indicates what to do with requests that can not be executed right now * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration#limitResponse + * @schema io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration#limitResponse + */ + readonly limitResponse?: LimitResponse; + + /** + * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: + * + * NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) + * + * Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. + * + * If not specified, this field defaults to a value of 30. + * + * Setting this field to zero supports the construction of a "jail" for this priority level that is used to hold some request(s) + * + * @schema io.k8s.api.flowcontrol.v1.LimitedPriorityLevelConfiguration#nominalConcurrencyShares */ - readonly limitResponse?: LimitResponseV1Beta2; + readonly nominalConcurrencyShares?: number; + } /** - * Converts an object of type 'LimitedPriorityLevelConfigurationV1Beta2' to JSON representation. + * Converts an object of type 'LimitedPriorityLevelConfiguration' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LimitedPriorityLevelConfigurationV1Beta2( - obj: LimitedPriorityLevelConfigurationV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LimitedPriorityLevelConfiguration(obj: LimitedPriorityLevelConfiguration | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - assuredConcurrencyShares: obj.assuredConcurrencyShares, - borrowingLimitPercent: obj.borrowingLimitPercent, - lendablePercent: obj.lendablePercent, - limitResponse: toJson_LimitResponseV1Beta2(obj.limitResponse), + 'borrowingLimitPercent': obj.borrowingLimitPercent, + 'lendablePercent': obj.lendablePercent, + 'limitResponse': toJson_LimitResponse(obj.limitResponse), + 'nominalConcurrencyShares': obj.nominalConcurrencyShares, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24651,26 +23614,20 @@ export interface FlowDistinguisherMethodV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.FlowDistinguisherMethod#type */ readonly type: string; + } /** * Converts an object of type 'FlowDistinguisherMethodV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FlowDistinguisherMethodV1Beta3( - obj: FlowDistinguisherMethodV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FlowDistinguisherMethodV1Beta3(obj: FlowDistinguisherMethodV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - type: obj.type, + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24686,26 +23643,20 @@ export interface PriorityLevelConfigurationReferenceV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationReference#name */ readonly name: string; + } /** * Converts an object of type 'PriorityLevelConfigurationReferenceV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PriorityLevelConfigurationReferenceV1Beta3( - obj: PriorityLevelConfigurationReferenceV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PriorityLevelConfigurationReferenceV1Beta3(obj: PriorityLevelConfigurationReferenceV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24735,32 +23686,65 @@ export interface PolicyRulesWithSubjectsV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.PolicyRulesWithSubjects#subjects */ readonly subjects: SubjectV1Beta3[]; + } /** * Converts an object of type 'PolicyRulesWithSubjectsV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PolicyRulesWithSubjectsV1Beta3( - obj: PolicyRulesWithSubjectsV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PolicyRulesWithSubjectsV1Beta3(obj: PolicyRulesWithSubjectsV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'nonResourceRules': obj.nonResourceRules?.map(y => toJson_NonResourcePolicyRuleV1Beta3(y)), + 'resourceRules': obj.resourceRules?.map(y => toJson_ResourcePolicyRuleV1Beta3(y)), + 'subjects': obj.subjects?.map(y => toJson_SubjectV1Beta3(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ExemptPriorityLevelConfiguration describes the configurable aspects of the handling of exempt requests. In the mandatory exempt configuration object the values in the fields here can be modified by authorized users, unlike the rest of the `spec`. + * + * @schema io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration + */ +export interface ExemptPriorityLevelConfigurationV1Beta3 { + /** + * `lendablePercent` prescribes the fraction of the level's NominalCL that can be borrowed by other priority levels. This value of this field must be between 0 and 100, inclusive, and it defaults to 0. The number of seats that other levels can borrow from this level, known as this level's LendableConcurrencyLimit (LendableCL), is defined as follows. + * + * LendableCL(i) = round( NominalCL(i) * lendablePercent(i)/100.0 ) + * + * @schema io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration#lendablePercent + */ + readonly lendablePercent?: number; + + /** + * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats nominally reserved for this priority level. This DOES NOT limit the dispatching from this priority level but affects the other priority levels through the borrowing mechanism. The server's concurrency limit (ServerCL) is divided among all the priority levels in proportion to their NCS values: + * + * NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) + * + * Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of zero. + * + * @schema io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration#nominalConcurrencyShares + */ + readonly nominalConcurrencyShares?: number; + +} + +/** + * Converts an object of type 'ExemptPriorityLevelConfigurationV1Beta3' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ExemptPriorityLevelConfigurationV1Beta3(obj: ExemptPriorityLevelConfigurationV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nonResourceRules: obj.nonResourceRules?.map((y) => - toJson_NonResourcePolicyRuleV1Beta3(y), - ), - resourceRules: obj.resourceRules?.map((y) => - toJson_ResourcePolicyRuleV1Beta3(y), - ), - subjects: obj.subjects?.map((y) => toJson_SubjectV1Beta3(y)), + 'lendablePercent': obj.lendablePercent, + 'nominalConcurrencyShares': obj.nominalConcurrencyShares, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24802,36 +23786,30 @@ export interface LimitedPriorityLevelConfigurationV1Beta3 { /** * `nominalConcurrencyShares` (NCS) contributes to the computation of the NominalConcurrencyLimit (NominalCL) of this level. This is the number of execution seats available at this priority level. This is used both for requests dispatched from this priority level as well as requests dispatched from other priority levels borrowing seats from this level. The server's concurrency limit (ServerCL) is divided among the Limited priority levels in proportion to their NCS values: * - * NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[limited priority level k] NCS(k) + * NominalCL(i) = ceil( ServerCL * NCS(i) / sum_ncs ) sum_ncs = sum[priority level k] NCS(k) * - * Bigger numbers mean a larger nominal concurrency limit, at the expense of every other Limited priority level. This field has a default value of 30. + * Bigger numbers mean a larger nominal concurrency limit, at the expense of every other priority level. This field has a default value of 30. * * @schema io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration#nominalConcurrencyShares */ readonly nominalConcurrencyShares?: number; + } /** * Converts an object of type 'LimitedPriorityLevelConfigurationV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LimitedPriorityLevelConfigurationV1Beta3( - obj: LimitedPriorityLevelConfigurationV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LimitedPriorityLevelConfigurationV1Beta3(obj: LimitedPriorityLevelConfigurationV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - borrowingLimitPercent: obj.borrowingLimitPercent, - lendablePercent: obj.lendablePercent, - limitResponse: toJson_LimitResponseV1Beta3(obj.limitResponse), - nominalConcurrencyShares: obj.nominalConcurrencyShares, + 'borrowingLimitPercent': obj.borrowingLimitPercent, + 'lendablePercent': obj.lendablePercent, + 'limitResponse': toJson_LimitResponseV1Beta3(obj.limitResponse), + 'nominalConcurrencyShares': obj.nominalConcurrencyShares, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24854,27 +23832,21 @@ export interface IngressBackend { * @schema io.k8s.api.networking.v1.IngressBackend#service */ readonly service?: IngressServiceBackend; + } /** * Converts an object of type 'IngressBackend' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IngressBackend( - obj: IngressBackend | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IngressBackend(obj: IngressBackend | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - resource: toJson_TypedLocalObjectReference(obj.resource), - service: toJson_IngressServiceBackend(obj.service), + 'resource': toJson_TypedLocalObjectReference(obj.resource), + 'service': toJson_IngressServiceBackend(obj.service), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24902,27 +23874,21 @@ export interface IngressRule { * @schema io.k8s.api.networking.v1.IngressRule#http */ readonly http?: HttpIngressRuleValue; + } /** * Converts an object of type 'IngressRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IngressRule( - obj: IngressRule | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IngressRule(obj: IngressRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - host: obj.host, - http: toJson_HttpIngressRuleValue(obj.http), + 'host': obj.host, + 'http': toJson_HttpIngressRuleValue(obj.http), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -24946,27 +23912,21 @@ export interface IngressTls { * @schema io.k8s.api.networking.v1.IngressTLS#secretName */ readonly secretName?: string; + } /** * Converts an object of type 'IngressTls' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IngressTls( - obj: IngressTls | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IngressTls(obj: IngressTls | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - hosts: obj.hosts?.map((y) => y), - secretName: obj.secretName, + 'hosts': obj.hosts?.map(y => y), + 'secretName': obj.secretName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25010,30 +23970,24 @@ export interface IngressClassParametersReference { * @schema io.k8s.api.networking.v1.IngressClassParametersReference#scope */ readonly scope?: string; + } /** * Converts an object of type 'IngressClassParametersReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IngressClassParametersReference( - obj: IngressClassParametersReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IngressClassParametersReference(obj: IngressClassParametersReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroup: obj.apiGroup, - kind: obj.kind, - name: obj.name, - namespace: obj.namespace, - scope: obj.scope, + 'apiGroup': obj.apiGroup, + 'kind': obj.kind, + 'name': obj.name, + 'namespace': obj.namespace, + 'scope': obj.scope, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25056,27 +24010,21 @@ export interface NetworkPolicyEgressRule { * @schema io.k8s.api.networking.v1.NetworkPolicyEgressRule#to */ readonly to?: NetworkPolicyPeer[]; + } /** * Converts an object of type 'NetworkPolicyEgressRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NetworkPolicyEgressRule( - obj: NetworkPolicyEgressRule | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NetworkPolicyEgressRule(obj: NetworkPolicyEgressRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - ports: obj.ports?.map((y) => toJson_NetworkPolicyPort(y)), - to: obj.to?.map((y) => toJson_NetworkPolicyPeer(y)), + 'ports': obj.ports?.map(y => toJson_NetworkPolicyPort(y)), + 'to': obj.to?.map(y => toJson_NetworkPolicyPeer(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25099,27 +24047,21 @@ export interface NetworkPolicyIngressRule { * @schema io.k8s.api.networking.v1.NetworkPolicyIngressRule#ports */ readonly ports?: NetworkPolicyPort[]; + } /** * Converts an object of type 'NetworkPolicyIngressRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NetworkPolicyIngressRule( - obj: NetworkPolicyIngressRule | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NetworkPolicyIngressRule(obj: NetworkPolicyIngressRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - from: obj.from?.map((y) => toJson_NetworkPolicyPeer(y)), - ports: obj.ports?.map((y) => toJson_NetworkPolicyPort(y)), + 'from': obj.from?.map(y => toJson_NetworkPolicyPeer(y)), + 'ports': obj.ports?.map(y => toJson_NetworkPolicyPort(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25157,36 +24099,22 @@ export interface ParentReferenceV1Alpha1 { */ readonly resource?: string; - /** - * UID is the uid of the object being referenced. - * - * @schema io.k8s.api.networking.v1alpha1.ParentReference#uid - */ - readonly uid?: string; } /** * Converts an object of type 'ParentReferenceV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ParentReferenceV1Alpha1( - obj: ParentReferenceV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ParentReferenceV1Alpha1(obj: ParentReferenceV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - group: obj.group, - name: obj.name, - namespace: obj.namespace, - resource: obj.resource, - uid: obj.uid, + 'group': obj.group, + 'name': obj.name, + 'namespace': obj.namespace, + 'resource': obj.resource, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25219,27 +24147,21 @@ export interface Preconditions { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.Preconditions#uid */ readonly uid?: string; + } /** * Converts an object of type 'Preconditions' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Preconditions( - obj: Preconditions | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Preconditions(obj: Preconditions | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - resourceVersion: obj.resourceVersion, - uid: obj.uid, + 'resourceVersion': obj.resourceVersion, + 'uid': obj.uid, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25253,7 +24175,8 @@ export class IntOrString { public static fromNumber(value: number): IntOrString { return new IntOrString(value); } - private constructor(public readonly value: string | number) {} + private constructor(public readonly value: string | number) { + } } /** @@ -25282,28 +24205,22 @@ export interface ResourceClaimParametersReferenceV1Alpha2 { * @schema io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference#name */ readonly name: string; + } /** * Converts an object of type 'ResourceClaimParametersReferenceV1Alpha2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceClaimParametersReferenceV1Alpha2( - obj: ResourceClaimParametersReferenceV1Alpha2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceClaimParametersReferenceV1Alpha2(obj: ResourceClaimParametersReferenceV1Alpha2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroup: obj.apiGroup, - kind: obj.kind, - name: obj.name, + 'apiGroup': obj.apiGroup, + 'kind': obj.kind, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25326,29 +24243,21 @@ export interface NodeSelectorTerm { * @schema io.k8s.api.core.v1.NodeSelectorTerm#matchFields */ readonly matchFields?: NodeSelectorRequirement[]; + } /** * Converts an object of type 'NodeSelectorTerm' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NodeSelectorTerm( - obj: NodeSelectorTerm | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NodeSelectorTerm(obj: NodeSelectorTerm | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - matchExpressions: obj.matchExpressions?.map((y) => - toJson_NodeSelectorRequirement(y), - ), - matchFields: obj.matchFields?.map((y) => toJson_NodeSelectorRequirement(y)), + 'matchExpressions': obj.matchExpressions?.map(y => toJson_NodeSelectorRequirement(y)), + 'matchFields': obj.matchFields?.map(y => toJson_NodeSelectorRequirement(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25371,27 +24280,21 @@ export interface TokenRequest { * @schema io.k8s.api.storage.v1.TokenRequest#expirationSeconds */ readonly expirationSeconds?: number; + } /** * Converts an object of type 'TokenRequest' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TokenRequest( - obj: TokenRequest | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TokenRequest(obj: TokenRequest | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - audience: obj.audience, - expirationSeconds: obj.expirationSeconds, + 'audience': obj.audience, + 'expirationSeconds': obj.expirationSeconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25428,29 +24331,23 @@ export interface CsiNodeDriver { * @schema io.k8s.api.storage.v1.CSINodeDriver#topologyKeys */ readonly topologyKeys?: string[]; + } /** * Converts an object of type 'CsiNodeDriver' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CsiNodeDriver( - obj: CsiNodeDriver | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CsiNodeDriver(obj: CsiNodeDriver | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - allocatable: toJson_VolumeNodeResources(obj.allocatable), - name: obj.name, - nodeID: obj.nodeId, - topologyKeys: obj.topologyKeys?.map((y) => y), + 'allocatable': toJson_VolumeNodeResources(obj.allocatable), + 'name': obj.name, + 'nodeID': obj.nodeId, + 'topologyKeys': obj.topologyKeys?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25480,28 +24377,22 @@ export interface LabelSelectorRequirement { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement#values */ readonly values?: string[]; + } /** * Converts an object of type 'LabelSelectorRequirement' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LabelSelectorRequirement( - obj: LabelSelectorRequirement | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LabelSelectorRequirement(obj: LabelSelectorRequirement | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - key: obj.key, - operator: obj.operator, - values: obj.values?.map((y) => y), + 'key': obj.key, + 'operator': obj.operator, + 'values': obj.values?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25524,27 +24415,21 @@ export interface TopologySelectorLabelRequirement { * @schema io.k8s.api.core.v1.TopologySelectorLabelRequirement#values */ readonly values: string[]; + } /** * Converts an object of type 'TopologySelectorLabelRequirement' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TopologySelectorLabelRequirement( - obj: TopologySelectorLabelRequirement | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TopologySelectorLabelRequirement(obj: TopologySelectorLabelRequirement | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - key: obj.key, - values: obj.values?.map((y) => y), + 'key': obj.key, + 'values': obj.values?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25567,27 +24452,21 @@ export interface VolumeAttachmentSource { * @schema io.k8s.api.storage.v1.VolumeAttachmentSource#persistentVolumeName */ readonly persistentVolumeName?: string; + } /** * Converts an object of type 'VolumeAttachmentSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_VolumeAttachmentSource( - obj: VolumeAttachmentSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeAttachmentSource(obj: VolumeAttachmentSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - inlineVolumeSpec: toJson_PersistentVolumeSpec(obj.inlineVolumeSpec), - persistentVolumeName: obj.persistentVolumeName, + 'inlineVolumeSpec': toJson_PersistentVolumeSpec(obj.inlineVolumeSpec), + 'persistentVolumeName': obj.persistentVolumeName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25611,27 +24490,21 @@ export interface CustomResourceConversion { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion#webhook */ readonly webhook?: WebhookConversion; + } /** * Converts an object of type 'CustomResourceConversion' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceConversion( - obj: CustomResourceConversion | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceConversion(obj: CustomResourceConversion | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - strategy: obj.strategy, - webhook: toJson_WebhookConversion(obj.webhook), + 'strategy': obj.strategy, + 'webhook': toJson_WebhookConversion(obj.webhook), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25684,31 +24557,25 @@ export interface CustomResourceDefinitionNames { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames#singular */ readonly singular?: string; + } /** * Converts an object of type 'CustomResourceDefinitionNames' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceDefinitionNames( - obj: CustomResourceDefinitionNames | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceDefinitionNames(obj: CustomResourceDefinitionNames | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - categories: obj.categories?.map((y) => y), - kind: obj.kind, - listKind: obj.listKind, - plural: obj.plural, - shortNames: obj.shortNames?.map((y) => y), - singular: obj.singular, + 'categories': obj.categories?.map(y => y), + 'kind': obj.kind, + 'listKind': obj.listKind, + 'plural': obj.plural, + 'shortNames': obj.shortNames?.map(y => y), + 'singular': obj.singular, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25774,35 +24641,27 @@ export interface CustomResourceDefinitionVersion { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion#subresources */ readonly subresources?: CustomResourceSubresources; + } /** * Converts an object of type 'CustomResourceDefinitionVersion' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceDefinitionVersion( - obj: CustomResourceDefinitionVersion | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceDefinitionVersion(obj: CustomResourceDefinitionVersion | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - additionalPrinterColumns: obj.additionalPrinterColumns?.map((y) => - toJson_CustomResourceColumnDefinition(y), - ), - deprecated: obj.deprecated, - deprecationWarning: obj.deprecationWarning, - name: obj.name, - schema: toJson_CustomResourceValidation(obj.schema), - served: obj.served, - storage: obj.storage, - subresources: toJson_CustomResourceSubresources(obj.subresources), + 'additionalPrinterColumns': obj.additionalPrinterColumns?.map(y => toJson_CustomResourceColumnDefinition(y)), + 'deprecated': obj.deprecated, + 'deprecationWarning': obj.deprecationWarning, + 'name': obj.name, + 'schema': toJson_CustomResourceValidation(obj.schema), + 'served': obj.served, + 'storage': obj.storage, + 'subresources': toJson_CustomResourceSubresources(obj.subresources), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25836,28 +24695,22 @@ export interface StatusCause { * @schema io.k8s.apimachinery.pkg.apis.meta.v1.StatusCause#reason */ readonly reason?: string; + } /** * Converts an object of type 'StatusCause' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StatusCause( - obj: StatusCause | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StatusCause(obj: StatusCause | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - field: obj.field, - message: obj.message, - reason: obj.reason, + 'field': obj.field, + 'message': obj.message, + 'reason': obj.reason, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25895,29 +24748,23 @@ export interface ServiceReference { * @schema io.k8s.api.admissionregistration.v1.ServiceReference#port */ readonly port?: number; + } /** * Converts an object of type 'ServiceReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ServiceReference( - obj: ServiceReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ServiceReference(obj: ServiceReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - namespace: obj.namespace, - path: obj.path, - port: obj.port, + 'name': obj.name, + 'namespace': obj.namespace, + 'path': obj.path, + 'port': obj.port, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -25975,31 +24822,101 @@ export interface NamedRuleWithOperationsV1Alpha1 { * @schema io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations#scope */ readonly scope?: string; + } /** * Converts an object of type 'NamedRuleWithOperationsV1Alpha1' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NamedRuleWithOperationsV1Alpha1( - obj: NamedRuleWithOperationsV1Alpha1 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NamedRuleWithOperationsV1Alpha1(obj: NamedRuleWithOperationsV1Alpha1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroups: obj.apiGroups?.map((y) => y), - apiVersions: obj.apiVersions?.map((y) => y), - operations: obj.operations?.map((y) => y), - resourceNames: obj.resourceNames?.map((y) => y), - resources: obj.resources?.map((y) => y), - scope: obj.scope, + 'apiGroups': obj.apiGroups?.map(y => y), + 'apiVersions': obj.apiVersions?.map(y => y), + 'operations': obj.operations?.map(y => y), + 'resourceNames': obj.resourceNames?.map(y => y), + 'resources': obj.resources?.map(y => y), + 'scope': obj.scope, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * NamedRuleWithOperations is a tuple of Operations and Resources with ResourceNames. + * + * @schema io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations + */ +export interface NamedRuleWithOperationsV1Beta1 { + /** + * APIGroups is the API groups the resources belong to. '*' is all groups. If '*' is present, the length of the slice must be one. Required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations#apiGroups + */ + readonly apiGroups?: string[]; + + /** + * APIVersions is the API versions the resources belong to. '*' is all versions. If '*' is present, the length of the slice must be one. Required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations#apiVersions + */ + readonly apiVersions?: string[]; + + /** + * Operations is the operations the admission hook cares about - CREATE, UPDATE, DELETE, CONNECT or * for all of those operations and any future admission operations that are added. If '*' is present, the length of the slice must be one. Required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations#operations + */ + readonly operations?: string[]; + + /** + * ResourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. + * + * @schema io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations#resourceNames + */ + readonly resourceNames?: string[]; + + /** + * Resources is a list of resources this rule applies to. + * + * For example: 'pods' means pods. 'pods/log' means the log subresource of pods. '*' means all resources, but not subresources. 'pods/*' means all subresources of pods. '_/scale' means all scale subresources. '_/*' means all resources and their subresources. + * + * If wildcard is present, the validation rule will ensure resources do not overlap with each other. + * + * Depending on the enclosing object, subresources might not be allowed. Required. + * + * @schema io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations#resources + */ + readonly resources?: string[]; + + /** + * scope specifies the scope of this rule. Valid values are "Cluster", "Namespaced", and "*" "Cluster" means that only cluster-scoped resources will match this rule. Namespace API objects are cluster-scoped. "Namespaced" means that only namespaced resources will match this rule. "*" means that there are no scope restrictions. Subresources match the scope of their parent resource. Default is "*". + * + * @default . + * @schema io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations#scope + */ + readonly scope?: string; + +} + +/** + * Converts an object of type 'NamedRuleWithOperationsV1Beta1' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_NamedRuleWithOperationsV1Beta1(obj: NamedRuleWithOperationsV1Beta1 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'apiGroups': obj.apiGroups?.map(y => y), + 'apiVersions': obj.apiVersions?.map(y => y), + 'operations': obj.operations?.map(y => y), + 'resourceNames': obj.resourceNames?.map(y => y), + 'resources': obj.resources?.map(y => y), + 'scope': obj.scope, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26022,27 +24939,21 @@ export interface RollingUpdateDaemonSet { * @schema io.k8s.api.apps.v1.RollingUpdateDaemonSet#maxUnavailable */ readonly maxUnavailable?: IntOrString; + } /** * Converts an object of type 'RollingUpdateDaemonSet' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_RollingUpdateDaemonSet( - obj: RollingUpdateDaemonSet | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_RollingUpdateDaemonSet(obj: RollingUpdateDaemonSet | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - maxSurge: obj.maxSurge?.value, - maxUnavailable: obj.maxUnavailable?.value, + 'maxSurge': obj.maxSurge?.value, + 'maxUnavailable': obj.maxUnavailable?.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26067,27 +24978,21 @@ export interface RollingUpdateDeployment { * @schema io.k8s.api.apps.v1.RollingUpdateDeployment#maxUnavailable */ readonly maxUnavailable?: IntOrString; + } /** * Converts an object of type 'RollingUpdateDeployment' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_RollingUpdateDeployment( - obj: RollingUpdateDeployment | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_RollingUpdateDeployment(obj: RollingUpdateDeployment | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - maxSurge: obj.maxSurge?.value, - maxUnavailable: obj.maxUnavailable?.value, + 'maxSurge': obj.maxSurge?.value, + 'maxUnavailable': obj.maxUnavailable?.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26111,27 +25016,21 @@ export interface RollingUpdateStatefulSetStrategy { * @schema io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy#partition */ readonly partition?: number; + } /** * Converts an object of type 'RollingUpdateStatefulSetStrategy' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_RollingUpdateStatefulSetStrategy( - obj: RollingUpdateStatefulSetStrategy | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_RollingUpdateStatefulSetStrategy(obj: RollingUpdateStatefulSetStrategy | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - maxUnavailable: obj.maxUnavailable?.value, - partition: obj.partition, + 'maxUnavailable': obj.maxUnavailable?.value, + 'partition': obj.partition, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26161,28 +25060,22 @@ export interface HpaScalingRulesV2 { * @schema io.k8s.api.autoscaling.v2.HPAScalingRules#stabilizationWindowSeconds */ readonly stabilizationWindowSeconds?: number; + } /** * Converts an object of type 'HpaScalingRulesV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HpaScalingRulesV2( - obj: HpaScalingRulesV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HpaScalingRulesV2(obj: HpaScalingRulesV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - policies: obj.policies?.map((y) => toJson_HpaScalingPolicyV2(y)), - selectPolicy: obj.selectPolicy, - stabilizationWindowSeconds: obj.stabilizationWindowSeconds, + 'policies': obj.policies?.map(y => toJson_HpaScalingPolicyV2(y)), + 'selectPolicy': obj.selectPolicy, + 'stabilizationWindowSeconds': obj.stabilizationWindowSeconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26212,28 +25105,22 @@ export interface ContainerResourceMetricSourceV2 { * @schema io.k8s.api.autoscaling.v2.ContainerResourceMetricSource#target */ readonly target: MetricTargetV2; + } /** * Converts an object of type 'ContainerResourceMetricSourceV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ContainerResourceMetricSourceV2( - obj: ContainerResourceMetricSourceV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ContainerResourceMetricSourceV2(obj: ContainerResourceMetricSourceV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - container: obj.container, - name: obj.name, - target: toJson_MetricTargetV2(obj.target), + 'container': obj.container, + 'name': obj.name, + 'target': toJson_MetricTargetV2(obj.target), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26256,27 +25143,21 @@ export interface ExternalMetricSourceV2 { * @schema io.k8s.api.autoscaling.v2.ExternalMetricSource#target */ readonly target: MetricTargetV2; + } /** * Converts an object of type 'ExternalMetricSourceV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ExternalMetricSourceV2( - obj: ExternalMetricSourceV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ExternalMetricSourceV2(obj: ExternalMetricSourceV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metric: toJson_MetricIdentifierV2(obj.metric), - target: toJson_MetricTargetV2(obj.target), + 'metric': toJson_MetricIdentifierV2(obj.metric), + 'target': toJson_MetricTargetV2(obj.target), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26306,28 +25187,22 @@ export interface ObjectMetricSourceV2 { * @schema io.k8s.api.autoscaling.v2.ObjectMetricSource#target */ readonly target: MetricTargetV2; + } /** * Converts an object of type 'ObjectMetricSourceV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ObjectMetricSourceV2( - obj: ObjectMetricSourceV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ObjectMetricSourceV2(obj: ObjectMetricSourceV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - describedObject: toJson_CrossVersionObjectReferenceV2(obj.describedObject), - metric: toJson_MetricIdentifierV2(obj.metric), - target: toJson_MetricTargetV2(obj.target), + 'describedObject': toJson_CrossVersionObjectReferenceV2(obj.describedObject), + 'metric': toJson_MetricIdentifierV2(obj.metric), + 'target': toJson_MetricTargetV2(obj.target), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26350,27 +25225,21 @@ export interface PodsMetricSourceV2 { * @schema io.k8s.api.autoscaling.v2.PodsMetricSource#target */ readonly target: MetricTargetV2; + } /** * Converts an object of type 'PodsMetricSourceV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodsMetricSourceV2( - obj: PodsMetricSourceV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodsMetricSourceV2(obj: PodsMetricSourceV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metric: toJson_MetricIdentifierV2(obj.metric), - target: toJson_MetricTargetV2(obj.target), + 'metric': toJson_MetricIdentifierV2(obj.metric), + 'target': toJson_MetricTargetV2(obj.target), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26393,27 +25262,21 @@ export interface ResourceMetricSourceV2 { * @schema io.k8s.api.autoscaling.v2.ResourceMetricSource#target */ readonly target: MetricTargetV2; + } /** * Converts an object of type 'ResourceMetricSourceV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceMetricSourceV2( - obj: ResourceMetricSourceV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceMetricSourceV2(obj: ResourceMetricSourceV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - target: toJson_MetricTargetV2(obj.target), + 'name': obj.name, + 'target': toJson_MetricTargetV2(obj.target), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26428,6 +25291,10 @@ export interface PodFailurePolicyRule { * * - FailJob: indicates that the pod's job is marked as Failed and all * running pods are terminated. + * - FailIndex: indicates that the pod's index is marked as Failed and will + * not be restarted. + * This value is beta-level. It can be used when the + * `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default). * - Ignore: indicates that the counter towards the .backoffLimit is not * incremented and a replacement pod is created. * - Count: indicates that the pod is handled in the default way - the @@ -26450,31 +25317,23 @@ export interface PodFailurePolicyRule { * * @schema io.k8s.api.batch.v1.PodFailurePolicyRule#onPodConditions */ - readonly onPodConditions: PodFailurePolicyOnPodConditionsPattern[]; + readonly onPodConditions?: PodFailurePolicyOnPodConditionsPattern[]; + } /** * Converts an object of type 'PodFailurePolicyRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodFailurePolicyRule( - obj: PodFailurePolicyRule | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodFailurePolicyRule(obj: PodFailurePolicyRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - action: obj.action, - onExitCodes: toJson_PodFailurePolicyOnExitCodesRequirement(obj.onExitCodes), - onPodConditions: obj.onPodConditions?.map((y) => - toJson_PodFailurePolicyOnPodConditionsPattern(y), - ), + 'action': obj.action, + 'onExitCodes': toJson_PodFailurePolicyOnExitCodesRequirement(obj.onExitCodes), + 'onPodConditions': obj.onPodConditions?.map(y => toJson_PodFailurePolicyOnPodConditionsPattern(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26518,30 +25377,24 @@ export interface ConfigMapNodeConfigSource { * @schema io.k8s.api.core.v1.ConfigMapNodeConfigSource#uid */ readonly uid?: string; + } /** * Converts an object of type 'ConfigMapNodeConfigSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ConfigMapNodeConfigSource( - obj: ConfigMapNodeConfigSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ConfigMapNodeConfigSource(obj: ConfigMapNodeConfigSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - kubeletConfigKey: obj.kubeletConfigKey, - name: obj.name, - namespace: obj.namespace, - resourceVersion: obj.resourceVersion, - uid: obj.uid, + 'kubeletConfigKey': obj.kubeletConfigKey, + 'name': obj.name, + 'namespace': obj.namespace, + 'resourceVersion': obj.resourceVersion, + 'uid': obj.uid, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26564,62 +25417,21 @@ export interface SecretReference { * @schema io.k8s.api.core.v1.SecretReference#namespace */ readonly namespace?: string; -} - -/** - * Converts an object of type 'SecretReference' to JSON representation. - */ -/* eslint-disable max-len, quote-props */ -export function toJson_SecretReference( - obj: SecretReference | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - name: obj.name, - namespace: obj.namespace, - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); -} -/* eslint-enable max-len, quote-props */ -/** - * ResourceClaim references one entry in PodSpec.ResourceClaims. - * - * @schema io.k8s.api.core.v1.ResourceClaim - */ -export interface ResourceClaim { - /** - * Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. - * - * @schema io.k8s.api.core.v1.ResourceClaim#name - */ - readonly name: string; } /** - * Converts an object of type 'ResourceClaim' to JSON representation. + * Converts an object of type 'SecretReference' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceClaim( - obj: ResourceClaim | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SecretReference(obj: SecretReference | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, + 'namespace': obj.namespace, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26642,32 +25454,21 @@ export interface NodeAffinity { * @schema io.k8s.api.core.v1.NodeAffinity#requiredDuringSchedulingIgnoredDuringExecution */ readonly requiredDuringSchedulingIgnoredDuringExecution?: NodeSelector; + } /** * Converts an object of type 'NodeAffinity' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NodeAffinity( - obj: NodeAffinity | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NodeAffinity(obj: NodeAffinity | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - preferredDuringSchedulingIgnoredDuringExecution: - obj.preferredDuringSchedulingIgnoredDuringExecution?.map((y) => - toJson_PreferredSchedulingTerm(y), - ), - requiredDuringSchedulingIgnoredDuringExecution: toJson_NodeSelector( - obj.requiredDuringSchedulingIgnoredDuringExecution, - ), + 'preferredDuringSchedulingIgnoredDuringExecution': obj.preferredDuringSchedulingIgnoredDuringExecution?.map(y => toJson_PreferredSchedulingTerm(y)), + 'requiredDuringSchedulingIgnoredDuringExecution': toJson_NodeSelector(obj.requiredDuringSchedulingIgnoredDuringExecution), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26690,33 +25491,21 @@ export interface PodAffinity { * @schema io.k8s.api.core.v1.PodAffinity#requiredDuringSchedulingIgnoredDuringExecution */ readonly requiredDuringSchedulingIgnoredDuringExecution?: PodAffinityTerm[]; + } /** * Converts an object of type 'PodAffinity' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodAffinity( - obj: PodAffinity | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodAffinity(obj: PodAffinity | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - preferredDuringSchedulingIgnoredDuringExecution: - obj.preferredDuringSchedulingIgnoredDuringExecution?.map((y) => - toJson_WeightedPodAffinityTerm(y), - ), - requiredDuringSchedulingIgnoredDuringExecution: - obj.requiredDuringSchedulingIgnoredDuringExecution?.map((y) => - toJson_PodAffinityTerm(y), - ), + 'preferredDuringSchedulingIgnoredDuringExecution': obj.preferredDuringSchedulingIgnoredDuringExecution?.map(y => toJson_WeightedPodAffinityTerm(y)), + 'requiredDuringSchedulingIgnoredDuringExecution': obj.requiredDuringSchedulingIgnoredDuringExecution?.map(y => toJson_PodAffinityTerm(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26739,33 +25528,21 @@ export interface PodAntiAffinity { * @schema io.k8s.api.core.v1.PodAntiAffinity#requiredDuringSchedulingIgnoredDuringExecution */ readonly requiredDuringSchedulingIgnoredDuringExecution?: PodAffinityTerm[]; + } /** * Converts an object of type 'PodAntiAffinity' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodAntiAffinity( - obj: PodAntiAffinity | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodAntiAffinity(obj: PodAntiAffinity | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - preferredDuringSchedulingIgnoredDuringExecution: - obj.preferredDuringSchedulingIgnoredDuringExecution?.map((y) => - toJson_WeightedPodAffinityTerm(y), - ), - requiredDuringSchedulingIgnoredDuringExecution: - obj.requiredDuringSchedulingIgnoredDuringExecution?.map((y) => - toJson_PodAffinityTerm(y), - ), + 'preferredDuringSchedulingIgnoredDuringExecution': obj.preferredDuringSchedulingIgnoredDuringExecution?.map(y => toJson_WeightedPodAffinityTerm(y)), + 'requiredDuringSchedulingIgnoredDuringExecution': obj.requiredDuringSchedulingIgnoredDuringExecution?.map(y => toJson_PodAffinityTerm(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26796,28 +25573,22 @@ export interface EnvVar { * @schema io.k8s.api.core.v1.EnvVar#valueFrom */ readonly valueFrom?: EnvVarSource; + } /** * Converts an object of type 'EnvVar' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EnvVar( - obj: EnvVar | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EnvVar(obj: EnvVar | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - value: obj.value, - valueFrom: toJson_EnvVarSource(obj.valueFrom), + 'name': obj.name, + 'value': obj.value, + 'valueFrom': toJson_EnvVarSource(obj.valueFrom), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26847,28 +25618,22 @@ export interface EnvFromSource { * @schema io.k8s.api.core.v1.EnvFromSource#secretRef */ readonly secretRef?: SecretEnvSource; + } /** * Converts an object of type 'EnvFromSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EnvFromSource( - obj: EnvFromSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EnvFromSource(obj: EnvFromSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - configMapRef: toJson_ConfigMapEnvSource(obj.configMapRef), - prefix: obj.prefix, - secretRef: toJson_SecretEnvSource(obj.secretRef), + 'configMapRef': toJson_ConfigMapEnvSource(obj.configMapRef), + 'prefix': obj.prefix, + 'secretRef': toJson_SecretEnvSource(obj.secretRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26891,27 +25656,21 @@ export interface Lifecycle { * @schema io.k8s.api.core.v1.Lifecycle#preStop */ readonly preStop?: LifecycleHandler; + } /** * Converts an object of type 'Lifecycle' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Lifecycle( - obj: Lifecycle | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Lifecycle(obj: Lifecycle | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - postStart: toJson_LifecycleHandler(obj.postStart), - preStop: toJson_LifecycleHandler(obj.preStop), + 'postStart': toJson_LifecycleHandler(obj.postStart), + 'preStop': toJson_LifecycleHandler(obj.preStop), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -26994,35 +25753,29 @@ export interface Probe { * @schema io.k8s.api.core.v1.Probe#timeoutSeconds */ readonly timeoutSeconds?: number; + } /** * Converts an object of type 'Probe' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Probe( - obj: Probe | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Probe(obj: Probe | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - exec: toJson_ExecAction(obj.exec), - failureThreshold: obj.failureThreshold, - grpc: toJson_GrpcAction(obj.grpc), - httpGet: toJson_HttpGetAction(obj.httpGet), - initialDelaySeconds: obj.initialDelaySeconds, - periodSeconds: obj.periodSeconds, - successThreshold: obj.successThreshold, - tcpSocket: toJson_TcpSocketAction(obj.tcpSocket), - terminationGracePeriodSeconds: obj.terminationGracePeriodSeconds, - timeoutSeconds: obj.timeoutSeconds, + 'exec': toJson_ExecAction(obj.exec), + 'failureThreshold': obj.failureThreshold, + 'grpc': toJson_GrpcAction(obj.grpc), + 'httpGet': toJson_HttpGetAction(obj.httpGet), + 'initialDelaySeconds': obj.initialDelaySeconds, + 'periodSeconds': obj.periodSeconds, + 'successThreshold': obj.successThreshold, + 'tcpSocket': toJson_TcpSocketAction(obj.tcpSocket), + 'terminationGracePeriodSeconds': obj.terminationGracePeriodSeconds, + 'timeoutSeconds': obj.timeoutSeconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27067,30 +25820,24 @@ export interface ContainerPort { * @schema io.k8s.api.core.v1.ContainerPort#protocol */ readonly protocol?: string; + } /** * Converts an object of type 'ContainerPort' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ContainerPort( - obj: ContainerPort | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ContainerPort(obj: ContainerPort | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - containerPort: obj.containerPort, - hostIP: obj.hostIp, - hostPort: obj.hostPort, - name: obj.name, - protocol: obj.protocol, + 'containerPort': obj.containerPort, + 'hostIP': obj.hostIp, + 'hostPort': obj.hostPort, + 'name': obj.name, + 'protocol': obj.protocol, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27113,27 +25860,70 @@ export interface ContainerResizePolicy { * @schema io.k8s.api.core.v1.ContainerResizePolicy#restartPolicy */ readonly restartPolicy: string; + } /** * Converts an object of type 'ContainerResizePolicy' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ContainerResizePolicy( - obj: ContainerResizePolicy | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ContainerResizePolicy(obj: ContainerResizePolicy | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'resourceName': obj.resourceName, + 'restartPolicy': obj.restartPolicy, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ResourceRequirements describes the compute resource requirements. + * + * @schema io.k8s.api.core.v1.ResourceRequirements + */ +export interface ResourceRequirements { + /** + * Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + * + * This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + * + * This field is immutable. It can only be set for containers. + * + * @schema io.k8s.api.core.v1.ResourceRequirements#claims + */ + readonly claims?: ResourceClaim[]; + + /** + * Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + * + * @schema io.k8s.api.core.v1.ResourceRequirements#limits + */ + readonly limits?: { [key: string]: Quantity }; + + /** + * Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + * + * @schema io.k8s.api.core.v1.ResourceRequirements#requests + */ + readonly requests?: { [key: string]: Quantity }; + +} + +/** + * Converts an object of type 'ResourceRequirements' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ResourceRequirements(obj: ResourceRequirements | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - resourceName: obj.resourceName, - restartPolicy: obj.restartPolicy, + 'claims': obj.claims?.map(y => toJson_ResourceClaim(y)), + 'limits': ((obj.limits) === undefined) ? undefined : (Object.entries(obj.limits).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), + 'requests': ((obj.requests) === undefined) ? undefined : (Object.entries(obj.requests).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1]?.value }), {})), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27223,36 +26013,30 @@ export interface SecurityContext { * @schema io.k8s.api.core.v1.SecurityContext#windowsOptions */ readonly windowsOptions?: WindowsSecurityContextOptions; + } /** * Converts an object of type 'SecurityContext' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SecurityContext( - obj: SecurityContext | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SecurityContext(obj: SecurityContext | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - allowPrivilegeEscalation: obj.allowPrivilegeEscalation, - capabilities: toJson_Capabilities(obj.capabilities), - privileged: obj.privileged, - procMount: obj.procMount, - readOnlyRootFilesystem: obj.readOnlyRootFilesystem, - runAsGroup: obj.runAsGroup, - runAsNonRoot: obj.runAsNonRoot, - runAsUser: obj.runAsUser, - seLinuxOptions: toJson_SeLinuxOptions(obj.seLinuxOptions), - seccompProfile: toJson_SeccompProfile(obj.seccompProfile), - windowsOptions: toJson_WindowsSecurityContextOptions(obj.windowsOptions), + 'allowPrivilegeEscalation': obj.allowPrivilegeEscalation, + 'capabilities': toJson_Capabilities(obj.capabilities), + 'privileged': obj.privileged, + 'procMount': obj.procMount, + 'readOnlyRootFilesystem': obj.readOnlyRootFilesystem, + 'runAsGroup': obj.runAsGroup, + 'runAsNonRoot': obj.runAsNonRoot, + 'runAsUser': obj.runAsUser, + 'seLinuxOptions': toJson_SeLinuxOptions(obj.seLinuxOptions), + 'seccompProfile': toJson_SeccompProfile(obj.seccompProfile), + 'windowsOptions': toJson_WindowsSecurityContextOptions(obj.windowsOptions), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27275,27 +26059,21 @@ export interface VolumeDevice { * @schema io.k8s.api.core.v1.VolumeDevice#name */ readonly name: string; + } /** * Converts an object of type 'VolumeDevice' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_VolumeDevice( - obj: VolumeDevice | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeDevice(obj: VolumeDevice | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - devicePath: obj.devicePath, - name: obj.name, + 'devicePath': obj.devicePath, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27349,31 +26127,25 @@ export interface VolumeMount { * @schema io.k8s.api.core.v1.VolumeMount#subPathExpr */ readonly subPathExpr?: string; + } /** * Converts an object of type 'VolumeMount' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_VolumeMount( - obj: VolumeMount | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeMount(obj: VolumeMount | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - mountPath: obj.mountPath, - mountPropagation: obj.mountPropagation, - name: obj.name, - readOnly: obj.readOnly, - subPath: obj.subPath, - subPathExpr: obj.subPathExpr, + 'mountPath': obj.mountPath, + 'mountPropagation': obj.mountPropagation, + 'name': obj.name, + 'readOnly': obj.readOnly, + 'subPath': obj.subPath, + 'subPathExpr': obj.subPathExpr, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27394,27 +26166,21 @@ export interface PodDnsConfigOption { * @schema io.k8s.api.core.v1.PodDNSConfigOption#value */ readonly value?: string; + } /** * Converts an object of type 'PodDnsConfigOption' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodDnsConfigOption( - obj: PodDnsConfigOption | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodDnsConfigOption(obj: PodDnsConfigOption | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - value: obj.value, + 'name': obj.name, + 'value': obj.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27436,36 +26202,28 @@ export interface ClaimSource { /** * ResourceClaimTemplateName is the name of a ResourceClaimTemplate object in the same namespace as this pod. * - * The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The name of the ResourceClaim will be -, where is the PodResourceClaim.Name. Pod validation will reject the pod if the concatenated name is not valid for a ResourceClaim (e.g. too long). - * - * An existing ResourceClaim with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated resource by mistake. Scheduling and pod startup are then blocked until the unrelated ResourceClaim is removed. + * The template will be used to create a new ResourceClaim, which will be bound to this pod. When this pod is deleted, the ResourceClaim will also be deleted. The pod name and resource name, along with a generated component, will be used to form a unique name for the ResourceClaim, which will be recorded in pod.status.resourceClaimStatuses. * * This field is immutable and no changes will be made to the corresponding ResourceClaim by the control plane after creating the ResourceClaim. * * @schema io.k8s.api.core.v1.ClaimSource#resourceClaimTemplateName */ readonly resourceClaimTemplateName?: string; + } /** * Converts an object of type 'ClaimSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ClaimSource( - obj: ClaimSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ClaimSource(obj: ClaimSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - resourceClaimName: obj.resourceClaimName, - resourceClaimTemplateName: obj.resourceClaimTemplateName, + 'resourceClaimName': obj.resourceClaimName, + 'resourceClaimTemplateName': obj.resourceClaimTemplateName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27502,29 +26260,23 @@ export interface SeLinuxOptions { * @schema io.k8s.api.core.v1.SELinuxOptions#user */ readonly user?: string; + } /** * Converts an object of type 'SeLinuxOptions' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SeLinuxOptions( - obj: SeLinuxOptions | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SeLinuxOptions(obj: SeLinuxOptions | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - level: obj.level, - role: obj.role, - type: obj.type, - user: obj.user, + 'level': obj.level, + 'role': obj.role, + 'type': obj.type, + 'user': obj.user, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27535,7 +26287,7 @@ export function toJson_SeLinuxOptions( */ export interface SeccompProfile { /** - * localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must only be set if type is "Localhost". + * localhostProfile indicates a profile defined in a file on the node should be used. The profile must be preconfigured on the node to work. Must be a descending path, relative to the kubelet's configured seccomp profile location. Must be set if type is "Localhost". Must NOT be set for any other type. * * @schema io.k8s.api.core.v1.SeccompProfile#localhostProfile */ @@ -27549,27 +26301,21 @@ export interface SeccompProfile { * @schema io.k8s.api.core.v1.SeccompProfile#type */ readonly type: string; + } /** * Converts an object of type 'SeccompProfile' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SeccompProfile( - obj: SeccompProfile | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SeccompProfile(obj: SeccompProfile | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - localhostProfile: obj.localhostProfile, - type: obj.type, + 'localhostProfile': obj.localhostProfile, + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27592,27 +26338,21 @@ export interface Sysctl { * @schema io.k8s.api.core.v1.Sysctl#value */ readonly value: string; + } /** * Converts an object of type 'Sysctl' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Sysctl( - obj: Sysctl | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Sysctl(obj: Sysctl | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - value: obj.value, + 'name': obj.name, + 'value': obj.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27637,7 +26377,7 @@ export interface WindowsSecurityContextOptions { readonly gmsaCredentialSpecName?: string; /** - * HostProcess determines if a container should be run as a 'Host Process' container. This field is alpha-level and will only be honored by components that enable the WindowsHostProcessContainers feature flag. Setting this field without the feature flag will result in errors when validating the Pod. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. + * HostProcess determines if a container should be run as a 'Host Process' container. All of a Pod's containers must have the same effective HostProcess value (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers). In addition, if HostProcess is true then HostNetwork must also be set to true. * * @schema io.k8s.api.core.v1.WindowsSecurityContextOptions#hostProcess */ @@ -27650,29 +26390,23 @@ export interface WindowsSecurityContextOptions { * @schema io.k8s.api.core.v1.WindowsSecurityContextOptions#runAsUserName */ readonly runAsUserName?: string; + } /** * Converts an object of type 'WindowsSecurityContextOptions' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_WindowsSecurityContextOptions( - obj: WindowsSecurityContextOptions | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_WindowsSecurityContextOptions(obj: WindowsSecurityContextOptions | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - gmsaCredentialSpec: obj.gmsaCredentialSpec, - gmsaCredentialSpecName: obj.gmsaCredentialSpecName, - hostProcess: obj.hostProcess, - runAsUserName: obj.runAsUserName, + 'gmsaCredentialSpec': obj.gmsaCredentialSpec, + 'gmsaCredentialSpecName': obj.gmsaCredentialSpecName, + 'hostProcess': obj.hostProcess, + 'runAsUserName': obj.runAsUserName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27702,28 +26436,22 @@ export interface AzureFileVolumeSource { * @schema io.k8s.api.core.v1.AzureFileVolumeSource#shareName */ readonly shareName: string; + } /** * Converts an object of type 'AzureFileVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_AzureFileVolumeSource( - obj: AzureFileVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_AzureFileVolumeSource(obj: AzureFileVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - readOnly: obj.readOnly, - secretName: obj.secretName, - shareName: obj.shareName, + 'readOnly': obj.readOnly, + 'secretName': obj.secretName, + 'shareName': obj.shareName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27775,31 +26503,25 @@ export interface CephFsVolumeSource { * @schema io.k8s.api.core.v1.CephFSVolumeSource#user */ readonly user?: string; + } /** * Converts an object of type 'CephFsVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CephFsVolumeSource( - obj: CephFsVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CephFsVolumeSource(obj: CephFsVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - monitors: obj.monitors?.map((y) => y), - path: obj.path, - readOnly: obj.readOnly, - secretFile: obj.secretFile, - secretRef: toJson_LocalObjectReference(obj.secretRef), - user: obj.user, + 'monitors': obj.monitors?.map(y => y), + 'path': obj.path, + 'readOnly': obj.readOnly, + 'secretFile': obj.secretFile, + 'secretRef': toJson_LocalObjectReference(obj.secretRef), + 'user': obj.user, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27836,29 +26558,23 @@ export interface CinderVolumeSource { * @schema io.k8s.api.core.v1.CinderVolumeSource#volumeID */ readonly volumeId: string; + } /** * Converts an object of type 'CinderVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CinderVolumeSource( - obj: CinderVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CinderVolumeSource(obj: CinderVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - readOnly: obj.readOnly, - secretRef: toJson_LocalObjectReference(obj.secretRef), - volumeID: obj.volumeId, + 'fsType': obj.fsType, + 'readOnly': obj.readOnly, + 'secretRef': toJson_LocalObjectReference(obj.secretRef), + 'volumeID': obj.volumeId, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27898,29 +26614,23 @@ export interface ConfigMapVolumeSource { * @schema io.k8s.api.core.v1.ConfigMapVolumeSource#optional */ readonly optional?: boolean; + } /** * Converts an object of type 'ConfigMapVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ConfigMapVolumeSource( - obj: ConfigMapVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ConfigMapVolumeSource(obj: ConfigMapVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - defaultMode: obj.defaultMode, - items: obj.items?.map((y) => toJson_KeyToPath(y)), - name: obj.name, - optional: obj.optional, + 'defaultMode': obj.defaultMode, + 'items': obj.items?.map(y => toJson_KeyToPath(y)), + 'name': obj.name, + 'optional': obj.optional, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -27965,36 +26675,24 @@ export interface CsiVolumeSource { * @schema io.k8s.api.core.v1.CSIVolumeSource#volumeAttributes */ readonly volumeAttributes?: { [key: string]: string }; + } /** * Converts an object of type 'CsiVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CsiVolumeSource( - obj: CsiVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CsiVolumeSource(obj: CsiVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - driver: obj.driver, - fsType: obj.fsType, - nodePublishSecretRef: toJson_LocalObjectReference(obj.nodePublishSecretRef), - readOnly: obj.readOnly, - volumeAttributes: - obj.volumeAttributes === undefined - ? undefined - : Object.entries(obj.volumeAttributes).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), + 'driver': obj.driver, + 'fsType': obj.fsType, + 'nodePublishSecretRef': toJson_LocalObjectReference(obj.nodePublishSecretRef), + 'readOnly': obj.readOnly, + 'volumeAttributes': ((obj.volumeAttributes) === undefined) ? undefined : (Object.entries(obj.volumeAttributes).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28018,27 +26716,21 @@ export interface DownwardApiVolumeSource { * @schema io.k8s.api.core.v1.DownwardAPIVolumeSource#items */ readonly items?: DownwardApiVolumeFile[]; + } /** * Converts an object of type 'DownwardApiVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DownwardApiVolumeSource( - obj: DownwardApiVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DownwardApiVolumeSource(obj: DownwardApiVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - defaultMode: obj.defaultMode, - items: obj.items?.map((y) => toJson_DownwardApiVolumeFile(y)), + 'defaultMode': obj.defaultMode, + 'items': obj.items?.map(y => toJson_DownwardApiVolumeFile(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28061,27 +26753,21 @@ export interface EmptyDirVolumeSource { * @schema io.k8s.api.core.v1.EmptyDirVolumeSource#sizeLimit */ readonly sizeLimit?: Quantity; + } /** * Converts an object of type 'EmptyDirVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EmptyDirVolumeSource( - obj: EmptyDirVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EmptyDirVolumeSource(obj: EmptyDirVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - medium: obj.medium, - sizeLimit: obj.sizeLimit?.value, + 'medium': obj.medium, + 'sizeLimit': obj.sizeLimit?.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28103,28 +26789,20 @@ export interface EphemeralVolumeSource { * @schema io.k8s.api.core.v1.EphemeralVolumeSource#volumeClaimTemplate */ readonly volumeClaimTemplate?: PersistentVolumeClaimTemplate; + } /** * Converts an object of type 'EphemeralVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EphemeralVolumeSource( - obj: EphemeralVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EphemeralVolumeSource(obj: EphemeralVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - volumeClaimTemplate: toJson_PersistentVolumeClaimTemplate( - obj.volumeClaimTemplate, - ), + 'volumeClaimTemplate': toJson_PersistentVolumeClaimTemplate(obj.volumeClaimTemplate), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28168,36 +26846,24 @@ export interface FlexVolumeSource { * @schema io.k8s.api.core.v1.FlexVolumeSource#secretRef */ readonly secretRef?: LocalObjectReference; + } /** * Converts an object of type 'FlexVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_FlexVolumeSource( - obj: FlexVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_FlexVolumeSource(obj: FlexVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - driver: obj.driver, - fsType: obj.fsType, - options: - obj.options === undefined - ? undefined - : Object.entries(obj.options).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - readOnly: obj.readOnly, - secretRef: toJson_LocalObjectReference(obj.secretRef), + 'driver': obj.driver, + 'fsType': obj.fsType, + 'options': ((obj.options) === undefined) ? undefined : (Object.entries(obj.options).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'readOnly': obj.readOnly, + 'secretRef': toJson_LocalObjectReference(obj.secretRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28229,28 +26895,22 @@ export interface GitRepoVolumeSource { * @schema io.k8s.api.core.v1.GitRepoVolumeSource#revision */ readonly revision?: string; + } /** * Converts an object of type 'GitRepoVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_GitRepoVolumeSource( - obj: GitRepoVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_GitRepoVolumeSource(obj: GitRepoVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - directory: obj.directory, - repository: obj.repository, - revision: obj.revision, + 'directory': obj.directory, + 'repository': obj.repository, + 'revision': obj.revision, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28281,28 +26941,22 @@ export interface GlusterfsVolumeSource { * @schema io.k8s.api.core.v1.GlusterfsVolumeSource#readOnly */ readonly readOnly?: boolean; + } /** * Converts an object of type 'GlusterfsVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_GlusterfsVolumeSource( - obj: GlusterfsVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_GlusterfsVolumeSource(obj: GlusterfsVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - endpoints: obj.endpoints, - path: obj.path, - readOnly: obj.readOnly, + 'endpoints': obj.endpoints, + 'path': obj.path, + 'readOnly': obj.readOnly, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28390,36 +27044,30 @@ export interface IscsiVolumeSource { * @schema io.k8s.api.core.v1.ISCSIVolumeSource#targetPortal */ readonly targetPortal: string; + } /** * Converts an object of type 'IscsiVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IscsiVolumeSource( - obj: IscsiVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IscsiVolumeSource(obj: IscsiVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - chapAuthDiscovery: obj.chapAuthDiscovery, - chapAuthSession: obj.chapAuthSession, - fsType: obj.fsType, - initiatorName: obj.initiatorName, - iqn: obj.iqn, - iscsiInterface: obj.iscsiInterface, - lun: obj.lun, - portals: obj.portals?.map((y) => y), - readOnly: obj.readOnly, - secretRef: toJson_LocalObjectReference(obj.secretRef), - targetPortal: obj.targetPortal, + 'chapAuthDiscovery': obj.chapAuthDiscovery, + 'chapAuthSession': obj.chapAuthSession, + 'fsType': obj.fsType, + 'initiatorName': obj.initiatorName, + 'iqn': obj.iqn, + 'iscsiInterface': obj.iscsiInterface, + 'lun': obj.lun, + 'portals': obj.portals?.map(y => y), + 'readOnly': obj.readOnly, + 'secretRef': toJson_LocalObjectReference(obj.secretRef), + 'targetPortal': obj.targetPortal, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28442,27 +27090,21 @@ export interface PersistentVolumeClaimVolumeSource { * @schema io.k8s.api.core.v1.PersistentVolumeClaimVolumeSource#readOnly */ readonly readOnly?: boolean; + } /** * Converts an object of type 'PersistentVolumeClaimVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PersistentVolumeClaimVolumeSource( - obj: PersistentVolumeClaimVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PersistentVolumeClaimVolumeSource(obj: PersistentVolumeClaimVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - claimName: obj.claimName, - readOnly: obj.readOnly, + 'claimName': obj.claimName, + 'readOnly': obj.readOnly, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28485,27 +27127,21 @@ export interface ProjectedVolumeSource { * @schema io.k8s.api.core.v1.ProjectedVolumeSource#sources */ readonly sources?: VolumeProjection[]; + } /** * Converts an object of type 'ProjectedVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ProjectedVolumeSource( - obj: ProjectedVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ProjectedVolumeSource(obj: ProjectedVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - defaultMode: obj.defaultMode, - sources: obj.sources?.map((y) => toJson_VolumeProjection(y)), + 'defaultMode': obj.defaultMode, + 'sources': obj.sources?.map(y => toJson_VolumeProjection(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28575,33 +27211,27 @@ export interface RbdVolumeSource { * @schema io.k8s.api.core.v1.RBDVolumeSource#user */ readonly user?: string; + } /** * Converts an object of type 'RbdVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_RbdVolumeSource( - obj: RbdVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_RbdVolumeSource(obj: RbdVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - image: obj.image, - keyring: obj.keyring, - monitors: obj.monitors?.map((y) => y), - pool: obj.pool, - readOnly: obj.readOnly, - secretRef: toJson_LocalObjectReference(obj.secretRef), - user: obj.user, + 'fsType': obj.fsType, + 'image': obj.image, + 'keyring': obj.keyring, + 'monitors': obj.monitors?.map(y => y), + 'pool': obj.pool, + 'readOnly': obj.readOnly, + 'secretRef': toJson_LocalObjectReference(obj.secretRef), + 'user': obj.user, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28683,35 +27313,29 @@ export interface ScaleIoVolumeSource { * @schema io.k8s.api.core.v1.ScaleIOVolumeSource#volumeName */ readonly volumeName?: string; + } /** * Converts an object of type 'ScaleIoVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ScaleIoVolumeSource( - obj: ScaleIoVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ScaleIoVolumeSource(obj: ScaleIoVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - gateway: obj.gateway, - protectionDomain: obj.protectionDomain, - readOnly: obj.readOnly, - secretRef: toJson_LocalObjectReference(obj.secretRef), - sslEnabled: obj.sslEnabled, - storageMode: obj.storageMode, - storagePool: obj.storagePool, - system: obj.system, - volumeName: obj.volumeName, + 'fsType': obj.fsType, + 'gateway': obj.gateway, + 'protectionDomain': obj.protectionDomain, + 'readOnly': obj.readOnly, + 'secretRef': toJson_LocalObjectReference(obj.secretRef), + 'sslEnabled': obj.sslEnabled, + 'storageMode': obj.storageMode, + 'storagePool': obj.storagePool, + 'system': obj.system, + 'volumeName': obj.volumeName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28751,29 +27375,23 @@ export interface SecretVolumeSource { * @schema io.k8s.api.core.v1.SecretVolumeSource#secretName */ readonly secretName?: string; + } /** * Converts an object of type 'SecretVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SecretVolumeSource( - obj: SecretVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SecretVolumeSource(obj: SecretVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - defaultMode: obj.defaultMode, - items: obj.items?.map((y) => toJson_KeyToPath(y)), - optional: obj.optional, - secretName: obj.secretName, + 'defaultMode': obj.defaultMode, + 'items': obj.items?.map(y => toJson_KeyToPath(y)), + 'optional': obj.optional, + 'secretName': obj.secretName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28817,30 +27435,24 @@ export interface StorageOsVolumeSource { * @schema io.k8s.api.core.v1.StorageOSVolumeSource#volumeNamespace */ readonly volumeNamespace?: string; + } /** * Converts an object of type 'StorageOsVolumeSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_StorageOsVolumeSource( - obj: StorageOsVolumeSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_StorageOsVolumeSource(obj: StorageOsVolumeSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fsType: obj.fsType, - readOnly: obj.readOnly, - secretRef: toJson_LocalObjectReference(obj.secretRef), - volumeName: obj.volumeName, - volumeNamespace: obj.volumeNamespace, + 'fsType': obj.fsType, + 'readOnly': obj.readOnly, + 'secretRef': toJson_LocalObjectReference(obj.secretRef), + 'volumeName': obj.volumeName, + 'volumeNamespace': obj.volumeNamespace, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28870,28 +27482,22 @@ export interface ScopedResourceSelectorRequirement { * @schema io.k8s.api.core.v1.ScopedResourceSelectorRequirement#values */ readonly values?: string[]; + } /** * Converts an object of type 'ScopedResourceSelectorRequirement' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ScopedResourceSelectorRequirement( - obj: ScopedResourceSelectorRequirement | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ScopedResourceSelectorRequirement(obj: ScopedResourceSelectorRequirement | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - operator: obj.operator, - scopeName: obj.scopeName, - values: obj.values?.map((y) => y), + 'operator': obj.operator, + 'scopeName': obj.scopeName, + 'values': obj.values?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28907,26 +27513,20 @@ export interface ClientIpConfig { * @schema io.k8s.api.core.v1.ClientIPConfig#timeoutSeconds */ readonly timeoutSeconds?: number; + } /** * Converts an object of type 'ClientIpConfig' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ClientIpConfig( - obj: ClientIpConfig | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ClientIpConfig(obj: ClientIpConfig | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - timeoutSeconds: obj.timeoutSeconds, + 'timeoutSeconds': obj.timeoutSeconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -28942,35 +27542,29 @@ export interface ForZone { * @schema io.k8s.api.discovery.v1.ForZone#name */ readonly name: string; + } /** * Converts an object of type 'ForZone' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ForZone( - obj: ForZone | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ForZone(obj: ForZone | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * NonResourcePolicyRule is a predicate that matches non-resource requests according to their verb and the target non-resource URL. A NonResourcePolicyRule matches a request if and only if both (a) at least one member of verbs matches the request and (b) at least one member of nonResourceURLs matches the request. * - * @schema io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule + * @schema io.k8s.api.flowcontrol.v1.NonResourcePolicyRule */ -export interface NonResourcePolicyRuleV1Beta2 { +export interface NonResourcePolicyRule { /** * `nonResourceURLs` is a set of url prefixes that a user should have access to and may not be empty. For example: * - "/healthz" is legal @@ -28980,206 +27574,129 @@ export interface NonResourcePolicyRuleV1Beta2 { * - "/healthz/*" matches all per-component health checks. * "*" matches all non-resource urls. if it is present, it must be the only entry. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule#nonResourceURLs + * @schema io.k8s.api.flowcontrol.v1.NonResourcePolicyRule#nonResourceURLs */ readonly nonResourceUrLs: string[]; /** * `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs. If it is present, it must be the only entry. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.NonResourcePolicyRule#verbs + * @schema io.k8s.api.flowcontrol.v1.NonResourcePolicyRule#verbs */ readonly verbs: string[]; + } /** - * Converts an object of type 'NonResourcePolicyRuleV1Beta2' to JSON representation. + * Converts an object of type 'NonResourcePolicyRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NonResourcePolicyRuleV1Beta2( - obj: NonResourcePolicyRuleV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NonResourcePolicyRule(obj: NonResourcePolicyRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nonResourceURLs: obj.nonResourceUrLs?.map((y) => y), - verbs: obj.verbs?.map((y) => y), + 'nonResourceURLs': obj.nonResourceUrLs?.map(y => y), + 'verbs': obj.verbs?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * ResourcePolicyRule is a predicate that matches some resource requests, testing the request's verb and the target resource. A ResourcePolicyRule matches a resource request if and only if: (a) at least one member of verbs matches the request, (b) at least one member of apiGroups matches the request, (c) at least one member of resources matches the request, and (d) either (d1) the request does not specify a namespace (i.e., `Namespace==""`) and clusterScope is true or (d2) the request specifies a namespace and least one member of namespaces matches the request's namespace. * - * @schema io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule + * @schema io.k8s.api.flowcontrol.v1.ResourcePolicyRule */ -export interface ResourcePolicyRuleV1Beta2 { +export interface ResourcePolicyRule { /** * `apiGroups` is a list of matching API groups and may not be empty. "*" matches all API groups and, if present, must be the only entry. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule#apiGroups + * @schema io.k8s.api.flowcontrol.v1.ResourcePolicyRule#apiGroups */ readonly apiGroups: string[]; /** * `clusterScope` indicates whether to match requests that do not specify a namespace (which happens either because the resource is not namespaced or the request targets all namespaces). If this field is omitted or false then the `namespaces` field must contain a non-empty list. * - * @schema io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule#clusterScope + * @schema io.k8s.api.flowcontrol.v1.ResourcePolicyRule#clusterScope */ readonly clusterScope?: boolean; /** * `namespaces` is a list of target namespaces that restricts matches. A request that specifies a target namespace matches only if either (a) this list contains that target namespace or (b) this list contains "*". Note that "*" matches any specified namespace but does not match a request that _does not specify_ a namespace (see the `clusterScope` field for that). This list may be empty, but only if `clusterScope` is true. * - * @schema io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule#namespaces + * @schema io.k8s.api.flowcontrol.v1.ResourcePolicyRule#namespaces */ readonly namespaces?: string[]; /** * `resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ "services", "nodes/status" ]. This list may not be empty. "*" matches all resources and, if present, must be the only entry. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule#resources + * @schema io.k8s.api.flowcontrol.v1.ResourcePolicyRule#resources */ readonly resources: string[]; /** * `verbs` is a list of matching verbs and may not be empty. "*" matches all verbs and, if present, must be the only entry. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.ResourcePolicyRule#verbs + * @schema io.k8s.api.flowcontrol.v1.ResourcePolicyRule#verbs */ readonly verbs: string[]; -} - -/** - * Converts an object of type 'ResourcePolicyRuleV1Beta2' to JSON representation. - */ -/* eslint-disable max-len, quote-props */ -export function toJson_ResourcePolicyRuleV1Beta2( - obj: ResourcePolicyRuleV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - apiGroups: obj.apiGroups?.map((y) => y), - clusterScope: obj.clusterScope, - namespaces: obj.namespaces?.map((y) => y), - resources: obj.resources?.map((y) => y), - verbs: obj.verbs?.map((y) => y), - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); -} -/* eslint-enable max-len, quote-props */ - -/** - * Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account. - * - * @schema io.k8s.api.flowcontrol.v1beta2.Subject - */ -export interface SubjectV1Beta2 { - /** - * `group` matches based on user group name. - * - * @schema io.k8s.api.flowcontrol.v1beta2.Subject#group - */ - readonly group?: GroupSubjectV1Beta2; - - /** - * `kind` indicates which one of the other fields is non-empty. Required - * - * @schema io.k8s.api.flowcontrol.v1beta2.Subject#kind - */ - readonly kind: string; - - /** - * `serviceAccount` matches ServiceAccounts. - * - * @schema io.k8s.api.flowcontrol.v1beta2.Subject#serviceAccount - */ - readonly serviceAccount?: ServiceAccountSubjectV1Beta2; - /** - * `user` matches based on username. - * - * @schema io.k8s.api.flowcontrol.v1beta2.Subject#user - */ - readonly user?: UserSubjectV1Beta2; } /** - * Converts an object of type 'SubjectV1Beta2' to JSON representation. + * Converts an object of type 'ResourcePolicyRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SubjectV1Beta2( - obj: SubjectV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourcePolicyRule(obj: ResourcePolicyRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - group: toJson_GroupSubjectV1Beta2(obj.group), - kind: obj.kind, - serviceAccount: toJson_ServiceAccountSubjectV1Beta2(obj.serviceAccount), - user: toJson_UserSubjectV1Beta2(obj.user), + 'apiGroups': obj.apiGroups?.map(y => y), + 'clusterScope': obj.clusterScope, + 'namespaces': obj.namespaces?.map(y => y), + 'resources': obj.resources?.map(y => y), + 'verbs': obj.verbs?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * LimitResponse defines how to handle requests that can not be executed right now. * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitResponse + * @schema io.k8s.api.flowcontrol.v1.LimitResponse */ -export interface LimitResponseV1Beta2 { +export interface LimitResponse { /** * `queuing` holds the configuration parameters for queuing. This field may be non-empty only if `type` is `"Queue"`. * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitResponse#queuing + * @schema io.k8s.api.flowcontrol.v1.LimitResponse#queuing */ - readonly queuing?: QueuingConfigurationV1Beta2; + readonly queuing?: QueuingConfiguration; /** * `type` is "Queue" or "Reject". "Queue" means that requests that can not be executed upon arrival are held in a queue until they can be executed or a queuing limit is reached. "Reject" means that requests that can not be executed upon arrival are rejected. Required. * - * @schema io.k8s.api.flowcontrol.v1beta2.LimitResponse#type + * @schema io.k8s.api.flowcontrol.v1.LimitResponse#type */ readonly type: string; + } /** - * Converts an object of type 'LimitResponseV1Beta2' to JSON representation. + * Converts an object of type 'LimitResponse' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LimitResponseV1Beta2( - obj: LimitResponseV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LimitResponse(obj: LimitResponse | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - queuing: toJson_QueuingConfigurationV1Beta2(obj.queuing), - type: obj.type, + 'queuing': toJson_QueuingConfiguration(obj.queuing), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29208,27 +27725,21 @@ export interface NonResourcePolicyRuleV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.NonResourcePolicyRule#verbs */ readonly verbs: string[]; + } /** * Converts an object of type 'NonResourcePolicyRuleV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NonResourcePolicyRuleV1Beta3( - obj: NonResourcePolicyRuleV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NonResourcePolicyRuleV1Beta3(obj: NonResourcePolicyRuleV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - nonResourceURLs: obj.nonResourceUrLs?.map((y) => y), - verbs: obj.verbs?.map((y) => y), + 'nonResourceURLs': obj.nonResourceUrLs?.map(y => y), + 'verbs': obj.verbs?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29272,30 +27783,24 @@ export interface ResourcePolicyRuleV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.ResourcePolicyRule#verbs */ readonly verbs: string[]; + } /** * Converts an object of type 'ResourcePolicyRuleV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourcePolicyRuleV1Beta3( - obj: ResourcePolicyRuleV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourcePolicyRuleV1Beta3(obj: ResourcePolicyRuleV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiGroups: obj.apiGroups?.map((y) => y), - clusterScope: obj.clusterScope, - namespaces: obj.namespaces?.map((y) => y), - resources: obj.resources?.map((y) => y), - verbs: obj.verbs?.map((y) => y), + 'apiGroups': obj.apiGroups?.map(y => y), + 'clusterScope': obj.clusterScope, + 'namespaces': obj.namespaces?.map(y => y), + 'resources': obj.resources?.map(y => y), + 'verbs': obj.verbs?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29332,29 +27837,23 @@ export interface SubjectV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.Subject#user */ readonly user?: UserSubjectV1Beta3; + } /** * Converts an object of type 'SubjectV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SubjectV1Beta3( - obj: SubjectV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SubjectV1Beta3(obj: SubjectV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - group: toJson_GroupSubjectV1Beta3(obj.group), - kind: obj.kind, - serviceAccount: toJson_ServiceAccountSubjectV1Beta3(obj.serviceAccount), - user: toJson_UserSubjectV1Beta3(obj.user), + 'group': toJson_GroupSubjectV1Beta3(obj.group), + 'kind': obj.kind, + 'serviceAccount': toJson_ServiceAccountSubjectV1Beta3(obj.serviceAccount), + 'user': toJson_UserSubjectV1Beta3(obj.user), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29377,27 +27876,21 @@ export interface LimitResponseV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.LimitResponse#type */ readonly type: string; + } /** * Converts an object of type 'LimitResponseV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LimitResponseV1Beta3( - obj: LimitResponseV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LimitResponseV1Beta3(obj: LimitResponseV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - queuing: toJson_QueuingConfigurationV1Beta3(obj.queuing), - type: obj.type, + 'queuing': toJson_QueuingConfigurationV1Beta3(obj.queuing), + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29420,27 +27913,21 @@ export interface IngressServiceBackend { * @schema io.k8s.api.networking.v1.IngressServiceBackend#port */ readonly port?: ServiceBackendPort; + } /** * Converts an object of type 'IngressServiceBackend' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IngressServiceBackend( - obj: IngressServiceBackend | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IngressServiceBackend(obj: IngressServiceBackend | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - port: toJson_ServiceBackendPort(obj.port), + 'name': obj.name, + 'port': toJson_ServiceBackendPort(obj.port), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29456,26 +27943,20 @@ export interface HttpIngressRuleValue { * @schema io.k8s.api.networking.v1.HTTPIngressRuleValue#paths */ readonly paths: HttpIngressPath[]; + } /** * Converts an object of type 'HttpIngressRuleValue' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HttpIngressRuleValue( - obj: HttpIngressRuleValue | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HttpIngressRuleValue(obj: HttpIngressRuleValue | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - paths: obj.paths?.map((y) => toJson_HttpIngressPath(y)), + 'paths': obj.paths?.map(y => toJson_HttpIngressPath(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29505,28 +27986,22 @@ export interface NetworkPolicyPort { * @schema io.k8s.api.networking.v1.NetworkPolicyPort#protocol */ readonly protocol?: string; + } /** * Converts an object of type 'NetworkPolicyPort' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NetworkPolicyPort( - obj: NetworkPolicyPort | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NetworkPolicyPort(obj: NetworkPolicyPort | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - endPort: obj.endPort, - port: obj.port?.value, - protocol: obj.protocol, + 'endPort': obj.endPort, + 'port': obj.port?.value, + 'protocol': obj.protocol, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29560,28 +28035,22 @@ export interface NetworkPolicyPeer { * @schema io.k8s.api.networking.v1.NetworkPolicyPeer#podSelector */ readonly podSelector?: LabelSelector; + } /** * Converts an object of type 'NetworkPolicyPeer' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NetworkPolicyPeer( - obj: NetworkPolicyPeer | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NetworkPolicyPeer(obj: NetworkPolicyPeer | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - ipBlock: toJson_IpBlock(obj.ipBlock), - namespaceSelector: toJson_LabelSelector(obj.namespaceSelector), - podSelector: toJson_LabelSelector(obj.podSelector), + 'ipBlock': toJson_IpBlock(obj.ipBlock), + 'namespaceSelector': toJson_LabelSelector(obj.namespaceSelector), + 'podSelector': toJson_LabelSelector(obj.podSelector), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29611,28 +28080,22 @@ export interface NodeSelectorRequirement { * @schema io.k8s.api.core.v1.NodeSelectorRequirement#values */ readonly values?: string[]; + } /** * Converts an object of type 'NodeSelectorRequirement' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_NodeSelectorRequirement( - obj: NodeSelectorRequirement | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_NodeSelectorRequirement(obj: NodeSelectorRequirement | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - key: obj.key, - operator: obj.operator, - values: obj.values?.map((y) => y), + 'key': obj.key, + 'operator': obj.operator, + 'values': obj.values?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29648,26 +28111,20 @@ export interface VolumeNodeResources { * @schema io.k8s.api.storage.v1.VolumeNodeResources#count */ readonly count?: number; + } /** * Converts an object of type 'VolumeNodeResources' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_VolumeNodeResources( - obj: VolumeNodeResources | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeNodeResources(obj: VolumeNodeResources | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - count: obj.count, + 'count': obj.count, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29690,27 +28147,21 @@ export interface WebhookConversion { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookConversion#conversionReviewVersions */ readonly conversionReviewVersions: string[]; + } /** * Converts an object of type 'WebhookConversion' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_WebhookConversion( - obj: WebhookConversion | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_WebhookConversion(obj: WebhookConversion | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - clientConfig: toJson_WebhookClientConfig(obj.clientConfig), - conversionReviewVersions: obj.conversionReviewVersions?.map((y) => y), + 'clientConfig': toJson_WebhookClientConfig(obj.clientConfig), + 'conversionReviewVersions': obj.conversionReviewVersions?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29761,31 +28212,25 @@ export interface CustomResourceColumnDefinition { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition#type */ readonly type: string; + } /** * Converts an object of type 'CustomResourceColumnDefinition' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceColumnDefinition( - obj: CustomResourceColumnDefinition | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceColumnDefinition(obj: CustomResourceColumnDefinition | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - description: obj.description, - format: obj.format, - jsonPath: obj.jsonPath, - name: obj.name, - priority: obj.priority, - type: obj.type, + 'description': obj.description, + 'format': obj.format, + 'jsonPath': obj.jsonPath, + 'name': obj.name, + 'priority': obj.priority, + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29801,26 +28246,20 @@ export interface CustomResourceValidation { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation#openAPIV3Schema */ readonly openApiv3Schema?: JsonSchemaProps; + } /** * Converts an object of type 'CustomResourceValidation' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceValidation( - obj: CustomResourceValidation | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceValidation(obj: CustomResourceValidation | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - openAPIV3Schema: toJson_JsonSchemaProps(obj.openApiv3Schema), + 'openAPIV3Schema': toJson_JsonSchemaProps(obj.openApiv3Schema), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29843,27 +28282,21 @@ export interface CustomResourceSubresources { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources#status */ readonly status?: any; + } /** * Converts an object of type 'CustomResourceSubresources' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceSubresources( - obj: CustomResourceSubresources | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceSubresources(obj: CustomResourceSubresources | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - scale: toJson_CustomResourceSubresourceScale(obj.scale), - status: obj.status, + 'scale': toJson_CustomResourceSubresourceScale(obj.scale), + 'status': obj.status, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29893,28 +28326,22 @@ export interface HpaScalingPolicyV2 { * @schema io.k8s.api.autoscaling.v2.HPAScalingPolicy#value */ readonly value: number; + } /** * Converts an object of type 'HpaScalingPolicyV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HpaScalingPolicyV2( - obj: HpaScalingPolicyV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HpaScalingPolicyV2(obj: HpaScalingPolicyV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - periodSeconds: obj.periodSeconds, - type: obj.type, - value: obj.value, + 'periodSeconds': obj.periodSeconds, + 'type': obj.type, + 'value': obj.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29951,29 +28378,23 @@ export interface MetricTargetV2 { * @schema io.k8s.api.autoscaling.v2.MetricTarget#value */ readonly value?: Quantity; + } /** * Converts an object of type 'MetricTargetV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_MetricTargetV2( - obj: MetricTargetV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_MetricTargetV2(obj: MetricTargetV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - averageUtilization: obj.averageUtilization, - averageValue: obj.averageValue?.value, - type: obj.type, - value: obj.value?.value, + 'averageUtilization': obj.averageUtilization, + 'averageValue': obj.averageValue?.value, + 'type': obj.type, + 'value': obj.value?.value, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -29996,27 +28417,21 @@ export interface MetricIdentifierV2 { * @schema io.k8s.api.autoscaling.v2.MetricIdentifier#selector */ readonly selector?: LabelSelector; + } /** * Converts an object of type 'MetricIdentifierV2' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_MetricIdentifierV2( - obj: MetricIdentifierV2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_MetricIdentifierV2(obj: MetricIdentifierV2 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - selector: toJson_LabelSelector(obj.selector), + 'name': obj.name, + 'selector': toJson_LabelSelector(obj.selector), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30054,28 +28469,22 @@ export interface PodFailurePolicyOnExitCodesRequirement { * @schema io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement#values */ readonly values: number[]; + } /** * Converts an object of type 'PodFailurePolicyOnExitCodesRequirement' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodFailurePolicyOnExitCodesRequirement( - obj: PodFailurePolicyOnExitCodesRequirement | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodFailurePolicyOnExitCodesRequirement(obj: PodFailurePolicyOnExitCodesRequirement | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - containerName: obj.containerName, - operator: obj.operator, - values: obj.values?.map((y) => y), + 'containerName': obj.containerName, + 'operator': obj.operator, + 'values': obj.values?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30099,27 +28508,21 @@ export interface PodFailurePolicyOnPodConditionsPattern { * @schema io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern#type */ readonly type: string; + } /** * Converts an object of type 'PodFailurePolicyOnPodConditionsPattern' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodFailurePolicyOnPodConditionsPattern( - obj: PodFailurePolicyOnPodConditionsPattern | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodFailurePolicyOnPodConditionsPattern(obj: PodFailurePolicyOnPodConditionsPattern | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - status: obj.status, - type: obj.type, + 'status': obj.status, + 'type': obj.type, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30142,27 +28545,21 @@ export interface PreferredSchedulingTerm { * @schema io.k8s.api.core.v1.PreferredSchedulingTerm#weight */ readonly weight: number; + } /** * Converts an object of type 'PreferredSchedulingTerm' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PreferredSchedulingTerm( - obj: PreferredSchedulingTerm | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PreferredSchedulingTerm(obj: PreferredSchedulingTerm | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - preference: toJson_NodeSelectorTerm(obj.preference), - weight: obj.weight, + 'preference': toJson_NodeSelectorTerm(obj.preference), + 'weight': obj.weight, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30185,27 +28582,21 @@ export interface WeightedPodAffinityTerm { * @schema io.k8s.api.core.v1.WeightedPodAffinityTerm#weight */ readonly weight: number; + } /** * Converts an object of type 'WeightedPodAffinityTerm' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_WeightedPodAffinityTerm( - obj: WeightedPodAffinityTerm | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_WeightedPodAffinityTerm(obj: WeightedPodAffinityTerm | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - podAffinityTerm: toJson_PodAffinityTerm(obj.podAffinityTerm), - weight: obj.weight, + 'podAffinityTerm': toJson_PodAffinityTerm(obj.podAffinityTerm), + 'weight': obj.weight, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30216,11 +28607,25 @@ export function toJson_WeightedPodAffinityTerm( */ export interface PodAffinityTerm { /** - * A label query over a set of resources, in this case pods. + * A label query over a set of resources, in this case pods. If it's null, this PodAffinityTerm matches with no Pods. + * + * @schema io.k8s.api.core.v1.PodAffinityTerm#labelSelector + */ + readonly labelSelector?: LabelSelector; + + /** + * MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. Also, MatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. + * + * @schema io.k8s.api.core.v1.PodAffinityTerm#matchLabelKeys + */ + readonly matchLabelKeys?: string[]; + + /** + * MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `LabelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both MismatchLabelKeys and LabelSelector. Also, MismatchLabelKeys cannot be set when LabelSelector isn't set. This is an alpha field and requires enabling MatchLabelKeysInPodAffinity feature gate. * - * @schema io.k8s.api.core.v1.PodAffinityTerm#labelSelector + * @schema io.k8s.api.core.v1.PodAffinityTerm#mismatchLabelKeys */ - readonly labelSelector?: LabelSelector; + readonly mismatchLabelKeys?: string[]; /** * A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. @@ -30242,29 +28647,25 @@ export interface PodAffinityTerm { * @schema io.k8s.api.core.v1.PodAffinityTerm#topologyKey */ readonly topologyKey: string; + } /** * Converts an object of type 'PodAffinityTerm' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PodAffinityTerm( - obj: PodAffinityTerm | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PodAffinityTerm(obj: PodAffinityTerm | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - labelSelector: toJson_LabelSelector(obj.labelSelector), - namespaceSelector: toJson_LabelSelector(obj.namespaceSelector), - namespaces: obj.namespaces?.map((y) => y), - topologyKey: obj.topologyKey, + 'labelSelector': toJson_LabelSelector(obj.labelSelector), + 'matchLabelKeys': obj.matchLabelKeys?.map(y => y), + 'mismatchLabelKeys': obj.mismatchLabelKeys?.map(y => y), + 'namespaceSelector': toJson_LabelSelector(obj.namespaceSelector), + 'namespaces': obj.namespaces?.map(y => y), + 'topologyKey': obj.topologyKey, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30301,29 +28702,23 @@ export interface EnvVarSource { * @schema io.k8s.api.core.v1.EnvVarSource#secretKeyRef */ readonly secretKeyRef?: SecretKeySelector; + } /** * Converts an object of type 'EnvVarSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_EnvVarSource( - obj: EnvVarSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_EnvVarSource(obj: EnvVarSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - configMapKeyRef: toJson_ConfigMapKeySelector(obj.configMapKeyRef), - fieldRef: toJson_ObjectFieldSelector(obj.fieldRef), - resourceFieldRef: toJson_ResourceFieldSelector(obj.resourceFieldRef), - secretKeyRef: toJson_SecretKeySelector(obj.secretKeyRef), + 'configMapKeyRef': toJson_ConfigMapKeySelector(obj.configMapKeyRef), + 'fieldRef': toJson_ObjectFieldSelector(obj.fieldRef), + 'resourceFieldRef': toJson_ResourceFieldSelector(obj.resourceFieldRef), + 'secretKeyRef': toJson_SecretKeySelector(obj.secretKeyRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30348,27 +28743,21 @@ export interface ConfigMapEnvSource { * @schema io.k8s.api.core.v1.ConfigMapEnvSource#optional */ readonly optional?: boolean; + } /** * Converts an object of type 'ConfigMapEnvSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ConfigMapEnvSource( - obj: ConfigMapEnvSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ConfigMapEnvSource(obj: ConfigMapEnvSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - optional: obj.optional, + 'name': obj.name, + 'optional': obj.optional, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30393,27 +28782,21 @@ export interface SecretEnvSource { * @schema io.k8s.api.core.v1.SecretEnvSource#optional */ readonly optional?: boolean; + } /** * Converts an object of type 'SecretEnvSource' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SecretEnvSource( - obj: SecretEnvSource | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SecretEnvSource(obj: SecretEnvSource | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - optional: obj.optional, + 'name': obj.name, + 'optional': obj.optional, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30437,34 +28820,36 @@ export interface LifecycleHandler { */ readonly httpGet?: HttpGetAction; + /** + * Sleep represents the duration that the container should sleep before being terminated. + * + * @schema io.k8s.api.core.v1.LifecycleHandler#sleep + */ + readonly sleep?: SleepAction; + /** * Deprecated. TCPSocket is NOT supported as a LifecycleHandler and kept for the backward compatibility. There are no validation of this field and lifecycle hooks will fail in runtime when tcp handler is specified. * * @schema io.k8s.api.core.v1.LifecycleHandler#tcpSocket */ readonly tcpSocket?: TcpSocketAction; + } /** * Converts an object of type 'LifecycleHandler' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_LifecycleHandler( - obj: LifecycleHandler | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_LifecycleHandler(obj: LifecycleHandler | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - exec: toJson_ExecAction(obj.exec), - httpGet: toJson_HttpGetAction(obj.httpGet), - tcpSocket: toJson_TcpSocketAction(obj.tcpSocket), + 'exec': toJson_ExecAction(obj.exec), + 'httpGet': toJson_HttpGetAction(obj.httpGet), + 'sleep': toJson_SleepAction(obj.sleep), + 'tcpSocket': toJson_TcpSocketAction(obj.tcpSocket), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30480,26 +28865,20 @@ export interface ExecAction { * @schema io.k8s.api.core.v1.ExecAction#command */ readonly command?: string[]; + } /** * Converts an object of type 'ExecAction' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ExecAction( - obj: ExecAction | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ExecAction(obj: ExecAction | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - command: obj.command?.map((y) => y), + 'command': obj.command?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30522,27 +28901,21 @@ export interface GrpcAction { * @schema io.k8s.api.core.v1.GRPCAction#service */ readonly service?: string; + } /** * Converts an object of type 'GrpcAction' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_GrpcAction( - obj: GrpcAction | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_GrpcAction(obj: GrpcAction | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - port: obj.port, - service: obj.service, + 'port': obj.port, + 'service': obj.service, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30587,30 +28960,24 @@ export interface HttpGetAction { * @schema io.k8s.api.core.v1.HTTPGetAction#scheme */ readonly scheme?: string; + } /** * Converts an object of type 'HttpGetAction' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HttpGetAction( - obj: HttpGetAction | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HttpGetAction(obj: HttpGetAction | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - host: obj.host, - httpHeaders: obj.httpHeaders?.map((y) => toJson_HttpHeader(y)), - path: obj.path, - port: obj.port?.value, - scheme: obj.scheme, + 'host': obj.host, + 'httpHeaders': obj.httpHeaders?.map(y => toJson_HttpHeader(y)), + 'path': obj.path, + 'port': obj.port?.value, + 'scheme': obj.scheme, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30633,27 +29000,50 @@ export interface TcpSocketAction { * @schema io.k8s.api.core.v1.TCPSocketAction#port */ readonly port: IntOrString; + } /** * Converts an object of type 'TcpSocketAction' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_TcpSocketAction( - obj: TcpSocketAction | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_TcpSocketAction(obj: TcpSocketAction | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'host': obj.host, + 'port': obj.port?.value, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ResourceClaim references one entry in PodSpec.ResourceClaims. + * + * @schema io.k8s.api.core.v1.ResourceClaim + */ +export interface ResourceClaim { + /** + * Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container. + * + * @schema io.k8s.api.core.v1.ResourceClaim#name + */ + readonly name: string; + +} + +/** + * Converts an object of type 'ResourceClaim' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ResourceClaim(obj: ResourceClaim | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - host: obj.host, - port: obj.port?.value, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30676,27 +29066,21 @@ export interface Capabilities { * @schema io.k8s.api.core.v1.Capabilities#drop */ readonly drop?: string[]; + } /** * Converts an object of type 'Capabilities' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_Capabilities( - obj: Capabilities | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_Capabilities(obj: Capabilities | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - add: obj.add?.map((y) => y), - drop: obj.drop?.map((y) => y), + 'add': obj.add?.map(y => y), + 'drop': obj.drop?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30726,28 +29110,22 @@ export interface KeyToPath { * @schema io.k8s.api.core.v1.KeyToPath#path */ readonly path: string; + } /** * Converts an object of type 'KeyToPath' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_KeyToPath( - obj: KeyToPath | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_KeyToPath(obj: KeyToPath | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - key: obj.key, - mode: obj.mode, - path: obj.path, + 'key': obj.key, + 'mode': obj.mode, + 'path': obj.path, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30784,29 +29162,23 @@ export interface DownwardApiVolumeFile { * @schema io.k8s.api.core.v1.DownwardAPIVolumeFile#resourceFieldRef */ readonly resourceFieldRef?: ResourceFieldSelector; + } /** * Converts an object of type 'DownwardApiVolumeFile' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DownwardApiVolumeFile( - obj: DownwardApiVolumeFile | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DownwardApiVolumeFile(obj: DownwardApiVolumeFile | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - fieldRef: toJson_ObjectFieldSelector(obj.fieldRef), - mode: obj.mode, - path: obj.path, - resourceFieldRef: toJson_ResourceFieldSelector(obj.resourceFieldRef), + 'fieldRef': toJson_ObjectFieldSelector(obj.fieldRef), + 'mode': obj.mode, + 'path': obj.path, + 'resourceFieldRef': toJson_ResourceFieldSelector(obj.resourceFieldRef), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30829,27 +29201,21 @@ export interface PersistentVolumeClaimTemplate { * @schema io.k8s.api.core.v1.PersistentVolumeClaimTemplate#spec */ readonly spec: PersistentVolumeClaimSpec; + } /** * Converts an object of type 'PersistentVolumeClaimTemplate' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_PersistentVolumeClaimTemplate( - obj: PersistentVolumeClaimTemplate | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_PersistentVolumeClaimTemplate(obj: PersistentVolumeClaimTemplate | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - metadata: toJson_ObjectMeta(obj.metadata), - spec: toJson_PersistentVolumeClaimSpec(obj.spec), + 'metadata': toJson_ObjectMeta(obj.metadata), + 'spec': toJson_PersistentVolumeClaimSpec(obj.spec), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -30859,6 +29225,19 @@ export function toJson_PersistentVolumeClaimTemplate( * @schema io.k8s.api.core.v1.VolumeProjection */ export interface VolumeProjection { + /** + * ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field of ClusterTrustBundle objects in an auto-updating file. + * + * Alpha, gated by the ClusterTrustBundleProjection feature gate. + * + * ClusterTrustBundle objects can either be selected by name, or by the combination of signer name and a label selector. + * + * Kubelet performs aggressive normalization of the PEM contents written into the pod filesystem. Esoteric PEM features such as inter-block comments and block headers are stripped. Certificates are deduplicated. The ordering of certificates within the file is arbitrary, and Kubelet may change the order over time. + * + * @schema io.k8s.api.core.v1.VolumeProjection#clusterTrustBundle + */ + readonly clusterTrustBundle?: ClusterTrustBundleProjection; + /** * configMap information about the configMap data to project * @@ -30886,195 +29265,69 @@ export interface VolumeProjection { * @schema io.k8s.api.core.v1.VolumeProjection#serviceAccountToken */ readonly serviceAccountToken?: ServiceAccountTokenProjection; -} - -/** - * Converts an object of type 'VolumeProjection' to JSON representation. - */ -/* eslint-disable max-len, quote-props */ -export function toJson_VolumeProjection( - obj: VolumeProjection | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - configMap: toJson_ConfigMapProjection(obj.configMap), - downwardAPI: toJson_DownwardApiProjection(obj.downwardApi), - secret: toJson_SecretProjection(obj.secret), - serviceAccountToken: toJson_ServiceAccountTokenProjection( - obj.serviceAccountToken, - ), - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); -} -/* eslint-enable max-len, quote-props */ - -/** - * GroupSubject holds detailed information for group-kind subject. - * - * @schema io.k8s.api.flowcontrol.v1beta2.GroupSubject - */ -export interface GroupSubjectV1Beta2 { - /** - * name is the user group that matches, or "*" to match all user groups. See https://github.com/kubernetes/apiserver/blob/master/pkg/authentication/user/user.go for some well-known group names. Required. - * - * @schema io.k8s.api.flowcontrol.v1beta2.GroupSubject#name - */ - readonly name: string; -} - -/** - * Converts an object of type 'GroupSubjectV1Beta2' to JSON representation. - */ -/* eslint-disable max-len, quote-props */ -export function toJson_GroupSubjectV1Beta2( - obj: GroupSubjectV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - name: obj.name, - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); -} -/* eslint-enable max-len, quote-props */ - -/** - * ServiceAccountSubject holds detailed information for service-account-kind subject. - * - * @schema io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject - */ -export interface ServiceAccountSubjectV1Beta2 { - /** - * `name` is the name of matching ServiceAccount objects, or "*" to match regardless of name. Required. - * - * @schema io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject#name - */ - readonly name: string; - - /** - * `namespace` is the namespace of matching ServiceAccount objects. Required. - * - * @schema io.k8s.api.flowcontrol.v1beta2.ServiceAccountSubject#namespace - */ - readonly namespace: string; -} - -/** - * Converts an object of type 'ServiceAccountSubjectV1Beta2' to JSON representation. - */ -/* eslint-disable max-len, quote-props */ -export function toJson_ServiceAccountSubjectV1Beta2( - obj: ServiceAccountSubjectV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - name: obj.name, - namespace: obj.namespace, - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); -} -/* eslint-enable max-len, quote-props */ -/** - * UserSubject holds detailed information for user-kind subject. - * - * @schema io.k8s.api.flowcontrol.v1beta2.UserSubject - */ -export interface UserSubjectV1Beta2 { - /** - * `name` is the username that matches, or "*" to match all usernames. Required. - * - * @schema io.k8s.api.flowcontrol.v1beta2.UserSubject#name - */ - readonly name: string; } /** - * Converts an object of type 'UserSubjectV1Beta2' to JSON representation. + * Converts an object of type 'VolumeProjection' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_UserSubjectV1Beta2( - obj: UserSubjectV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_VolumeProjection(obj: VolumeProjection | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'clusterTrustBundle': toJson_ClusterTrustBundleProjection(obj.clusterTrustBundle), + 'configMap': toJson_ConfigMapProjection(obj.configMap), + 'downwardAPI': toJson_DownwardApiProjection(obj.downwardApi), + 'secret': toJson_SecretProjection(obj.secret), + 'serviceAccountToken': toJson_ServiceAccountTokenProjection(obj.serviceAccountToken), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ /** * QueuingConfiguration holds the configuration parameters for queuing * - * @schema io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration + * @schema io.k8s.api.flowcontrol.v1.QueuingConfiguration */ -export interface QueuingConfigurationV1Beta2 { +export interface QueuingConfiguration { /** * `handSize` is a small positive number that configures the shuffle sharding of requests into queues. When enqueuing a request at this priority level the request's flow identifier (a string pair) is hashed and the hash value is used to shuffle the list of queues and deal a hand of the size specified here. The request is put into one of the shortest queues in that hand. `handSize` must be no larger than `queues`, and should be significantly smaller (so that a few heavy flows do not saturate most of the queues). See the user-facing documentation for more extensive guidance on setting this field. This field has a default value of 8. * - * @schema io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration#handSize + * @schema io.k8s.api.flowcontrol.v1.QueuingConfiguration#handSize */ readonly handSize?: number; /** * `queueLengthLimit` is the maximum number of requests allowed to be waiting in a given queue of this priority level at a time; excess requests are rejected. This value must be positive. If not specified, it will be defaulted to 50. * - * @schema io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration#queueLengthLimit + * @schema io.k8s.api.flowcontrol.v1.QueuingConfiguration#queueLengthLimit */ readonly queueLengthLimit?: number; /** * `queues` is the number of queues for this priority level. The queues exist independently at each apiserver. The value must be positive. Setting it to 1 effectively precludes shufflesharding and thus makes the distinguisher method of associated flow schemas irrelevant. This field has a default value of 64. * - * @schema io.k8s.api.flowcontrol.v1beta2.QueuingConfiguration#queues + * @schema io.k8s.api.flowcontrol.v1.QueuingConfiguration#queues */ readonly queues?: number; + } /** - * Converts an object of type 'QueuingConfigurationV1Beta2' to JSON representation. + * Converts an object of type 'QueuingConfiguration' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_QueuingConfigurationV1Beta2( - obj: QueuingConfigurationV1Beta2 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_QueuingConfiguration(obj: QueuingConfiguration | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - handSize: obj.handSize, - queueLengthLimit: obj.queueLengthLimit, - queues: obj.queues, + 'handSize': obj.handSize, + 'queueLengthLimit': obj.queueLengthLimit, + 'queues': obj.queues, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31090,26 +29343,20 @@ export interface GroupSubjectV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.GroupSubject#name */ readonly name: string; + } /** * Converts an object of type 'GroupSubjectV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_GroupSubjectV1Beta3( - obj: GroupSubjectV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_GroupSubjectV1Beta3(obj: GroupSubjectV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31132,27 +29379,21 @@ export interface ServiceAccountSubjectV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.ServiceAccountSubject#namespace */ readonly namespace: string; + } /** * Converts an object of type 'ServiceAccountSubjectV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ServiceAccountSubjectV1Beta3( - obj: ServiceAccountSubjectV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ServiceAccountSubjectV1Beta3(obj: ServiceAccountSubjectV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - namespace: obj.namespace, + 'name': obj.name, + 'namespace': obj.namespace, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31168,26 +29409,20 @@ export interface UserSubjectV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.UserSubject#name */ readonly name: string; + } /** * Converts an object of type 'UserSubjectV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_UserSubjectV1Beta3( - obj: UserSubjectV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_UserSubjectV1Beta3(obj: UserSubjectV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, + 'name': obj.name, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31217,28 +29452,22 @@ export interface QueuingConfigurationV1Beta3 { * @schema io.k8s.api.flowcontrol.v1beta3.QueuingConfiguration#queues */ readonly queues?: number; + } /** * Converts an object of type 'QueuingConfigurationV1Beta3' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_QueuingConfigurationV1Beta3( - obj: QueuingConfigurationV1Beta3 | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_QueuingConfigurationV1Beta3(obj: QueuingConfigurationV1Beta3 | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - handSize: obj.handSize, - queueLengthLimit: obj.queueLengthLimit, - queues: obj.queues, + 'handSize': obj.handSize, + 'queueLengthLimit': obj.queueLengthLimit, + 'queues': obj.queues, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31261,27 +29490,21 @@ export interface ServiceBackendPort { * @schema io.k8s.api.networking.v1.ServiceBackendPort#number */ readonly number?: number; + } /** * Converts an object of type 'ServiceBackendPort' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ServiceBackendPort( - obj: ServiceBackendPort | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ServiceBackendPort(obj: ServiceBackendPort | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - number: obj.number, + 'name': obj.name, + 'number': obj.number, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31321,28 +29544,22 @@ export interface HttpIngressPath { * @schema io.k8s.api.networking.v1.HTTPIngressPath#pathType */ readonly pathType: string; + } /** * Converts an object of type 'HttpIngressPath' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HttpIngressPath( - obj: HttpIngressPath | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HttpIngressPath(obj: HttpIngressPath | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - backend: toJson_IngressBackend(obj.backend), - path: obj.path, - pathType: obj.pathType, + 'backend': toJson_IngressBackend(obj.backend), + 'path': obj.path, + 'pathType': obj.pathType, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31365,27 +29582,21 @@ export interface IpBlock { * @schema io.k8s.api.networking.v1.IPBlock#except */ readonly except?: string[]; + } /** * Converts an object of type 'IpBlock' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_IpBlock( - obj: IpBlock | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_IpBlock(obj: IpBlock | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - cidr: obj.cidr, - except: obj.except?.map((y) => y), + 'cidr': obj.cidr, + 'except': obj.except?.map(y => y), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31668,105 +29879,63 @@ export interface JsonSchemaProps { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps#x-kubernetes-validations */ readonly xKubernetesValidations?: ValidationRule[]; + } /** * Converts an object of type 'JsonSchemaProps' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_JsonSchemaProps( - obj: JsonSchemaProps | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } - const result = { - $ref: obj.ref, - $schema: obj.schema, - additionalItems: obj.additionalItems, - additionalProperties: obj.additionalProperties, - allOf: obj.allOf?.map((y) => toJson_JsonSchemaProps(y)), - anyOf: obj.anyOf?.map((y) => toJson_JsonSchemaProps(y)), - default: obj.default, - definitions: - obj.definitions === undefined - ? undefined - : Object.entries(obj.definitions).reduce( - (r, i) => - i[1] === undefined - ? r - : { ...r, [i[0]]: toJson_JsonSchemaProps(i[1]) }, - {}, - ), - dependencies: - obj.dependencies === undefined - ? undefined - : Object.entries(obj.dependencies).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ), - description: obj.description, - enum: obj.enum?.map((y) => y), - example: obj.example, - exclusiveMaximum: obj.exclusiveMaximum, - exclusiveMinimum: obj.exclusiveMinimum, - externalDocs: toJson_ExternalDocumentation(obj.externalDocs), - format: obj.format, - id: obj.id, - items: obj.items, - maxItems: obj.maxItems, - maxLength: obj.maxLength, - maxProperties: obj.maxProperties, - maximum: obj.maximum, - minItems: obj.minItems, - minLength: obj.minLength, - minProperties: obj.minProperties, - minimum: obj.minimum, - multipleOf: obj.multipleOf, - not: toJson_JsonSchemaProps(obj.not), - nullable: obj.nullable, - oneOf: obj.oneOf?.map((y) => toJson_JsonSchemaProps(y)), - pattern: obj.pattern, - patternProperties: - obj.patternProperties === undefined - ? undefined - : Object.entries(obj.patternProperties).reduce( - (r, i) => - i[1] === undefined - ? r - : { ...r, [i[0]]: toJson_JsonSchemaProps(i[1]) }, - {}, - ), - properties: - obj.properties === undefined - ? undefined - : Object.entries(obj.properties).reduce( - (r, i) => - i[1] === undefined - ? r - : { ...r, [i[0]]: toJson_JsonSchemaProps(i[1]) }, - {}, - ), - required: obj.required?.map((y) => y), - title: obj.title, - type: obj.type, - uniqueItems: obj.uniqueItems, - "x-kubernetes-embedded-resource": obj.xKubernetesEmbeddedResource, - "x-kubernetes-int-or-string": obj.xKubernetesIntOrString, - "x-kubernetes-list-map-keys": obj.xKubernetesListMapKeys?.map((y) => y), - "x-kubernetes-list-type": obj.xKubernetesListType, - "x-kubernetes-map-type": obj.xKubernetesMapType, - "x-kubernetes-preserve-unknown-fields": - obj.xKubernetesPreserveUnknownFields, - "x-kubernetes-validations": obj.xKubernetesValidations?.map((y) => - toJson_ValidationRule(y), - ), - }; - // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); +export function toJson_JsonSchemaProps(obj: JsonSchemaProps | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + '$ref': obj.ref, + '$schema': obj.schema, + 'additionalItems': obj.additionalItems, + 'additionalProperties': obj.additionalProperties, + 'allOf': obj.allOf?.map(y => toJson_JsonSchemaProps(y)), + 'anyOf': obj.anyOf?.map(y => toJson_JsonSchemaProps(y)), + 'default': obj.default, + 'definitions': ((obj.definitions) === undefined) ? undefined : (Object.entries(obj.definitions).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: toJson_JsonSchemaProps(i[1]) }), {})), + 'dependencies': ((obj.dependencies) === undefined) ? undefined : (Object.entries(obj.dependencies).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {})), + 'description': obj.description, + 'enum': obj.enum?.map(y => y), + 'example': obj.example, + 'exclusiveMaximum': obj.exclusiveMaximum, + 'exclusiveMinimum': obj.exclusiveMinimum, + 'externalDocs': toJson_ExternalDocumentation(obj.externalDocs), + 'format': obj.format, + 'id': obj.id, + 'items': obj.items, + 'maxItems': obj.maxItems, + 'maxLength': obj.maxLength, + 'maxProperties': obj.maxProperties, + 'maximum': obj.maximum, + 'minItems': obj.minItems, + 'minLength': obj.minLength, + 'minProperties': obj.minProperties, + 'minimum': obj.minimum, + 'multipleOf': obj.multipleOf, + 'not': toJson_JsonSchemaProps(obj.not), + 'nullable': obj.nullable, + 'oneOf': obj.oneOf?.map(y => toJson_JsonSchemaProps(y)), + 'pattern': obj.pattern, + 'patternProperties': ((obj.patternProperties) === undefined) ? undefined : (Object.entries(obj.patternProperties).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: toJson_JsonSchemaProps(i[1]) }), {})), + 'properties': ((obj.properties) === undefined) ? undefined : (Object.entries(obj.properties).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: toJson_JsonSchemaProps(i[1]) }), {})), + 'required': obj.required?.map(y => y), + 'title': obj.title, + 'type': obj.type, + 'uniqueItems': obj.uniqueItems, + 'x-kubernetes-embedded-resource': obj.xKubernetesEmbeddedResource, + 'x-kubernetes-int-or-string': obj.xKubernetesIntOrString, + 'x-kubernetes-list-map-keys': obj.xKubernetesListMapKeys?.map(y => y), + 'x-kubernetes-list-type': obj.xKubernetesListType, + 'x-kubernetes-map-type': obj.xKubernetesMapType, + 'x-kubernetes-preserve-unknown-fields': obj.xKubernetesPreserveUnknownFields, + 'x-kubernetes-validations': obj.xKubernetesValidations?.map(y => toJson_ValidationRule(y)), + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31796,28 +29965,22 @@ export interface CustomResourceSubresourceScale { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale#statusReplicasPath */ readonly statusReplicasPath: string; + } /** * Converts an object of type 'CustomResourceSubresourceScale' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_CustomResourceSubresourceScale( - obj: CustomResourceSubresourceScale | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_CustomResourceSubresourceScale(obj: CustomResourceSubresourceScale | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - labelSelectorPath: obj.labelSelectorPath, - specReplicasPath: obj.specReplicasPath, - statusReplicasPath: obj.statusReplicasPath, + 'labelSelectorPath': obj.labelSelectorPath, + 'specReplicasPath': obj.specReplicasPath, + 'statusReplicasPath': obj.statusReplicasPath, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31847,28 +30010,22 @@ export interface ConfigMapKeySelector { * @schema io.k8s.api.core.v1.ConfigMapKeySelector#optional */ readonly optional?: boolean; + } /** * Converts an object of type 'ConfigMapKeySelector' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ConfigMapKeySelector( - obj: ConfigMapKeySelector | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ConfigMapKeySelector(obj: ConfigMapKeySelector | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - key: obj.key, - name: obj.name, - optional: obj.optional, + 'key': obj.key, + 'name': obj.name, + 'optional': obj.optional, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31891,27 +30048,21 @@ export interface ObjectFieldSelector { * @schema io.k8s.api.core.v1.ObjectFieldSelector#fieldPath */ readonly fieldPath: string; + } /** * Converts an object of type 'ObjectFieldSelector' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ObjectFieldSelector( - obj: ObjectFieldSelector | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ObjectFieldSelector(obj: ObjectFieldSelector | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - apiVersion: obj.apiVersion, - fieldPath: obj.fieldPath, + 'apiVersion': obj.apiVersion, + 'fieldPath': obj.fieldPath, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31941,28 +30092,22 @@ export interface ResourceFieldSelector { * @schema io.k8s.api.core.v1.ResourceFieldSelector#resource */ readonly resource: string; + } /** * Converts an object of type 'ResourceFieldSelector' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ResourceFieldSelector( - obj: ResourceFieldSelector | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ResourceFieldSelector(obj: ResourceFieldSelector | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - containerName: obj.containerName, - divisor: obj.divisor?.value, - resource: obj.resource, + 'containerName': obj.containerName, + 'divisor': obj.divisor?.value, + 'resource': obj.resource, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -31992,28 +30137,51 @@ export interface SecretKeySelector { * @schema io.k8s.api.core.v1.SecretKeySelector#optional */ readonly optional?: boolean; + } /** * Converts an object of type 'SecretKeySelector' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SecretKeySelector( - obj: SecretKeySelector | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SecretKeySelector(obj: SecretKeySelector | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'key': obj.key, + 'name': obj.name, + 'optional': obj.optional, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * SleepAction describes a "sleep" action. + * + * @schema io.k8s.api.core.v1.SleepAction + */ +export interface SleepAction { + /** + * Seconds is the number of seconds to sleep. + * + * @schema io.k8s.api.core.v1.SleepAction#seconds + */ + readonly seconds: number; + +} + +/** + * Converts an object of type 'SleepAction' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_SleepAction(obj: SleepAction | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - key: obj.key, - name: obj.name, - optional: obj.optional, + 'seconds': obj.seconds, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -32024,7 +30192,7 @@ export function toJson_SecretKeySelector( */ export interface HttpHeader { /** - * The header field name + * The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. * * @schema io.k8s.api.core.v1.HTTPHeader#name */ @@ -32036,27 +30204,82 @@ export interface HttpHeader { * @schema io.k8s.api.core.v1.HTTPHeader#value */ readonly value: string; + } /** * Converts an object of type 'HttpHeader' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_HttpHeader( - obj: HttpHeader | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_HttpHeader(obj: HttpHeader | undefined): Record | undefined { + if (obj === undefined) { return undefined; } + const result = { + 'name': obj.name, + 'value': obj.value, + }; + // filter undefined values + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); +} +/* eslint-enable max-len, quote-props */ + +/** + * ClusterTrustBundleProjection describes how to select a set of ClusterTrustBundle objects and project their contents into the pod filesystem. + * + * @schema io.k8s.api.core.v1.ClusterTrustBundleProjection + */ +export interface ClusterTrustBundleProjection { + /** + * Select all ClusterTrustBundles that match this label selector. Only has effect if signerName is set. Mutually-exclusive with name. If unset, interpreted as "match nothing". If set but empty, interpreted as "match everything". + * + * @schema io.k8s.api.core.v1.ClusterTrustBundleProjection#labelSelector + */ + readonly labelSelector?: LabelSelector; + + /** + * Select a single ClusterTrustBundle by object name. Mutually-exclusive with signerName and labelSelector. + * + * @schema io.k8s.api.core.v1.ClusterTrustBundleProjection#name + */ + readonly name?: string; + + /** + * If true, don't block pod startup if the referenced ClusterTrustBundle(s) aren't available. If using name, then the named ClusterTrustBundle is allowed not to exist. If using signerName, then the combination of signerName and labelSelector is allowed to match zero ClusterTrustBundles. + * + * @schema io.k8s.api.core.v1.ClusterTrustBundleProjection#optional + */ + readonly optional?: boolean; + + /** + * Relative path from the volume root to write the bundle. + * + * @schema io.k8s.api.core.v1.ClusterTrustBundleProjection#path + */ + readonly path: string; + + /** + * Select all ClusterTrustBundles that match this signer name. Mutually-exclusive with name. The contents of all selected ClusterTrustBundles will be unified and deduplicated. + * + * @schema io.k8s.api.core.v1.ClusterTrustBundleProjection#signerName + */ + readonly signerName?: string; + +} + +/** + * Converts an object of type 'ClusterTrustBundleProjection' to JSON representation. + */ +/* eslint-disable max-len, quote-props */ +export function toJson_ClusterTrustBundleProjection(obj: ClusterTrustBundleProjection | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - name: obj.name, - value: obj.value, + 'labelSelector': toJson_LabelSelector(obj.labelSelector), + 'name': obj.name, + 'optional': obj.optional, + 'path': obj.path, + 'signerName': obj.signerName, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -32088,28 +30311,22 @@ export interface ConfigMapProjection { * @schema io.k8s.api.core.v1.ConfigMapProjection#optional */ readonly optional?: boolean; + } /** * Converts an object of type 'ConfigMapProjection' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ConfigMapProjection( - obj: ConfigMapProjection | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ConfigMapProjection(obj: ConfigMapProjection | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - items: obj.items?.map((y) => toJson_KeyToPath(y)), - name: obj.name, - optional: obj.optional, + 'items': obj.items?.map(y => toJson_KeyToPath(y)), + 'name': obj.name, + 'optional': obj.optional, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -32125,26 +30342,20 @@ export interface DownwardApiProjection { * @schema io.k8s.api.core.v1.DownwardAPIProjection#items */ readonly items?: DownwardApiVolumeFile[]; + } /** * Converts an object of type 'DownwardApiProjection' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_DownwardApiProjection( - obj: DownwardApiProjection | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_DownwardApiProjection(obj: DownwardApiProjection | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - items: obj.items?.map((y) => toJson_DownwardApiVolumeFile(y)), + 'items': obj.items?.map(y => toJson_DownwardApiVolumeFile(y)), }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -32176,28 +30387,22 @@ export interface SecretProjection { * @schema io.k8s.api.core.v1.SecretProjection#optional */ readonly optional?: boolean; + } /** * Converts an object of type 'SecretProjection' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_SecretProjection( - obj: SecretProjection | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_SecretProjection(obj: SecretProjection | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - items: obj.items?.map((y) => toJson_KeyToPath(y)), - name: obj.name, - optional: obj.optional, + 'items': obj.items?.map(y => toJson_KeyToPath(y)), + 'name': obj.name, + 'optional': obj.optional, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -32228,28 +30433,22 @@ export interface ServiceAccountTokenProjection { * @schema io.k8s.api.core.v1.ServiceAccountTokenProjection#path */ readonly path: string; + } /** * Converts an object of type 'ServiceAccountTokenProjection' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ServiceAccountTokenProjection( - obj: ServiceAccountTokenProjection | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ServiceAccountTokenProjection(obj: ServiceAccountTokenProjection | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - audience: obj.audience, - expirationSeconds: obj.expirationSeconds, - path: obj.path, + 'audience': obj.audience, + 'expirationSeconds': obj.expirationSeconds, + 'path': obj.path, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -32268,27 +30467,21 @@ export interface ExternalDocumentation { * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation#url */ readonly url?: string; + } /** * Converts an object of type 'ExternalDocumentation' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ExternalDocumentation( - obj: ExternalDocumentation | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ExternalDocumentation(obj: ExternalDocumentation | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - description: obj.description, - url: obj.url, + 'description': obj.description, + 'url': obj.url, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ @@ -32298,6 +30491,13 @@ export function toJson_ExternalDocumentation( * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule */ export interface ValidationRule { + /** + * fieldPath represents the field path returned when the validation fails. It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` It does not support list numeric index. It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. Numeric index of array is not supported. For field name which contains special characters, use `['specialName']` to refer the field name. e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` + * + * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule#fieldPath + */ + readonly fieldPath?: string; + /** * Message represents the message displayed when validation fails. The message is required if the Rule contains line breaks. The message must not contain line breaks. If unset, the message is "failed rule: {Rule}". e.g. "must be a URL with the host matching spec.host" * @@ -32312,6 +30512,26 @@ export interface ValidationRule { */ readonly messageExpression?: string; + /** + * optionalOldSelf is used to opt a transition rule into evaluation even when the object is first created, or if the old object is missing the value. + * + * When enabled `oldSelf` will be a CEL optional whose value will be `None` if there is no old value, or when the object is initially created. + * + * You may check for presence of oldSelf using `oldSelf.hasValue()` and unwrap it after checking using `oldSelf.value()`. Check the CEL documentation for Optional types for more information: https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes + * + * May not be set unless `oldSelf` is used in `rule`. + * + * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule#optionalOldSelf + */ + readonly optionalOldSelf?: boolean; + + /** + * reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". If not set, default to use "FieldValueInvalid". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. + * + * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule#reason + */ + readonly reason?: string; + /** * Rule represents the expression which will be evaluated by CEL. ref: https://github.com/google/cel-spec The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. The `self` variable in the CEL expression is bound to the scoped value. Example: - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} * @@ -32339,30 +30559,36 @@ export interface ValidationRule { * are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with * non-intersecting keys are appended, retaining their partial order. * + * If `rule` makes use of the `oldSelf` variable it is implicitly a `transition rule`. + * + * By default, the `oldSelf` variable is the same type as `self`. When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional + * variable whose value() is the same type as `self`. + * See the documentation for the `optionalOldSelf` field for details. + * + * Transition rules by default are applied only on UPDATE requests and are skipped if an old value could not be found. You can opt a transition rule into unconditional evaluation by setting `optionalOldSelf` to true. + * * @schema io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule#rule */ readonly rule: string; + } /** * Converts an object of type 'ValidationRule' to JSON representation. */ /* eslint-disable max-len, quote-props */ -export function toJson_ValidationRule( - obj: ValidationRule | undefined, -): Record | undefined { - if (obj === undefined) { - return undefined; - } +export function toJson_ValidationRule(obj: ValidationRule | undefined): Record | undefined { + if (obj === undefined) { return undefined; } const result = { - message: obj.message, - messageExpression: obj.messageExpression, - rule: obj.rule, + 'fieldPath': obj.fieldPath, + 'message': obj.message, + 'messageExpression': obj.messageExpression, + 'optionalOldSelf': obj.optionalOldSelf, + 'reason': obj.reason, + 'rule': obj.rule, }; // filter undefined values - return Object.entries(result).reduce( - (r, i) => (i[1] === undefined ? r : { ...r, [i[0]]: i[1] }), - {}, - ); + return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {}); } /* eslint-enable max-len, quote-props */ +