Skip to content

Commit

Permalink
refactor: openshift-model-config generated from OpenAPI schemas
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Sep 30, 2024
1 parent ed01a22 commit 7a92dc7
Show file tree
Hide file tree
Showing 287 changed files with 8,627 additions and 7,450 deletions.
19 changes: 2 additions & 17 deletions kubernetes-model-generator/openshift-model-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<configuration >
<settings combine.self="append">
<schemas>
<schema>${openapi.schema.openshift-latest}</schema>
<schema>${openapi.schema.openshift-generated}</schema>
</schemas>
<packageMappings combine.self="append">
<io.openshift.config>io.fabric8.openshift.api.model.config</io.openshift.config>
Expand All @@ -70,23 +70,8 @@
<includeGenerationRegex>^io\.openshift\.config\..*$</includeGenerationRegex>
</includeGenerationRegexes>
<skipGenerationRegexes>
<skipGenerationRegex>^io\.openshift\.config\.v1\.BuildSpecBDEnv$</skipGenerationRegex>
<skipGenerationRegex>^io\.openshift\.config\.v1\.BuildSpecBDEValueFrom$</skipGenerationRegex>
<skipGenerationRegex>^io\.openshift\.config\.v1\.BuildSpecBDResources$</skipGenerationRegex>
<skipGenerationRegex>^io\.openshift\.config\.v1alpha1\..*$</skipGenerationRegex>
</skipGenerationRegexes>
<refToJavaTypeMappings>
<io.metal3.v1alpha1.HostFirmwareComponentsStatusConditions>io.fabric8.kubernetes.api.model.Condition</io.metal3.v1alpha1.HostFirmwareComponentsStatusConditions>
<io.openshift.config.v1.BuildSpecBDEnv>io.fabric8.kubernetes.api.model.EnvVar</io.openshift.config.v1.BuildSpecBDEnv>
<io.openshift.config.v1.BuildSpecBDResources>io.fabric8.kubernetes.api.model.ResourceRequirements</io.openshift.config.v1.BuildSpecBDResources>
<property>
<!--
Should be automatically picked up, however:
The io.k8s.api.core.v1.Toleration definition in openshift-4.17.0 is outdated as compared to the ones used inline
-->
<name>com.coreos.monitoring.v1.AlertmanagerSpecTolerations</name>
<value>io.fabric8.kubernetes.api.model.Toleration</value>
</property>
</refToJavaTypeMappings>
</settings>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ public class APIServer implements Editable<APIServerBuilder> , HasMetadata
@JsonProperty("spec")
private APIServerSpec spec;
@JsonProperty("status")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
private Object status;
private APIServerStatus status;
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

Expand All @@ -98,7 +97,7 @@ public class APIServer implements Editable<APIServerBuilder> , HasMetadata
public APIServer() {
}

