io.dekorate.halkyon.model.CapabilitiesBuilder Maven / Gradle / Ivy
package io.dekorate.halkyon.model;
import io.dekorate.deps.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class CapabilitiesBuilder extends CapabilitiesFluentImpl implements VisitableBuilder {
CapabilitiesFluent> fluent;
Boolean validationEnabled;
public CapabilitiesBuilder() {
this(true);
}
public CapabilitiesBuilder(Boolean validationEnabled) {
this(new Capabilities(), validationEnabled);
}
public CapabilitiesBuilder(CapabilitiesFluent> fluent) {
this(fluent, true);
}
public CapabilitiesBuilder(CapabilitiesFluent> fluent,Boolean validationEnabled) {
this(fluent, new Capabilities(), validationEnabled);
}
public CapabilitiesBuilder(CapabilitiesFluent> fluent,Capabilities instance) {
this(fluent, instance, true);
}
public CapabilitiesBuilder(CapabilitiesFluent> fluent,Capabilities instance,Boolean validationEnabled) {
this.fluent = fluent;
fluent.withRequires(instance.getRequires());
fluent.withProvides(instance.getProvides());
this.validationEnabled = validationEnabled;
}
public CapabilitiesBuilder(Capabilities instance) {
this(instance,true);
}
public CapabilitiesBuilder(Capabilities instance,Boolean validationEnabled) {
this.fluent = this;
this.withRequires(instance.getRequires());
this.withProvides(instance.getProvides());
this.validationEnabled = validationEnabled;
}
public Capabilities build() {
Capabilities buildable = new Capabilities(fluent.getRequires(),fluent.getProvides());
return buildable;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
CapabilitiesBuilder that = (CapabilitiesBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(fluent, validationEnabled, super.hashCode());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy