diff --git a/kubernetes-model-generator/openapi/generator/pkg/parser/parser.go b/kubernetes-model-generator/openapi/generator/pkg/parser/parser.go index e284db97aee..ab15827a184 100644 --- a/kubernetes-model-generator/openapi/generator/pkg/parser/parser.go +++ b/kubernetes-model-generator/openapi/generator/pkg/parser/parser.go @@ -124,11 +124,11 @@ func resolveType(typ *types.Type) string { isList := false isObject := false for _, m := range typ.Members { - if m.Type.Name == listMeta { + if m.Embedded == true && m.Type.Name == listMeta { isList = true // stop iterating, if it's a list then it's not an object break - } else if m.Type.Name == typeMeta { + } else if m.Embedded == true && m.Type.Name == typeMeta { isObject = true // keep iterating, maybe it's a list } diff --git a/kubernetes-model-generator/openapi/schemas/openshift-generated.json b/kubernetes-model-generator/openapi/schemas/openshift-generated.json index 1107d57b5e1..70bad48f44a 100644 --- a/kubernetes-model-generator/openapi/schemas/openshift-generated.json +++ b/kubernetes-model-generator/openapi/schemas/openshift-generated.json @@ -34178,7 +34178,7 @@ } }, "x-fabric8-info": { - "Type": "object", + "Type": "nested", "Group": "console.openshift.io", "Version": "v1", "Kind": "ConsoleYAMLSampleSpec", diff --git a/kubernetes-model-generator/openshift-model-console/pom.xml b/kubernetes-model-generator/openshift-model-console/pom.xml index e85debcf077..9de38176276 100644 --- a/kubernetes-model-generator/openshift-model-console/pom.xml +++ b/kubernetes-model-generator/openshift-model-console/pom.xml @@ -60,12 +60,8 @@ - ${openapi.schema.openshift-latest} + ${openapi.schema.openshift-generated} - - io.fabric8.kubernetes.api.model - io.fabric8.openshift.api.model.console - ^io\.openshift\.console\..*$ diff --git a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpecApplicationMenu.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ApplicationMenuSpec.java similarity index 89% rename from kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpecApplicationMenu.java rename to kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ApplicationMenuSpec.java index 3ec042b050d..4a92dab03ef 100644 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpecApplicationMenu.java +++ b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ApplicationMenuSpec.java @@ -52,7 +52,7 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class ConsoleLinkSpecApplicationMenu implements Editable , KubernetesResource +public class ApplicationMenuSpec implements Editable , KubernetesResource { @JsonProperty("imageURL") @@ -66,10 +66,10 @@ public class ConsoleLinkSpecApplicationMenu implements Editable , KubernetesResource +public class CLIDownloadLink implements Editable , KubernetesResource { @JsonProperty("href") @@ -66,10 +66,10 @@ public class ConsoleCLIDownloadSpecLinks implements Editable links = new ArrayList<>(); + private List links = new ArrayList<>(); @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -75,7 +75,7 @@ public class ConsoleCLIDownloadSpec implements Editable links) { + public ConsoleCLIDownloadSpec(String description, String displayName, List links) { super(); this.description = description; this.displayName = displayName; @@ -104,12 +104,12 @@ public void setDisplayName(String displayName) { @JsonProperty("links") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getLinks() { + public List getLinks() { return links; } @JsonProperty("links") - public void setLinks(List links) { + public void setLinks(List links) { this.links = links; } diff --git a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpec.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpec.java index 8fb7fb1c9e4..307319dc17d 100644 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpec.java +++ b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpec.java @@ -59,13 +59,13 @@ public class ConsoleLinkSpec implements Editable , Kuber { @JsonProperty("applicationMenu") - private ConsoleLinkSpecApplicationMenu applicationMenu; + private ApplicationMenuSpec applicationMenu; @JsonProperty("href") private String href; @JsonProperty("location") private String location; @JsonProperty("namespaceDashboard") - private ConsoleLinkSpecNamespaceDashboard namespaceDashboard; + private NamespaceDashboardSpec namespaceDashboard; @JsonProperty("text") private String text; @JsonIgnore @@ -78,7 +78,7 @@ public class ConsoleLinkSpec implements Editable , Kuber public ConsoleLinkSpec() { } - public ConsoleLinkSpec(ConsoleLinkSpecApplicationMenu applicationMenu, String href, String location, ConsoleLinkSpecNamespaceDashboard namespaceDashboard, String text) { + public ConsoleLinkSpec(ApplicationMenuSpec applicationMenu, String href, String location, NamespaceDashboardSpec namespaceDashboard, String text) { super(); this.applicationMenu = applicationMenu; this.href = href; @@ -88,12 +88,12 @@ public ConsoleLinkSpec(ConsoleLinkSpecApplicationMenu applicationMenu, String hr } @JsonProperty("applicationMenu") - public ConsoleLinkSpecApplicationMenu getApplicationMenu() { + public ApplicationMenuSpec getApplicationMenu() { return applicationMenu; } @JsonProperty("applicationMenu") - public void setApplicationMenu(ConsoleLinkSpecApplicationMenu applicationMenu) { + public void setApplicationMenu(ApplicationMenuSpec applicationMenu) { this.applicationMenu = applicationMenu; } @@ -118,12 +118,12 @@ public void setLocation(String location) { } @JsonProperty("namespaceDashboard") - public ConsoleLinkSpecNamespaceDashboard getNamespaceDashboard() { + public NamespaceDashboardSpec getNamespaceDashboard() { return namespaceDashboard; } @JsonProperty("namespaceDashboard") - public void setNamespaceDashboard(ConsoleLinkSpecNamespaceDashboard namespaceDashboard) { + public void setNamespaceDashboard(NamespaceDashboardSpec namespaceDashboard) { this.namespaceDashboard = namespaceDashboard; } diff --git a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpecNDNamespaceSelector.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpecNDNamespaceSelector.java deleted file mode 100644 index 28124301674..00000000000 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleLinkSpecNDNamespaceSelector.java +++ /dev/null @@ -1,129 +0,0 @@ - -package io.fabric8.openshift.api.model.console.v1; - -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.LabelSelectorRequirement; -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({ - "matchExpressions", - "matchLabels" -}) -@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 ConsoleLinkSpecNDNamespaceSelector implements Editable , KubernetesResource -{ - - @JsonProperty("matchExpressions") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List matchExpressions = new ArrayList<>(); - @JsonProperty("matchLabels") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private Map matchLabels = new LinkedHashMap<>(); - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsoleLinkSpecNDNamespaceSelector() { - } - - public ConsoleLinkSpecNDNamespaceSelector(List matchExpressions, Map matchLabels) { - super(); - this.matchExpressions = matchExpressions; - this.matchLabels = matchLabels; - } - - @JsonProperty("matchExpressions") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getMatchExpressions() { - return matchExpressions; - } - - @JsonProperty("matchExpressions") - public void setMatchExpressions(List matchExpressions) { - this.matchExpressions = matchExpressions; - } - - @JsonProperty("matchLabels") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - public Map getMatchLabels() { - return matchLabels; - } - - @JsonProperty("matchLabels") - public void setMatchLabels(Map matchLabels) { - this.matchLabels = matchLabels; - } - - @JsonIgnore - public ConsoleLinkSpecNDNamespaceSelectorBuilder edit() { - return new ConsoleLinkSpecNDNamespaceSelectorBuilder(this); - } - - @JsonIgnore - public ConsoleLinkSpecNDNamespaceSelectorBuilder 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-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleNotificationSpec.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleNotificationSpec.java index 332a9c89219..5e6549aa089 100644 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleNotificationSpec.java +++ b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleNotificationSpec.java @@ -63,7 +63,7 @@ public class ConsoleNotificationSpec implements Editable , KubernetesResource +public class ConsolePluginBackend implements Editable , KubernetesResource { @JsonProperty("service") - private ConsolePluginSpecBService service; + private ConsolePluginService service; @JsonProperty("type") private String type; @JsonIgnore @@ -66,22 +66,22 @@ public class ConsolePluginSpecBackend implements Editable , KubernetesResource +public class ConsolePluginI18n implements Editable , KubernetesResource { @JsonProperty("loadType") @@ -63,10 +63,10 @@ public class ConsolePluginSpecI18n implements Editable , KubernetesResource +public class ConsolePluginProxy implements Editable , KubernetesResource { @JsonProperty("alias") @@ -64,7 +64,7 @@ public class ConsolePluginSpecProxy implements Editable additionalProperties = new LinkedHashMap(); @@ -72,10 +72,10 @@ public class ConsolePluginSpecProxy implements Editable , KubernetesResource +public class ConsolePluginProxyEndpoint implements Editable , KubernetesResource { @JsonProperty("service") - private ConsolePluginSpecPEService service; + private ConsolePluginProxyServiceConfig service; @JsonProperty("type") private String type; @JsonIgnore @@ -66,22 +66,22 @@ public class ConsolePluginSpecPEndpoint implements Editable , KubernetesResource +public class ConsolePluginProxyServiceConfig implements Editable , KubernetesResource { @JsonProperty("name") @@ -69,10 +69,10 @@ public class ConsolePluginSpecPEService implements Editable , KubernetesResource +public class ConsolePluginService implements Editable , KubernetesResource { @JsonProperty("basePath") @@ -72,10 +72,10 @@ public class ConsolePluginSpecBService implements Editable , K { @JsonProperty("backend") - private ConsolePluginSpecBackend backend; + private ConsolePluginBackend backend; @JsonProperty("displayName") private String displayName; @JsonProperty("i18n") - private ConsolePluginSpecI18n i18n; + private ConsolePluginI18n i18n; @JsonProperty("proxy") @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List proxy = new ArrayList<>(); + private List proxy = new ArrayList<>(); @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -78,7 +78,7 @@ public class ConsolePluginSpec implements Editable , K public ConsolePluginSpec() { } - public ConsolePluginSpec(ConsolePluginSpecBackend backend, String displayName, ConsolePluginSpecI18n i18n, List proxy) { + public ConsolePluginSpec(ConsolePluginBackend backend, String displayName, ConsolePluginI18n i18n, List proxy) { super(); this.backend = backend; this.displayName = displayName; @@ -87,12 +87,12 @@ public ConsolePluginSpec(ConsolePluginSpecBackend backend, String displayName, C } @JsonProperty("backend") - public ConsolePluginSpecBackend getBackend() { + public ConsolePluginBackend getBackend() { return backend; } @JsonProperty("backend") - public void setBackend(ConsolePluginSpecBackend backend) { + public void setBackend(ConsolePluginBackend backend) { this.backend = backend; } @@ -107,23 +107,23 @@ public void setDisplayName(String displayName) { } @JsonProperty("i18n") - public ConsolePluginSpecI18n getI18n() { + public ConsolePluginI18n getI18n() { return i18n; } @JsonProperty("i18n") - public void setI18n(ConsolePluginSpecI18n i18n) { + public void setI18n(ConsolePluginI18n i18n) { this.i18n = i18n; } @JsonProperty("proxy") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getProxy() { + public List getProxy() { return proxy; } @JsonProperty("proxy") - public void setProxy(List proxy) { + public void setProxy(List proxy) { this.proxy = proxy; } diff --git a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartSpec.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartSpec.java index a51938423e2..826342c0934 100644 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartSpec.java +++ b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartSpec.java @@ -93,7 +93,7 @@ public class ConsoleQuickStartSpec implements Editable tags = new ArrayList<>(); @JsonProperty("tasks") @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List tasks = new ArrayList<>(); + private List tasks = new ArrayList<>(); @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -104,7 +104,7 @@ public class ConsoleQuickStartSpec implements Editable accessReviewResources, String conclusion, String description, String displayName, Integer durationMinutes, String icon, String introduction, List nextQuickStart, List prerequisites, List tags, List tasks) { + public ConsoleQuickStartSpec(List accessReviewResources, String conclusion, String description, String displayName, Integer durationMinutes, String icon, String introduction, List nextQuickStart, List prerequisites, List tags, List tasks) { super(); this.accessReviewResources = accessReviewResources; this.conclusion = conclusion; @@ -225,12 +225,12 @@ public void setTags(List tags) { @JsonProperty("tasks") @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getTasks() { + public List getTasks() { return tasks; } @JsonProperty("tasks") - public void setTasks(List tasks) { + public void setTasks(List tasks) { this.tasks = tasks; } diff --git a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartSpecTasks.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartTask.java similarity index 82% rename from kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartSpecTasks.java rename to kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartTask.java index 277915a2392..e5159488d55 100644 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartSpecTasks.java +++ b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleQuickStartTask.java @@ -54,15 +54,15 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class ConsoleQuickStartSpecTasks implements Editable , KubernetesResource +public class ConsoleQuickStartTask implements Editable , KubernetesResource { @JsonProperty("description") private String description; @JsonProperty("review") - private ConsoleQuickStartSpecTReview review; + private ConsoleQuickStartTaskReview review; @JsonProperty("summary") - private ConsoleQuickStartSpecTSummary summary; + private ConsoleQuickStartTaskSummary summary; @JsonProperty("title") private String title; @JsonIgnore @@ -72,10 +72,10 @@ public class ConsoleQuickStartSpecTasks implements Editable , KubernetesResource +public class ConsoleQuickStartTaskReview implements Editable , KubernetesResource { @JsonProperty("failedTaskHelp") @@ -66,10 +66,10 @@ public class ConsoleQuickStartSpecTReview implements Editable , KubernetesResource +public class ConsoleQuickStartTaskSummary implements Editable , KubernetesResource { @JsonProperty("failed") @@ -66,10 +66,10 @@ public class ConsoleQuickStartSpecTSummary implements Editable , KubernetesResource +public class ConsoleSampleContainerImportSource implements Editable , KubernetesResource { @JsonProperty("image") private String image; @JsonProperty("service") - private ConsoleSampleSpecSCIService service; + private ConsoleSampleContainerImportSourceService service; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -66,10 +66,10 @@ public class ConsoleSampleSpecSContainerImport implements Editable , KubernetesResource +public class ConsoleSampleContainerImportSourceService implements Editable , KubernetesResource { @JsonProperty("targetPort") @@ -63,10 +63,10 @@ public class ConsoleSampleSpecSCIService implements Editable , KubernetesResource +public class ConsoleSampleGitImportSource implements Editable , KubernetesResource { @JsonProperty("repository") - private ConsoleSampleSpecSGIRepository repository; + private ConsoleSampleGitImportSourceRepository repository; @JsonProperty("service") - private ConsoleSampleSpecSGIService service; + private ConsoleSampleGitImportSourceService service; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); @@ -66,42 +66,42 @@ public class ConsoleSampleSpecSGitImport implements Editable , KubernetesResource +public class ConsoleSampleGitImportSourceRepository implements Editable , KubernetesResource { @JsonProperty("contextDir") @@ -69,10 +69,10 @@ public class ConsoleSampleSpecSGIRepository implements Editable , KubernetesResource +public class ConsoleSampleGitImportSourceService implements Editable , KubernetesResource { @JsonProperty("targetPort") @@ -63,10 +63,10 @@ public class ConsoleSampleSpecSGIService implements Editable , KubernetesResource +public class ConsoleSampleSource implements Editable , KubernetesResource { @JsonProperty("containerImport") - private ConsoleSampleSpecSContainerImport containerImport; + private ConsoleSampleContainerImportSource containerImport; @JsonProperty("gitImport") - private ConsoleSampleSpecSGitImport gitImport; + private ConsoleSampleGitImportSource gitImport; @JsonProperty("type") private String type; @JsonIgnore @@ -69,10 +69,10 @@ public class ConsoleSampleSpecSource implements Editable , K @JsonProperty("provider") private String provider; @JsonProperty("source") - private ConsoleSampleSpecSource source; + private ConsoleSampleSource source; @JsonProperty("tags") @JsonInclude(JsonInclude.Include.NON_EMPTY) private List tags = new ArrayList<>(); @@ -90,7 +90,7 @@ public class ConsoleSampleSpec implements Editable , K public ConsoleSampleSpec() { } - public ConsoleSampleSpec(String _abstract, String description, String icon, String provider, ConsoleSampleSpecSource source, List tags, String title, String type) { + public ConsoleSampleSpec(String _abstract, String description, String icon, String provider, ConsoleSampleSource source, List tags, String title, String type) { super(); this._abstract = _abstract; this.description = description; @@ -143,12 +143,12 @@ public void setProvider(String provider) { } @JsonProperty("source") - public ConsoleSampleSpecSource getSource() { + public ConsoleSampleSource getSource() { return source; } @JsonProperty("source") - public void setSource(ConsoleSampleSpecSource source) { + public void setSource(ConsoleSampleSource source) { this.source = source; } diff --git a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleYAMLSampleSpec.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleYAMLSampleSpec.java index 41d612f9134..ecb41988d87 100644 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleYAMLSampleSpec.java +++ b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleYAMLSampleSpec.java @@ -22,6 +22,7 @@ import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; import io.fabric8.kubernetes.api.model.PodTemplateSpec; import io.fabric8.kubernetes.api.model.ResourceRequirements; +import io.fabric8.kubernetes.api.model.TypeMeta; import io.sundr.builder.annotations.Buildable; import io.sundr.builder.annotations.BuildableReference; import lombok.EqualsAndHashCode; @@ -63,7 +64,7 @@ public class ConsoleYAMLSampleSpec implements Editable , KubernetesResource -{ - - @JsonProperty("apiVersion") - private String apiVersion; - @JsonProperty("kind") - private String kind; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsoleYAMLSampleSpecTargetResource() { - } - - public ConsoleYAMLSampleSpecTargetResource(String apiVersion, String kind) { - super(); - this.apiVersion = apiVersion; - this.kind = kind; - } - - @JsonProperty("apiVersion") - public String getApiVersion() { - return apiVersion; - } - - @JsonProperty("apiVersion") - public void setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - } - - @JsonProperty("kind") - public String getKind() { - return kind; - } - - @JsonProperty("kind") - public void setKind(String kind) { - this.kind = kind; - } - - @JsonIgnore - public ConsoleYAMLSampleSpecTargetResourceBuilder edit() { - return new ConsoleYAMLSampleSpecTargetResourceBuilder(this); - } - - @JsonIgnore - public ConsoleYAMLSampleSpecTargetResourceBuilder 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-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleNotificationSpecLink.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/Link.java similarity index 89% rename from kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleNotificationSpecLink.java rename to kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/Link.java index adde9f1663c..1318ce54464 100644 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/ConsoleNotificationSpecLink.java +++ b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1/Link.java @@ -52,7 +52,7 @@ @BuildableReference(PersistentVolumeClaim.class) }) @Generated("jsonschema2pojo") -public class ConsoleNotificationSpecLink implements Editable , KubernetesResource +public class Link implements Editable , KubernetesResource { @JsonProperty("href") @@ -66,10 +66,10 @@ public class ConsoleNotificationSpecLink implements Editable , KubernetesResource +public class NamespaceDashboardSpec implements Editable , KubernetesResource { @JsonProperty("namespaceSelector") - private ConsoleLinkSpecNDNamespaceSelector namespaceSelector; + private LabelSelector namespaceSelector; @JsonProperty("namespaces") @JsonInclude(JsonInclude.Include.NON_EMPTY) private List namespaces = new ArrayList<>(); @@ -69,22 +69,22 @@ public class ConsoleLinkSpecNamespaceDashboard implements Editable namespaces) { + public NamespaceDashboardSpec(LabelSelector namespaceSelector, List namespaces) { super(); this.namespaceSelector = namespaceSelector; this.namespaces = namespaces; } @JsonProperty("namespaceSelector") - public ConsoleLinkSpecNDNamespaceSelector getNamespaceSelector() { + public LabelSelector getNamespaceSelector() { return namespaceSelector; } @JsonProperty("namespaceSelector") - public void setNamespaceSelector(ConsoleLinkSpecNDNamespaceSelector namespaceSelector) { + public void setNamespaceSelector(LabelSelector namespaceSelector) { this.namespaceSelector = namespaceSelector; } @@ -100,12 +100,12 @@ public void setNamespaces(List namespaces) { } @JsonIgnore - public ConsoleLinkSpecNamespaceDashboardBuilder edit() { - return new ConsoleLinkSpecNamespaceDashboardBuilder(this); + public NamespaceDashboardSpecBuilder edit() { + return new NamespaceDashboardSpecBuilder(this); } @JsonIgnore - public ConsoleLinkSpecNamespaceDashboardBuilder toBuilder() { + public NamespaceDashboardSpecBuilder toBuilder() { return edit(); } diff --git a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePlugin.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePlugin.java deleted file mode 100644 index 402bfffb0c4..00000000000 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePlugin.java +++ /dev/null @@ -1,189 +0,0 @@ - -package io.fabric8.openshift.api.model.console.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.ObjectMeta; -import io.fabric8.kubernetes.api.model.ObjectReference; -import io.fabric8.kubernetes.api.model.PersistentVolumeClaim; -import io.fabric8.kubernetes.api.model.PodTemplateSpec; -import io.fabric8.kubernetes.api.model.ResourceRequirements; -import io.fabric8.kubernetes.model.annotation.Group; -import io.fabric8.kubernetes.model.annotation.Version; -import io.sundr.builder.annotations.Buildable; -import io.sundr.builder.annotations.BuildableReference; -import io.sundr.transform.annotations.TemplateTransformation; -import io.sundr.transform.annotations.TemplateTransformations; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.experimental.Accessors; - -@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class) -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "apiVersion", - "kind", - "metadata", - "spec" -}) -@ToString -@EqualsAndHashCode -@Accessors(prefix = { - "_", - "" -}) -@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder", refs = { - @BuildableReference(ObjectMeta.class), - @BuildableReference(LabelSelector.class), - @BuildableReference(Container.class), - @BuildableReference(PodTemplateSpec.class), - @BuildableReference(ResourceRequirements.class), - @BuildableReference(IntOrString.class), - @BuildableReference(ObjectReference.class), - @BuildableReference(LocalObjectReference.class), - @BuildableReference(PersistentVolumeClaim.class) -}) -@TemplateTransformations({ - @TemplateTransformation(value = "/manifest.vm", outputPath = "META-INF/services/io.fabric8.kubernetes.api.model.KubernetesResource", gather = true) -}) -@Version("v1alpha1") -@Group("console.openshift.io") -@Generated("jsonschema2pojo") -public class ConsolePlugin implements Editable , HasMetadata -{ - - /** - * - * (Required) - * - */ - @JsonProperty("apiVersion") - private String apiVersion = "console.openshift.io/v1alpha1"; - /** - * - * (Required) - * - */ - @JsonProperty("kind") - private String kind = "ConsolePlugin"; - @JsonProperty("metadata") - private ObjectMeta metadata; - @JsonProperty("spec") - private ConsolePluginSpec spec; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsolePlugin() { - } - - public ConsolePlugin(String apiVersion, String kind, ObjectMeta metadata, ConsolePluginSpec spec) { - super(); - this.apiVersion = apiVersion; - this.kind = kind; - this.metadata = metadata; - this.spec = spec; - } - - /** - * - * (Required) - * - */ - @JsonProperty("apiVersion") - public String getApiVersion() { - return apiVersion; - } - - /** - * - * (Required) - * - */ - @JsonProperty("apiVersion") - public void setApiVersion(String apiVersion) { - this.apiVersion = apiVersion; - } - - /** - * - * (Required) - * - */ - @JsonProperty("kind") - public String getKind() { - return kind; - } - - /** - * - * (Required) - * - */ - @JsonProperty("kind") - public void setKind(String kind) { - this.kind = kind; - } - - @JsonProperty("metadata") - public ObjectMeta getMetadata() { - return metadata; - } - - @JsonProperty("metadata") - public void setMetadata(ObjectMeta metadata) { - this.metadata = metadata; - } - - @JsonProperty("spec") - public ConsolePluginSpec getSpec() { - return spec; - } - - @JsonProperty("spec") - public void setSpec(ConsolePluginSpec spec) { - this.spec = spec; - } - - @JsonIgnore - public ConsolePluginBuilder edit() { - return new ConsolePluginBuilder(this); - } - - @JsonIgnore - public ConsolePluginBuilder 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-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginList.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginList.java deleted file mode 100644 index 134d4fafbb5..00000000000 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginList.java +++ /dev/null @@ -1,195 +0,0 @@ - -package io.fabric8.openshift.api.model.console.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("console.openshift.io") -@Generated("jsonschema2pojo") -public class ConsolePluginList implements Editable , KubernetesResource, KubernetesResourceList -{ - - /** - * - * (Required) - * - */ - @JsonProperty("apiVersion") - private String apiVersion = "console.openshift.io/v1alpha1"; - @JsonProperty("items") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List items = new ArrayList<>(); - /** - * - * (Required) - * - */ - @JsonProperty("kind") - private String kind = "ConsolePluginList"; - @JsonProperty("metadata") - private ListMeta metadata; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsolePluginList() { - } - - public ConsolePluginList(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 ConsolePluginListBuilder edit() { - return new ConsolePluginListBuilder(this); - } - - @JsonIgnore - public ConsolePluginListBuilder 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-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpec.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpec.java deleted file mode 100644 index c2df69c173e..00000000000 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpec.java +++ /dev/null @@ -1,140 +0,0 @@ - -package io.fabric8.openshift.api.model.console.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({ - "displayName", - "proxy", - "service" -}) -@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 ConsolePluginSpec implements Editable , KubernetesResource -{ - - @JsonProperty("displayName") - private String displayName; - @JsonProperty("proxy") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List proxy = new ArrayList<>(); - @JsonProperty("service") - private ConsolePluginSpecService service; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsolePluginSpec() { - } - - public ConsolePluginSpec(String displayName, List proxy, ConsolePluginSpecService service) { - super(); - this.displayName = displayName; - this.proxy = proxy; - this.service = service; - } - - @JsonProperty("displayName") - public String getDisplayName() { - return displayName; - } - - @JsonProperty("displayName") - public void setDisplayName(String displayName) { - this.displayName = displayName; - } - - @JsonProperty("proxy") - @JsonInclude(JsonInclude.Include.NON_EMPTY) - public List getProxy() { - return proxy; - } - - @JsonProperty("proxy") - public void setProxy(List proxy) { - this.proxy = proxy; - } - - @JsonProperty("service") - public ConsolePluginSpecService getService() { - return service; - } - - @JsonProperty("service") - public void setService(ConsolePluginSpecService service) { - this.service = service; - } - - @JsonIgnore - public ConsolePluginSpecBuilder edit() { - return new ConsolePluginSpecBuilder(this); - } - - @JsonIgnore - public ConsolePluginSpecBuilder 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-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecPService.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecPService.java deleted file mode 100644 index 63577cfaaa6..00000000000 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecPService.java +++ /dev/null @@ -1,136 +0,0 @@ - -package io.fabric8.openshift.api.model.console.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({ - "name", - "namespace", - "port" -}) -@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 ConsolePluginSpecPService implements Editable , KubernetesResource -{ - - @JsonProperty("name") - private String name; - @JsonProperty("namespace") - private String namespace; - @JsonProperty("port") - private Integer port; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsolePluginSpecPService() { - } - - public ConsolePluginSpecPService(String name, String namespace, Integer port) { - super(); - this.name = name; - this.namespace = namespace; - this.port = port; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - @JsonProperty("namespace") - public String getNamespace() { - return namespace; - } - - @JsonProperty("namespace") - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - @JsonProperty("port") - public Integer getPort() { - return port; - } - - @JsonProperty("port") - public void setPort(Integer port) { - this.port = port; - } - - @JsonIgnore - public ConsolePluginSpecPServiceBuilder edit() { - return new ConsolePluginSpecPServiceBuilder(this); - } - - @JsonIgnore - public ConsolePluginSpecPServiceBuilder 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-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecProxy.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecProxy.java deleted file mode 100644 index c9813687217..00000000000 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecProxy.java +++ /dev/null @@ -1,164 +0,0 @@ - -package io.fabric8.openshift.api.model.console.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({ - "alias", - "authorize", - "caCertificate", - "service", - "type" -}) -@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 ConsolePluginSpecProxy implements Editable , KubernetesResource -{ - - @JsonProperty("alias") - private String alias; - @JsonProperty("authorize") - private Boolean authorize; - @JsonProperty("caCertificate") - private String caCertificate; - @JsonProperty("service") - private ConsolePluginSpecPService service; - @JsonProperty("type") - private String type; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsolePluginSpecProxy() { - } - - public ConsolePluginSpecProxy(String alias, Boolean authorize, String caCertificate, ConsolePluginSpecPService service, String type) { - super(); - this.alias = alias; - this.authorize = authorize; - this.caCertificate = caCertificate; - this.service = service; - this.type = type; - } - - @JsonProperty("alias") - public String getAlias() { - return alias; - } - - @JsonProperty("alias") - public void setAlias(String alias) { - this.alias = alias; - } - - @JsonProperty("authorize") - public Boolean getAuthorize() { - return authorize; - } - - @JsonProperty("authorize") - public void setAuthorize(Boolean authorize) { - this.authorize = authorize; - } - - @JsonProperty("caCertificate") - public String getCaCertificate() { - return caCertificate; - } - - @JsonProperty("caCertificate") - public void setCaCertificate(String caCertificate) { - this.caCertificate = caCertificate; - } - - @JsonProperty("service") - public ConsolePluginSpecPService getService() { - return service; - } - - @JsonProperty("service") - public void setService(ConsolePluginSpecPService service) { - this.service = service; - } - - @JsonProperty("type") - public String getType() { - return type; - } - - @JsonProperty("type") - public void setType(String type) { - this.type = type; - } - - @JsonIgnore - public ConsolePluginSpecProxyBuilder edit() { - return new ConsolePluginSpecProxyBuilder(this); - } - - @JsonIgnore - public ConsolePluginSpecProxyBuilder 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-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecService.java b/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecService.java deleted file mode 100644 index d426aecce87..00000000000 --- a/kubernetes-model-generator/openshift-model-console/src/generated/java/io/fabric8/openshift/api/model/console/v1alpha1/ConsolePluginSpecService.java +++ /dev/null @@ -1,150 +0,0 @@ - -package io.fabric8.openshift.api.model.console.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({ - "basePath", - "name", - "namespace", - "port" -}) -@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 ConsolePluginSpecService implements Editable , KubernetesResource -{ - - @JsonProperty("basePath") - private String basePath; - @JsonProperty("name") - private String name; - @JsonProperty("namespace") - private String namespace; - @JsonProperty("port") - private Integer port; - @JsonIgnore - private Map additionalProperties = new LinkedHashMap(); - - /** - * No args constructor for use in serialization - * - */ - public ConsolePluginSpecService() { - } - - public ConsolePluginSpecService(String basePath, String name, String namespace, Integer port) { - super(); - this.basePath = basePath; - this.name = name; - this.namespace = namespace; - this.port = port; - } - - @JsonProperty("basePath") - public String getBasePath() { - return basePath; - } - - @JsonProperty("basePath") - public void setBasePath(String basePath) { - this.basePath = basePath; - } - - @JsonProperty("name") - public String getName() { - return name; - } - - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - @JsonProperty("namespace") - public String getNamespace() { - return namespace; - } - - @JsonProperty("namespace") - public void setNamespace(String namespace) { - this.namespace = namespace; - } - - @JsonProperty("port") - public Integer getPort() { - return port; - } - - @JsonProperty("port") - public void setPort(Integer port) { - this.port = port; - } - - @JsonIgnore - public ConsolePluginSpecServiceBuilder edit() { - return new ConsolePluginSpecServiceBuilder(this); - } - - @JsonIgnore - public ConsolePluginSpecServiceBuilder 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-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsolePluginTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsolePluginTest.java index c1b7a29bec8..82f14cdd19e 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsolePluginTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsolePluginTest.java @@ -15,10 +15,10 @@ */ package io.fabric8.openshift.client.server.mock; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePlugin; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePluginBuilder; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePluginList; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePluginListBuilder; +import io.fabric8.openshift.api.model.console.v1.ConsolePlugin; +import io.fabric8.openshift.api.model.console.v1.ConsolePluginBuilder; +import io.fabric8.openshift.api.model.console.v1.ConsolePluginList; +import io.fabric8.openshift.api.model.console.v1.ConsolePluginListBuilder; import io.fabric8.openshift.client.OpenShiftClient; import org.junit.jupiter.api.Test; @@ -34,7 +34,7 @@ class ConsolePluginTest { @Test void get() { // Given - server.expect().get().withPath("/apis/console.openshift.io/v1alpha1/consoleplugins/test-get") + server.expect().get().withPath("/apis/console.openshift.io/v1/consoleplugins/test-get") .andReturn(HttpURLConnection.HTTP_OK, createNewConsolePlugin("test-get")) .once(); @@ -50,7 +50,7 @@ void get() { @Test void list() { // Given - server.expect().get().withPath("/apis/console.openshift.io/v1alpha1/consoleplugins") + server.expect().get().withPath("/apis/console.openshift.io/v1/consoleplugins") .andReturn(HttpURLConnection.HTTP_OK, new ConsolePluginListBuilder() .addToItems(createNewConsolePlugin("test-list")) .build()) @@ -69,7 +69,7 @@ void list() { @Test void delete() { // Given - server.expect().delete().withPath("/apis/console.openshift.io/v1alpha1/consoleplugins/cluster") + server.expect().delete().withPath("/apis/console.openshift.io/v1/consoleplugins/cluster") .andReturn(HttpURLConnection.HTTP_OK, createNewConsolePlugin("cluster")) .once(); @@ -85,12 +85,14 @@ private ConsolePlugin createNewConsolePlugin(String name) { .withNewMetadata().withName(name).endMetadata() .withNewSpec() .withDisplayName("Dev Sandbox Console Plugin") + .withNewBackend() .withNewService() .withBasePath("/") .withName("dev-sandbox-console-plugin") .withNamespace("dev-sandbox-console-plugin") .withPort(9001) .endService() + .endBackend() .endSpec() .build(); } diff --git a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsoleQuickStartTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsoleQuickStartTest.java index 0562abaf886..3e01345f394 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsoleQuickStartTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/ConsoleQuickStartTest.java @@ -19,7 +19,7 @@ import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartBuilder; import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartList; import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartListBuilder; -import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartSpecTasksBuilder; +import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartTaskBuilder; import io.fabric8.openshift.client.OpenShiftClient; import org.junit.jupiter.api.Test; @@ -89,7 +89,7 @@ private ConsoleQuickStart createNewConsoleQuickStart(String name) { .withDescription("Now that you’ve created a sample application and added health checks,\n" + " let’s monitor your application.") .withDisplayName("Test Monitor your application") - .withTasks(new ConsoleQuickStartSpecTasksBuilder() + .withTasks(new ConsoleQuickStartTaskBuilder() .withDescription("Console Quickstart task") .withTitle("test console quickstart") .build()) diff --git a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java index 2fe57a9f5b9..ba19f3efc46 100644 --- a/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java +++ b/kubernetes-tests/src/test/java/io/fabric8/openshift/client/server/mock/OpenShiftResourcesTest.java @@ -70,9 +70,9 @@ import io.fabric8.openshift.api.model.console.v1.ConsoleExternalLogLink; import io.fabric8.openshift.api.model.console.v1.ConsoleLink; import io.fabric8.openshift.api.model.console.v1.ConsoleNotification; +import io.fabric8.openshift.api.model.console.v1.ConsolePlugin; import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStart; import io.fabric8.openshift.api.model.console.v1.ConsoleYAMLSample; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePlugin; import io.fabric8.openshift.api.model.machine.v1beta1.Machine; import io.fabric8.openshift.api.model.machine.v1beta1.MachineSet; import io.fabric8.openshift.api.model.machineconfiguration.v1.ContainerRuntimeConfig; @@ -133,7 +133,7 @@ private static Stream argumentProvider() { Arguments.of(ConsoleExternalLogLink.class, false, "console.openshift.io", "v1", "consoleexternalloglinks"), Arguments.of(ConsoleLink.class, false, "console.openshift.io", "v1", "consolelinks"), Arguments.of(ConsoleNotification.class, false, "console.openshift.io", "v1", "consolenotifications"), - Arguments.of(ConsolePlugin.class, false, "console.openshift.io", "v1alpha1", "consoleplugins"), + Arguments.of(ConsolePlugin.class, false, "console.openshift.io", "v1", "consoleplugins"), Arguments.of(ConsoleQuickStart.class, false, "console.openshift.io", "v1", "consolequickstarts"), Arguments.of(ConsoleYAMLSample.class, false, "console.openshift.io", "v1", "consoleyamlsamples"), Arguments.of(APIServer.class, false, "config.openshift.io", "v1", "apiservers"), diff --git a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftConsoleAPIGroupDSL.java b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftConsoleAPIGroupDSL.java index 60723245596..d2be07c854a 100644 --- a/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftConsoleAPIGroupDSL.java +++ b/openshift-client-api/src/main/java/io/fabric8/openshift/client/dsl/OpenShiftConsoleAPIGroupDSL.java @@ -26,12 +26,12 @@ import io.fabric8.openshift.api.model.console.v1.ConsoleLinkList; import io.fabric8.openshift.api.model.console.v1.ConsoleNotification; import io.fabric8.openshift.api.model.console.v1.ConsoleNotificationList; +import io.fabric8.openshift.api.model.console.v1.ConsolePlugin; +import io.fabric8.openshift.api.model.console.v1.ConsolePluginList; import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStart; import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartList; import io.fabric8.openshift.api.model.console.v1.ConsoleYAMLSample; import io.fabric8.openshift.api.model.console.v1.ConsoleYAMLSampleList; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePlugin; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePluginList; public interface OpenShiftConsoleAPIGroupDSL extends Client { /** @@ -77,7 +77,7 @@ public interface OpenShiftConsoleAPIGroupDSL extends Client { NonNamespaceOperation> consoleQuickStarts(); /** - * DSL entrypoint for ConsolePlugin (console.openshift.io/v1alpha1 + * DSL entrypoint for ConsolePlugin (console.openshift.io/v1 * * @return NonNamespaceOperation object for ConsolePlugin */ diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftConsoleAPIGroupClient.java b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftConsoleAPIGroupClient.java index f940caa06f3..ec1650975c6 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftConsoleAPIGroupClient.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/impl/OpenShiftConsoleAPIGroupClient.java @@ -26,12 +26,12 @@ import io.fabric8.openshift.api.model.console.v1.ConsoleLinkList; import io.fabric8.openshift.api.model.console.v1.ConsoleNotification; import io.fabric8.openshift.api.model.console.v1.ConsoleNotificationList; +import io.fabric8.openshift.api.model.console.v1.ConsolePlugin; +import io.fabric8.openshift.api.model.console.v1.ConsolePluginList; import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStart; import io.fabric8.openshift.api.model.console.v1.ConsoleQuickStartList; import io.fabric8.openshift.api.model.console.v1.ConsoleYAMLSample; import io.fabric8.openshift.api.model.console.v1.ConsoleYAMLSampleList; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePlugin; -import io.fabric8.openshift.api.model.console.v1alpha1.ConsolePluginList; import io.fabric8.openshift.client.dsl.OpenShiftConsoleAPIGroupDSL; public class OpenShiftConsoleAPIGroupClient extends ClientAdapter