public APIServer(String apiVersion, String kind, ObjectMeta metadata, APIServerSpec spec, Object status) {
public APIServer(String apiVersion, String kind, ObjectMeta metadata, APIServerSpec spec, APIServerStatus status) {
super();
this.apiVersion = apiVersion;
this.kind = kind;
Expand Down Expand Up @@ -168,13 +167,12 @@ public void setSpec(APIServerSpec spec) {
}

@JsonProperty("status")
public Object getStatus() {
public APIServerStatus getStatus() {
return status;
}

@JsonProperty("status")
@JsonDeserialize(using = io.fabric8.kubernetes.internal.KubernetesDeserializer.class)
public void setStatus(Object status) {
public void setStatus(APIServerStatus status) {
this.status = status;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class APIServerSpecEncryption implements Editable<APIServerSpecEncryptionBuilder> , KubernetesResource
public class APIServerEncryption implements Editable<APIServerEncryptionBuilder> , KubernetesResource
{

@JsonProperty("type")
Expand All @@ -63,10 +63,10 @@ public class APIServerSpecEncryption implements Editable<APIServerSpecEncryption
* No args constructor for use in serialization
*
*/
public APIServerSpecEncryption() {
public APIServerEncryption() {
}

public APIServerSpecEncryption(String type) {
public APIServerEncryption(String type) {
super();
this.type = type;
}
Expand All @@ -82,12 +82,12 @@ public void setType(String type) {
}

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

@JsonIgnore
public APIServerSpecEncryptionBuilder toBuilder() {
public APIServerEncryptionBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,25 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class APIServerSpecSCNamedCertificates implements Editable<APIServerSpecSCNamedCertificatesBuilder> , KubernetesResource
public class APIServerNamedServingCert implements Editable<APIServerNamedServingCertBuilder> , KubernetesResource
{

@JsonProperty("names")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> names = new ArrayList<>();
@JsonProperty("servingCertificate")
private APIServerSpecSCNCServingCertificate servingCertificate;
private SecretNameReference servingCertificate;
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

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

public APIServerSpecSCNamedCertificates(List<String> names, APIServerSpecSCNCServingCertificate servingCertificate) {
public APIServerNamedServingCert(List<String> names, SecretNameReference servingCertificate) {
super();
this.names = names;
this.servingCertificate = servingCertificate;
Expand All @@ -90,22 +90,22 @@ public void setNames(List<String> names) {
}

@JsonProperty("servingCertificate")
public APIServerSpecSCNCServingCertificate getServingCertificate() {
public SecretNameReference getServingCertificate() {
return servingCertificate;
}

@JsonProperty("servingCertificate")
public void setServingCertificate(APIServerSpecSCNCServingCertificate servingCertificate) {
public void setServingCertificate(SecretNameReference servingCertificate) {
this.servingCertificate = servingCertificate;
}

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

@JsonIgnore
public APIServerSpecSCNamedCertificatesBuilder toBuilder() {
public APIServerNamedServingCertBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,45 +53,45 @@
@BuildableReference(PersistentVolumeClaim.class)
})
@Generated("jsonschema2pojo")
public class APIServerSpecServingCerts implements Editable<APIServerSpecServingCertsBuilder> , KubernetesResource
public class APIServerServingCerts implements Editable<APIServerServingCertsBuilder> , KubernetesResource
{

@JsonProperty("namedCertificates")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<APIServerSpecSCNamedCertificates> namedCertificates = new ArrayList<>();
private List<APIServerNamedServingCert> namedCertificates = new ArrayList<>();
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

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

public APIServerSpecServingCerts(List<APIServerSpecSCNamedCertificates> namedCertificates) {
public APIServerServingCerts(List<APIServerNamedServingCert> namedCertificates) {
super();
this.namedCertificates = namedCertificates;
}

@JsonProperty("namedCertificates")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public List<APIServerSpecSCNamedCertificates> getNamedCertificates() {
public List<APIServerNamedServingCert> getNamedCertificates() {
return namedCertificates;
}

@JsonProperty("namedCertificates")
public void setNamedCertificates(List<APIServerSpecSCNamedCertificates> namedCertificates) {
public void setNamedCertificates(List<APIServerNamedServingCert> namedCertificates) {
this.namedCertificates = namedCertificates;
}

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

@JsonIgnore
public APIServerSpecServingCertsBuilder toBuilder() {
public APIServerServingCertsBuilder toBuilder() {
return edit();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ public class APIServerSpec implements Editable<APIServerSpecBuilder> , Kubernete
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> additionalCORSAllowedOrigins = new ArrayList<>();
@JsonProperty("audit")
private APIServerSpecAudit audit;
private Audit audit;
@JsonProperty("clientCA")
private APIServerSpecClientCA clientCA;
private ConfigMapNameReference clientCA;
@JsonProperty("encryption")
private APIServerSpecEncryption encryption;
private APIServerEncryption encryption;
@JsonProperty("servingCerts")
private APIServerSpecServingCerts servingCerts;
private APIServerServingCerts servingCerts;
@JsonProperty("tlsSecurityProfile")
private APIServerSpecTlsSecurityProfile tlsSecurityProfile;
private TLSSecurityProfile tlsSecurityProfile;
@JsonIgnore
private Map<String, Object> additionalProperties = new LinkedHashMap<String, Object>();

Expand All @@ -84,7 +84,7 @@ public class APIServerSpec implements Editable<APIServerSpecBuilder> , Kubernete
public APIServerSpec() {
}

public APIServerSpec(List<String> additionalCORSAllowedOrigins, APIServerSpecAudit audit, APIServerSpecClientCA clientCA, APIServerSpecEncryption encryption, APIServerSpecServingCerts servingCerts, APIServerSpecTlsSecurityProfile tlsSecurityProfile) {
public APIServerSpec(List<String> additionalCORSAllowedOrigins, Audit audit, ConfigMapNameReference clientCA, APIServerEncryption encryption, APIServerServingCerts servingCerts, TLSSecurityProfile tlsSecurityProfile) {
super();
this.additionalCORSAllowedOrigins = additionalCORSAllowedOrigins;
this.audit = audit;
Expand All @@ -106,52 +106,52 @@ public void setAdditionalCORSAllowedOrigins(List<String> additionalCORSAllowedOr
}

@JsonProperty("audit")
public APIServerSpecAudit getAudit() {
public Audit getAudit() {
return audit;
}

@JsonProperty("audit")
public void setAudit(APIServerSpecAudit audit) {
public void setAudit(Audit audit) {
this.audit = audit;
}

@JsonProperty("clientCA")
public APIServerSpecClientCA getClientCA() {
public ConfigMapNameReference getClientCA() {
return clientCA;
}

@JsonProperty("clientCA")
public void setClientCA(APIServerSpecClientCA clientCA) {
public void setClientCA(ConfigMapNameReference clientCA) {
this.clientCA = clientCA;
}

@JsonProperty("encryption")
public APIServerSpecEncryption getEncryption() {
public APIServerEncryption getEncryption() {
return encryption;
}

@JsonProperty("encryption")
public void setEncryption(APIServerSpecEncryption encryption) {
public void setEncryption(APIServerEncryption encryption) {
this.encryption = encryption;
}

@JsonProperty("servingCerts")
public APIServerSpecServingCerts getServingCerts() {
public APIServerServingCerts getServingCerts() {
return servingCerts;
}

@JsonProperty("servingCerts")
public void setServingCerts(APIServerSpecServingCerts servingCerts) {
public void setServingCerts(APIServerServingCerts servingCerts) {
this.servingCerts = servingCerts;
}

@JsonProperty("tlsSecurityProfile")
public APIServerSpecTlsSecurityProfile getTlsSecurityProfile() {
public TLSSecurityProfile getTlsSecurityProfile() {
return tlsSecurityProfile;
}

@JsonProperty("tlsSecurityProfile")
public void setTlsSecurityProfile(APIServerSpecTlsSecurityProfile tlsSecurityProfile) {
public void setTlsSecurityProfile(TLSSecurityProfile tlsSecurityProfile) {
this.tlsSecurityProfile = tlsSecurityProfile;
}

Expand Down
Loading

0 comments on commit 7a92dc7

Please sign in to comment.