io.alauda.kubernetes.api.model.ObjectFieldSelectorBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class ObjectFieldSelectorBuilder extends ObjectFieldSelectorFluentImpl implements VisitableBuilder{
ObjectFieldSelectorFluent> fluent;
Boolean validationEnabled;
public ObjectFieldSelectorBuilder(){
this(true);
}
public ObjectFieldSelectorBuilder(Boolean validationEnabled){
this(new ObjectFieldSelector(), validationEnabled);
}
public ObjectFieldSelectorBuilder(ObjectFieldSelectorFluent> fluent){
this(fluent, true);
}
public ObjectFieldSelectorBuilder(ObjectFieldSelectorFluent> fluent,Boolean validationEnabled){
this(fluent, new ObjectFieldSelector(), validationEnabled);
}
public ObjectFieldSelectorBuilder(ObjectFieldSelectorFluent> fluent,ObjectFieldSelector instance){
this(fluent, instance, true);
}
public ObjectFieldSelectorBuilder(ObjectFieldSelectorFluent> fluent,ObjectFieldSelector instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withApiVersion(instance.getApiVersion());
fluent.withFieldPath(instance.getFieldPath());
this.validationEnabled = validationEnabled;
}
public ObjectFieldSelectorBuilder(ObjectFieldSelector instance){
this(instance,true);
}
public ObjectFieldSelectorBuilder(ObjectFieldSelector instance,Boolean validationEnabled){
this.fluent = this;
this.withApiVersion(instance.getApiVersion());
this.withFieldPath(instance.getFieldPath());
this.validationEnabled = validationEnabled;
}
public ObjectFieldSelector build(){
ObjectFieldSelector buildable = new ObjectFieldSelector(fluent.getApiVersion(),fluent.getFieldPath());
io.alauda.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;
ObjectFieldSelectorBuilder that = (ObjectFieldSelectorBuilder) 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;
}
}