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 io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptionsFluentImpl implements VisitableBuilder{
io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptionsFluent> fluent;
Boolean validationEnabled;
public FSGroupStrategyOptionsBuilder(){
this(true);
}
public FSGroupStrategyOptionsBuilder(Boolean validationEnabled){
this(new FSGroupStrategyOptions(), validationEnabled);
}
public FSGroupStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptionsFluent> fluent){
this(fluent, true);
}
public FSGroupStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptionsFluent> fluent,Boolean validationEnabled){
this(fluent, new FSGroupStrategyOptions(), validationEnabled);
}
public FSGroupStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptionsFluent> fluent,io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptions instance){
this(fluent, instance, true);
}
public FSGroupStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptionsFluent> fluent,io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptions instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withRanges(instance.getRanges());
fluent.withRule(instance.getRule());
this.validationEnabled = validationEnabled;
}
public FSGroupStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptions instance){
this(instance,true);
}
public FSGroupStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.FSGroupStrategyOptions instance,Boolean validationEnabled){
this.fluent = this;
this.withRanges(instance.getRanges());
this.withRule(instance.getRule());
this.validationEnabled = validationEnabled;
}
public io.alauda.kubernetes.api.model.extensions.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;
}
}