From d732f7e34383aca6fac9d1257aaf609bfce5ff21 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Thu, 3 Oct 2024 07:06:34 +0200 Subject: [PATCH] refactor: openshift-model-whereabouts generated from OpenAPI schemas Signed-off-by: Marc Nuri --- Makefile | 1 + kubernetes-model-generator/generateModel.sh | 1 - .../openshift-model-whereabouts/Makefile | 27 --- .../cmd/generate/generate.go | 97 -------- .../openshift-model-whereabouts/pom.xml | 46 ++-- .../kubernetes/api/model/KubeSchema.java | 217 ------------------ .../api/model/ValidationSchema.java | 217 ------------------ .../model/whereabouts/v1alpha1/IPPool.java | 11 +- .../whereabouts/v1alpha1/IPPoolSpec.java | 8 +- ...cation.java => IPPoolSpecAllocations.java} | 26 ++- .../whereabouts/v1alpha1/NodeSlicePool.java | 204 ++++++++++++++++ .../v1alpha1/NodeSlicePoolList.java | 195 ++++++++++++++++ .../v1alpha1/NodeSlicePoolSpec.java | 122 ++++++++++ .../v1alpha1/NodeSlicePoolStatus.java | 112 +++++++++ .../NodeSlicePoolStatusAllocations.java | 122 ++++++++++ .../OverlappingRangeIPReservation.java | 11 +- .../OverlappingRangeIPReservationSpec.java | 16 +- .../client/server/mock/IPPoolTest.java | 4 +- 18 files changed, 828 insertions(+), 609 deletions(-) delete mode 100644 kubernetes-model-generator/openshift-model-whereabouts/Makefile delete mode 100644 kubernetes-model-generator/openshift-model-whereabouts/cmd/generate/generate.go delete mode 100644 kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java delete mode 100644 kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java rename kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/{IPAllocation.java => IPPoolSpecAllocations.java} (83%) create mode 100644 kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePool.java create mode 100644 kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolList.java create mode 100644 kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolSpec.java create mode 100644 kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatus.java create mode 100644 kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatusAllocations.java diff --git a/Makefile b/Makefile index 3e8485b7af7..846cddb60bb 100644 --- a/Makefile +++ b/Makefile @@ -75,6 +75,7 @@ openapi-generate-java-classes: cd kubernetes-model-generator/openshift-model-machineconfiguration && mvn -Pgenerate clean install cd kubernetes-model-generator/openshift-model-monitoring && mvn -Pgenerate clean install cd kubernetes-model-generator/openshift-model-tuned && mvn -Pgenerate clean install + cd kubernetes-model-generator/openshift-model-whereabouts && mvn -Pgenerate clean install # Legacy generation of the model: TODO: remove .PHONY: generate-model-legacy diff --git a/kubernetes-model-generator/generateModel.sh b/kubernetes-model-generator/generateModel.sh index 232dd8757d7..89ea9e188c9 100755 --- a/kubernetes-model-generator/generateModel.sh +++ b/kubernetes-model-generator/generateModel.sh @@ -24,7 +24,6 @@ ABSOLUTE_BASEDIR=$(realpath "$BASEDIR") declare -a modules=( "openshift-model-hive" "openshift-model-installer" - "openshift-model-whereabouts" "openshift-model-storageversionmigrator" "../extensions/knative/generator" "../extensions/certmanager/generator-v1" diff --git a/kubernetes-model-generator/openshift-model-whereabouts/Makefile b/kubernetes-model-generator/openshift-model-whereabouts/Makefile deleted file mode 100644 index c09a7003874..00000000000 --- a/kubernetes-model-generator/openshift-model-whereabouts/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/openshift-model-whereabouts/cmd/generate/generate.go b/kubernetes-model-generator/openshift-model-whereabouts/cmd/generate/generate.go deleted file mode 100644 index 89d142667a2..00000000000 --- a/kubernetes-model-generator/openshift-model-whereabouts/cmd/generate/generate.go +++ /dev/null @@ -1,97 +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" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apimachineryversion "k8s.io/apimachinery/pkg/version" - "log" - "reflect" - "strings" - "time" - whereabouts "github.com/k8snetworkplumbingwg/whereabouts/pkg/api/v1alpha1" - - "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 - Time metav1.Time - IPPool whereabouts.IPPool - IPPoolList whereabouts.IPPoolList - OverlappingRangeIPReservation whereabouts.OverlappingRangeIPReservation - OverlappingRangeIPReservationList whereabouts.OverlappingRangeIPReservationList - IPAllocation whereabouts.IPAllocation -} - -func main() { - packages := []schemagen.PackageDescriptor{ - {"k8s.io/api/core/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_core_", false}, - {"k8s.io/apimachinery/pkg/api/resource", "", "io.fabric8.kubernetes.api.model", "kubernetes_resource_", false}, - {"k8s.io/apimachinery/pkg/util/intstr", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_pkg_util_intstr_", false}, - {"k8s.io/apimachinery/pkg/runtime", "", "io.fabric8.openshift.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/kubernetes/pkg/util", "", "io.fabric8.kubernetes.api.model", "kubernetes_util_", false}, - {"k8s.io/kubernetes/pkg/api/errors", "", "io.fabric8.kubernetes.api.model", "kubernetes_errors_", false}, - {"k8s.io/kubernetes/pkg/api/unversioned", "", "io.fabric8.kubernetes.api.model", "api_", false}, - {"k8s.io/apimachinery/pkg/apis/meta/v1", "", "io.fabric8.kubernetes.api.model", "kubernetes_apimachinery_", false}, - {"github.com/openshift/api/config/v1", "", "io.fabric8.openshift.api.model", "os_config_v1_", false}, - {"github.com/k8snetworkplumbingwg/whereabouts/pkg/api/v1alpha1", "whereabouts.cni.cncf.io", "io.fabric8.openshift.api.model.whereabouts.v1alpha1", "os_whereabouts_v1alpha1_", true}, - } - - typeMap := map[reflect.Type]reflect.Type{ - reflect.TypeOf(time.Time{}): reflect.TypeOf(""), - reflect.TypeOf(struct{}{}): reflect.TypeOf(""), - } - manualTypeMap := map[reflect.Type]string { } - schema, err := schemagen.GenerateSchema(reflect.TypeOf(Schema{}), packages, typeMap, manualTypeMap,"whereabouts") - 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/openshift-model-whereabouts/pom.xml b/kubernetes-model-generator/openshift-model-whereabouts/pom.xml index 8c72fb22327..924aa0989a4 100644 --- a/kubernetes-model-generator/openshift-model-whereabouts/pom.xml +++ b/kubernetes-model-generator/openshift-model-whereabouts/pom.xml @@ -43,41 +43,33 @@ io.fabric8 kubernetes-model-core - - io.fabric8 - kubernetes-model-common - - - io.fabric8 - openshift-model - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - attach-artifacts - - false - - - - - - - generate - org.jsonschema2pojo - jsonschema2pojo-maven-plugin + io.fabric8 + openapi-model-generator-maven-plugin + + + + https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/5bb9e1542cf987458db181bedee7c051a1538dc1/doc/crds/whereabouts.cni.cncf.io_ippools.yaml + https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/5bb9e1542cf987458db181bedee7c051a1538dc1/doc/crds/whereabouts.cni.cncf.io_nodeslicepools.yaml + https://raw.githubusercontent.com/k8snetworkplumbingwg/whereabouts/5bb9e1542cf987458db181bedee7c051a1538dc1/doc/crds/whereabouts.cni.cncf.io_overlappingrangeipreservations.yaml + + + io.fabric8.openshift.api.model.whereabouts + io.fabric8.openshift.api.model.whereabouts + io.fabric8.openshift.api.model.whereabouts + + + ^io\.cncf\.cni\.whereabouts\..*$ + + + diff --git a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java deleted file mode 100644 index b6c2e88abe9..00000000000 --- a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ /dev/null @@ -1,217 +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.version.Info; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.IPAllocation; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.IPPool; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.IPPoolList; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.OverlappingRangeIPReservation; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.OverlappingRangeIPReservationList; - -@Generated("jsonschema2pojo") -public class KubeSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private IPAllocation iPAllocation; - private IPPool iPPool; - private IPPoolList iPPoolList; - private Info info; - private ObjectMeta objectMeta; - private OverlappingRangeIPReservation overlappingRangeIPReservation; - private OverlappingRangeIPReservationList overlappingRangeIPReservationList; - private Patch patch; - private Status status; - private String time; - private TypeMeta typeMeta; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public KubeSchema() { - } - - public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, IPAllocation iPAllocation, IPPool iPPool, IPPoolList iPPoolList, Info info, ObjectMeta objectMeta, OverlappingRangeIPReservation overlappingRangeIPReservation, OverlappingRangeIPReservationList overlappingRangeIPReservationList, Patch patch, Status status, String time, TypeMeta typeMeta) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.iPAllocation = iPAllocation; - this.iPPool = iPPool; - this.iPPoolList = iPPoolList; - this.info = info; - this.objectMeta = objectMeta; - this.overlappingRangeIPReservation = overlappingRangeIPReservation; - this.overlappingRangeIPReservationList = overlappingRangeIPReservationList; - this.patch = patch; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - } - - @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("IPAllocation") - public IPAllocation getIPAllocation() { - return iPAllocation; - } - - @JsonProperty("IPAllocation") - public void setIPAllocation(IPAllocation iPAllocation) { - this.iPAllocation = iPAllocation; - } - - @JsonProperty("IPPool") - public IPPool getIPPool() { - return iPPool; - } - - @JsonProperty("IPPool") - public void setIPPool(IPPool iPPool) { - this.iPPool = iPPool; - } - - @JsonProperty("IPPoolList") - public IPPoolList getIPPoolList() { - return iPPoolList; - } - - @JsonProperty("IPPoolList") - public void setIPPoolList(IPPoolList iPPoolList) { - this.iPPoolList = iPPoolList; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("OverlappingRangeIPReservation") - public OverlappingRangeIPReservation getOverlappingRangeIPReservation() { - return overlappingRangeIPReservation; - } - - @JsonProperty("OverlappingRangeIPReservation") - public void setOverlappingRangeIPReservation(OverlappingRangeIPReservation overlappingRangeIPReservation) { - this.overlappingRangeIPReservation = overlappingRangeIPReservation; - } - - @JsonProperty("OverlappingRangeIPReservationList") - public OverlappingRangeIPReservationList getOverlappingRangeIPReservationList() { - return overlappingRangeIPReservationList; - } - - @JsonProperty("OverlappingRangeIPReservationList") - public void setOverlappingRangeIPReservationList(OverlappingRangeIPReservationList overlappingRangeIPReservationList) { - this.overlappingRangeIPReservationList = overlappingRangeIPReservationList; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @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; - } - - @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/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java deleted file mode 100644 index 9321f2e7490..00000000000 --- a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java +++ /dev/null @@ -1,217 +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.version.Info; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.IPAllocation; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.IPPool; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.IPPoolList; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.OverlappingRangeIPReservation; -import io.fabric8.openshift.api.model.whereabouts.v1alpha1.OverlappingRangeIPReservationList; - -@Generated("jsonschema2pojo") -public class ValidationSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private IPAllocation iPAllocation; - private IPPool iPPool; - private IPPoolList iPPoolList; - private Info info; - private ObjectMeta objectMeta; - private OverlappingRangeIPReservation overlappingRangeIPReservation; - private OverlappingRangeIPReservationList overlappingRangeIPReservationList; - private Patch patch; - private Status status; - private String time; - private TypeMeta typeMeta; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ValidationSchema() { - } - - public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, KubernetesList baseKubernetesList, IPAllocation iPAllocation, IPPool iPPool, IPPoolList iPPoolList, Info info, ObjectMeta objectMeta, OverlappingRangeIPReservation overlappingRangeIPReservation, OverlappingRangeIPReservationList overlappingRangeIPReservationList, Patch patch, Status status, String time, TypeMeta typeMeta) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.iPAllocation = iPAllocation; - this.iPPool = iPPool; - this.iPPoolList = iPPoolList; - this.info = info; - this.objectMeta = objectMeta; - this.overlappingRangeIPReservation = overlappingRangeIPReservation; - this.overlappingRangeIPReservationList = overlappingRangeIPReservationList; - this.patch = patch; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - } - - @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("IPAllocation") - public IPAllocation getIPAllocation() { - return iPAllocation; - } - - @JsonProperty("IPAllocation") - public void setIPAllocation(IPAllocation iPAllocation) { - this.iPAllocation = iPAllocation; - } - - @JsonProperty("IPPool") - public IPPool getIPPool() { - return iPPool; - } - - @JsonProperty("IPPool") - public void setIPPool(IPPool iPPool) { - this.iPPool = iPPool; - } - - @JsonProperty("IPPoolList") - public IPPoolList getIPPoolList() { - return iPPoolList; - } - - @JsonProperty("IPPoolList") - public void setIPPoolList(IPPoolList iPPoolList) { - this.iPPoolList = iPPoolList; - } - - @JsonProperty("Info") - public Info getInfo() { - return info; - } - - @JsonProperty("Info") - public void setInfo(Info info) { - this.info = info; - } - - @JsonProperty("ObjectMeta") - public ObjectMeta getObjectMeta() { - return objectMeta; - } - - @JsonProperty("ObjectMeta") - public void setObjectMeta(ObjectMeta objectMeta) { - this.objectMeta = objectMeta; - } - - @JsonProperty("OverlappingRangeIPReservation") - public OverlappingRangeIPReservation getOverlappingRangeIPReservation() { - return overlappingRangeIPReservation; - } - - @JsonProperty("OverlappingRangeIPReservation") - public void setOverlappingRangeIPReservation(OverlappingRangeIPReservation overlappingRangeIPReservation) { - this.overlappingRangeIPReservation = overlappingRangeIPReservation; - } - - @JsonProperty("OverlappingRangeIPReservationList") - public OverlappingRangeIPReservationList getOverlappingRangeIPReservationList() { - return overlappingRangeIPReservationList; - } - - @JsonProperty("OverlappingRangeIPReservationList") - public void setOverlappingRangeIPReservationList(OverlappingRangeIPReservationList overlappingRangeIPReservationList) { - this.overlappingRangeIPReservationList = overlappingRangeIPReservationList; - } - - @JsonProperty("Patch") - public Patch getPatch() { - return patch; - } - - @JsonProperty("Patch") - public void setPatch(Patch patch) { - this.patch = patch; - } - - @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; - } - - @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/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPool.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPool.java index 06fb288337e..8fa5ad6f334 100644 --- a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPool.java +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPool.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 IPPool implements Editable , HasMetadata, Namespaced @JsonProperty("kind") private String kind = "IPPool"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private IPPoolSpec spec; @JsonIgnore @@ -94,7 +95,7 @@ public class IPPool implements Editable , HasMetadata, Namespaced public IPPool() { } - public IPPool(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, IPPoolSpec spec) { + public IPPool(String apiVersion, String kind, ObjectMeta metadata, IPPoolSpec 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/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPoolSpec.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPoolSpec.java index 1449b967744..eb50a12f1d4 100644 --- a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPoolSpec.java +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPoolSpec.java @@ -57,7 +57,7 @@ public class IPPoolSpec implements Editable , KubernetesResou @JsonProperty("allocations") @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Map allocations = new LinkedHashMap<>(); + private Map allocations = new LinkedHashMap<>(); @JsonProperty("range") private String range; @JsonIgnore @@ -70,7 +70,7 @@ public class IPPoolSpec implements Editable , KubernetesResou public IPPoolSpec() { } - public IPPoolSpec(Map allocations, String range) { + public IPPoolSpec(Map allocations, String range) { super(); this.allocations = allocations; this.range = range; @@ -78,12 +78,12 @@ public IPPoolSpec(Map allocations, String range) { @JsonProperty("allocations") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public Map getAllocations() { + public Map getAllocations() { return allocations; } @JsonProperty("allocations") - public void setAllocations(Map allocations) { + public void setAllocations(Map allocations) { this.allocations = allocations; } diff --git a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPAllocation.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPoolSpecAllocations.java similarity index 83% rename from kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPAllocation.java rename to kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPoolSpecAllocations.java index b65861b7038..3ac3ea517db 100644 --- a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPAllocation.java +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/IPPoolSpecAllocations.java @@ -32,6 +32,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "id", + "ifname", "podref" }) @ToString @@ -52,11 +53,13 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class IPAllocation implements Editable , KubernetesResource +public class IPPoolSpecAllocations implements Editable , KubernetesResource { @JsonProperty("id") private String id; + @JsonProperty("ifname") + private String ifname; @JsonProperty("podref") private String podref; @JsonIgnore @@ -66,12 +69,13 @@ public class IPAllocation implements Editable , KubernetesR * No args constructor for use in serialization * */ - public IPAllocation() { + public IPPoolSpecAllocations() { } - public IPAllocation(String id, String podref) { + public IPPoolSpecAllocations(String id, String ifname, String podref) { super(); this.id = id; + this.ifname = ifname; this.podref = podref; } @@ -85,6 +89,16 @@ public void setId(String id) { this.id = id; } + @JsonProperty("ifname") + public String getIfname() { + return ifname; + } + + @JsonProperty("ifname") + public void setIfname(String ifname) { + this.ifname = ifname; + } + @JsonProperty("podref") public String getPodref() { return podref; @@ -96,12 +110,12 @@ public void setPodref(String podref) { } @JsonIgnore - public IPAllocationBuilder edit() { - return new IPAllocationBuilder(this); + public IPPoolSpecAllocationsBuilder edit() { + return new IPPoolSpecAllocationsBuilder(this); } @JsonIgnore - public IPAllocationBuilder toBuilder() { + public IPPoolSpecAllocationsBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePool.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePool.java new file mode 100644 index 00000000000..b23bde32593 --- /dev/null +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePool.java @@ -0,0 +1,204 @@ + +package io.fabric8.openshift.api.model.whereabouts.v1alpha1; + +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("v1alpha1") +@Group("whereabouts.cni.cncf.io") +@Generated("jsonschema2pojo") +public class NodeSlicePool implements Editable , HasMetadata, Namespaced +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private String apiVersion = "whereabouts.cni.cncf.io/v1alpha1"; + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private String kind = "NodeSlicePool"; + @JsonProperty("metadata") + private ObjectMeta metadata; + @JsonProperty("spec") + private NodeSlicePoolSpec spec; + @JsonProperty("status") + private NodeSlicePoolStatus status; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public NodeSlicePool() { + } + + public NodeSlicePool(String apiVersion, String kind, ObjectMeta metadata, NodeSlicePoolSpec spec, NodeSlicePoolStatus 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 NodeSlicePoolSpec getSpec() { + return spec; + } + + @JsonProperty("spec") + public void setSpec(NodeSlicePoolSpec spec) { + this.spec = spec; + } + + @JsonProperty("status") + public NodeSlicePoolStatus getStatus() { + return status; + } + + @JsonProperty("status") + public void setStatus(NodeSlicePoolStatus status) { + this.status = status; + } + + @JsonIgnore + public NodeSlicePoolBuilder edit() { + return new NodeSlicePoolBuilder(this); + } + + @JsonIgnore + public NodeSlicePoolBuilder 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/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolList.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolList.java new file mode 100644 index 00000000000..246713e8061 --- /dev/null +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolList.java @@ -0,0 +1,195 @@ + +package io.fabric8.openshift.api.model.whereabouts.v1alpha1; + +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("v1alpha1") +@Group("whereabouts.cni.cncf.io") +@Generated("jsonschema2pojo") +public class NodeSlicePoolList implements Editable , KubernetesResource, KubernetesResourceList +{ + + /** + * + * (Required) + * + */ + @JsonProperty("apiVersion") + private String apiVersion = "whereabouts.cni.cncf.io/v1alpha1"; + @JsonProperty("items") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List items = new ArrayList<>(); + /** + * + * (Required) + * + */ + @JsonProperty("kind") + private String kind = "NodeSlicePoolList"; + @JsonProperty("metadata") + private ListMeta metadata; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public NodeSlicePoolList() { + } + + public NodeSlicePoolList(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 NodeSlicePoolListBuilder edit() { + return new NodeSlicePoolListBuilder(this); + } + + @JsonIgnore + public NodeSlicePoolListBuilder 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/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolSpec.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolSpec.java new file mode 100644 index 00000000000..8586035744b --- /dev/null +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolSpec.java @@ -0,0 +1,122 @@ + +package io.fabric8.openshift.api.model.whereabouts.v1alpha1; + +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({ + "range", + "sliceSize" +}) +@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 NodeSlicePoolSpec implements Editable , KubernetesResource +{ + + @JsonProperty("range") + private String range; + @JsonProperty("sliceSize") + private String sliceSize; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public NodeSlicePoolSpec() { + } + + public NodeSlicePoolSpec(String range, String sliceSize) { + super(); + this.range = range; + this.sliceSize = sliceSize; + } + + @JsonProperty("range") + public String getRange() { + return range; + } + + @JsonProperty("range") + public void setRange(String range) { + this.range = range; + } + + @JsonProperty("sliceSize") + public String getSliceSize() { + return sliceSize; + } + + @JsonProperty("sliceSize") + public void setSliceSize(String sliceSize) { + this.sliceSize = sliceSize; + } + + @JsonIgnore + public NodeSlicePoolSpecBuilder edit() { + return new NodeSlicePoolSpecBuilder(this); + } + + @JsonIgnore + public NodeSlicePoolSpecBuilder 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/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatus.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatus.java new file mode 100644 index 00000000000..fdea9b919b0 --- /dev/null +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatus.java @@ -0,0 +1,112 @@ + +package io.fabric8.openshift.api.model.whereabouts.v1alpha1; + +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({ + "allocations" +}) +@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 NodeSlicePoolStatus implements Editable , KubernetesResource +{ + + @JsonProperty("allocations") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + private List allocations = new ArrayList<>(); + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public NodeSlicePoolStatus() { + } + + public NodeSlicePoolStatus(List allocations) { + super(); + this.allocations = allocations; + } + + @JsonProperty("allocations") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + public List getAllocations() { + return allocations; + } + + @JsonProperty("allocations") + public void setAllocations(List allocations) { + this.allocations = allocations; + } + + @JsonIgnore + public NodeSlicePoolStatusBuilder edit() { + return new NodeSlicePoolStatusBuilder(this); + } + + @JsonIgnore + public NodeSlicePoolStatusBuilder 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/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatusAllocations.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatusAllocations.java new file mode 100644 index 00000000000..ca745a54448 --- /dev/null +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/NodeSlicePoolStatusAllocations.java @@ -0,0 +1,122 @@ + +package io.fabric8.openshift.api.model.whereabouts.v1alpha1; + +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({ + "nodeName", + "sliceRange" +}) +@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 NodeSlicePoolStatusAllocations implements Editable , KubernetesResource +{ + + @JsonProperty("nodeName") + private String nodeName; + @JsonProperty("sliceRange") + private String sliceRange; + @JsonIgnore + private Map additionalProperties = new LinkedHashMap(); + + /** + * No args constructor for use in serialization + * + */ + public NodeSlicePoolStatusAllocations() { + } + + public NodeSlicePoolStatusAllocations(String nodeName, String sliceRange) { + super(); + this.nodeName = nodeName; + this.sliceRange = sliceRange; + } + + @JsonProperty("nodeName") + public String getNodeName() { + return nodeName; + } + + @JsonProperty("nodeName") + public void setNodeName(String nodeName) { + this.nodeName = nodeName; + } + + @JsonProperty("sliceRange") + public String getSliceRange() { + return sliceRange; + } + + @JsonProperty("sliceRange") + public void setSliceRange(String sliceRange) { + this.sliceRange = sliceRange; + } + + @JsonIgnore + public NodeSlicePoolStatusAllocationsBuilder edit() { + return new NodeSlicePoolStatusAllocationsBuilder(this); + } + + @JsonIgnore + public NodeSlicePoolStatusAllocationsBuilder 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/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/OverlappingRangeIPReservation.java b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/OverlappingRangeIPReservation.java index df104323088..61acf298cd8 100644 --- a/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/OverlappingRangeIPReservation.java +++ b/kubernetes-model-generator/openshift-model-whereabouts/src/generated/java/io/fabric8/openshift/api/model/whereabouts/v1alpha1/OverlappingRangeIPReservation.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 OverlappingRangeIPReservation implements Editable