io.fabric8.knative.internal.pkg.apis.duck.v1.WithPodSpecFluent Maven / Gradle / Ivy
package io.fabric8.knative.internal.pkg.apis.duck.v1;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Object;
import java.lang.String;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class WithPodSpecFluent> extends BaseFluent{
public WithPodSpecFluent() {
}
public WithPodSpecFluent(WithPodSpec instance) {
instance = (instance != null ? instance : new WithPodSpec());
if (instance != null) {
this.withTemplate(instance.getTemplate());
this.withTemplate(instance.getTemplate());
}
}
private PodSpecableBuilder template;
public PodSpecable buildTemplate() {
return this.template!=null ?this.template.build():null;
}
public A withTemplate(PodSpecable template) {
_visitables.get("template").remove(this.template);
if (template!=null){ this.template= new PodSpecableBuilder(template); _visitables.get("template").add(this.template);} else { this.template = null; _visitables.get("template").remove(this.template); } return (A) this;
}
public boolean hasTemplate() {
return this.template != null;
}
public TemplateNested withNewTemplate() {
return new TemplateNested(null);
}
public TemplateNested withNewTemplateLike(PodSpecable item) {
return new TemplateNested(item);
}
public TemplateNested editTemplate() {
return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(null));
}
public TemplateNested editOrNewTemplate() {
return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(new PodSpecableBuilder().build()));
}
public TemplateNested editOrNewTemplateLike(PodSpecable item) {
return withNewTemplateLike(java.util.Optional.ofNullable(buildTemplate()).orElse(item));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
WithPodSpecFluent that = (WithPodSpecFluent) o;
if (!java.util.Objects.equals(template, that.template)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(template, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (template != null) { sb.append("template:"); sb.append(template); }
sb.append("}");
return sb.toString();
}
public class TemplateNested extends PodSpecableFluent> implements Nested{
TemplateNested(PodSpecable item) {
this.builder = new PodSpecableBuilder(this, item);
}
PodSpecableBuilder builder;
public N and() {
return (N) WithPodSpecFluent.this.withTemplate(builder.build());
}
public N endTemplate() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy