me.snowdrop.istio.api.model.v1.mixer.config.AttributeInfoBuilder Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.mixer.config;
import me.snowdrop.istio.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class AttributeInfoBuilder extends AttributeInfoFluentImpl implements me.snowdrop.istio.api.builder.VisitableBuilder{
AttributeInfoFluent> fluent;
Boolean validationEnabled;
public AttributeInfoBuilder(){
this(true);
}
public AttributeInfoBuilder(Boolean validationEnabled){
this(new AttributeInfo(), validationEnabled);
}
public AttributeInfoBuilder(AttributeInfoFluent> fluent){
this(fluent, true);
}
public AttributeInfoBuilder(AttributeInfoFluent> fluent,Boolean validationEnabled){
this(fluent, new AttributeInfo(), validationEnabled);
}
public AttributeInfoBuilder(AttributeInfoFluent> fluent,AttributeInfo instance){
this(fluent, instance, true);
}
public AttributeInfoBuilder(AttributeInfoFluent> fluent,AttributeInfo instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withDescription(instance.getDescription());
fluent.withValueType(instance.getValueType());
this.validationEnabled = validationEnabled;
}
public AttributeInfoBuilder(AttributeInfo instance){
this(instance,true);
}
public AttributeInfoBuilder(AttributeInfo instance,Boolean validationEnabled){
this.fluent = this;
this.withDescription(instance.getDescription());
this.withValueType(instance.getValueType());
this.validationEnabled = validationEnabled;
}
public AttributeInfo build(){
AttributeInfo buildable = new AttributeInfo(fluent.getDescription(),fluent.getValueType());
me.snowdrop.istio.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;
AttributeInfoBuilder that = (AttributeInfoBuilder) 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