diff --git a/Makefile b/Makefile index 5871f8f9502..7a5e2707b7c 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,7 @@ generate-openapi-classes: cd kubernetes-model-generator/kubernetes-model-certificates && mvn -Pgenerate clean install 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 # 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 85a35b9e77a..6c9258aacd3 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-events" "kubernetes-model-extensions" "kubernetes-model-flowcontrol" "kubernetes-model-gatewayapi" diff --git a/kubernetes-model-generator/kubernetes-model-events/Makefile b/kubernetes-model-generator/kubernetes-model-events/Makefile deleted file mode 100644 index c09a7003874..00000000000 --- a/kubernetes-model-generator/kubernetes-model-events/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-events/cmd/generate/generate.go b/kubernetes-model-generator/kubernetes-model-events/cmd/generate/generate.go deleted file mode 100644 index 59315e9cf12..00000000000 --- a/kubernetes-model-generator/kubernetes-model-events/cmd/generate/generate.go +++ /dev/null @@ -1,109 +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" - - v1events "k8s.io/api/events/v1" - v1beta1events "k8s.io/api/events/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 - - V1Beta1Event v1beta1events.Event - V1Beta1EventList v1beta1events.EventList - V1Beta1EventSeries v1beta1events.EventSeries - V1Event v1events.Event - V1EventList v1events.EventList - V1EventSeries v1events.EventSeries -} - -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/events/v1beta1", "events.k8s.io", "io.fabric8.kubernetes.api.model.events.v1beta1", "kubernetes_events_v1beta1_", true}, - {"k8s.io/api/events/v1", "events.k8s.io", "io.fabric8.kubernetes.api.model.events.v1", "kubernetes_events_v1_", 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{}, "events") - 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-events/pom.xml b/kubernetes-model-generator/kubernetes-model-events/pom.xml index d0b1e268d5b..0900d04bfb9 100644 --- a/kubernetes-model-generator/kubernetes-model-events/pom.xml +++ b/kubernetes-model-generator/kubernetes-model-events/pom.xml @@ -41,37 +41,30 @@ 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.21.14.json + ${openapi.schema.kubernetes-latest} + + + io.fabric8.kubernetes.api.model.events + + + ^io\.k8s\.api\.events\..*$ + + + diff --git a/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java b/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java deleted file mode 100644 index 5c20970a34b..00000000000 --- a/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/KubeSchema.java +++ /dev/null @@ -1,332 +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; - -@Generated("jsonschema2pojo") -public class KubeSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private CreateOptions createOptions; - private DeleteOptions deleteOptions; - private GetOptions getOptions; - private Info info; - private ListOptions listOptions; - private ObjectMeta objectMeta; - private ObjectReference objectReference; - private Patch patch; - private PatchOptions patchOptions; - private Quantity quantity; - private RootPaths rootPaths; - private Status status; - private String time; - private TypeMeta typeMeta; - private UpdateOptions updateOptions; - private io.fabric8.kubernetes.api.model.events.v1beta1.Event v1Beta1Event; - private io.fabric8.kubernetes.api.model.events.v1beta1.EventList v1Beta1EventList; - private io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries v1Beta1EventSeries; - private io.fabric8.kubernetes.api.model.events.v1.Event v1Event; - private io.fabric8.kubernetes.api.model.events.v1.EventList v1EventList; - private io.fabric8.kubernetes.api.model.events.v1.EventSeries v1EventSeries; - @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, DeleteOptions deleteOptions, GetOptions getOptions, Info info, ListOptions listOptions, ObjectMeta objectMeta, ObjectReference objectReference, Patch patch, PatchOptions patchOptions, Quantity quantity, RootPaths rootPaths, Status status, String time, TypeMeta typeMeta, UpdateOptions updateOptions, io.fabric8.kubernetes.api.model.events.v1beta1.Event v1Beta1Event, io.fabric8.kubernetes.api.model.events.v1beta1.EventList v1Beta1EventList, io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries v1Beta1EventSeries, io.fabric8.kubernetes.api.model.events.v1.Event v1Event, io.fabric8.kubernetes.api.model.events.v1.EventList v1EventList, io.fabric8.kubernetes.api.model.events.v1.EventSeries v1EventSeries) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.createOptions = createOptions; - this.deleteOptions = deleteOptions; - this.getOptions = getOptions; - this.info = info; - this.listOptions = listOptions; - this.objectMeta = objectMeta; - this.objectReference = objectReference; - this.patch = patch; - this.patchOptions = patchOptions; - this.quantity = quantity; - this.rootPaths = rootPaths; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - this.updateOptions = updateOptions; - this.v1Beta1Event = v1Beta1Event; - this.v1Beta1EventList = v1Beta1EventList; - this.v1Beta1EventSeries = v1Beta1EventSeries; - this.v1Event = v1Event; - this.v1EventList = v1EventList; - this.v1EventSeries = v1EventSeries; - } - - @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("DeleteOptions") - public DeleteOptions getDeleteOptions() { - return deleteOptions; - } - - @JsonProperty("DeleteOptions") - public void setDeleteOptions(DeleteOptions deleteOptions) { - this.deleteOptions = deleteOptions; - } - - @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("ListOptions") - public ListOptions getListOptions() { - return listOptions; - } - - @JsonProperty("ListOptions") - public void setListOptions(ListOptions listOptions) { - this.listOptions = listOptions; - } - - @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("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; - } - - @JsonProperty("V1Beta1Event") - public io.fabric8.kubernetes.api.model.events.v1beta1.Event getV1Beta1Event() { - return v1Beta1Event; - } - - @JsonProperty("V1Beta1Event") - public void setV1Beta1Event(io.fabric8.kubernetes.api.model.events.v1beta1.Event v1Beta1Event) { - this.v1Beta1Event = v1Beta1Event; - } - - @JsonProperty("V1Beta1EventList") - public io.fabric8.kubernetes.api.model.events.v1beta1.EventList getV1Beta1EventList() { - return v1Beta1EventList; - } - - @JsonProperty("V1Beta1EventList") - public void setV1Beta1EventList(io.fabric8.kubernetes.api.model.events.v1beta1.EventList v1Beta1EventList) { - this.v1Beta1EventList = v1Beta1EventList; - } - - @JsonProperty("V1Beta1EventSeries") - public io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries getV1Beta1EventSeries() { - return v1Beta1EventSeries; - } - - @JsonProperty("V1Beta1EventSeries") - public void setV1Beta1EventSeries(io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries v1Beta1EventSeries) { - this.v1Beta1EventSeries = v1Beta1EventSeries; - } - - @JsonProperty("V1Event") - public io.fabric8.kubernetes.api.model.events.v1.Event getV1Event() { - return v1Event; - } - - @JsonProperty("V1Event") - public void setV1Event(io.fabric8.kubernetes.api.model.events.v1.Event v1Event) { - this.v1Event = v1Event; - } - - @JsonProperty("V1EventList") - public io.fabric8.kubernetes.api.model.events.v1.EventList getV1EventList() { - return v1EventList; - } - - @JsonProperty("V1EventList") - public void setV1EventList(io.fabric8.kubernetes.api.model.events.v1.EventList v1EventList) { - this.v1EventList = v1EventList; - } - - @JsonProperty("V1EventSeries") - public io.fabric8.kubernetes.api.model.events.v1.EventSeries getV1EventSeries() { - return v1EventSeries; - } - - @JsonProperty("V1EventSeries") - public void setV1EventSeries(io.fabric8.kubernetes.api.model.events.v1.EventSeries v1EventSeries) { - this.v1EventSeries = v1EventSeries; - } - - @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-events/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java b/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java deleted file mode 100644 index ef33284795b..00000000000 --- a/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/ValidationSchema.java +++ /dev/null @@ -1,332 +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; - -@Generated("jsonschema2pojo") -public class ValidationSchema { - - private APIGroup aPIGroup; - private APIGroupList aPIGroupList; - private KubernetesList baseKubernetesList; - private CreateOptions createOptions; - private DeleteOptions deleteOptions; - private GetOptions getOptions; - private Info info; - private ListOptions listOptions; - private ObjectMeta objectMeta; - private ObjectReference objectReference; - private Patch patch; - private PatchOptions patchOptions; - private Quantity quantity; - private RootPaths rootPaths; - private Status status; - private String time; - private TypeMeta typeMeta; - private UpdateOptions updateOptions; - private io.fabric8.kubernetes.api.model.events.v1beta1.Event v1Beta1Event; - private io.fabric8.kubernetes.api.model.events.v1beta1.EventList v1Beta1EventList; - private io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries v1Beta1EventSeries; - private io.fabric8.kubernetes.api.model.events.v1.Event v1Event; - private io.fabric8.kubernetes.api.model.events.v1.EventList v1EventList; - private io.fabric8.kubernetes.api.model.events.v1.EventSeries v1EventSeries; - @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, DeleteOptions deleteOptions, GetOptions getOptions, Info info, ListOptions listOptions, ObjectMeta objectMeta, ObjectReference objectReference, Patch patch, PatchOptions patchOptions, Quantity quantity, RootPaths rootPaths, Status status, String time, TypeMeta typeMeta, UpdateOptions updateOptions, io.fabric8.kubernetes.api.model.events.v1beta1.Event v1Beta1Event, io.fabric8.kubernetes.api.model.events.v1beta1.EventList v1Beta1EventList, io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries v1Beta1EventSeries, io.fabric8.kubernetes.api.model.events.v1.Event v1Event, io.fabric8.kubernetes.api.model.events.v1.EventList v1EventList, io.fabric8.kubernetes.api.model.events.v1.EventSeries v1EventSeries) { - super(); - this.aPIGroup = aPIGroup; - this.aPIGroupList = aPIGroupList; - this.baseKubernetesList = baseKubernetesList; - this.createOptions = createOptions; - this.deleteOptions = deleteOptions; - this.getOptions = getOptions; - this.info = info; - this.listOptions = listOptions; - this.objectMeta = objectMeta; - this.objectReference = objectReference; - this.patch = patch; - this.patchOptions = patchOptions; - this.quantity = quantity; - this.rootPaths = rootPaths; - this.status = status; - this.time = time; - this.typeMeta = typeMeta; - this.updateOptions = updateOptions; - this.v1Beta1Event = v1Beta1Event; - this.v1Beta1EventList = v1Beta1EventList; - this.v1Beta1EventSeries = v1Beta1EventSeries; - this.v1Event = v1Event; - this.v1EventList = v1EventList; - this.v1EventSeries = v1EventSeries; - } - - @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("DeleteOptions") - public DeleteOptions getDeleteOptions() { - return deleteOptions; - } - - @JsonProperty("DeleteOptions") - public void setDeleteOptions(DeleteOptions deleteOptions) { - this.deleteOptions = deleteOptions; - } - - @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("ListOptions") - public ListOptions getListOptions() { - return listOptions; - } - - @JsonProperty("ListOptions") - public void setListOptions(ListOptions listOptions) { - this.listOptions = listOptions; - } - - @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("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; - } - - @JsonProperty("V1Beta1Event") - public io.fabric8.kubernetes.api.model.events.v1beta1.Event getV1Beta1Event() { - return v1Beta1Event; - } - - @JsonProperty("V1Beta1Event") - public void setV1Beta1Event(io.fabric8.kubernetes.api.model.events.v1beta1.Event v1Beta1Event) { - this.v1Beta1Event = v1Beta1Event; - } - - @JsonProperty("V1Beta1EventList") - public io.fabric8.kubernetes.api.model.events.v1beta1.EventList getV1Beta1EventList() { - return v1Beta1EventList; - } - - @JsonProperty("V1Beta1EventList") - public void setV1Beta1EventList(io.fabric8.kubernetes.api.model.events.v1beta1.EventList v1Beta1EventList) { - this.v1Beta1EventList = v1Beta1EventList; - } - - @JsonProperty("V1Beta1EventSeries") - public io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries getV1Beta1EventSeries() { - return v1Beta1EventSeries; - } - - @JsonProperty("V1Beta1EventSeries") - public void setV1Beta1EventSeries(io.fabric8.kubernetes.api.model.events.v1beta1.EventSeries v1Beta1EventSeries) { - this.v1Beta1EventSeries = v1Beta1EventSeries; - } - - @JsonProperty("V1Event") - public io.fabric8.kubernetes.api.model.events.v1.Event getV1Event() { - return v1Event; - } - - @JsonProperty("V1Event") - public void setV1Event(io.fabric8.kubernetes.api.model.events.v1.Event v1Event) { - this.v1Event = v1Event; - } - - @JsonProperty("V1EventList") - public io.fabric8.kubernetes.api.model.events.v1.EventList getV1EventList() { - return v1EventList; - } - - @JsonProperty("V1EventList") - public void setV1EventList(io.fabric8.kubernetes.api.model.events.v1.EventList v1EventList) { - this.v1EventList = v1EventList; - } - - @JsonProperty("V1EventSeries") - public io.fabric8.kubernetes.api.model.events.v1.EventSeries getV1EventSeries() { - return v1EventSeries; - } - - @JsonProperty("V1EventSeries") - public void setV1EventSeries(io.fabric8.kubernetes.api.model.events.v1.EventSeries v1EventSeries) { - this.v1EventSeries = v1EventSeries; - } - - @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-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1/Event.java b/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1/Event.java index 8fade33c0f5..82512f83f5b 100644 --- a/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1/Event.java +++ b/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1/Event.java @@ -20,6 +20,8 @@ import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.MicroTime; 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; @@ -61,13 +63,13 @@ "" }) @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), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectReference.class), + @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) }) @@ -107,15 +109,15 @@ public class Event implements Editable , HasMetadata, Namespaced @JsonProperty("kind") private String kind = "Event"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("note") private String note; @JsonProperty("reason") private String reason; @JsonProperty("regarding") - private io.fabric8.kubernetes.api.model.ObjectReference regarding; + private ObjectReference regarding; @JsonProperty("related") - private io.fabric8.kubernetes.api.model.ObjectReference related; + private ObjectReference related; @JsonProperty("reportingController") private String reportingController; @JsonProperty("reportingInstance") @@ -134,7 +136,7 @@ public class Event implements Editable , HasMetadata, Namespaced public Event() { } - public Event(String action, String apiVersion, Integer deprecatedCount, String deprecatedFirstTimestamp, String deprecatedLastTimestamp, EventSource deprecatedSource, MicroTime eventTime, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, String note, String reason, io.fabric8.kubernetes.api.model.ObjectReference regarding, io.fabric8.kubernetes.api.model.ObjectReference related, String reportingController, String reportingInstance, EventSeries series, String type) { + public Event(String action, String apiVersion, Integer deprecatedCount, String deprecatedFirstTimestamp, String deprecatedLastTimestamp, EventSource deprecatedSource, MicroTime eventTime, String kind, ObjectMeta metadata, String note, String reason, ObjectReference regarding, ObjectReference related, String reportingController, String reportingInstance, EventSeries series, String type) { super(); this.action = action; this.apiVersion = apiVersion; @@ -256,12 +258,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; } @@ -286,22 +288,22 @@ public void setReason(String reason) { } @JsonProperty("regarding") - public io.fabric8.kubernetes.api.model.ObjectReference getRegarding() { + public ObjectReference getRegarding() { return regarding; } @JsonProperty("regarding") - public void setRegarding(io.fabric8.kubernetes.api.model.ObjectReference regarding) { + public void setRegarding(ObjectReference regarding) { this.regarding = regarding; } @JsonProperty("related") - public io.fabric8.kubernetes.api.model.ObjectReference getRelated() { + public ObjectReference getRelated() { return related; } @JsonProperty("related") - public void setRelated(io.fabric8.kubernetes.api.model.ObjectReference related) { + public void setRelated(ObjectReference related) { this.related = related; } diff --git a/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1beta1/Event.java b/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1beta1/Event.java index 8e2175b5a2a..47dcfca45f3 100644 --- a/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1beta1/Event.java +++ b/kubernetes-model-generator/kubernetes-model-events/src/generated/java/io/fabric8/kubernetes/api/model/events/v1beta1/Event.java @@ -20,6 +20,8 @@ import io.fabric8.kubernetes.api.model.LocalObjectReference; import io.fabric8.kubernetes.api.model.MicroTime; 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; @@ -61,13 +63,13 @@ "" }) @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), @BuildableReference(ResourceRequirements.class), @BuildableReference(IntOrString.class), - @BuildableReference(io.fabric8.kubernetes.api.model.ObjectReference.class), + @BuildableReference(ObjectReference.class), @BuildableReference(LocalObjectReference.class), @BuildableReference(PersistentVolumeClaim.class) }) @@ -107,15 +109,15 @@ public class Event implements Editable , HasMetadata, Namespaced @JsonProperty("kind") private String kind = "Event"; @JsonProperty("metadata") - private io.fabric8.kubernetes.api.model.ObjectMeta metadata; + private ObjectMeta metadata; @JsonProperty("note") private String note; @JsonProperty("reason") private String reason; @JsonProperty("regarding") - private io.fabric8.kubernetes.api.model.ObjectReference regarding; + private ObjectReference regarding; @JsonProperty("related") - private io.fabric8.kubernetes.api.model.ObjectReference related; + private ObjectReference related; @JsonProperty("reportingController") private String reportingController; @JsonProperty("reportingInstance") @@ -134,7 +136,7 @@ public class Event implements Editable , HasMetadata, Namespaced public Event() { } - public Event(String action, String apiVersion, Integer deprecatedCount, String deprecatedFirstTimestamp, String deprecatedLastTimestamp, EventSource deprecatedSource, MicroTime eventTime, String kind, io.fabric8.kubernetes.api.model.ObjectMeta metadata, String note, String reason, io.fabric8.kubernetes.api.model.ObjectReference regarding, io.fabric8.kubernetes.api.model.ObjectReference related, String reportingController, String reportingInstance, EventSeries series, String type) { + public Event(String action, String apiVersion, Integer deprecatedCount, String deprecatedFirstTimestamp, String deprecatedLastTimestamp, EventSource deprecatedSource, MicroTime eventTime, String kind, ObjectMeta metadata, String note, String reason, ObjectReference regarding, ObjectReference related, String reportingController, String reportingInstance, EventSeries series, String type) { super(); this.action = action; this.apiVersion = apiVersion; @@ -256,12 +258,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; } @@ -286,22 +288,22 @@ public void setReason(String reason) { } @JsonProperty("regarding") - public io.fabric8.kubernetes.api.model.ObjectReference getRegarding() { + public ObjectReference getRegarding() { return regarding; } @JsonProperty("regarding") - public void setRegarding(io.fabric8.kubernetes.api.model.ObjectReference regarding) { + public void setRegarding(ObjectReference regarding) { this.regarding = regarding; } @JsonProperty("related") - public io.fabric8.kubernetes.api.model.ObjectReference getRelated() { + public ObjectReference getRelated() { return related; } @JsonProperty("related") - public void setRelated(io.fabric8.kubernetes.api.model.ObjectReference related) { + public void setRelated(ObjectReference related) { this.related = related; }