Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #5135: adding an edit method to each model object #5138

Merged
merged 3 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* Fix #5368: added support for additional ListOptions fields
* Fix #5377: added a createOr and unlock function to provide a straight-forward replacement for createOrReplace.
* Fix #5388: [crd-generator] Generate deterministic CRDs
* Fix #5135: added per instance methods to create a builder - instead on new PodBuilder(pod), you may use pod.toBuilder()
* Fix #5257: Add ErrorStreamMessage and StatusStreamMessage to ease mocking of pods/exec requests
* Fix #5220: refinements and clarifications to the validation of names

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
package io.fabric8.certmanager.api.model;

import javax.annotation.Generated;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Expand Down Expand Up @@ -74,6 +75,7 @@
import io.fabric8.certmanager.api.model.v1.VenafiIssuer;
import io.fabric8.certmanager.api.model.v1.VenafiTPP;
import io.fabric8.certmanager.api.model.v1.X509Subject;
import io.fabric8.kubernetes.api.builder.Editable;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -192,7 +194,8 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class CertmanagerSchema {
public class CertmanagerSchema implements Editable<CertmanagerSchemaBuilder>
{

@JsonProperty("github_com_cert-manager_cert-manager_pkg_apis_acme_v1_ACMEAuthorization")
private ACMEAuthorization githubComCertManagerCertManagerPkgApisAcmeV1ACMEAuthorization;
Expand Down Expand Up @@ -1116,4 +1119,14 @@ public void setGithubComCertManagerCertManagerPkgApisMetaV1SecretKeySelector(Sec
this.githubComCertManagerCertManagerPkgApisMetaV1SecretKeySelector = githubComCertManagerCertManagerPkgApisMetaV1SecretKeySelector;
}

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

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

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -69,7 +70,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEAuthorization implements KubernetesResource
public class ACMEAuthorization implements Editable<ACMEAuthorizationBuilder> , KubernetesResource
{

@JsonProperty("challenges")
Expand Down Expand Up @@ -152,6 +153,16 @@ public void setWildcard(Boolean wildcard) {
this.wildcard = wildcard;
}

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

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

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -65,7 +66,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallenge implements KubernetesResource
public class ACMEChallenge implements Editable<ACMEChallengeBuilder> , KubernetesResource
{

@JsonProperty("token")
Expand Down Expand Up @@ -121,6 +122,16 @@ public void setUrl(String url) {
this.url = url;
}

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

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

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -65,7 +66,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolver implements KubernetesResource
public class ACMEChallengeSolver implements Editable<ACMEChallengeSolverBuilder> , KubernetesResource
{

@JsonProperty("dns01")
Expand Down Expand Up @@ -121,6 +122,16 @@ public void setSelector(CertificateDNSNameSelector selector) {
this.selector = selector;
}

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

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

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -72,7 +73,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolverDNS01 implements KubernetesResource
public class ACMEChallengeSolverDNS01 implements Editable<ACMEChallengeSolverDNS01Builder> , KubernetesResource
{

@JsonProperty("acmeDNS")
Expand Down Expand Up @@ -219,6 +220,16 @@ public void setWebhook(ACMEIssuerDNS01ProviderWebhook webhook) {
this.webhook = webhook;
}

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

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

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -64,7 +65,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolverHTTP01 implements KubernetesResource
public class ACMEChallengeSolverHTTP01 implements Editable<ACMEChallengeSolverHTTP01Builder> , KubernetesResource
{

@JsonProperty("gatewayHTTPRoute")
Expand Down Expand Up @@ -107,6 +108,16 @@ public void setIngress(ACMEChallengeSolverHTTP01Ingress ingress) {
this.ingress = ingress;
}

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

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

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -68,7 +69,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolverHTTP01GatewayHTTPRoute implements KubernetesResource
public class ACMEChallengeSolverHTTP01GatewayHTTPRoute implements Editable<ACMEChallengeSolverHTTP01GatewayHTTPRouteBuilder> , KubernetesResource
{

@JsonProperty("labels")
Expand Down Expand Up @@ -126,6 +127,16 @@ public void setServiceType(java.lang.String serviceType) {
this.serviceType = serviceType;
}

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

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

@JsonAnyGetter
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -67,7 +68,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolverHTTP01Ingress implements KubernetesResource
public class ACMEChallengeSolverHTTP01Ingress implements Editable<ACMEChallengeSolverHTTP01IngressBuilder> , KubernetesResource
{

@JsonProperty("class")
Expand Down Expand Up @@ -149,6 +150,16 @@ public void setServiceType(java.lang.String serviceType) {
this.serviceType = serviceType;
}

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

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

@JsonAnyGetter
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -64,7 +65,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolverHTTP01IngressObjectMeta implements KubernetesResource
public class ACMEChallengeSolverHTTP01IngressObjectMeta implements Editable<ACMEChallengeSolverHTTP01IngressObjectMetaBuilder> , KubernetesResource
{

@JsonProperty("annotations")
Expand Down Expand Up @@ -109,6 +110,16 @@ public void setLabels(Map<String, String> labels) {
this.labels = labels;
}

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

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

@JsonAnyGetter
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
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.ContainerPort;
import io.fabric8.kubernetes.api.model.EnvVar;
Expand Down Expand Up @@ -64,7 +65,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolverHTTP01IngressPodObjectMeta implements KubernetesResource
public class ACMEChallengeSolverHTTP01IngressPodObjectMeta implements Editable<ACMEChallengeSolverHTTP01IngressPodObjectMetaBuilder> , KubernetesResource
{

@JsonProperty("annotations")
Expand Down Expand Up @@ -109,6 +110,16 @@ public void setLabels(Map<String, String> labels) {
this.labels = labels;
}

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

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

@JsonAnyGetter
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
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.Affinity;
import io.fabric8.kubernetes.api.model.Container;
import io.fabric8.kubernetes.api.model.ContainerPort;
Expand Down Expand Up @@ -71,7 +72,7 @@
@BuildableReference(VolumeMount.class)
})
@Generated("jsonschema2pojo")
public class ACMEChallengeSolverHTTP01IngressPodSpec implements KubernetesResource
public class ACMEChallengeSolverHTTP01IngressPodSpec implements Editable<ACMEChallengeSolverHTTP01IngressPodSpecBuilder> , KubernetesResource
{

@JsonProperty("affinity")
Expand Down Expand Up @@ -155,6 +156,16 @@ public void setTolerations(List<Toleration> tolerations) {
this.tolerations = tolerations;
}

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

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

@JsonAnyGetter
public Map<java.lang.String, Object> getAdditionalProperties() {
return this.additionalProperties;
Expand Down
Loading