From 6afb426f941ea24f4c95e78d413f0df14e6cd6fb Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Thu, 3 Oct 2024 10:00:29 +0200 Subject: [PATCH] refactor: openshift-model-storageversionmigrator generated from OpenAPI schemas Signed-off-by: Marc Nuri --- Makefile | 1 + kubernetes-model-generator/generateModel.sh | 1 - .../Makefile | 27 --- .../cmd/generate/generate.go | 99 --------- .../pom.xml | 44 ++-- .../kubernetes/api/model/KubeSchema.java | 204 ------------------ .../api/model/ValidationSchema.java | 204 ------------------ .../v1alpha1/StorageState.java | 11 +- .../v1alpha1/StorageStateSpec.java | 8 +- ...rce.java => StorageStateSpecResource.java} | 12 +- .../v1alpha1/StorageVersionMigration.java | 11 +- .../v1alpha1/StorageVersionMigrationSpec.java | 8 +- ... StorageVersionMigrationSpecResource.java} | 12 +- .../StorageVersionMigrationStatus.java | 8 +- ...rageVersionMigrationStatusConditions.java} | 12 +- 15 files changed, 60 insertions(+), 602 deletions(-) delete mode 100644 kubernetes-model-generator/openshift-model-storageversionmigrator/Makefile delete mode 100644 kubernetes-model-generator/openshift-model-storageversionmigrator/cmd/generate/generate.go delete mode 100644 kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java delete mode 100644 kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java rename kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/{GroupResource.java => StorageStateSpecResource.java} (90%) rename kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/{GroupVersionResource.java => StorageVersionMigrationSpecResource.java} (88%) rename kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/{MigrationCondition.java => StorageVersionMigrationStatusConditions.java} (89%) diff --git a/Makefile b/Makefile index 846cddb60bb..7f035e049a2 100644 --- a/Makefile +++ b/Makefile @@ -76,6 +76,7 @@ openapi-generate-java-classes: 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 + cd kubernetes-model-generator/openshift-model-storageversionmigrator && 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 89ea9e188c9..e12512d7be7 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-storageversionmigrator" "../extensions/knative/generator" "../extensions/certmanager/generator-v1" "../extensions/certmanager/generator-v1alpha2" diff --git a/kubernetes-model-generator/openshift-model-storageversionmigrator/Makefile b/kubernetes-model-generator/openshift-model-storageversionmigrator/Makefile deleted file mode 100644 index c09a7003874..00000000000 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/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-storageversionmigrator/cmd/generate/generate.go b/kubernetes-model-generator/openshift-model-storageversionmigrator/cmd/generate/generate.go deleted file mode 100644 index 1a46e0962cd..00000000000 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/cmd/generate/generate.go +++ /dev/null @@ -1,99 +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" - runtime "k8s.io/apimachinery/pkg/runtime" - "log" - "reflect" - "strings" - "time" - kubestorageversionmigrator "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/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 - StorageState kubestorageversionmigrator.StorageState - StorageStateList kubestorageversionmigrator.StorageStateList - StorageVersionMigration kubestorageversionmigrator.StorageVersionMigration - StorageVersionMigrationList kubestorageversionmigrator.StorageVersionMigrationList -} - -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}, - {"sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1", "migration.k8s.io", "io.fabric8.openshift.api.model.storageversionmigrator.v1alpha1", "os_storageversionmigrator_v1alpha1_", true}, - } - - typeMap := map[reflect.Type]reflect.Type{ - reflect.TypeOf(time.Time{}): reflect.TypeOf(""), - reflect.TypeOf(struct{}{}): reflect.TypeOf(""), - } - manualTypeMap := map[reflect.Type]string { - reflect.TypeOf(runtime.RawExtension{}): "java.util.Map", - } - schema, err := schemagen.GenerateSchema(reflect.TypeOf(Schema{}), packages, typeMap, manualTypeMap,"storageversionmigrator") - 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-storageversionmigrator/pom.xml b/kubernetes-model-generator/openshift-model-storageversionmigrator/pom.xml index 4f0e092cd9f..69ef1511cde 100644 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/pom.xml +++ b/kubernetes-model-generator/openshift-model-storageversionmigrator/pom.xml @@ -43,41 +43,31 @@ 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/kubernetes-sigs/kube-storage-version-migrator/5c8923c5ff96ceb4435f66b986b5aec2dd0cbc22/manifests/storage_migration_crd.yaml + https://raw.githubusercontent.com/kubernetes-sigs/kube-storage-version-migrator/5c8923c5ff96ceb4435f66b986b5aec2dd0cbc22/manifests/storage_state_crd.yaml + + + io.fabric8.openshift.api.model.storageversionmigrator + io.fabric8.openshift.api.model.storageversionmigrator + + + ^io\.k8s\.migration\..*$ + + + diff --git a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java deleted file mode 100644 index 483f4a2798b..00000000000 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ /dev/null @@ -1,204 +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.storageversionmigrator.v1alpha1.StorageState; -import io.fabric8.openshift.api.model.storageversionmigrator.v1alpha1.StorageStateList; -import io.fabric8.openshift.api.model.storageversionmigrator.v1alpha1.StorageVersionMigration; -import io.fabric8.openshift.api.model.storageversionmigrator.v1alpha1.StorageVersionMigrationList; - -@Generated("jsonschema2pojo") -public class KubeSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private Info info; - private ObjectMeta objectMeta; - private Patch patch; - private Status status; - private StorageState storageState; - private StorageStateList storageStateList; - private StorageVersionMigration storageVersionMigration; - private StorageVersionMigrationList storageVersionMigrationList; - 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, Info info, ObjectMeta objectMeta, Patch patch, Status status, StorageState storageState, StorageStateList storageStateList, StorageVersionMigration storageVersionMigration, StorageVersionMigrationList storageVersionMigrationList, String time, TypeMeta typeMeta) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.info = info; - this.objectMeta = objectMeta; - this.patch = patch; - this.status = status; - this.storageState = storageState; - this.storageStateList = storageStateList; - this.storageVersionMigration = storageVersionMigration; - this.storageVersionMigrationList = storageVersionMigrationList; - 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("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("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("StorageState") - public StorageState getStorageState() { - return storageState; - } - - @JsonProperty("StorageState") - public void setStorageState(StorageState storageState) { - this.storageState = storageState; - } - - @JsonProperty("StorageStateList") - public StorageStateList getStorageStateList() { - return storageStateList; - } - - @JsonProperty("StorageStateList") - public void setStorageStateList(StorageStateList storageStateList) { - this.storageStateList = storageStateList; - } - - @JsonProperty("StorageVersionMigration") - public StorageVersionMigration getStorageVersionMigration() { - return storageVersionMigration; - } - - @JsonProperty("StorageVersionMigration") - public void setStorageVersionMigration(StorageVersionMigration storageVersionMigration) { - this.storageVersionMigration = storageVersionMigration; - } - - @JsonProperty("StorageVersionMigrationList") - public StorageVersionMigrationList getStorageVersionMigrationList() { - return storageVersionMigrationList; - } - - @JsonProperty("StorageVersionMigrationList") - public void setStorageVersionMigrationList(StorageVersionMigrationList storageVersionMigrationList) { - this.storageVersionMigrationList = storageVersionMigrationList; - } - - @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-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java deleted file mode 100644 index 7a146d36f02..00000000000 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java +++ /dev/null @@ -1,204 +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.storageversionmigrator.v1alpha1.StorageState; -import io.fabric8.openshift.api.model.storageversionmigrator.v1alpha1.StorageStateList; -import io.fabric8.openshift.api.model.storageversionmigrator.v1alpha1.StorageVersionMigration; -import io.fabric8.openshift.api.model.storageversionmigrator.v1alpha1.StorageVersionMigrationList; - -@Generated("jsonschema2pojo") -public class ValidationSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private Info info; - private ObjectMeta objectMeta; - private Patch patch; - private Status status; - private StorageState storageState; - private StorageStateList storageStateList; - private StorageVersionMigration storageVersionMigration; - private StorageVersionMigrationList storageVersionMigrationList; - 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, Info info, ObjectMeta objectMeta, Patch patch, Status status, StorageState storageState, StorageStateList storageStateList, StorageVersionMigration storageVersionMigration, StorageVersionMigrationList storageVersionMigrationList, String time, TypeMeta typeMeta) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.info = info; - this.objectMeta = objectMeta; - this.patch = patch; - this.status = status; - this.storageState = storageState; - this.storageStateList = storageStateList; - this.storageVersionMigration = storageVersionMigration; - this.storageVersionMigrationList = storageVersionMigrationList; - 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("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("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("StorageState") - public StorageState getStorageState() { - return storageState; - } - - @JsonProperty("StorageState") - public void setStorageState(StorageState storageState) { - this.storageState = storageState; - } - - @JsonProperty("StorageStateList") - public StorageStateList getStorageStateList() { - return storageStateList; - } - - @JsonProperty("StorageStateList") - public void setStorageStateList(StorageStateList storageStateList) { - this.storageStateList = storageStateList; - } - - @JsonProperty("StorageVersionMigration") - public StorageVersionMigration getStorageVersionMigration() { - return storageVersionMigration; - } - - @JsonProperty("StorageVersionMigration") - public void setStorageVersionMigration(StorageVersionMigration storageVersionMigration) { - this.storageVersionMigration = storageVersionMigration; - } - - @JsonProperty("StorageVersionMigrationList") - public StorageVersionMigrationList getStorageVersionMigrationList() { - return storageVersionMigrationList; - } - - @JsonProperty("StorageVersionMigrationList") - public void setStorageVersionMigrationList(StorageVersionMigrationList storageVersionMigrationList) { - this.storageVersionMigrationList = storageVersionMigrationList; - } - - @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-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageState.java b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageState.java index 72081045210..0d667f0965d 100644 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageState.java +++ b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageState.java @@ -17,6 +17,7 @@ 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; @@ -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 StorageState implements Editable , HasMetadata @JsonProperty("kind") private String kind = "StorageState"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("spec") private StorageStateSpec spec; @JsonProperty("status") @@ -96,7 +97,7 @@ public class StorageState implements Editable , HasMetadata public StorageState() { } - public StorageState(String apiVersion, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, StorageStateSpec spec, StorageStateStatus status) { + public StorageState(String apiVersion, String kind, ObjectMeta metadata, StorageStateSpec spec, StorageStateStatus status) { super(); this.apiVersion = apiVersion; this.kind = kind; @@ -146,12 +147,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-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageStateSpec.java b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageStateSpec.java index 0a67e031950..c90273855e1 100644 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageStateSpec.java +++ b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageStateSpec.java @@ -55,7 +55,7 @@ public class StorageStateSpec implements Editable , Kub { @JsonProperty("resource") - private GroupResource resource; + private StorageStateSpecResource resource; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -66,18 +66,18 @@ public class StorageStateSpec implements Editable , Kub public StorageStateSpec() { } - public StorageStateSpec(GroupResource resource) { + public StorageStateSpec(StorageStateSpecResource resource) { super(); this.resource = resource; } @JsonProperty("resource") - public GroupResource getResource() { + public StorageStateSpecResource getResource() { return resource; } @JsonProperty("resource") - public void setResource(GroupResource resource) { + public void setResource(StorageStateSpecResource resource) { this.resource = resource; } diff --git a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/GroupResource.java b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageStateSpecResource.java similarity index 90% rename from kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/GroupResource.java rename to kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageStateSpecResource.java index 796b364275b..4ba9635dc72 100644 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/GroupResource.java +++ b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageStateSpecResource.java @@ -52,7 +52,7 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class GroupResource implements Editable , KubernetesResource +public class StorageStateSpecResource implements Editable , KubernetesResource { @JsonProperty("group") @@ -66,10 +66,10 @@ public class GroupResource implements Editable , Kubernete * No args constructor for use in serialization * */ - public GroupResource() { + public StorageStateSpecResource() { } - public GroupResource(String group, String resource) { + public StorageStateSpecResource(String group, String resource) { super(); this.group = group; this.resource = resource; @@ -96,12 +96,12 @@ public void setResource(String resource) { } @JsonIgnore - public GroupResourceBuilder edit() { - return new GroupResourceBuilder(this); + public StorageStateSpecResourceBuilder edit() { + return new StorageStateSpecResourceBuilder(this); } @JsonIgnore - public GroupResourceBuilder toBuilder() { + public StorageStateSpecResourceBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageVersionMigration.java b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageVersionMigration.java index c81aa9133de..69f5f7f4005 100644 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageVersionMigration.java +++ b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageVersionMigration.java @@ -17,6 +17,7 @@ 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; @@ -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 StorageVersionMigration implements Editable additionalProperties = new LinkedHashMap(); @@ -69,7 +69,7 @@ public class StorageVersionMigrationSpec implements Editable , KubernetesResource +public class StorageVersionMigrationSpecResource implements Editable , KubernetesResource { @JsonProperty("group") @@ -69,10 +69,10 @@ public class GroupVersionResource implements Editable conditions = new ArrayList<>(); + private List conditions = new ArrayList<>(); @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -69,19 +69,19 @@ public class StorageVersionMigrationStatus implements Editable conditions) { + public StorageVersionMigrationStatus(List conditions) { super(); this.conditions = conditions; } @JsonProperty("conditions") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getConditions() { + public List getConditions() { return conditions; } @JsonProperty("conditions") - public void setConditions(List conditions) { + public void setConditions(List conditions) { this.conditions = conditions; } diff --git a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/MigrationCondition.java b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageVersionMigrationStatusConditions.java similarity index 89% rename from kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/MigrationCondition.java rename to kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageVersionMigrationStatusConditions.java index 0d4fc53f4ba..9a7cb49481c 100644 --- a/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/MigrationCondition.java +++ b/kubernetes-model-generator/openshift-model-storageversionmigrator/src/generated/java/io/fabric8/openshift/api/model/storageversionmigrator/v1alpha1/StorageVersionMigrationStatusConditions.java @@ -55,7 +55,7 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class MigrationCondition implements Editable , KubernetesResource +public class StorageVersionMigrationStatusConditions implements Editable , KubernetesResource { @JsonProperty("lastUpdateTime") @@ -75,10 +75,10 @@ public class MigrationCondition implements Editable , * No args constructor for use in serialization * */ - public MigrationCondition() { + public StorageVersionMigrationStatusConditions() { } - public MigrationCondition(String lastUpdateTime, String message, String reason, String status, String type) { + public StorageVersionMigrationStatusConditions(String lastUpdateTime, String message, String reason, String status, String type) { super(); this.lastUpdateTime = lastUpdateTime; this.message = message; @@ -138,12 +138,12 @@ public void setType(String type) { } @JsonIgnore - public MigrationConditionBuilder edit() { - return new MigrationConditionBuilder(this); + public StorageVersionMigrationStatusConditionsBuilder edit() { + return new StorageVersionMigrationStatusConditionsBuilder(this); } @JsonIgnore - public MigrationConditionBuilder toBuilder() { + public StorageVersionMigrationStatusConditionsBuilder toBuilder() { return edit(); }