me.snowdrop.istio.api.model.v1.mixer.template.ActionBuilder Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.mixer.template;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class ActionBuilder extends ActionFluentImpl implements VisitableBuilder{
ActionFluent> fluent;
Boolean validationEnabled;
public ActionBuilder(){
this(true);
}
public ActionBuilder(Boolean validationEnabled){
this(new Action(), validationEnabled);
}
public ActionBuilder(ActionFluent> fluent){
this(fluent, true);
}
public ActionBuilder(ActionFluent> fluent,Boolean validationEnabled){
this(fluent, new Action(), validationEnabled);
}
public ActionBuilder(ActionFluent> fluent,Action instance){
this(fluent, instance, true);
}
public ActionBuilder(ActionFluent> fluent,Action instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withMethod(instance.getMethod());
fluent.withNamespace(instance.getNamespace());
fluent.withPath(instance.getPath());
fluent.withProperties(instance.getProperties());
fluent.withService(instance.getService());
this.validationEnabled = validationEnabled;
}
public ActionBuilder(Action instance){
this(instance,true);
}
public ActionBuilder(Action instance,Boolean validationEnabled){
this.fluent = this;
this.withMethod(instance.getMethod());
this.withNamespace(instance.getNamespace());
this.withPath(instance.getPath());
this.withProperties(instance.getProperties());
this.withService(instance.getService());
this.validationEnabled = validationEnabled;
}
public Action build(){
Action buildable = new Action(fluent.getMethod(),fluent.getNamespace(),fluent.getPath(),fluent.getProperties(),fluent.getService());
io.fabric8.kubernetes.api.builder.ValidationUtils.validate(buildable);
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;
ActionBuilder that = (ActionBuilder) 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;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy