annotations.io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptionsBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model.extensions;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class FSGroupStrategyOptionsBuilder extends FSGroupStrategyOptionsFluentImpl implements VisitableBuilder{
FSGroupStrategyOptionsFluent> fluent;
Boolean validationEnabled;
public FSGroupStrategyOptionsBuilder(){
this(true);
}
public FSGroupStrategyOptionsBuilder(Boolean validationEnabled){
this(new FSGroupStrategyOptions(), validationEnabled);
}
public FSGroupStrategyOptionsBuilder(FSGroupStrategyOptionsFluent> fluent){
this(fluent, true);
}
public FSGroupStrategyOptionsBuilder(FSGroupStrategyOptionsFluent> fluent,Boolean validationEnabled){
this(fluent, new FSGroupStrategyOptions(), validationEnabled);
}
public FSGroupStrategyOptionsBuilder(FSGroupStrategyOptionsFluent> fluent,FSGroupStrategyOptions instance){
this(fluent, instance, true);
}
public FSGroupStrategyOptionsBuilder(FSGroupStrategyOptionsFluent> fluent,FSGroupStrategyOptions instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withRanges(instance.getRanges());
fluent.withRule(instance.getRule());
this.validationEnabled = validationEnabled;
}
public FSGroupStrategyOptionsBuilder(FSGroupStrategyOptions instance){
this(instance,true);
}
public FSGroupStrategyOptionsBuilder(FSGroupStrategyOptions instance,Boolean validationEnabled){
this.fluent = this;
this.withRanges(instance.getRanges());
this.withRule(instance.getRule());
this.validationEnabled = validationEnabled;
}
public FSGroupStrategyOptions build(){
FSGroupStrategyOptions buildable = new FSGroupStrategyOptions(fluent.getRanges(),fluent.getRule());
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;
FSGroupStrategyOptionsBuilder that = (FSGroupStrategyOptionsBuilder) 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;
}
}