me.snowdrop.istio.api.mesh.v1alpha1.SDSBuilder Maven / Gradle / Ivy
The newest version!
package me.snowdrop.istio.api.mesh.v1alpha1;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class SDSBuilder extends SDSFluentImpl implements VisitableBuilder{
SDSFluent> fluent;
Boolean validationEnabled;
public SDSBuilder(){
this(true);
}
public SDSBuilder(Boolean validationEnabled){
this(new SDS(), validationEnabled);
}
public SDSBuilder(SDSFluent> fluent){
this(fluent, true);
}
public SDSBuilder(SDSFluent> fluent,Boolean validationEnabled){
this(fluent, new SDS(), validationEnabled);
}
public SDSBuilder(SDSFluent> fluent,SDS instance){
this(fluent, instance, true);
}
public SDSBuilder(SDSFluent> fluent,SDS instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withEnabled(instance.getEnabled());
fluent.withK8sSaJwtPath(instance.getK8sSaJwtPath());
this.validationEnabled = validationEnabled;
}
public SDSBuilder(SDS instance){
this(instance,true);
}
public SDSBuilder(SDS instance,Boolean validationEnabled){
this.fluent = this;
this.withEnabled(instance.getEnabled());
this.withK8sSaJwtPath(instance.getK8sSaJwtPath());
this.validationEnabled = validationEnabled;
}
public SDS build(){
SDS buildable = new SDS(fluent.isEnabled(),fluent.getK8sSaJwtPath());
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;
SDSBuilder that = (SDSBuilder) 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;
}
}