io.dekorate.halkyon.config.CapabilityConfigBuilder Maven / Gradle / Ivy
package io.dekorate.halkyon.config;
import io.dekorate.deps.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class CapabilityConfigBuilder extends CapabilityConfigFluentImpl implements VisitableBuilder {
CapabilityConfigFluent> fluent;
Boolean validationEnabled;
public CapabilityConfigBuilder() {
this(true);
}
public CapabilityConfigBuilder(Boolean validationEnabled) {
this(new CapabilityConfig(), validationEnabled);
}
public CapabilityConfigBuilder(CapabilityConfigFluent> fluent) {
this(fluent, true);
}
public CapabilityConfigBuilder(CapabilityConfigFluent> fluent,Boolean validationEnabled) {
this(fluent, new CapabilityConfig(), validationEnabled);
}
public CapabilityConfigBuilder(CapabilityConfigFluent> fluent,CapabilityConfig instance) {
this(fluent, instance, true);
}
public CapabilityConfigBuilder(CapabilityConfigFluent> fluent,CapabilityConfig instance,Boolean validationEnabled) {
this.fluent = fluent;
fluent.withProject(instance.getProject());
fluent.withAttributes(instance.getAttributes());
fluent.withCategory(instance.getCategory());
fluent.withType(instance.getType());
fluent.withName(instance.getName());
fluent.withVersion(instance.getVersion());
fluent.withParameters(instance.getParameters());
this.validationEnabled = validationEnabled;
}
public CapabilityConfigBuilder(CapabilityConfig instance) {
this(instance,true);
}
public CapabilityConfigBuilder(CapabilityConfig instance,Boolean validationEnabled) {
this.fluent = this;
this.withProject(instance.getProject());
this.withAttributes(instance.getAttributes());
this.withCategory(instance.getCategory());
this.withType(instance.getType());
this.withName(instance.getName());
this.withVersion(instance.getVersion());
this.withParameters(instance.getParameters());
this.validationEnabled = validationEnabled;
}
public EditableCapabilityConfig build() {
EditableCapabilityConfig buildable = new EditableCapabilityConfig(fluent.getProject(),fluent.getAttributes(),fluent.getCategory(),fluent.getType(),fluent.getName(),fluent.getVersion(),fluent.getParameters());
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;
CapabilityConfigBuilder that = (CapabilityConfigBuilder) 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