From 0eb3a4489a603da5b0ec340368c275c051934f21 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Fri, 26 Jul 2024 16:24:00 +0200 Subject: [PATCH] refactor: kubernetes-model-extensions generated from OpenAPI schemas Signed-off-by: Marc Nuri --- Makefile | 1 + .../client/impl/URLFromIngressImplTest.java | 1 - .../internal/URLFromServiceUtilTest.java | 1 - kubernetes-model-generator/generateModel.sh | 1 - .../kubernetes-model-extensions/Makefile | 27 -- .../cmd/generate/generate.go | 112 ----- .../kubernetes-model-extensions/pom.xml | 38 +- .../kubernetes/api/model/KubeSchema.java | 403 ---------------- .../api/model/ValidationSchema.java | 403 ---------------- .../model/extensions/AllowedCSIDriver.java | 108 +++++ .../model/extensions/AllowedFlexVolume.java | 108 +++++ ...ssPortStatus.java => AllowedHostPath.java} | 66 +-- .../api/model/extensions/DaemonSet.java | 11 +- .../api/model/extensions/DaemonSetSpec.java | 20 +- .../api/model/extensions/Deployment.java | 11 +- .../model/extensions/DeploymentRollback.java | 43 +- .../api/model/extensions/DeploymentSpec.java | 20 +- ...tatus.java => FSGroupStrategyOptions.java} | 46 +- .../api/model/extensions/HTTPIngressPath.java | 18 +- .../api/model/extensions/HostPortRange.java | 122 +++++ .../api/model/extensions/IDRange.java | 122 +++++ .../api/model/extensions/Ingress.java | 11 +- .../api/model/extensions/IngressBackend.java | 26 +- .../api/model/extensions/IngressSpec.java | 16 +- .../api/model/extensions/IngressStatus.java | 9 +- .../api/model/extensions/NetworkPolicy.java | 11 +- .../model/extensions/NetworkPolicyPeer.java | 17 +- .../model/extensions/NetworkPolicyPort.java | 25 +- .../model/extensions/NetworkPolicySpec.java | 11 +- .../model/extensions/PodSecurityPolicy.java | 189 ++++++++ .../extensions/PodSecurityPolicyList.java | 195 ++++++++ .../extensions/PodSecurityPolicySpec.java | 454 ++++++++++++++++++ .../api/model/extensions/ReplicaSet.java | 11 +- .../api/model/extensions/ReplicaSetSpec.java | 20 +- .../extensions/RollingUpdateDaemonSet.java | 25 +- .../extensions/RollingUpdateDeployment.java | 17 +- ...ss.java => RunAsGroupStrategyOptions.java} | 68 ++- .../extensions/RunAsUserStrategyOptions.java | 126 +++++ .../RuntimeClassStrategyOptions.java | 126 +++++ .../extensions/SELinuxStrategyOptions.java | 123 +++++ .../api/model/extensions/Scale.java | 204 ++++++++ .../api/model/extensions/ScaleSpec.java | 108 +++++ .../api/model/extensions/ScaleStatus.java | 138 ++++++ .../SupplementalGroupsStrategyOptions.java | 126 +++++ .../generator/model/KubernetesTest.java | 23 - 45 files changed, 2463 insertions(+), 1298 deletions(-) delete mode 100644 kubernetes-model-generator/kubernetes-model-extensions/Makefile delete mode 100644 kubernetes-model-generator/kubernetes-model-extensions/cmd/generate/generate.go delete mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java delete mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedCSIDriver.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedFlexVolume.java rename kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/{IngressPortStatus.java => AllowedHostPath.java} (71%) rename kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/{IngressLoadBalancerStatus.java => FSGroupStrategyOptions.java} (76%) create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HostPortRange.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IDRange.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicy.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicyList.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicySpec.java rename kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/{IngressLoadBalancerIngress.java => RunAsGroupStrategyOptions.java} (70%) create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RunAsUserStrategyOptions.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RuntimeClassStrategyOptions.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SELinuxStrategyOptions.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Scale.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleSpec.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleStatus.java create mode 100644 kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SupplementalGroupsStrategyOptions.java diff --git a/Makefile b/Makefile index 7a5e2707b7c..4cf986a51f5 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ generate-openapi-classes: cd kubernetes-model-generator/kubernetes-model-coordination && mvn -Pgenerate clean install cd kubernetes-model-generator/kubernetes-model-discovery && mvn -Pgenerate clean install cd kubernetes-model-generator/kubernetes-model-events && mvn -Pgenerate clean install + cd kubernetes-model-generator/kubernetes-model-extensions && mvn -Pgenerate clean install # Legacy generation of the model: TODO: remove .PHONY: generate-model-legacy diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/impl/URLFromIngressImplTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/impl/URLFromIngressImplTest.java index 562db781a41..aab725a53d7 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/impl/URLFromIngressImplTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/impl/URLFromIngressImplTest.java @@ -173,7 +173,6 @@ private io.fabric8.kubernetes.api.model.extensions.IngressBuilder createNewExten .withNewHttp() .addNewPath() .withPath("/testpath") - .withPathType("Prefix") .withNewBackend() .withServiceName("svc1") .withServicePort(new IntOrString(80)) diff --git a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/internal/URLFromServiceUtilTest.java b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/internal/URLFromServiceUtilTest.java index 6fcc8b1c8bf..b708c431f27 100644 --- a/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/internal/URLFromServiceUtilTest.java +++ b/kubernetes-client/src/test/java/io/fabric8/kubernetes/client/utils/internal/URLFromServiceUtilTest.java @@ -375,7 +375,6 @@ private io.fabric8.kubernetes.api.model.extensions.IngressBuilder createNewExten .withNewHttp() .addNewPath() .withPath("/testpath") - .withPathType("Prefix") .withNewBackend() .withServiceName("svc1") .withServicePort(new IntOrString("http")) diff --git a/kubernetes-model-generator/generateModel.sh b/kubernetes-model-generator/generateModel.sh index 6c9258aacd3..b03f8eb8cbc 100755 --- a/kubernetes-model-generator/generateModel.sh +++ b/kubernetes-model-generator/generateModel.sh @@ -22,7 +22,6 @@ ABSOLUTE_BASEDIR=$(realpath "$BASEDIR") # Array for all existing modules declare -a modules=( - "kubernetes-model-extensions" "kubernetes-model-flowcontrol" "kubernetes-model-gatewayapi" "kubernetes-model-networking" diff --git a/kubernetes-model-generator/kubernetes-model-extensions/Makefile b/kubernetes-model-generator/kubernetes-model-extensions/Makefile deleted file mode 100644 index c09a7003874..00000000000 --- a/kubernetes-model-generator/kubernetes-model-extensions/Makefile +++ /dev/null @@ -1,27 +0,0 @@ -# -# Copyright (C) 2015 Red Hat, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -SHELL := /bin/bash - -all: build - -build: gobuild - mvn -Pgenerate clean install -DskipTests - -gobuild: - CGO_ENABLED=0 GO15VENDOREXPERIMENT=1 go build -a ./cmd/generate/generate.go - ./generate > src/main/resources/schema/kube-schema.json - ./generate validation > src/main/resources/schema/validation-schema.json diff --git a/kubernetes-model-generator/kubernetes-model-extensions/cmd/generate/generate.go b/kubernetes-model-generator/kubernetes-model-extensions/cmd/generate/generate.go deleted file mode 100644 index c4c6fdb30a0..00000000000 --- a/kubernetes-model-generator/kubernetes-model-extensions/cmd/generate/generate.go +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Copyright (C) 2015 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package main - -import ( - "bytes" - "encoding/json" - "fmt" - // Dependencies of rbac - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/api/resource" - apimachineryversion "k8s.io/apimachinery/pkg/version" - kapi "k8s.io/api/core/v1" - - extensions "k8s.io/api/extensions/v1beta1" - - "log" - "reflect" - "strings" - "time" - - "os" - - "github.com/fabric8io/kubernetes-client/kubernetes-model-generator/pkg/schemagen" -) - -type Schema struct { - Info apimachineryversion.Info - APIGroup metav1.APIGroup - APIGroupList metav1.APIGroupList - BaseKubernetesList metav1.List - ObjectMeta metav1.ObjectMeta - TypeMeta metav1.TypeMeta - Status metav1.Status - Patch metav1.Patch - ListOptions metav1.ListOptions - DeleteOptions metav1.DeleteOptions - CreateOptions metav1.CreateOptions - UpdateOptions metav1.UpdateOptions - GetOptions metav1.GetOptions - PatchOptions metav1.PatchOptions - Time metav1.Time - RootPaths metav1.RootPaths - Quantity resource.Quantity - ObjectReference kapi.ObjectReference - - Ingress extensions.Ingress - IngressList extensions.IngressList - DeploymentRollback extensions.DeploymentRollback - DaemonSet extensions.DaemonSet - DaemonSetList extensions.DaemonSetList - NetworkPolicy extensions.NetworkPolicy - NetworkPolicyList extensions.NetworkPolicyList - Deployment extensions.Deployment - DeploymentList extensions.DeploymentList - ReplicaSet extensions.ReplicaSet - ReplicaSetList extensions.ReplicaSetList -} - -func main() { - packages := []schemagen.PackageDescriptor{ - {"k8s.io/apimachinery/pkg/util/intstr", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_pkg_util_intstr_", false}, - {"k8s.io/apimachinery/pkg/runtime", "", "io.fabric8.kubernetes.api.model.runtime", "kubernetes_apimachinery_pkg_runtime_", false}, - {"k8s.io/apimachinery/pkg/version", "", "io.fabric8.kubernetes.api.model.version", "kubernetes_apimachinery_pkg_version_", false}, - {"k8s.io/apimachinery/pkg/apis/meta/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_", false}, - {"k8s.io/api/core/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_core_", false}, - {"k8s.io/api/extensions/v1beta1", "", "io.fabric8.kubernetes.api.model.extensions", "kubernetes_extensions_", true}, - } - - typeMap := map[reflect.Type]reflect.Type{ - reflect.TypeOf(time.Time{}): reflect.TypeOf(""), - reflect.TypeOf(struct{}{}): reflect.TypeOf(""), - } - schema, err := schemagen.GenerateSchema(reflect.TypeOf(Schema{}), packages, typeMap, map[reflect.Type]string{},"extensions") - if err != nil { - fmt.Fprintf(os.Stderr, "An error occurred: %v", err) - return - } - - args := os.Args[1:] - if len(args) < 1 || args[0] != "validation" { - schema.Resources = nil - } - - b, err := json.Marshal(&schema) - if err != nil { - log.Fatal(err) - } - result := string(b) - result = strings.Replace(result, "\"additionalProperty\":", "\"additionalProperties\":", -1) - - var out bytes.Buffer - err = json.Indent(&out, []byte(result), "", " ") - if err != nil { - log.Fatal(err) - } - - fmt.Println(out.String()) -} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/pom.xml b/kubernetes-model-generator/kubernetes-model-extensions/pom.xml index 90c17465125..ce377e9f3a3 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/pom.xml +++ b/kubernetes-model-generator/kubernetes-model-extensions/pom.xml @@ -41,37 +41,29 @@ io.fabric8 kubernetes-model-core - - io.fabric8 - kubernetes-model-common - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - false - - - - - - - generate - org.jsonschema2pojo - jsonschema2pojo-maven-plugin + io.fabric8 + openapi-model-generator-maven-plugin + + + + ${project.basedir}/../openapi/schemas/kubernetes-1.17.17.json + + + io.fabric8.kubernetes.api.model.extensions + + + ^io\.k8s\.api\.extensions\..*$ + + + diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java deleted file mode 100644 index e17ea4d9eaf..00000000000 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ /dev/null @@ -1,403 +0,0 @@ - -package io.fabric8.kubernetes.api.model; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.fabric8.kubernetes.api.model.extensions.DaemonSet; -import io.fabric8.kubernetes.api.model.extensions.DaemonSetList; -import io.fabric8.kubernetes.api.model.extensions.Deployment; -import io.fabric8.kubernetes.api.model.extensions.DeploymentList; -import io.fabric8.kubernetes.api.model.extensions.DeploymentRollback; -import io.fabric8.kubernetes.api.model.extensions.Ingress; -import io.fabric8.kubernetes.api.model.extensions.IngressList; -import io.fabric8.kubernetes.api.model.extensions.NetworkPolicy; -import io.fabric8.kubernetes.api.model.extensions.NetworkPolicyList; -import io.fabric8.kubernetes.api.model.extensions.ReplicaSet; -import io.fabric8.kubernetes.api.model.extensions.ReplicaSetList; -import io.fabric8.kubernetes.api.model.version.Info; - -@Generated("jsonschema2pojo") -public class KubeSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private CreateOptions createOptions; - private DaemonSet daemonSet; - private DaemonSetList daemonSetList; - private DeleteOptions deleteOptions; - private Deployment deployment; - private DeploymentList deploymentList; - private DeploymentRollback deploymentRollback; - private GetOptions getOptions; - private Info info; - private Ingress ingress; - private IngressList ingressList; - private ListOptions listOptions; - private NetworkPolicy networkPolicy; - private NetworkPolicyList networkPolicyList; - private ObjectMeta objectMeta; - private ObjectReference objectReference; - private Patch patch; - private PatchOptions patchOptions; - private Quantity quantity; - private ReplicaSet replicaSet; - private ReplicaSetList replicaSetList; - private RootPaths rootPaths; - private Status status; - private String time; - private TypeMeta typeMeta; - private UpdateOptions updateOptions; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public KubeSchema() { - } - - public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, CreateOptions createOptions, DaemonSet daemonSet, DaemonSetList daemonSetList, DeleteOptions deleteOptions, Deployment deployment, DeploymentList deploymentList, DeploymentRollback deploymentRollback, GetOptions getOptions, Info info, Ingress ingress, IngressList ingressList, ListOptions listOptions, NetworkPolicy networkPolicy, NetworkPolicyList networkPolicyList, ObjectMeta objectMeta, ObjectReference objectReference, Patch patch, PatchOptions patchOptions, Quantity quantity, ReplicaSet replicaSet, ReplicaSetList replicaSetList, RootPaths rootPaths, Status status, String time, TypeMeta typeMeta, UpdateOptions updateOptions) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.createOptions = createOptions; - this.daemonSet = daemonSet; - this.daemonSetList = daemonSetList; - this.deleteOptions = deleteOptions; - this.deployment = deployment; - this.deploymentList = deploymentList; - this.deploymentRollback = deploymentRollback; - this.getOptions = getOptions; - this.info = info; - this.ingress = ingress; - this.ingressList = ingressList; - this.listOptions = listOptions; - this.networkPolicy = networkPolicy; - this.networkPolicyList = networkPolicyList; - this.objectMeta = objectMeta; - this.objectReference = objectReference; - this.patch = patch; - this.patchOptions = patchOptions; - this.quantity = quantity; - this.replicaSet = replicaSet; - this.replicaSetList = replicaSetList; - this.rootPaths = rootPaths; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - this.updateOptions = updateOptions; - } - - @JsonProperty("APIGroup") - public APIGroup getAPIGroup() { - return aPIGroup; - } - - @JsonProperty("APIGroup") - public void setAPIGroup(APIGroup aPIGroup) { - this.aPIGroup = aPIGroup; - } - - @JsonProperty("APIGroupList") - public APIGroupList getAPIGroupList() { - return aPIGroupList; - } - - @JsonProperty("APIGroupList") - public void setAPIGroupList(APIGroupList aPIGroupList) { - this.aPIGroupList = aPIGroupList; - } - - @JsonProperty("BaseKubernetesList") - public KubernetesList getBaseKubernetesList() { - return baseKubernetesList; - } - - @JsonProperty("BaseKubernetesList") - public void setBaseKubernetesList(KubernetesList baseKubernetesList) { - this.baseKubernetesList = baseKubernetesList; - } - - @JsonProperty("CreateOptions") - public CreateOptions getCreateOptions() { - return createOptions; - } - - @JsonProperty("CreateOptions") - public void setCreateOptions(CreateOptions createOptions) { - this.createOptions = createOptions; - } - - @JsonProperty("DaemonSet") - public DaemonSet getDaemonSet() { - return daemonSet; - } - - @JsonProperty("DaemonSet") - public void setDaemonSet(DaemonSet daemonSet) { - this.daemonSet = daemonSet; - } - - @JsonProperty("DaemonSetList") - public DaemonSetList getDaemonSetList() { - return daemonSetList; - } - - @JsonProperty("DaemonSetList") - public void setDaemonSetList(DaemonSetList daemonSetList) { - this.daemonSetList = daemonSetList; - } - - @JsonProperty("DeleteOptions") - public DeleteOptions getDeleteOptions() { - return deleteOptions; - } - - @JsonProperty("DeleteOptions") - public void setDeleteOptions(DeleteOptions deleteOptions) { - this.deleteOptions = deleteOptions; - } - - @JsonProperty("Deployment") - public Deployment getDeployment() { - return deployment; - } - - @JsonProperty("Deployment") - public void setDeployment(Deployment deployment) { - this.deployment = deployment; - } - - @JsonProperty("DeploymentList") - public DeploymentList getDeploymentList() { - return deploymentList; - } - - @JsonProperty("DeploymentList") - public void setDeploymentList(DeploymentList deploymentList) { - this.deploymentList = deploymentList; - } - - @JsonProperty("DeploymentRollback") - public DeploymentRollback getDeploymentRollback() { - return deploymentRollback; - } - - @JsonProperty("DeploymentRollback") - public void setDeploymentRollback(DeploymentRollback deploymentRollback) { - this.deploymentRollback = deploymentRollback; - } - - @JsonProperty("GetOptions") - public GetOptions getGetOptions() { - return getOptions; - } - - @JsonProperty("GetOptions") - public void setGetOptions(GetOptions getOptions) { - this.getOptions = getOptions; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("Ingress") - public Ingress getIngress() { - return ingress; - } - - @JsonProperty("Ingress") - public void setIngress(Ingress ingress) { - this.ingress = ingress; - } - - @JsonProperty("IngressList") - public IngressList getIngressList() { - return ingressList; - } - - @JsonProperty("IngressList") - public void setIngressList(IngressList ingressList) { - this.ingressList = ingressList; - } - - @JsonProperty("ListOptions") - public ListOptions getListOptions() { - return listOptions; - } - - @JsonProperty("ListOptions") - public void setListOptions(ListOptions listOptions) { - this.listOptions = listOptions; - } - - @JsonProperty("NetworkPolicy") - public NetworkPolicy getNetworkPolicy() { - return networkPolicy; - } - - @JsonProperty("NetworkPolicy") - public void setNetworkPolicy(NetworkPolicy networkPolicy) { - this.networkPolicy = networkPolicy; - } - - @JsonProperty("NetworkPolicyList") - public NetworkPolicyList getNetworkPolicyList() { - return networkPolicyList; - } - - @JsonProperty("NetworkPolicyList") - public void setNetworkPolicyList(NetworkPolicyList networkPolicyList) { - this.networkPolicyList = networkPolicyList; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("ObjectReference") - public ObjectReference getObjectReference() { - return objectReference; - } - - @JsonProperty("ObjectReference") - public void setObjectReference(ObjectReference objectReference) { - this.objectReference = objectReference; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @JsonProperty("PatchOptions") - public PatchOptions getPatchOptions() { - return patchOptions; - } - - @JsonProperty("PatchOptions") - public void setPatchOptions(PatchOptions patchOptions) { - this.patchOptions = patchOptions; - } - - @JsonProperty("Quantity") - public Quantity getQuantity() { - return quantity; - } - - @JsonProperty("Quantity") - public void setQuantity(Quantity quantity) { - this.quantity = quantity; - } - - @JsonProperty("ReplicaSet") - public ReplicaSet getReplicaSet() { - return replicaSet; - } - - @JsonProperty("ReplicaSet") - public void setReplicaSet(ReplicaSet replicaSet) { - this.replicaSet = replicaSet; - } - - @JsonProperty("ReplicaSetList") - public ReplicaSetList getReplicaSetList() { - return replicaSetList; - } - - @JsonProperty("ReplicaSetList") - public void setReplicaSetList(ReplicaSetList replicaSetList) { - this.replicaSetList = replicaSetList; - } - - @JsonProperty("RootPaths") - public RootPaths getRootPaths() { - return rootPaths; - } - - @JsonProperty("RootPaths") - public void setRootPaths(RootPaths rootPaths) { - this.rootPaths = rootPaths; - } - - @JsonProperty("Status") - public Status getStatus() { - return status; - } - - @JsonProperty("Status") - public void setStatus(Status status) { - this.status = status; - } - - @JsonProperty("Time") - public String getTime() { - return time; - } - - @JsonProperty("Time") - public void setTime(String time) { - this.time = time; - } - - @JsonProperty("TypeMeta") - public TypeMeta getTypeMeta() { - return typeMeta; - } - - @JsonProperty("TypeMeta") - public void setTypeMeta(TypeMeta typeMeta) { - this.typeMeta = typeMeta; - } - - @JsonProperty("UpdateOptions") - public UpdateOptions getUpdateOptions() { - return updateOptions; - } - - @JsonProperty("UpdateOptions") - public void setUpdateOptions(UpdateOptions updateOptions) { - this.updateOptions = updateOptions; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - -} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java deleted file mode 100644 index 2f194aeb828..00000000000 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java +++ /dev/null @@ -1,403 +0,0 @@ - -package io.fabric8.kubernetes.api.model; - -import java.util.LinkedHashMap; -import java.util.Map; -import javax.annotation.Generated; -import com.fasterxml.jackson.annotation.JsonAnyGetter; -import com.fasterxml.jackson.annotation.JsonAnySetter; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import io.fabric8.kubernetes.api.model.extensions.DaemonSet; -import io.fabric8.kubernetes.api.model.extensions.DaemonSetList; -import io.fabric8.kubernetes.api.model.extensions.Deployment; -import io.fabric8.kubernetes.api.model.extensions.DeploymentList; -import io.fabric8.kubernetes.api.model.extensions.DeploymentRollback; -import io.fabric8.kubernetes.api.model.extensions.Ingress; -import io.fabric8.kubernetes.api.model.extensions.IngressList; -import io.fabric8.kubernetes.api.model.extensions.NetworkPolicy; -import io.fabric8.kubernetes.api.model.extensions.NetworkPolicyList; -import io.fabric8.kubernetes.api.model.extensions.ReplicaSet; -import io.fabric8.kubernetes.api.model.extensions.ReplicaSetList; -import io.fabric8.kubernetes.api.model.version.Info; - -@Generated("jsonschema2pojo") -public class ValidationSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private CreateOptions createOptions; - private DaemonSet daemonSet; - private DaemonSetList daemonSetList; - private DeleteOptions deleteOptions; - private Deployment deployment; - private DeploymentList deploymentList; - private DeploymentRollback deploymentRollback; - private GetOptions getOptions; - private Info info; - private Ingress ingress; - private IngressList ingressList; - private ListOptions listOptions; - private NetworkPolicy networkPolicy; - private NetworkPolicyList networkPolicyList; - private ObjectMeta objectMeta; - private ObjectReference objectReference; - private Patch patch; - private PatchOptions patchOptions; - private Quantity quantity; - private ReplicaSet replicaSet; - private ReplicaSetList replicaSetList; - private RootPaths rootPaths; - private Status status; - private String time; - private TypeMeta typeMeta; - private UpdateOptions updateOptions; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ValidationSchema() { - } - - public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, CreateOptions createOptions, DaemonSet daemonSet, DaemonSetList daemonSetList, DeleteOptions deleteOptions, Deployment deployment, DeploymentList deploymentList, DeploymentRollback deploymentRollback, GetOptions getOptions, Info info, Ingress ingress, IngressList ingressList, ListOptions listOptions, NetworkPolicy networkPolicy, NetworkPolicyList networkPolicyList, ObjectMeta objectMeta, ObjectReference objectReference, Patch patch, PatchOptions patchOptions, Quantity quantity, ReplicaSet replicaSet, ReplicaSetList replicaSetList, RootPaths rootPaths, Status status, String time, TypeMeta typeMeta, UpdateOptions updateOptions) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.createOptions = createOptions; - this.daemonSet = daemonSet; - this.daemonSetList = daemonSetList; - this.deleteOptions = deleteOptions; - this.deployment = deployment; - this.deploymentList = deploymentList; - this.deploymentRollback = deploymentRollback; - this.getOptions = getOptions; - this.info = info; - this.ingress = ingress; - this.ingressList = ingressList; - this.listOptions = listOptions; - this.networkPolicy = networkPolicy; - this.networkPolicyList = networkPolicyList; - this.objectMeta = objectMeta; - this.objectReference = objectReference; - this.patch = patch; - this.patchOptions = patchOptions; - this.quantity = quantity; - this.replicaSet = replicaSet; - this.replicaSetList = replicaSetList; - this.rootPaths = rootPaths; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - this.updateOptions = updateOptions; - } - - @JsonProperty("APIGroup") - public APIGroup getAPIGroup() { - return aPIGroup; - } - - @JsonProperty("APIGroup") - public void setAPIGroup(APIGroup aPIGroup) { - this.aPIGroup = aPIGroup; - } - - @JsonProperty("APIGroupList") - public APIGroupList getAPIGroupList() { - return aPIGroupList; - } - - @JsonProperty("APIGroupList") - public void setAPIGroupList(APIGroupList aPIGroupList) { - this.aPIGroupList = aPIGroupList; - } - - @JsonProperty("BaseKubernetesList") - public KubernetesList getBaseKubernetesList() { - return baseKubernetesList; - } - - @JsonProperty("BaseKubernetesList") - public void setBaseKubernetesList(KubernetesList baseKubernetesList) { - this.baseKubernetesList = baseKubernetesList; - } - - @JsonProperty("CreateOptions") - public CreateOptions getCreateOptions() { - return createOptions; - } - - @JsonProperty("CreateOptions") - public void setCreateOptions(CreateOptions createOptions) { - this.createOptions = createOptions; - } - - @JsonProperty("DaemonSet") - public DaemonSet getDaemonSet() { - return daemonSet; - } - - @JsonProperty("DaemonSet") - public void setDaemonSet(DaemonSet daemonSet) { - this.daemonSet = daemonSet; - } - - @JsonProperty("DaemonSetList") - public DaemonSetList getDaemonSetList() { - return daemonSetList; - } - - @JsonProperty("DaemonSetList") - public void setDaemonSetList(DaemonSetList daemonSetList) { - this.daemonSetList = daemonSetList; - } - - @JsonProperty("DeleteOptions") - public DeleteOptions getDeleteOptions() { - return deleteOptions; - } - - @JsonProperty("DeleteOptions") - public void setDeleteOptions(DeleteOptions deleteOptions) { - this.deleteOptions = deleteOptions; - } - - @JsonProperty("Deployment") - public Deployment getDeployment() { - return deployment; - } - - @JsonProperty("Deployment") - public void setDeployment(Deployment deployment) { - this.deployment = deployment; - } - - @JsonProperty("DeploymentList") - public DeploymentList getDeploymentList() { - return deploymentList; - } - - @JsonProperty("DeploymentList") - public void setDeploymentList(DeploymentList deploymentList) { - this.deploymentList = deploymentList; - } - - @JsonProperty("DeploymentRollback") - public DeploymentRollback getDeploymentRollback() { - return deploymentRollback; - } - - @JsonProperty("DeploymentRollback") - public void setDeploymentRollback(DeploymentRollback deploymentRollback) { - this.deploymentRollback = deploymentRollback; - } - - @JsonProperty("GetOptions") - public GetOptions getGetOptions() { - return getOptions; - } - - @JsonProperty("GetOptions") - public void setGetOptions(GetOptions getOptions) { - this.getOptions = getOptions; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("Ingress") - public Ingress getIngress() { - return ingress; - } - - @JsonProperty("Ingress") - public void setIngress(Ingress ingress) { - this.ingress = ingress; - } - - @JsonProperty("IngressList") - public IngressList getIngressList() { - return ingressList; - } - - @JsonProperty("IngressList") - public void setIngressList(IngressList ingressList) { - this.ingressList = ingressList; - } - - @JsonProperty("ListOptions") - public ListOptions getListOptions() { - return listOptions; - } - - @JsonProperty("ListOptions") - public void setListOptions(ListOptions listOptions) { - this.listOptions = listOptions; - } - - @JsonProperty("NetworkPolicy") - public NetworkPolicy getNetworkPolicy() { - return networkPolicy; - } - - @JsonProperty("NetworkPolicy") - public void setNetworkPolicy(NetworkPolicy networkPolicy) { - this.networkPolicy = networkPolicy; - } - - @JsonProperty("NetworkPolicyList") - public NetworkPolicyList getNetworkPolicyList() { - return networkPolicyList; - } - - @JsonProperty("NetworkPolicyList") - public void setNetworkPolicyList(NetworkPolicyList networkPolicyList) { - this.networkPolicyList = networkPolicyList; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("ObjectReference") - public ObjectReference getObjectReference() { - return objectReference; - } - - @JsonProperty("ObjectReference") - public void setObjectReference(ObjectReference objectReference) { - this.objectReference = objectReference; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @JsonProperty("PatchOptions") - public PatchOptions getPatchOptions() { - return patchOptions; - } - - @JsonProperty("PatchOptions") - public void setPatchOptions(PatchOptions patchOptions) { - this.patchOptions = patchOptions; - } - - @JsonProperty("Quantity") - public Quantity getQuantity() { - return quantity; - } - - @JsonProperty("Quantity") - public void setQuantity(Quantity quantity) { - this.quantity = quantity; - } - - @JsonProperty("ReplicaSet") - public ReplicaSet getReplicaSet() { - return replicaSet; - } - - @JsonProperty("ReplicaSet") - public void setReplicaSet(ReplicaSet replicaSet) { - this.replicaSet = replicaSet; - } - - @JsonProperty("ReplicaSetList") - public ReplicaSetList getReplicaSetList() { - return replicaSetList; - } - - @JsonProperty("ReplicaSetList") - public void setReplicaSetList(ReplicaSetList replicaSetList) { - this.replicaSetList = replicaSetList; - } - - @JsonProperty("RootPaths") - public RootPaths getRootPaths() { - return rootPaths; - } - - @JsonProperty("RootPaths") - public void setRootPaths(RootPaths rootPaths) { - this.rootPaths = rootPaths; - } - - @JsonProperty("Status") - public Status getStatus() { - return status; - } - - @JsonProperty("Status") - public void setStatus(Status status) { - this.status = status; - } - - @JsonProperty("Time") - public String getTime() { - return time; - } - - @JsonProperty("Time") - public void setTime(String time) { - this.time = time; - } - - @JsonProperty("TypeMeta") - public TypeMeta getTypeMeta() { - return typeMeta; - } - - @JsonProperty("TypeMeta") - public void setTypeMeta(TypeMeta typeMeta) { - this.typeMeta = typeMeta; - } - - @JsonProperty("UpdateOptions") - public UpdateOptions getUpdateOptions() { - return updateOptions; - } - - @JsonProperty("UpdateOptions") - public void setUpdateOptions(UpdateOptions updateOptions) { - this.updateOptions = updateOptions; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - public void setAdditionalProperties(Map additionalProperties) { - this.additionalProperties = additionalProperties; - } - -} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedCSIDriver.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedCSIDriver.java new file mode 100644 index 00000000000..cce8e46a8a4 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedCSIDriver.java @@ -0,0 +1,108 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "name" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class AllowedCSIDriver implements Editable , KubernetesResource +{ + + @JsonProperty("name") + private String name; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public AllowedCSIDriver() { + } + + public AllowedCSIDriver(String name) { + super(); + this.name = name; + } + + @JsonProperty("name") + public String getName() { + return name; + } + + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + @JsonIgnore + public AllowedCSIDriverBuilder edit() { + return new AllowedCSIDriverBuilder(this); + } + + @JsonIgnore + public AllowedCSIDriverBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedFlexVolume.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedFlexVolume.java new file mode 100644 index 00000000000..226f326ace4 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedFlexVolume.java @@ -0,0 +1,108 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "driver" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class AllowedFlexVolume implements Editable , KubernetesResource +{ + + @JsonProperty("driver") + private String driver; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public AllowedFlexVolume() { + } + + public AllowedFlexVolume(String driver) { + super(); + this.driver = driver; + } + + @JsonProperty("driver") + public String getDriver() { + return driver; + } + + @JsonProperty("driver") + public void setDriver(String driver) { + this.driver = driver; + } + + @JsonIgnore + public AllowedFlexVolumeBuilder edit() { + return new AllowedFlexVolumeBuilder(this); + } + + @JsonIgnore + public AllowedFlexVolumeBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressPortStatus.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedHostPath.java similarity index 71% rename from kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressPortStatus.java rename to kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedHostPath.java index 9f6a4359cb8..d84c7d7574b 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressPortStatus.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/AllowedHostPath.java @@ -31,9 +31,8 @@ @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - "error", - "port", - "protocol" + "pathPrefix", + "readOnly" }) @ToString @EqualsAndHashCode @@ -53,15 +52,13 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class IngressPortStatus implements Editable , KubernetesResource +public class AllowedHostPath implements Editable , KubernetesResource { - @JsonProperty("error") - private String error; - @JsonProperty("port") - private Integer port; - @JsonProperty("protocol") - private String protocol; + @JsonProperty("pathPrefix") + private String pathPrefix; + @JsonProperty("readOnly") + private Boolean readOnly; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -69,53 +66,42 @@ public class IngressPortStatus implements Editable , K * No args constructor for use in serialization * */ - public IngressPortStatus() { + public AllowedHostPath() { } - public IngressPortStatus(String error, Integer port, String protocol) { + public AllowedHostPath(String pathPrefix, Boolean readOnly) { super(); - this.error = error; - this.port = port; - this.protocol = protocol; + this.pathPrefix = pathPrefix; + this.readOnly = readOnly; } - @JsonProperty("error") - public String getError() { - return error; + @JsonProperty("pathPrefix") + public String getPathPrefix() { + return pathPrefix; } - @JsonProperty("error") - public void setError(String error) { - this.error = error; + @JsonProperty("pathPrefix") + public void setPathPrefix(String pathPrefix) { + this.pathPrefix = pathPrefix; } - @JsonProperty("port") - public Integer getPort() { - return port; + @JsonProperty("readOnly") + public Boolean getReadOnly() { + return readOnly; } - @JsonProperty("port") - public void setPort(Integer port) { - this.port = port; - } - - @JsonProperty("protocol") - public String getProtocol() { - return protocol; - } - - @JsonProperty("protocol") - public void setProtocol(String protocol) { - this.protocol = protocol; + @JsonProperty("readOnly") + public void setReadOnly(Boolean readOnly) { + this.readOnly = readOnly; } @JsonIgnore - public IngressPortStatusBuilder edit() { - return new IngressPortStatusBuilder(this); + public AllowedHostPathBuilder edit() { + return new AllowedHostPathBuilder(this); } @JsonIgnore - public IngressPortStatusBuilder toBuilder() { + public AllowedHostPathBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSet.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSet.java index a6ef6b87281..aa4cae80826 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSet.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSet.java @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -48,7 +49,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -82,7 +83,7 @@ public class DaemonSet implements Editable , HasMetadata, Name @JsonProperty("kind") private String kind = "DaemonSet"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private DaemonSetSpec spec; @JsonProperty("status") @@ -97,7 +98,7 @@ public class DaemonSet implements Editable , HasMetadata, Name public DaemonSet() { } - public DaemonSet(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, DaemonSetSpec spec, DaemonSetStatus status) { + public DaemonSet(String apiVersion, String kind, ObjectMeta metadata, DaemonSetSpec spec, DaemonSetStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -147,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSetSpec.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSetSpec.java index b3f68c890d7..c101857d6e8 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSetSpec.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DaemonSetSpec.java @@ -15,10 +15,12 @@ import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; @@ -44,9 +46,9 @@ }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(ObjectMeta.class), - @BuildableReference(io.fabric8.kubernetes.api.model.LabelSelector.class), + @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), - @BuildableReference(io.fabric8.kubernetes.api.model.PodTemplateSpec.class), + @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @@ -62,9 +64,9 @@ public class DaemonSetSpec implements Editable , Kubernete @JsonProperty("revisionHistoryLimit") private Integer revisionHistoryLimit; @JsonProperty("selector") - private io.fabric8.kubernetes.api.model.LabelSelector selector; + private LabelSelector selector; @JsonProperty("template") - private io.fabric8.kubernetes.api.model.PodTemplateSpec template; + private PodTemplateSpec template; @JsonProperty("templateGeneration") private Long templateGeneration; @JsonProperty("updateStrategy") @@ -79,7 +81,7 @@ public class DaemonSetSpec implements Editable , Kubernete public DaemonSetSpec() { } - public DaemonSetSpec(Integer minReadySeconds, Integer revisionHistoryLimit, io.fabric8.kubernetes.api.model.LabelSelector selector, io.fabric8.kubernetes.api.model.PodTemplateSpec template, Long templateGeneration, DaemonSetUpdateStrategy updateStrategy) { + public DaemonSetSpec(Integer minReadySeconds, Integer revisionHistoryLimit, LabelSelector selector, PodTemplateSpec template, Long templateGeneration, DaemonSetUpdateStrategy updateStrategy) { super(); this.minReadySeconds = minReadySeconds; this.revisionHistoryLimit = revisionHistoryLimit; @@ -110,22 +112,22 @@ public void setRevisionHistoryLimit(Integer revisionHistoryLimit) { } @JsonProperty("selector") - public io.fabric8.kubernetes.api.model.LabelSelector getSelector() { + public LabelSelector getSelector() { return selector; } @JsonProperty("selector") - public void setSelector(io.fabric8.kubernetes.api.model.LabelSelector selector) { + public void setSelector(LabelSelector selector) { this.selector = selector; } @JsonProperty("template") - public io.fabric8.kubernetes.api.model.PodTemplateSpec getTemplate() { + public PodTemplateSpec getTemplate() { return template; } @JsonProperty("template") - public void setTemplate(io.fabric8.kubernetes.api.model.PodTemplateSpec template) { + public void setTemplate(PodTemplateSpec template) { this.template = template; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Deployment.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Deployment.java index cafd9de6270..f8a0081daff 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Deployment.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Deployment.java @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -48,7 +49,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -82,7 +83,7 @@ public class Deployment implements Editable , HasMetadata, Na @JsonProperty("kind") private String kind = "Deployment"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private DeploymentSpec spec; @JsonProperty("status") @@ -97,7 +98,7 @@ public class Deployment implements Editable , HasMetadata, Na public Deployment() { } - public Deployment(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, DeploymentSpec spec, DeploymentStatus status) { + public Deployment(String apiVersion, String kind, ObjectMeta metadata, DeploymentSpec spec, DeploymentStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -147,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentRollback.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentRollback.java index a498dbb08af..5d106f8ad58 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentRollback.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentRollback.java @@ -22,12 +22,8 @@ import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; -import io.fabric8.kubernetes.model.annotation.Group; -import io.fabric8.kubernetes.model.annotation.Version; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; -import io.sundr.transform.annotations.TemplateTransformation; -import io.sundr.transform.annotations.TemplateTransformations; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.experimental.Accessors; @@ -58,29 +54,14 @@ @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) }) -@TemplateTransformations({ - @TemplateTransformation(value = "/manifest.vm", outputPath = "META-INF/services/io.fabric8.kubernetes.api.model.KubernetesResource", gather = true) -}) -@Version("v1beta1") -@Group("extensions") @Generated("jsonschema2pojo") public class DeploymentRollback implements Editable , KubernetesResource { - /** - * - * (Required) - * - */ @JsonProperty("apiVersion") - private String apiVersion = "extensions/v1beta1"; - /** - * - * (Required) - * - */ + private String apiVersion; @JsonProperty("kind") - private String kind = "DeploymentRollback"; + private String kind; @JsonProperty("name") private String name; @JsonProperty("rollbackTo") @@ -107,41 +88,21 @@ public DeploymentRollback(String apiVersion, String kind, String name, RollbackC this.updatedAnnotations = updatedAnnotations; } - /** - * - * (Required) - * - */ @JsonProperty("apiVersion") public String getApiVersion() { return apiVersion; } - /** - * - * (Required) - * - */ @JsonProperty("apiVersion") public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } - /** - * - * (Required) - * - */ @JsonProperty("kind") public String getKind() { return kind; } - /** - * - * (Required) - * - */ @JsonProperty("kind") public void setKind(String kind) { this.kind = kind; diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentSpec.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentSpec.java index 18a2c4c529b..d7308d0740f 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentSpec.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/DeploymentSpec.java @@ -15,10 +15,12 @@ import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; @@ -47,9 +49,9 @@ }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(ObjectMeta.class), - @BuildableReference(io.fabric8.kubernetes.api.model.LabelSelector.class), + @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), - @BuildableReference(io.fabric8.kubernetes.api.model.PodTemplateSpec.class), + @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @@ -73,11 +75,11 @@ public class DeploymentSpec implements Editable , Kuberne @JsonProperty("rollbackTo") private RollbackConfig rollbackTo; @JsonProperty("selector") - private io.fabric8.kubernetes.api.model.LabelSelector selector; + private LabelSelector selector; @JsonProperty("strategy") private DeploymentStrategy strategy; @JsonProperty("template") - private io.fabric8.kubernetes.api.model.PodTemplateSpec template; + private PodTemplateSpec template; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -88,7 +90,7 @@ public class DeploymentSpec implements Editable , Kuberne public DeploymentSpec() { } - public DeploymentSpec(Integer minReadySeconds, Boolean paused, Integer progressDeadlineSeconds, Integer replicas, Integer revisionHistoryLimit, RollbackConfig rollbackTo, io.fabric8.kubernetes.api.model.LabelSelector selector, DeploymentStrategy strategy, io.fabric8.kubernetes.api.model.PodTemplateSpec template) { + public DeploymentSpec(Integer minReadySeconds, Boolean paused, Integer progressDeadlineSeconds, Integer replicas, Integer revisionHistoryLimit, RollbackConfig rollbackTo, LabelSelector selector, DeploymentStrategy strategy, PodTemplateSpec template) { super(); this.minReadySeconds = minReadySeconds; this.paused = paused; @@ -162,12 +164,12 @@ public void setRollbackTo(RollbackConfig rollbackTo) { } @JsonProperty("selector") - public io.fabric8.kubernetes.api.model.LabelSelector getSelector() { + public LabelSelector getSelector() { return selector; } @JsonProperty("selector") - public void setSelector(io.fabric8.kubernetes.api.model.LabelSelector selector) { + public void setSelector(LabelSelector selector) { this.selector = selector; } @@ -182,12 +184,12 @@ public void setStrategy(DeploymentStrategy strategy) { } @JsonProperty("template") - public io.fabric8.kubernetes.api.model.PodTemplateSpec getTemplate() { + public PodTemplateSpec getTemplate() { return template; } @JsonProperty("template") - public void setTemplate(io.fabric8.kubernetes.api.model.PodTemplateSpec template) { + public void setTemplate(PodTemplateSpec template) { this.template = template; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressLoadBalancerStatus.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/FSGroupStrategyOptions.java similarity index 76% rename from kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressLoadBalancerStatus.java rename to kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/FSGroupStrategyOptions.java index 9881c5a9f51..6f2f798e5f1 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressLoadBalancerStatus.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/FSGroupStrategyOptions.java @@ -33,7 +33,8 @@ @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - "ingress" + "ranges", + "rule" }) @ToString @EqualsAndHashCode @@ -53,12 +54,14 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class IngressLoadBalancerStatus implements Editable , KubernetesResource +public class FSGroupStrategyOptions implements Editable , KubernetesResource { - @JsonProperty("ingress") + @JsonProperty("ranges") @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List ingress = new ArrayList<>(); + private List ranges = new ArrayList<>(); + @JsonProperty("rule") + private String rule; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -66,32 +69,43 @@ public class IngressLoadBalancerStatus implements Editable ingress) { + public FSGroupStrategyOptions(List ranges, String rule) { super(); - this.ingress = ingress; + this.ranges = ranges; + this.rule = rule; } - @JsonProperty("ingress") + @JsonProperty("ranges") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getIngress() { - return ingress; + public List getRanges() { + return ranges; } - @JsonProperty("ingress") - public void setIngress(List ingress) { - this.ingress = ingress; + @JsonProperty("ranges") + public void setRanges(List ranges) { + this.ranges = ranges; + } + + @JsonProperty("rule") + public String getRule() { + return rule; + } + + @JsonProperty("rule") + public void setRule(String rule) { + this.rule = rule; } @JsonIgnore - public IngressLoadBalancerStatusBuilder edit() { - return new IngressLoadBalancerStatusBuilder(this); + public FSGroupStrategyOptionsBuilder edit() { + return new FSGroupStrategyOptionsBuilder(this); } @JsonIgnore - public IngressLoadBalancerStatusBuilder toBuilder() { + public FSGroupStrategyOptionsBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HTTPIngressPath.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HTTPIngressPath.java index 7e32ed61b42..ae1bb55ea8b 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HTTPIngressPath.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HTTPIngressPath.java @@ -32,8 +32,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "backend", - "path", - "pathType" + "path" }) @ToString @EqualsAndHashCode @@ -60,8 +59,6 @@ public class HTTPIngressPath implements Editable , Kuber private IngressBackend backend; @JsonProperty("path") private String path; - @JsonProperty("pathType") - private String pathType; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -72,11 +69,10 @@ public class HTTPIngressPath implements Editable , Kuber public HTTPIngressPath() { } - public HTTPIngressPath(IngressBackend backend, String path, String pathType) { + public HTTPIngressPath(IngressBackend backend, String path) { super(); this.backend = backend; this.path = path; - this.pathType = pathType; } @JsonProperty("backend") @@ -99,16 +95,6 @@ public void setPath(String path) { this.path = path; } - @JsonProperty("pathType") - public String getPathType() { - return pathType; - } - - @JsonProperty("pathType") - public void setPathType(String pathType) { - this.pathType = pathType; - } - @JsonIgnore public HTTPIngressPathBuilder edit() { return new HTTPIngressPathBuilder(this); diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HostPortRange.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HostPortRange.java new file mode 100644 index 00000000000..7df8ce9f72a --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/HostPortRange.java @@ -0,0 +1,122 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "max", + "min" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class HostPortRange implements Editable , KubernetesResource +{ + + @JsonProperty("max") + private Integer max; + @JsonProperty("min") + private Integer min; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public HostPortRange() { + } + + public HostPortRange(Integer max, Integer min) { + super(); + this.max = max; + this.min = min; + } + + @JsonProperty("max") + public Integer getMax() { + return max; + } + + @JsonProperty("max") + public void setMax(Integer max) { + this.max = max; + } + + @JsonProperty("min") + public Integer getMin() { + return min; + } + + @JsonProperty("min") + public void setMin(Integer min) { + this.min = min; + } + + @JsonIgnore + public HostPortRangeBuilder edit() { + return new HostPortRangeBuilder(this); + } + + @JsonIgnore + public HostPortRangeBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IDRange.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IDRange.java new file mode 100644 index 00000000000..cbe5a7ce0c5 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IDRange.java @@ -0,0 +1,122 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "max", + "min" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class IDRange implements Editable , KubernetesResource +{ + + @JsonProperty("max") + private Long max; + @JsonProperty("min") + private Long min; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public IDRange() { + } + + public IDRange(Long max, Long min) { + super(); + this.max = max; + this.min = min; + } + + @JsonProperty("max") + public Long getMax() { + return max; + } + + @JsonProperty("max") + public void setMax(Long max) { + this.max = max; + } + + @JsonProperty("min") + public Long getMin() { + return min; + } + + @JsonProperty("min") + public void setMin(Long min) { + this.min = min; + } + + @JsonIgnore + public IDRangeBuilder edit() { + return new IDRangeBuilder(this); + } + + @JsonIgnore + public IDRangeBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Ingress.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Ingress.java index 6a41a57061d..888236dfb2e 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Ingress.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Ingress.java @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -48,7 +49,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -82,7 +83,7 @@ public class Ingress implements Editable , HasMetadata, Namespac @JsonProperty("kind") private String kind = "Ingress"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private IngressSpec spec; @JsonProperty("status") @@ -97,7 +98,7 @@ public class Ingress implements Editable , HasMetadata, Namespac public Ingress() { } - public Ingress(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, IngressSpec spec, IngressStatus status) { + public Ingress(String apiVersion, String kind, ObjectMeta metadata, IngressSpec spec, IngressStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -147,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressBackend.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressBackend.java index b0184b17b8b..d39e782e28b 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressBackend.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressBackend.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.builder.Editable; import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; @@ -21,7 +22,6 @@ import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; -import io.fabric8.kubernetes.api.model.TypedLocalObjectReference; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; import lombok.EqualsAndHashCode; @@ -31,7 +31,6 @@ @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - "resource", "serviceName", "servicePort" }) @@ -47,7 +46,7 @@ @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), - @BuildableReference(io.fabric8.kubernetes.api.model.IntOrString.class), + @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) @@ -56,12 +55,10 @@ public class IngressBackend implements Editable , KubernetesResource { - @JsonProperty("resource") - private TypedLocalObjectReference resource; @JsonProperty("serviceName") private String serviceName; @JsonProperty("servicePort") - private io.fabric8.kubernetes.api.model.IntOrString servicePort; + private IntOrString servicePort; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -72,23 +69,12 @@ public class IngressBackend implements Editable , Kuberne public IngressBackend() { } - public IngressBackend(TypedLocalObjectReference resource, String serviceName, io.fabric8.kubernetes.api.model.IntOrString servicePort) { + public IngressBackend(String serviceName, IntOrString servicePort) { super(); - this.resource = resource; this.serviceName = serviceName; this.servicePort = servicePort; } - @JsonProperty("resource") - public TypedLocalObjectReference getResource() { - return resource; - } - - @JsonProperty("resource") - public void setResource(TypedLocalObjectReference resource) { - this.resource = resource; - } - @JsonProperty("serviceName") public String getServiceName() { return serviceName; @@ -100,12 +86,12 @@ public void setServiceName(String serviceName) { } @JsonProperty("servicePort") - public io.fabric8.kubernetes.api.model.IntOrString getServicePort() { + public IntOrString getServicePort() { return servicePort; } @JsonProperty("servicePort") - public void setServicePort(io.fabric8.kubernetes.api.model.IntOrString servicePort) { + public void setServicePort(IntOrString servicePort) { this.servicePort = servicePort; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressSpec.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressSpec.java index 71d48cde41a..97189c0bc4d 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressSpec.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressSpec.java @@ -34,7 +34,6 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "backend", - "ingressClassName", "rules", "tls" }) @@ -61,8 +60,6 @@ public class IngressSpec implements Editable , KubernetesRes @JsonProperty("backend") private IngressBackend backend; - @JsonProperty("ingressClassName") - private String ingressClassName; @JsonProperty("rules") @JsonInclude(JsonInclude.Include.NON_EMPTY) private List rules = new ArrayList<>(); @@ -79,10 +76,9 @@ public class IngressSpec implements Editable , KubernetesRes public IngressSpec() { } - public IngressSpec(IngressBackend backend, String ingressClassName, List rules, List tls) { + public IngressSpec(IngressBackend backend, List rules, List tls) { super(); this.backend = backend; - this.ingressClassName = ingressClassName; this.rules = rules; this.tls = tls; } @@ -97,16 +93,6 @@ public void setBackend(IngressBackend backend) { this.backend = backend; } - @JsonProperty("ingressClassName") - public String getIngressClassName() { - return ingressClassName; - } - - @JsonProperty("ingressClassName") - public void setIngressClassName(String ingressClassName) { - this.ingressClassName = ingressClassName; - } - @JsonProperty("rules") @JsonInclude(JsonInclude.Include.NON_EMPTY) public List getRules() { diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressStatus.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressStatus.java index 2ea1d99915e..9a5a04778b7 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressStatus.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/IngressStatus.java @@ -16,6 +16,7 @@ import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LoadBalancerStatus; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; @@ -55,7 +56,7 @@ public class IngressStatus implements Editable , Kubernete { @JsonProperty("loadBalancer") - private IngressLoadBalancerStatus loadBalancer; + private LoadBalancerStatus loadBalancer; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -66,18 +67,18 @@ public class IngressStatus implements Editable , Kubernete public IngressStatus() { } - public IngressStatus(IngressLoadBalancerStatus loadBalancer) { + public IngressStatus(LoadBalancerStatus loadBalancer) { super(); this.loadBalancer = loadBalancer; } @JsonProperty("loadBalancer") - public IngressLoadBalancerStatus getLoadBalancer() { + public LoadBalancerStatus getLoadBalancer() { return loadBalancer; } @JsonProperty("loadBalancer") - public void setLoadBalancer(IngressLoadBalancerStatus loadBalancer) { + public void setLoadBalancer(LoadBalancerStatus loadBalancer) { this.loadBalancer = loadBalancer; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicy.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicy.java index 87f50e6571f..be7b805a98d 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicy.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicy.java @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -47,7 +48,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -81,7 +82,7 @@ public class NetworkPolicy implements Editable , HasMetada @JsonProperty("kind") private String kind = "NetworkPolicy"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private NetworkPolicySpec spec; @JsonIgnore @@ -94,7 +95,7 @@ public class NetworkPolicy implements Editable , HasMetada public NetworkPolicy() { } - public NetworkPolicy(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, NetworkPolicySpec spec) { + public NetworkPolicy(String apiVersion, String kind, ObjectMeta metadata, NetworkPolicySpec spec) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -143,12 +144,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPeer.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPeer.java index f38b1d9e960..252aa24fcf0 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPeer.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPeer.java @@ -15,6 +15,7 @@ import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; @@ -42,7 +43,7 @@ }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(ObjectMeta.class), - @BuildableReference(io.fabric8.kubernetes.api.model.LabelSelector.class), + @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @@ -58,9 +59,9 @@ public class NetworkPolicyPeer implements Editable , K @JsonProperty("ipBlock") private IPBlock ipBlock; @JsonProperty("namespaceSelector") - private io.fabric8.kubernetes.api.model.LabelSelector namespaceSelector; + private LabelSelector namespaceSelector; @JsonProperty("podSelector") - private io.fabric8.kubernetes.api.model.LabelSelector podSelector; + private LabelSelector podSelector; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -71,7 +72,7 @@ public class NetworkPolicyPeer implements Editable , K public NetworkPolicyPeer() { } - public NetworkPolicyPeer(IPBlock ipBlock, io.fabric8.kubernetes.api.model.LabelSelector namespaceSelector, io.fabric8.kubernetes.api.model.LabelSelector podSelector) { + public NetworkPolicyPeer(IPBlock ipBlock, LabelSelector namespaceSelector, LabelSelector podSelector) { super(); this.ipBlock = ipBlock; this.namespaceSelector = namespaceSelector; @@ -89,22 +90,22 @@ public void setIpBlock(IPBlock ipBlock) { } @JsonProperty("namespaceSelector") - public io.fabric8.kubernetes.api.model.LabelSelector getNamespaceSelector() { + public LabelSelector getNamespaceSelector() { return namespaceSelector; } @JsonProperty("namespaceSelector") - public void setNamespaceSelector(io.fabric8.kubernetes.api.model.LabelSelector namespaceSelector) { + public void setNamespaceSelector(LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } @JsonProperty("podSelector") - public io.fabric8.kubernetes.api.model.LabelSelector getPodSelector() { + public LabelSelector getPodSelector() { return podSelector; } @JsonProperty("podSelector") - public void setPodSelector(io.fabric8.kubernetes.api.model.LabelSelector podSelector) { + public void setPodSelector(LabelSelector podSelector) { this.podSelector = podSelector; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPort.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPort.java index 47822e34864..5ad4eff0546 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPort.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicyPort.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.builder.Editable; import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; @@ -30,7 +31,6 @@ @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - "endPort", "port", "protocol" }) @@ -46,7 +46,7 @@ @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), - @BuildableReference(io.fabric8.kubernetes.api.model.IntOrString.class), + @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) @@ -55,10 +55,8 @@ public class NetworkPolicyPort implements Editable , KubernetesResource { - @JsonProperty("endPort") - private Integer endPort; @JsonProperty("port") - private io.fabric8.kubernetes.api.model.IntOrString port; + private IntOrString port; @JsonProperty("protocol") private String protocol; @JsonIgnore @@ -71,30 +69,19 @@ public class NetworkPolicyPort implements Editable , K public NetworkPolicyPort() { } - public NetworkPolicyPort(Integer endPort, io.fabric8.kubernetes.api.model.IntOrString port, String protocol) { + public NetworkPolicyPort(IntOrString port, String protocol) { super(); - this.endPort = endPort; this.port = port; this.protocol = protocol; } - @JsonProperty("endPort") - public Integer getEndPort() { - return endPort; - } - - @JsonProperty("endPort") - public void setEndPort(Integer endPort) { - this.endPort = endPort; - } - @JsonProperty("port") - public io.fabric8.kubernetes.api.model.IntOrString getPort() { + public IntOrString getPort() { return port; } @JsonProperty("port") - public void setPort(io.fabric8.kubernetes.api.model.IntOrString port) { + public void setPort(IntOrString port) { this.port = port; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicySpec.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicySpec.java index 948b1dde34e..eb6b54ca3ed 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicySpec.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/NetworkPolicySpec.java @@ -17,6 +17,7 @@ import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; @@ -45,7 +46,7 @@ }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(ObjectMeta.class), - @BuildableReference(io.fabric8.kubernetes.api.model.LabelSelector.class), + @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @@ -65,7 +66,7 @@ public class NetworkPolicySpec implements Editable , K @JsonInclude(JsonInclude.Include.NON_EMPTY) private List ingress = new ArrayList<>(); @JsonProperty("podSelector") - private io.fabric8.kubernetes.api.model.LabelSelector podSelector; + private LabelSelector podSelector; @JsonProperty("policyTypes") @JsonInclude(JsonInclude.Include.NON_EMPTY) private List policyTypes = new ArrayList<>(); @@ -79,7 +80,7 @@ public class NetworkPolicySpec implements Editable , K public NetworkPolicySpec() { } - public NetworkPolicySpec(List egress, List ingress, io.fabric8.kubernetes.api.model.LabelSelector podSelector, List policyTypes) { + public NetworkPolicySpec(List egress, List ingress, LabelSelector podSelector, List policyTypes) { super(); this.egress = egress; this.ingress = ingress; @@ -110,12 +111,12 @@ public void setIngress(List ingress) { } @JsonProperty("podSelector") - public io.fabric8.kubernetes.api.model.LabelSelector getPodSelector() { + public LabelSelector getPodSelector() { return podSelector; } @JsonProperty("podSelector") - public void setPodSelector(io.fabric8.kubernetes.api.model.LabelSelector podSelector) { + public void setPodSelector(LabelSelector podSelector) { this.podSelector = podSelector; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicy.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicy.java new file mode 100644 index 00000000000..64d5b1edf46 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicy.java @@ -0,0 +1,189 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.HasMetadata; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.model.annotation.Group; +import io.fabric8.kubernetes.model.annotation.Version; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import io.sundr.transform.annotations.TemplateTransformation; +import io.sundr.transform.annotations.TemplateTransformations; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "spec" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@TemplateTransformations({ + @TemplateTransformation(value = "/manifest.vm", outputPath = "META-INF/services/io.fabric8.kubernetes.api.model.KubernetesResource", gather = true) +}) +@Version("v1beta1") +@Group("extensions") +@Generated("jsonschema2pojo") +public class PodSecurityPolicy implements Editable , HasMetadata +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private String apiVersion = "extensions/v1beta1"; + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private String kind = "PodSecurityPolicy"; + @JsonProperty("metadata") + private ObjectMeta metadata; + @JsonProperty("spec") + private PodSecurityPolicySpec spec; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public PodSecurityPolicy() { + } + + public PodSecurityPolicy(String apiVersion, String kind, ObjectMeta metadata, PodSecurityPolicySpec spec) { + super(); + this.apiVersion = apiVersion; + this.kind = kind; + this.metadata = metadata; + this.spec = spec; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public String getApiVersion() { + return apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public String getKind() { + return kind; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + @JsonProperty("metadata") + public ObjectMeta getMetadata() { + return metadata; + } + + @JsonProperty("metadata") + public void setMetadata(ObjectMeta metadata) { + this.metadata = metadata; + } + + @JsonProperty("spec") + public PodSecurityPolicySpec getSpec() { + return spec; + } + + @JsonProperty("spec") + public void setSpec(PodSecurityPolicySpec spec) { + this.spec = spec; + } + + @JsonIgnore + public PodSecurityPolicyBuilder edit() { + return new PodSecurityPolicyBuilder(this); + } + + @JsonIgnore + public PodSecurityPolicyBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicyList.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicyList.java new file mode 100644 index 00000000000..1780247dd01 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicyList.java @@ -0,0 +1,195 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.KubernetesResourceList; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.ListMeta; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.model.annotation.Group; +import io.fabric8.kubernetes.model.annotation.Version; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import io.sundr.transform.annotations.TemplateTransformation; +import io.sundr.transform.annotations.TemplateTransformations; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "items" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@TemplateTransformations({ + @TemplateTransformation(value = "/manifest.vm", outputPath = "META-INF/services/io.fabric8.kubernetes.api.model.KubernetesResource", gather = true) +}) +@Version("v1beta1") +@Group("extensions") +@Generated("jsonschema2pojo") +public class PodSecurityPolicyList implements Editable , KubernetesResource, KubernetesResourceList +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private String apiVersion = "extensions/v1beta1"; + @JsonProperty("items") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List items = new ArrayList<>(); + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private String kind = "PodSecurityPolicyList"; + @JsonProperty("metadata") + private ListMeta metadata; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public PodSecurityPolicyList() { + } + + public PodSecurityPolicyList(String apiVersion, List items, String kind, ListMeta metadata) { + super(); + this.apiVersion = apiVersion; + this.items = items; + this.kind = kind; + this.metadata = metadata; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public String getApiVersion() { + return apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + @JsonProperty("items") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getItems() { + return items; + } + + @JsonProperty("items") + public void setItems(List items) { + this.items = items; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public String getKind() { + return kind; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + @JsonProperty("metadata") + public ListMeta getMetadata() { + return metadata; + } + + @JsonProperty("metadata") + public void setMetadata(ListMeta metadata) { + this.metadata = metadata; + } + + @JsonIgnore + public PodSecurityPolicyListBuilder edit() { + return new PodSecurityPolicyListBuilder(this); + } + + @JsonIgnore + public PodSecurityPolicyListBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicySpec.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicySpec.java new file mode 100644 index 00000000000..be41dec3322 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/PodSecurityPolicySpec.java @@ -0,0 +1,454 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "allowPrivilegeEscalation", + "allowedCSIDrivers", + "allowedCapabilities", + "allowedFlexVolumes", + "allowedHostPaths", + "allowedProcMountTypes", + "allowedUnsafeSysctls", + "defaultAddCapabilities", + "defaultAllowPrivilegeEscalation", + "forbiddenSysctls", + "fsGroup", + "hostIPC", + "hostNetwork", + "hostPID", + "hostPorts", + "privileged", + "readOnlyRootFilesystem", + "requiredDropCapabilities", + "runAsGroup", + "runAsUser", + "runtimeClass", + "seLinux", + "supplementalGroups", + "volumes" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class PodSecurityPolicySpec implements Editable , KubernetesResource +{ + + @JsonProperty("allowPrivilegeEscalation") + private Boolean allowPrivilegeEscalation; + @JsonProperty("allowedCSIDrivers") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allowedCSIDrivers = new ArrayList<>(); + @JsonProperty("allowedCapabilities") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allowedCapabilities = new ArrayList<>(); + @JsonProperty("allowedFlexVolumes") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allowedFlexVolumes = new ArrayList<>(); + @JsonProperty("allowedHostPaths") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allowedHostPaths = new ArrayList<>(); + @JsonProperty("allowedProcMountTypes") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allowedProcMountTypes = new ArrayList<>(); + @JsonProperty("allowedUnsafeSysctls") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allowedUnsafeSysctls = new ArrayList<>(); + @JsonProperty("defaultAddCapabilities") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List defaultAddCapabilities = new ArrayList<>(); + @JsonProperty("defaultAllowPrivilegeEscalation") + private Boolean defaultAllowPrivilegeEscalation; + @JsonProperty("forbiddenSysctls") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List forbiddenSysctls = new ArrayList<>(); + @JsonProperty("fsGroup") + private FSGroupStrategyOptions fsGroup; + @JsonProperty("hostIPC") + private Boolean hostIPC; + @JsonProperty("hostNetwork") + private Boolean hostNetwork; + @JsonProperty("hostPID") + private Boolean hostPID; + @JsonProperty("hostPorts") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List hostPorts = new ArrayList<>(); + @JsonProperty("privileged") + private Boolean privileged; + @JsonProperty("readOnlyRootFilesystem") + private Boolean readOnlyRootFilesystem; + @JsonProperty("requiredDropCapabilities") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List requiredDropCapabilities = new ArrayList<>(); + @JsonProperty("runAsGroup") + private RunAsGroupStrategyOptions runAsGroup; + @JsonProperty("runAsUser") + private RunAsUserStrategyOptions runAsUser; + @JsonProperty("runtimeClass") + private RuntimeClassStrategyOptions runtimeClass; + @JsonProperty("seLinux") + private SELinuxStrategyOptions seLinux; + @JsonProperty("supplementalGroups") + private SupplementalGroupsStrategyOptions supplementalGroups; + @JsonProperty("volumes") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List volumes = new ArrayList<>(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public PodSecurityPolicySpec() { + } + + public PodSecurityPolicySpec(Boolean allowPrivilegeEscalation, List allowedCSIDrivers, List allowedCapabilities, List allowedFlexVolumes, List allowedHostPaths, List allowedProcMountTypes, List allowedUnsafeSysctls, List defaultAddCapabilities, Boolean defaultAllowPrivilegeEscalation, List forbiddenSysctls, FSGroupStrategyOptions fsGroup, Boolean hostIPC, Boolean hostNetwork, Boolean hostPID, List hostPorts, Boolean privileged, Boolean readOnlyRootFilesystem, List requiredDropCapabilities, RunAsGroupStrategyOptions runAsGroup, RunAsUserStrategyOptions runAsUser, RuntimeClassStrategyOptions runtimeClass, SELinuxStrategyOptions seLinux, SupplementalGroupsStrategyOptions supplementalGroups, List volumes) { + super(); + this.allowPrivilegeEscalation = allowPrivilegeEscalation; + this.allowedCSIDrivers = allowedCSIDrivers; + this.allowedCapabilities = allowedCapabilities; + this.allowedFlexVolumes = allowedFlexVolumes; + this.allowedHostPaths = allowedHostPaths; + this.allowedProcMountTypes = allowedProcMountTypes; + this.allowedUnsafeSysctls = allowedUnsafeSysctls; + this.defaultAddCapabilities = defaultAddCapabilities; + this.defaultAllowPrivilegeEscalation = defaultAllowPrivilegeEscalation; + this.forbiddenSysctls = forbiddenSysctls; + this.fsGroup = fsGroup; + this.hostIPC = hostIPC; + this.hostNetwork = hostNetwork; + this.hostPID = hostPID; + this.hostPorts = hostPorts; + this.privileged = privileged; + this.readOnlyRootFilesystem = readOnlyRootFilesystem; + this.requiredDropCapabilities = requiredDropCapabilities; + this.runAsGroup = runAsGroup; + this.runAsUser = runAsUser; + this.runtimeClass = runtimeClass; + this.seLinux = seLinux; + this.supplementalGroups = supplementalGroups; + this.volumes = volumes; + } + + @JsonProperty("allowPrivilegeEscalation") + public Boolean getAllowPrivilegeEscalation() { + return allowPrivilegeEscalation; + } + + @JsonProperty("allowPrivilegeEscalation") + public void setAllowPrivilegeEscalation(Boolean allowPrivilegeEscalation) { + this.allowPrivilegeEscalation = allowPrivilegeEscalation; + } + + @JsonProperty("allowedCSIDrivers") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllowedCSIDrivers() { + return allowedCSIDrivers; + } + + @JsonProperty("allowedCSIDrivers") + public void setAllowedCSIDrivers(List allowedCSIDrivers) { + this.allowedCSIDrivers = allowedCSIDrivers; + } + + @JsonProperty("allowedCapabilities") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllowedCapabilities() { + return allowedCapabilities; + } + + @JsonProperty("allowedCapabilities") + public void setAllowedCapabilities(List allowedCapabilities) { + this.allowedCapabilities = allowedCapabilities; + } + + @JsonProperty("allowedFlexVolumes") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllowedFlexVolumes() { + return allowedFlexVolumes; + } + + @JsonProperty("allowedFlexVolumes") + public void setAllowedFlexVolumes(List allowedFlexVolumes) { + this.allowedFlexVolumes = allowedFlexVolumes; + } + + @JsonProperty("allowedHostPaths") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllowedHostPaths() { + return allowedHostPaths; + } + + @JsonProperty("allowedHostPaths") + public void setAllowedHostPaths(List allowedHostPaths) { + this.allowedHostPaths = allowedHostPaths; + } + + @JsonProperty("allowedProcMountTypes") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllowedProcMountTypes() { + return allowedProcMountTypes; + } + + @JsonProperty("allowedProcMountTypes") + public void setAllowedProcMountTypes(List allowedProcMountTypes) { + this.allowedProcMountTypes = allowedProcMountTypes; + } + + @JsonProperty("allowedUnsafeSysctls") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllowedUnsafeSysctls() { + return allowedUnsafeSysctls; + } + + @JsonProperty("allowedUnsafeSysctls") + public void setAllowedUnsafeSysctls(List allowedUnsafeSysctls) { + this.allowedUnsafeSysctls = allowedUnsafeSysctls; + } + + @JsonProperty("defaultAddCapabilities") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getDefaultAddCapabilities() { + return defaultAddCapabilities; + } + + @JsonProperty("defaultAddCapabilities") + public void setDefaultAddCapabilities(List defaultAddCapabilities) { + this.defaultAddCapabilities = defaultAddCapabilities; + } + + @JsonProperty("defaultAllowPrivilegeEscalation") + public Boolean getDefaultAllowPrivilegeEscalation() { + return defaultAllowPrivilegeEscalation; + } + + @JsonProperty("defaultAllowPrivilegeEscalation") + public void setDefaultAllowPrivilegeEscalation(Boolean defaultAllowPrivilegeEscalation) { + this.defaultAllowPrivilegeEscalation = defaultAllowPrivilegeEscalation; + } + + @JsonProperty("forbiddenSysctls") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getForbiddenSysctls() { + return forbiddenSysctls; + } + + @JsonProperty("forbiddenSysctls") + public void setForbiddenSysctls(List forbiddenSysctls) { + this.forbiddenSysctls = forbiddenSysctls; + } + + @JsonProperty("fsGroup") + public FSGroupStrategyOptions getFsGroup() { + return fsGroup; + } + + @JsonProperty("fsGroup") + public void setFsGroup(FSGroupStrategyOptions fsGroup) { + this.fsGroup = fsGroup; + } + + @JsonProperty("hostIPC") + public Boolean getHostIPC() { + return hostIPC; + } + + @JsonProperty("hostIPC") + public void setHostIPC(Boolean hostIPC) { + this.hostIPC = hostIPC; + } + + @JsonProperty("hostNetwork") + public Boolean getHostNetwork() { + return hostNetwork; + } + + @JsonProperty("hostNetwork") + public void setHostNetwork(Boolean hostNetwork) { + this.hostNetwork = hostNetwork; + } + + @JsonProperty("hostPID") + public Boolean getHostPID() { + return hostPID; + } + + @JsonProperty("hostPID") + public void setHostPID(Boolean hostPID) { + this.hostPID = hostPID; + } + + @JsonProperty("hostPorts") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getHostPorts() { + return hostPorts; + } + + @JsonProperty("hostPorts") + public void setHostPorts(List hostPorts) { + this.hostPorts = hostPorts; + } + + @JsonProperty("privileged") + public Boolean getPrivileged() { + return privileged; + } + + @JsonProperty("privileged") + public void setPrivileged(Boolean privileged) { + this.privileged = privileged; + } + + @JsonProperty("readOnlyRootFilesystem") + public Boolean getReadOnlyRootFilesystem() { + return readOnlyRootFilesystem; + } + + @JsonProperty("readOnlyRootFilesystem") + public void setReadOnlyRootFilesystem(Boolean readOnlyRootFilesystem) { + this.readOnlyRootFilesystem = readOnlyRootFilesystem; + } + + @JsonProperty("requiredDropCapabilities") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getRequiredDropCapabilities() { + return requiredDropCapabilities; + } + + @JsonProperty("requiredDropCapabilities") + public void setRequiredDropCapabilities(List requiredDropCapabilities) { + this.requiredDropCapabilities = requiredDropCapabilities; + } + + @JsonProperty("runAsGroup") + public RunAsGroupStrategyOptions getRunAsGroup() { + return runAsGroup; + } + + @JsonProperty("runAsGroup") + public void setRunAsGroup(RunAsGroupStrategyOptions runAsGroup) { + this.runAsGroup = runAsGroup; + } + + @JsonProperty("runAsUser") + public RunAsUserStrategyOptions getRunAsUser() { + return runAsUser; + } + + @JsonProperty("runAsUser") + public void setRunAsUser(RunAsUserStrategyOptions runAsUser) { + this.runAsUser = runAsUser; + } + + @JsonProperty("runtimeClass") + public RuntimeClassStrategyOptions getRuntimeClass() { + return runtimeClass; + } + + @JsonProperty("runtimeClass") + public void setRuntimeClass(RuntimeClassStrategyOptions runtimeClass) { + this.runtimeClass = runtimeClass; + } + + @JsonProperty("seLinux") + public SELinuxStrategyOptions getSeLinux() { + return seLinux; + } + + @JsonProperty("seLinux") + public void setSeLinux(SELinuxStrategyOptions seLinux) { + this.seLinux = seLinux; + } + + @JsonProperty("supplementalGroups") + public SupplementalGroupsStrategyOptions getSupplementalGroups() { + return supplementalGroups; + } + + @JsonProperty("supplementalGroups") + public void setSupplementalGroups(SupplementalGroupsStrategyOptions supplementalGroups) { + this.supplementalGroups = supplementalGroups; + } + + @JsonProperty("volumes") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getVolumes() { + return volumes; + } + + @JsonProperty("volumes") + public void setVolumes(List volumes) { + this.volumes = volumes; + } + + @JsonIgnore + public PodSecurityPolicySpecBuilder edit() { + return new PodSecurityPolicySpecBuilder(this); + } + + @JsonIgnore + public PodSecurityPolicySpecBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSet.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSet.java index fead66aa8ac..094573c8d7e 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSet.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSet.java @@ -18,6 +18,7 @@ import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; @@ -48,7 +49,7 @@ "" }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectMeta.class), + @BuildableReference(ObjectMeta.class), @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @@ -82,7 +83,7 @@ public class ReplicaSet implements Editable , HasMetadata, Na @JsonProperty("kind") private String kind = "ReplicaSet"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private ReplicaSetSpec spec; @JsonProperty("status") @@ -97,7 +98,7 @@ public class ReplicaSet implements Editable , HasMetadata, Na public ReplicaSet() { } - public ReplicaSet(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, ReplicaSetSpec spec, ReplicaSetStatus status) { + public ReplicaSet(String apiVersion, String kind, ObjectMeta metadata, ReplicaSetSpec spec, ReplicaSetStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -147,12 +148,12 @@ public void setKind(String kind) { } @JsonProperty("metadata") - public io.fabric8.kubernetes.api.model.ObjectMeta getMetadata() { + public ObjectMeta getMetadata() { return metadata; } @JsonProperty("metadata") - public void setMetadata(io.fabric8.kubernetes.api.model.ObjectMeta metadata) { + public void setMetadata(ObjectMeta metadata) { this.metadata = metadata; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSetSpec.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSetSpec.java index f295cd49905..3dd67ea269e 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSetSpec.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ReplicaSetSpec.java @@ -15,10 +15,12 @@ import io.fabric8.kubernetes.api.model.Container; import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.ObjectMeta; import io.fabric8.kubernetes.api.model.ObjectReference; import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; @@ -42,9 +44,9 @@ }) @Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { @BuildableReference(ObjectMeta.class), - @BuildableReference(io.fabric8.kubernetes.api.model.LabelSelector.class), + @BuildableReference(LabelSelector.class), @BuildableReference(Container.class), - @BuildableReference(io.fabric8.kubernetes.api.model.PodTemplateSpec.class), + @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @@ -60,9 +62,9 @@ public class ReplicaSetSpec implements Editable , Kuberne @JsonProperty("replicas") private Integer replicas; @JsonProperty("selector") - private io.fabric8.kubernetes.api.model.LabelSelector selector; + private LabelSelector selector; @JsonProperty("template") - private io.fabric8.kubernetes.api.model.PodTemplateSpec template; + private PodTemplateSpec template; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -73,7 +75,7 @@ public class ReplicaSetSpec implements Editable , Kuberne public ReplicaSetSpec() { } - public ReplicaSetSpec(Integer minReadySeconds, Integer replicas, io.fabric8.kubernetes.api.model.LabelSelector selector, io.fabric8.kubernetes.api.model.PodTemplateSpec template) { + public ReplicaSetSpec(Integer minReadySeconds, Integer replicas, LabelSelector selector, PodTemplateSpec template) { super(); this.minReadySeconds = minReadySeconds; this.replicas = replicas; @@ -102,22 +104,22 @@ public void setReplicas(Integer replicas) { } @JsonProperty("selector") - public io.fabric8.kubernetes.api.model.LabelSelector getSelector() { + public LabelSelector getSelector() { return selector; } @JsonProperty("selector") - public void setSelector(io.fabric8.kubernetes.api.model.LabelSelector selector) { + public void setSelector(LabelSelector selector) { this.selector = selector; } @JsonProperty("template") - public io.fabric8.kubernetes.api.model.PodTemplateSpec getTemplate() { + public PodTemplateSpec getTemplate() { return template; } @JsonProperty("template") - public void setTemplate(io.fabric8.kubernetes.api.model.PodTemplateSpec template) { + public void setTemplate(PodTemplateSpec template) { this.template = template; } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RollingUpdateDaemonSet.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RollingUpdateDaemonSet.java index a2a976da014..be4249cfc9b 100644 --- a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RollingUpdateDaemonSet.java +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RollingUpdateDaemonSet.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import io.fabric8.kubernetes.api.builder.Editable; import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; import io.fabric8.kubernetes.api.model.KubernetesResource; import io.fabric8.kubernetes.api.model.LabelSelector; import io.fabric8.kubernetes.api.model.LocalObjectReference; @@ -30,7 +31,6 @@ @JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ - "maxSurge", "maxUnavailable" }) @ToString @@ -45,7 +45,7 @@ @BuildableReference(Container.class), @BuildableReference(PodTemplateSpec.class), @BuildableReference(ResourceRequirements.class), - @BuildableReference(io.fabric8.kubernetes.api.model.IntOrString.class), + @BuildableReference(IntOrString.class), @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) @@ -54,10 +54,8 @@ public class RollingUpdateDaemonSet implements Editable , KubernetesResource { - @JsonProperty("maxSurge") - private io.fabric8.kubernetes.api.model.IntOrString maxSurge; @JsonProperty("maxUnavailable") - private io.fabric8.kubernetes.api.model.IntOrString maxUnavailable; + private IntOrString maxUnavailable; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -68,29 +66,18 @@ public class RollingUpdateDaemonSet implements Editable additionalProperties = new LinkedHashMap(); @@ -68,29 +69,29 @@ public class RollingUpdateDeployment implements Editable , KubernetesResource +public class RunAsGroupStrategyOptions implements Editable , KubernetesResource { - @JsonProperty("hostname") - private String hostname; - @JsonProperty("ip") - private String ip; - @JsonProperty("ports") + @JsonProperty("ranges") @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List ports = new ArrayList<>(); + private List ranges = new ArrayList<>(); + @JsonProperty("rule") + private String rule; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -72,54 +69,43 @@ public class IngressLoadBalancerIngress implements Editable ports) { + public RunAsGroupStrategyOptions(List ranges, String rule) { super(); - this.hostname = hostname; - this.ip = ip; - this.ports = ports; + this.ranges = ranges; + this.rule = rule; } - @JsonProperty("hostname") - public String getHostname() { - return hostname; - } - - @JsonProperty("hostname") - public void setHostname(String hostname) { - this.hostname = hostname; - } - - @JsonProperty("ip") - public String getIp() { - return ip; + @JsonProperty("ranges") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getRanges() { + return ranges; } - @JsonProperty("ip") - public void setIp(String ip) { - this.ip = ip; + @JsonProperty("ranges") + public void setRanges(List ranges) { + this.ranges = ranges; } - @JsonProperty("ports") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getPorts() { - return ports; + @JsonProperty("rule") + public String getRule() { + return rule; } - @JsonProperty("ports") - public void setPorts(List ports) { - this.ports = ports; + @JsonProperty("rule") + public void setRule(String rule) { + this.rule = rule; } @JsonIgnore - public IngressLoadBalancerIngressBuilder edit() { - return new IngressLoadBalancerIngressBuilder(this); + public RunAsGroupStrategyOptionsBuilder edit() { + return new RunAsGroupStrategyOptionsBuilder(this); } @JsonIgnore - public IngressLoadBalancerIngressBuilder toBuilder() { + public RunAsGroupStrategyOptionsBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RunAsUserStrategyOptions.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RunAsUserStrategyOptions.java new file mode 100644 index 00000000000..364bbb16992 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RunAsUserStrategyOptions.java @@ -0,0 +1,126 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "ranges", + "rule" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class RunAsUserStrategyOptions implements Editable , KubernetesResource +{ + + @JsonProperty("ranges") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List ranges = new ArrayList<>(); + @JsonProperty("rule") + private String rule; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public RunAsUserStrategyOptions() { + } + + public RunAsUserStrategyOptions(List ranges, String rule) { + super(); + this.ranges = ranges; + this.rule = rule; + } + + @JsonProperty("ranges") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getRanges() { + return ranges; + } + + @JsonProperty("ranges") + public void setRanges(List ranges) { + this.ranges = ranges; + } + + @JsonProperty("rule") + public String getRule() { + return rule; + } + + @JsonProperty("rule") + public void setRule(String rule) { + this.rule = rule; + } + + @JsonIgnore + public RunAsUserStrategyOptionsBuilder edit() { + return new RunAsUserStrategyOptionsBuilder(this); + } + + @JsonIgnore + public RunAsUserStrategyOptionsBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RuntimeClassStrategyOptions.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RuntimeClassStrategyOptions.java new file mode 100644 index 00000000000..0bef9208e72 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/RuntimeClassStrategyOptions.java @@ -0,0 +1,126 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "allowedRuntimeClassNames", + "defaultRuntimeClassName" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class RuntimeClassStrategyOptions implements Editable , KubernetesResource +{ + + @JsonProperty("allowedRuntimeClassNames") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allowedRuntimeClassNames = new ArrayList<>(); + @JsonProperty("defaultRuntimeClassName") + private String defaultRuntimeClassName; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public RuntimeClassStrategyOptions() { + } + + public RuntimeClassStrategyOptions(List allowedRuntimeClassNames, String defaultRuntimeClassName) { + super(); + this.allowedRuntimeClassNames = allowedRuntimeClassNames; + this.defaultRuntimeClassName = defaultRuntimeClassName; + } + + @JsonProperty("allowedRuntimeClassNames") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllowedRuntimeClassNames() { + return allowedRuntimeClassNames; + } + + @JsonProperty("allowedRuntimeClassNames") + public void setAllowedRuntimeClassNames(List allowedRuntimeClassNames) { + this.allowedRuntimeClassNames = allowedRuntimeClassNames; + } + + @JsonProperty("defaultRuntimeClassName") + public String getDefaultRuntimeClassName() { + return defaultRuntimeClassName; + } + + @JsonProperty("defaultRuntimeClassName") + public void setDefaultRuntimeClassName(String defaultRuntimeClassName) { + this.defaultRuntimeClassName = defaultRuntimeClassName; + } + + @JsonIgnore + public RuntimeClassStrategyOptionsBuilder edit() { + return new RuntimeClassStrategyOptionsBuilder(this); + } + + @JsonIgnore + public RuntimeClassStrategyOptionsBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SELinuxStrategyOptions.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SELinuxStrategyOptions.java new file mode 100644 index 00000000000..48eb0e5aa5b --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SELinuxStrategyOptions.java @@ -0,0 +1,123 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.api.model.SELinuxOptions; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "rule", + "seLinuxOptions" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class SELinuxStrategyOptions implements Editable , KubernetesResource +{ + + @JsonProperty("rule") + private String rule; + @JsonProperty("seLinuxOptions") + private SELinuxOptions seLinuxOptions; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public SELinuxStrategyOptions() { + } + + public SELinuxStrategyOptions(String rule, SELinuxOptions seLinuxOptions) { + super(); + this.rule = rule; + this.seLinuxOptions = seLinuxOptions; + } + + @JsonProperty("rule") + public String getRule() { + return rule; + } + + @JsonProperty("rule") + public void setRule(String rule) { + this.rule = rule; + } + + @JsonProperty("seLinuxOptions") + public SELinuxOptions getSeLinuxOptions() { + return seLinuxOptions; + } + + @JsonProperty("seLinuxOptions") + public void setSeLinuxOptions(SELinuxOptions seLinuxOptions) { + this.seLinuxOptions = seLinuxOptions; + } + + @JsonIgnore + public SELinuxStrategyOptionsBuilder edit() { + return new SELinuxStrategyOptionsBuilder(this); + } + + @JsonIgnore + public SELinuxStrategyOptionsBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Scale.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Scale.java new file mode 100644 index 00000000000..8cfdef4e9fd --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/Scale.java @@ -0,0 +1,204 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.HasMetadata; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.Namespaced; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.model.annotation.Group; +import io.fabric8.kubernetes.model.annotation.Version; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import io.sundr.transform.annotations.TemplateTransformation; +import io.sundr.transform.annotations.TemplateTransformations; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "apiVersion", + "kind", + "metadata", + "spec", + "status" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@TemplateTransformations({ + @TemplateTransformation(value = "/manifest.vm", outputPath = "META-INF/services/io.fabric8.kubernetes.api.model.KubernetesResource", gather = true) +}) +@Version("v1beta1") +@Group("extensions") +@Generated("jsonschema2pojo") +public class Scale implements Editable , HasMetadata, Namespaced +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private String apiVersion = "extensions/v1beta1"; + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private String kind = "Scale"; + @JsonProperty("metadata") + private ObjectMeta metadata; + @JsonProperty("spec") + private ScaleSpec spec; + @JsonProperty("status") + private ScaleStatus status; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public Scale() { + } + + public Scale(String apiVersion, String kind, ObjectMeta metadata, ScaleSpec spec, ScaleStatus status) { + super(); + this.apiVersion = apiVersion; + this.kind = kind; + this.metadata = metadata; + this.spec = spec; + this.status = status; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public String getApiVersion() { + return apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public String getKind() { + return kind; + } + + /** + * + * (Required) + * + */ + @JsonProperty("kind") + public void setKind(String kind) { + this.kind = kind; + } + + @JsonProperty("metadata") + public ObjectMeta getMetadata() { + return metadata; + } + + @JsonProperty("metadata") + public void setMetadata(ObjectMeta metadata) { + this.metadata = metadata; + } + + @JsonProperty("spec") + public ScaleSpec getSpec() { + return spec; + } + + @JsonProperty("spec") + public void setSpec(ScaleSpec spec) { + this.spec = spec; + } + + @JsonProperty("status") + public ScaleStatus getStatus() { + return status; + } + + @JsonProperty("status") + public void setStatus(ScaleStatus status) { + this.status = status; + } + + @JsonIgnore + public ScaleBuilder edit() { + return new ScaleBuilder(this); + } + + @JsonIgnore + public ScaleBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleSpec.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleSpec.java new file mode 100644 index 00000000000..b1c04b10845 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleSpec.java @@ -0,0 +1,108 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "replicas" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class ScaleSpec implements Editable , KubernetesResource +{ + + @JsonProperty("replicas") + private Integer replicas; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ScaleSpec() { + } + + public ScaleSpec(Integer replicas) { + super(); + this.replicas = replicas; + } + + @JsonProperty("replicas") + public Integer getReplicas() { + return replicas; + } + + @JsonProperty("replicas") + public void setReplicas(Integer replicas) { + this.replicas = replicas; + } + + @JsonIgnore + public ScaleSpecBuilder edit() { + return new ScaleSpecBuilder(this); + } + + @JsonIgnore + public ScaleSpecBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleStatus.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleStatus.java new file mode 100644 index 00000000000..908ccf5002e --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/ScaleStatus.java @@ -0,0 +1,138 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.LinkedHashMap; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "replicas", + "selector", + "targetSelector" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class ScaleStatus implements Editable , KubernetesResource +{ + + @JsonProperty("replicas") + private Integer replicas; + @JsonProperty("selector") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private Map selector = new LinkedHashMap<>(); + @JsonProperty("targetSelector") + private String targetSelector; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public ScaleStatus() { + } + + public ScaleStatus(Integer replicas, Map selector, String targetSelector) { + super(); + this.replicas = replicas; + this.selector = selector; + this.targetSelector = targetSelector; + } + + @JsonProperty("replicas") + public Integer getReplicas() { + return replicas; + } + + @JsonProperty("replicas") + public void setReplicas(Integer replicas) { + this.replicas = replicas; + } + + @JsonProperty("selector") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public Map getSelector() { + return selector; + } + + @JsonProperty("selector") + public void setSelector(Map selector) { + this.selector = selector; + } + + @JsonProperty("targetSelector") + public String getTargetSelector() { + return targetSelector; + } + + @JsonProperty("targetSelector") + public void setTargetSelector(String targetSelector) { + this.targetSelector = targetSelector; + } + + @JsonIgnore + public ScaleStatusBuilder edit() { + return new ScaleStatusBuilder(this); + } + + @JsonIgnore + public ScaleStatusBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SupplementalGroupsStrategyOptions.java b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SupplementalGroupsStrategyOptions.java new file mode 100644 index 00000000000..bf01697e2e5 --- /dev/null +++ b/kubernetes-model-generator/kubernetes-model-extensions/src/generated/java/io/fabric8/kubernetes/api/model/extensions/SupplementalGroupsStrategyOptions.java @@ -0,0 +1,126 @@ + +package io.fabric8.kubernetes.api.model.extensions; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import javax.annotation.Generated; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import io.fabric8.kubernetes.api.builder.Editable; +import io.fabric8.kubernetes.api.model.Container; +import io.fabric8.kubernetes.api.model.IntOrString; +import io.fabric8.kubernetes.api.model.KubernetesResource; +import io.fabric8.kubernetes.api.model.LabelSelector; +import io.fabric8.kubernetes.api.model.LocalObjectReference; +import io.fabric8.kubernetes.api.model.ObjectMeta; +import io.fabric8.kubernetes.api.model.ObjectReference; +import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; +import io.fabric8.kubernetes.api.model.PodTemplateSpec; +import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.sundr.builder.annotations.Buildable; +import io.sundr.builder.annotations.BuildableReference; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.experimental.Accessors; + +@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "ranges", + "rule" +}) +@ToString +@EqualsAndHashCode +@Accessors(prefix = { + "_", + "" +}) +@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { + @BuildableReference(ObjectMeta.class), + @BuildableReference(LabelSelector.class), + @BuildableReference(Container.class), + @BuildableReference(PodTemplateSpec.class), + @BuildableReference(ResourceRequirements.class), + @BuildableReference(IntOrString.class), + @BuildableReference(ObjectReference.class), + @BuildableReference(LocalObjectReference.class), + @BuildableReference(PersistentVolumeClaim.class) +}) +@Generated("jsonschema2pojo") +public class SupplementalGroupsStrategyOptions implements Editable , KubernetesResource +{ + + @JsonProperty("ranges") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List ranges = new ArrayList<>(); + @JsonProperty("rule") + private String rule; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public SupplementalGroupsStrategyOptions() { + } + + public SupplementalGroupsStrategyOptions(List ranges, String rule) { + super(); + this.ranges = ranges; + this.rule = rule; + } + + @JsonProperty("ranges") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getRanges() { + return ranges; + } + + @JsonProperty("ranges") + public void setRanges(List ranges) { + this.ranges = ranges; + } + + @JsonProperty("rule") + public String getRule() { + return rule; + } + + @JsonProperty("rule") + public void setRule(String rule) { + this.rule = rule; + } + + @JsonIgnore + public SupplementalGroupsStrategyOptionsBuilder edit() { + return new SupplementalGroupsStrategyOptionsBuilder(this); + } + + @JsonIgnore + public SupplementalGroupsStrategyOptionsBuilder toBuilder() { + return edit(); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + public void setAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + } + +} diff --git a/kubernetes-model-generator/openapi/maven-plugin/src/test/java/io/fabric8/kubernetes/schema/generator/model/KubernetesTest.java b/kubernetes-model-generator/openapi/maven-plugin/src/test/java/io/fabric8/kubernetes/schema/generator/model/KubernetesTest.java index 0166f5b5338..b64c684b9f5 100644 --- a/kubernetes-model-generator/openapi/maven-plugin/src/test/java/io/fabric8/kubernetes/schema/generator/model/KubernetesTest.java +++ b/kubernetes-model-generator/openapi/maven-plugin/src/test/java/io/fabric8/kubernetes/schema/generator/model/KubernetesTest.java @@ -45,29 +45,6 @@ void setUp() { .generateJavadoc(false); } - @Test - void events() { - new ModelGenerator(baseSettings - .clearSchemas() - .schema(new File("../schemas/kubernetes-1.21.14.json")) - .schema(new File("../schemas/kubernetes-1.30.0.json")) - .includeGenerationRegex("^io\\.k8s\\.api\\.events\\..*$") - .packageMapping("io.k8s.api.events", "io.fabric8.kubernetes.api.model.events") - .build()) - .generate(); - } - - @Test - void extensions() { - new ModelGenerator(baseSettings - .clearSchemas() - .schema(new File("../schemas/kubernetes-1.17.17.json")) - .includeGenerationRegex("^io\\.k8s\\.api\\.extensions\\..*$") - .packageMapping("io.k8s.api.extensions.v1beta1", "io.fabric8.kubernetes.api.model.extensions") - .build()) - .generate(); - } - @Test void flowControl() { new ModelGenerator(baseSettings