io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptionsBuilder 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 SupplementalGroupsStrategyOptionsBuilder extends io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptionsFluentImpl implements VisitableBuilder{
io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptionsFluent> fluent;
Boolean validationEnabled;
public SupplementalGroupsStrategyOptionsBuilder(){
this(true);
}
public SupplementalGroupsStrategyOptionsBuilder(Boolean validationEnabled){
this(new SupplementalGroupsStrategyOptions(), validationEnabled);
}
public SupplementalGroupsStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptionsFluent> fluent){
this(fluent, true);
}
public SupplementalGroupsStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptionsFluent> fluent,Boolean validationEnabled){
this(fluent, new SupplementalGroupsStrategyOptions(), validationEnabled);
}
public SupplementalGroupsStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptionsFluent> fluent,io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptions instance){
this(fluent, instance, true);
}
public SupplementalGroupsStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptionsFluent> fluent,io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptions instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withRanges(instance.getRanges());
fluent.withRule(instance.getRule());
this.validationEnabled = validationEnabled;
}
public SupplementalGroupsStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptions instance){
this(instance,true);
}
public SupplementalGroupsStrategyOptionsBuilder(io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptions instance,Boolean validationEnabled){
this.fluent = this;
this.withRanges(instance.getRanges());
this.withRule(instance.getRule());
this.validationEnabled = validationEnabled;
}
public io.alauda.kubernetes.api.model.extensions.SupplementalGroupsStrategyOptions build(){
SupplementalGroupsStrategyOptions buildable = new SupplementalGroupsStrategyOptions(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;
SupplementalGroupsStrategyOptionsBuilder that = (SupplementalGroupsStrategyOptionsBuilder) 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;
}
}