me.snowdrop.istio.api.authentication.v1alpha1.StringMatchBuilder Maven / Gradle / Ivy
package me.snowdrop.istio.api.authentication.v1alpha1;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
import javax.validation.Validator;
public class StringMatchBuilder extends StringMatchFluentImpl implements VisitableBuilder{
StringMatchFluent> fluent;
Boolean validationEnabled;
Validator validator;
public StringMatchBuilder(){
this(true);
}
public StringMatchBuilder(Boolean validationEnabled){
this(new StringMatch(), validationEnabled);
}
public StringMatchBuilder(StringMatchFluent> fluent){
this(fluent, true);
}
public StringMatchBuilder(StringMatchFluent> fluent,Boolean validationEnabled){
this(fluent, new StringMatch(), validationEnabled);
}
public StringMatchBuilder(StringMatchFluent> fluent,StringMatch instance){
this(fluent, instance, true);
}
public StringMatchBuilder(StringMatchFluent> fluent,StringMatch instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withMatchType(instance.getMatchType());
this.validationEnabled = validationEnabled;
}
public StringMatchBuilder(StringMatch instance){
this(instance,true);
}
public StringMatchBuilder(StringMatch instance,Boolean validationEnabled){
this.fluent = this;
this.withMatchType(instance.getMatchType());
this.validationEnabled = validationEnabled;
}
public StringMatchBuilder(Validator validator){
this(new StringMatch(), true);
}
public StringMatchBuilder(StringMatchFluent> fluent,StringMatch instance,Validator validator){
this.fluent = fluent;
fluent.withMatchType(instance.getMatchType());
this.validator = validator;
this.validationEnabled = validator != null;
}
public StringMatchBuilder(StringMatch instance,Validator validator){
this.fluent = this;
this.withMatchType(instance.getMatchType());
this.validator = validator;
this.validationEnabled = validator != null;
}
public StringMatch build(){
StringMatch buildable = new StringMatch(fluent.getMatchType());
if (validationEnabled) {io.fabric8.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;
StringMatchBuilder that = (StringMatchBuilder) 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;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy