io.dekorate.halkyon.config.RequiredCapabilityConfigBuilder 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 RequiredCapabilityConfigBuilder extends RequiredCapabilityConfigFluentImpl implements VisitableBuilder {
RequiredCapabilityConfigFluent> fluent;
Boolean validationEnabled;
public RequiredCapabilityConfigBuilder() {
this(true);
}
public RequiredCapabilityConfigBuilder(Boolean validationEnabled) {
this(new RequiredCapabilityConfig(), validationEnabled);
}
public RequiredCapabilityConfigBuilder(RequiredCapabilityConfigFluent> fluent) {
this(fluent, true);
}
public RequiredCapabilityConfigBuilder(RequiredCapabilityConfigFluent> fluent,Boolean validationEnabled) {
this(fluent, new RequiredCapabilityConfig(), validationEnabled);
}
public RequiredCapabilityConfigBuilder(RequiredCapabilityConfigFluent> fluent,RequiredCapabilityConfig instance) {
this(fluent, instance, true);
}
public RequiredCapabilityConfigBuilder(RequiredCapabilityConfigFluent> fluent,RequiredCapabilityConfig instance,Boolean validationEnabled) {
this.fluent = fluent;
fluent.withProject(instance.getProject());
fluent.withAttributes(instance.getAttributes());
fluent.withName(instance.getName());
fluent.withCategory(instance.getCategory());
fluent.withType(instance.getType());
fluent.withBoundTo(instance.getBoundTo());
fluent.withAutoBindable(instance.isAutoBindable());
fluent.withParameters(instance.getParameters());
this.validationEnabled = validationEnabled;
}
public RequiredCapabilityConfigBuilder(RequiredCapabilityConfig instance) {
this(instance,true);
}
public RequiredCapabilityConfigBuilder(RequiredCapabilityConfig instance,Boolean validationEnabled) {
this.fluent = this;
this.withProject(instance.getProject());
this.withAttributes(instance.getAttributes());
this.withName(instance.getName());
this.withCategory(instance.getCategory());
this.withType(instance.getType());
this.withBoundTo(instance.getBoundTo());
this.withAutoBindable(instance.isAutoBindable());
this.withParameters(instance.getParameters());
this.validationEnabled = validationEnabled;
}
public EditableRequiredCapabilityConfig build() {
EditableRequiredCapabilityConfig buildable = new EditableRequiredCapabilityConfig(fluent.getProject(),fluent.getAttributes(),fluent.getName(),fluent.getCategory(),fluent.getType(),fluent.getBoundTo(),fluent.isAutoBindable(),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;
RequiredCapabilityConfigBuilder that = (RequiredCapabilityConfigBuilder) 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