Skip to content

Commit

Permalink
feat(kubernetes-model): add model type APIVersions to Kubernetes Core…
Browse files Browse the repository at this point in the history
… Model

Signed-off-by: Rohan Kumar <[email protected]>
(cherry picked from commit c3d6160)
  • Loading branch information
rohanKanojia authored and manusa committed Aug 9, 2024
1 parent 9010033 commit 966b676
Show file tree
Hide file tree
Showing 8 changed files with 391 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type Schema struct {
APIGroupList metav1.APIGroupList
APIResource metav1.APIResource
APIResourceList metav1.APIResourceList
APIVersions metav1.APIVersions
KubernetesList metav1.List
ObjectMeta metav1.ObjectMeta
TypeMeta metav1.TypeMeta
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@

package io.fabric8.kubernetes.api.model;

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.model.annotation.Group;
import io.fabric8.kubernetes.model.annotation.Version;
import io.sundr.builder.annotations.Buildable;
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",
"serverAddressByClientCIDRs",
"versions"
})
@ToString
@EqualsAndHashCode
@Accessors(prefix = {
"_",
""
})
@Buildable(editableEnabled = false, validationEnabled = false, generateBuilderPackage = false, lazyCollectionInitEnabled = false, builderPackage = "io.fabric8.kubernetes.api.builder")
@TemplateTransformations({
@TemplateTransformation(value = "/manifest.vm", outputPath = "META-INF/services/io.fabric8.kubernetes.api.model.KubernetesResource", gather = true)
})
@Version("v1")
@Group("")
@Generated("jsonschema2pojo")
public class APIVersions implements Editable<APIVersionsBuilder> , KubernetesResource
{

/**
*
* (Required)
*
*/
@JsonProperty("apiVersion")
private String apiVersion = "v1";
/**
*
* (Required)
*
*/
@JsonProperty("kind")
private String kind = "APIVersions";
@JsonProperty("serverAddressByClientCIDRs")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<ServerAddressByClientCIDR> serverAddressByClientCIDRs = new ArrayList<>();
@JsonProperty("versions")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> versions = new ArrayList<>();
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

/**
* No args constructor for use in serialization
*
*/
public APIVersions() {
}

public APIVersions(String apiVersion, String kind, List<ServerAddressByClientCIDR> serverAddressByClientCIDRs, List<String> versions) {
super();
this.apiVersion = apiVersion;
this.kind = kind;
this.serverAddressByClientCIDRs = serverAddressByClientCIDRs;
this.versions = versions;
}

/**
*
* (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("serverAddressByClientCIDRs")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<ServerAddressByClientCIDR> getServerAddressByClientCIDRs() {
return serverAddressByClientCIDRs;
}

@JsonProperty("serverAddressByClientCIDRs")
public void setServerAddressByClientCIDRs(List<ServerAddressByClientCIDR> serverAddressByClientCIDRs) {
this.serverAddressByClientCIDRs = serverAddressByClientCIDRs;
}

@JsonProperty("versions")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<String> getVersions() {
return versions;
}

@JsonProperty("versions")
public void setVersions(List<String> versions) {
this.versions = versions;
}

@JsonIgnore
public APIVersionsBuilder edit() {
return new APIVersionsBuilder(this);
}

@JsonIgnore
public APIVersionsBuilder toBuilder() {
return edit();
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

public void setAdditionalProperties(Map<String, Object> additionalProperties) {
this.additionalProperties = additionalProperties;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class KubeSchema {
private APIResourceList aPIResourceList;
private APIService aPIService;
private APIServiceList aPIServiceList;
private APIVersions aPIVersions;
private Binding binding;
private ComponentStatus componentStatus;
private ComponentStatusList componentStatusList;
Expand Down Expand Up @@ -87,14 +88,15 @@ public class KubeSchema {
public KubeSchema() {
}

public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, APIResource aPIResource, APIResourceList aPIResourceList, APIService aPIService, APIServiceList aPIServiceList, Binding binding, ComponentStatus componentStatus, ComponentStatusList componentStatusList, Condition condition, Config config, ConfigMap configMap, ConfigMapList configMapList, ContainerStatus containerStatus, CreateOptions createOptions, DeleteOptions deleteOptions, EndpointPort endpointPort, Endpoints endpoints, EndpointsList endpointsList, EnvVar envVar, Event event, EventList eventList, EventSeries eventSeries, EventSource eventSource, GetOptions getOptions, GroupKind groupKind, GroupVersionKind groupVersionKind, GroupVersionResource groupVersionResource, Info info, KubernetesList kubernetesList, LimitRangeList limitRangeList, ListOptions listOptions, MicroTime microTime, Namespace namespace, NamespaceList namespaceList, Node node, NodeList nodeList, ObjectMeta objectMeta, Patch patch, PatchOptions patchOptions, PersistentVolume persistentVolume, PersistentVolumeClaim persistentVolumeClaim, PersistentVolumeClaimList persistentVolumeClaimList, PersistentVolumeList persistentVolumeList, PodExecOptions podExecOptions, PodList podList, PodTemplateList podTemplateList, Quantity quantity, ReplicationControllerList replicationControllerList, ResourceQuota resourceQuota, ResourceQuotaList resourceQuotaList, RootPaths rootPaths, Secret secret, SecretList secretList, ServiceAccount serviceAccount, ServiceAccountList serviceAccountList, ServiceList serviceList, Status status, String time, Toleration toleration, TopologySelectorTerm topologySelectorTerm, TypeMeta typeMeta, UpdateOptions updateOptions, WatchEvent watchEvent) {
public KubeSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, APIResource aPIResource, APIResourceList aPIResourceList, APIService aPIService, APIServiceList aPIServiceList, APIVersions aPIVersions, Binding binding, ComponentStatus componentStatus, ComponentStatusList componentStatusList, Condition condition, Config config, ConfigMap configMap, ConfigMapList configMapList, ContainerStatus containerStatus, CreateOptions createOptions, DeleteOptions deleteOptions, EndpointPort endpointPort, Endpoints endpoints, EndpointsList endpointsList, EnvVar envVar, Event event, EventList eventList, EventSeries eventSeries, EventSource eventSource, GetOptions getOptions, GroupKind groupKind, GroupVersionKind groupVersionKind, GroupVersionResource groupVersionResource, Info info, KubernetesList kubernetesList, LimitRangeList limitRangeList, ListOptions listOptions, MicroTime microTime, Namespace namespace, NamespaceList namespaceList, Node node, NodeList nodeList, ObjectMeta objectMeta, Patch patch, PatchOptions patchOptions, PersistentVolume persistentVolume, PersistentVolumeClaim persistentVolumeClaim, PersistentVolumeClaimList persistentVolumeClaimList, PersistentVolumeList persistentVolumeList, PodExecOptions podExecOptions, PodList podList, PodTemplateList podTemplateList, Quantity quantity, ReplicationControllerList replicationControllerList, ResourceQuota resourceQuota, ResourceQuotaList resourceQuotaList, RootPaths rootPaths, Secret secret, SecretList secretList, ServiceAccount serviceAccount, ServiceAccountList serviceAccountList, ServiceList serviceList, Status status, String time, Toleration toleration, TopologySelectorTerm topologySelectorTerm, TypeMeta typeMeta, UpdateOptions updateOptions, WatchEvent watchEvent) {
super();
this.aPIGroup = aPIGroup;
this.aPIGroupList = aPIGroupList;
this.aPIResource = aPIResource;
this.aPIResourceList = aPIResourceList;
this.aPIService = aPIService;
this.aPIServiceList = aPIServiceList;
this.aPIVersions = aPIVersions;
this.binding = binding;
this.componentStatus = componentStatus;
this.componentStatusList = componentStatusList;
Expand Down Expand Up @@ -215,6 +217,16 @@ public void setAPIServiceList(APIServiceList aPIServiceList) {
this.aPIServiceList = aPIServiceList;
}

@JsonProperty("APIVersions")
public APIVersions getAPIVersions() {
return aPIVersions;
}

@JsonProperty("APIVersions")
public void setAPIVersions(APIVersions aPIVersions) {
this.aPIVersions = aPIVersions;
}

@JsonProperty("Binding")
public Binding getBinding() {
return binding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class ValidationSchema {
private APIResourceList aPIResourceList;
private APIService aPIService;
private APIServiceList aPIServiceList;
private APIVersions aPIVersions;
private Binding binding;
private ComponentStatus componentStatus;
private ComponentStatusList componentStatusList;
Expand Down Expand Up @@ -87,14 +88,15 @@ public class ValidationSchema {
public ValidationSchema() {
}

public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, APIResource aPIResource, APIResourceList aPIResourceList, APIService aPIService, APIServiceList aPIServiceList, Binding binding, ComponentStatus componentStatus, ComponentStatusList componentStatusList, Condition condition, Config config, ConfigMap configMap, ConfigMapList configMapList, ContainerStatus containerStatus, CreateOptions createOptions, DeleteOptions deleteOptions, EndpointPort endpointPort, Endpoints endpoints, EndpointsList endpointsList, EnvVar envVar, Event event, EventList eventList, EventSeries eventSeries, EventSource eventSource, GetOptions getOptions, GroupKind groupKind, GroupVersionKind groupVersionKind, GroupVersionResource groupVersionResource, Info info, KubernetesList kubernetesList, LimitRangeList limitRangeList, ListOptions listOptions, MicroTime microTime, Namespace namespace, NamespaceList namespaceList, Node node, NodeList nodeList, ObjectMeta objectMeta, Patch patch, PatchOptions patchOptions, PersistentVolume persistentVolume, PersistentVolumeClaim persistentVolumeClaim, PersistentVolumeClaimList persistentVolumeClaimList, PersistentVolumeList persistentVolumeList, PodExecOptions podExecOptions, PodList podList, PodTemplateList podTemplateList, Quantity quantity, ReplicationControllerList replicationControllerList, ResourceQuota resourceQuota, ResourceQuotaList resourceQuotaList, RootPaths rootPaths, Secret secret, SecretList secretList, ServiceAccount serviceAccount, ServiceAccountList serviceAccountList, ServiceList serviceList, Status status, String time, Toleration toleration, TopologySelectorTerm topologySelectorTerm, TypeMeta typeMeta, UpdateOptions updateOptions, WatchEvent watchEvent) {
public ValidationSchema(APIGroup aPIGroup, APIGroupList aPIGroupList, APIResource aPIResource, APIResourceList aPIResourceList, APIService aPIService, APIServiceList aPIServiceList, APIVersions aPIVersions, Binding binding, ComponentStatus componentStatus, ComponentStatusList componentStatusList, Condition condition, Config config, ConfigMap configMap, ConfigMapList configMapList, ContainerStatus containerStatus, CreateOptions createOptions, DeleteOptions deleteOptions, EndpointPort endpointPort, Endpoints endpoints, EndpointsList endpointsList, EnvVar envVar, Event event, EventList eventList, EventSeries eventSeries, EventSource eventSource, GetOptions getOptions, GroupKind groupKind, GroupVersionKind groupVersionKind, GroupVersionResource groupVersionResource, Info info, KubernetesList kubernetesList, LimitRangeList limitRangeList, ListOptions listOptions, MicroTime microTime, Namespace namespace, NamespaceList namespaceList, Node node, NodeList nodeList, ObjectMeta objectMeta, Patch patch, PatchOptions patchOptions, PersistentVolume persistentVolume, PersistentVolumeClaim persistentVolumeClaim, PersistentVolumeClaimList persistentVolumeClaimList, PersistentVolumeList persistentVolumeList, PodExecOptions podExecOptions, PodList podList, PodTemplateList podTemplateList, Quantity quantity, ReplicationControllerList replicationControllerList, ResourceQuota resourceQuota, ResourceQuotaList resourceQuotaList, RootPaths rootPaths, Secret secret, SecretList secretList, ServiceAccount serviceAccount, ServiceAccountList serviceAccountList, ServiceList serviceList, Status status, String time, Toleration toleration, TopologySelectorTerm topologySelectorTerm, TypeMeta typeMeta, UpdateOptions updateOptions, WatchEvent watchEvent) {
super();
this.aPIGroup = aPIGroup;
this.aPIGroupList = aPIGroupList;
this.aPIResource = aPIResource;
this.aPIResourceList = aPIResourceList;
this.aPIService = aPIService;
this.aPIServiceList = aPIServiceList;
this.aPIVersions = aPIVersions;
this.binding = binding;
this.componentStatus = componentStatus;
this.componentStatusList = componentStatusList;
Expand Down Expand Up @@ -215,6 +217,16 @@ public void setAPIServiceList(APIServiceList aPIServiceList) {
this.aPIServiceList = aPIServiceList;
}

@JsonProperty("APIVersions")
public APIVersions getAPIVersions() {
return aPIVersions;
}

@JsonProperty("APIVersions")
public void setAPIVersions(APIVersions aPIVersions) {
this.aPIVersions = aPIVersions;
}

@JsonProperty("Binding")
public Binding getBinding() {
return binding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,39 @@
"io.fabric8.kubernetes.api.model.KubernetesResource"
]
},
"kubernetes_apimachinery_pkg_apis_APIVersions": {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"default": "v1",
"required": true
},
"kind": {
"type": "string",
"default": "APIVersions",
"required": true
},
"serverAddressByClientCIDRs": {
"type": "array",
"items": {
"$ref": "#/definitions/kubernetes_apimachinery_pkg_apis_ServerAddressByClientCIDR",
"existingJavaType": "io.fabric8.kubernetes.api.model.ServerAddressByClientCIDR"
}
},
"versions": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": true,
"javaType": "io.fabric8.kubernetes.api.model.APIVersions",
"javaInterfaces": [
"io.fabric8.kubernetes.api.model.KubernetesResource"
]
},
"kubernetes_apimachinery_pkg_apis_Condition": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -8019,6 +8052,10 @@
"$ref": "#/definitions/kubernetes_aggregator_APIServiceList",
"existingJavaType": "io.fabric8.kubernetes.api.model.APIServiceList"
},
"APIVersions": {
"$ref": "#/definitions/kubernetes_apimachinery_pkg_apis_APIVersions",
"existingJavaType": "io.fabric8.kubernetes.api.model.APIVersions"
},
"Binding": {
"$ref": "#/definitions/kubernetes_core_Binding",
"existingJavaType": "io.fabric8.kubernetes.api.model.Binding"
Expand Down
Loading

0 comments on commit 966b676

Please sign in to comment.