annotations.me.snowdrop.istio.api.model.v1.routing.EgressRuleBuilder Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.routing;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class EgressRuleBuilder extends EgressRuleFluentImpl implements VisitableBuilder{
EgressRuleFluent> fluent;
Boolean validationEnabled;
public EgressRuleBuilder(){
this(true);
}
public EgressRuleBuilder(Boolean validationEnabled){
this(new EgressRule(), validationEnabled);
}
public EgressRuleBuilder(EgressRuleFluent> fluent){
this(fluent, true);
}
public EgressRuleBuilder(EgressRuleFluent> fluent,Boolean validationEnabled){
this(fluent, new EgressRule(), validationEnabled);
}
public EgressRuleBuilder(EgressRuleFluent> fluent,EgressRule instance){
this(fluent, instance, true);
}
public EgressRuleBuilder(EgressRuleFluent> fluent,EgressRule instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withDestination(instance.getDestination());
fluent.withPorts(instance.getPorts());
fluent.withUseEgressProxy(instance.getUseEgressProxy());
this.validationEnabled = validationEnabled;
}
public EgressRuleBuilder(EgressRule instance){
this(instance,true);
}
public EgressRuleBuilder(EgressRule instance,Boolean validationEnabled){
this.fluent = this;
this.withDestination(instance.getDestination());
this.withPorts(instance.getPorts());
this.withUseEgressProxy(instance.getUseEgressProxy());
this.validationEnabled = validationEnabled;
}
public EgressRule build(){
EgressRule buildable = new EgressRule(fluent.getDestination(),fluent.getPorts(),fluent.isUseEgressProxy());
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;
EgressRuleBuilder that = (EgressRuleBuilder) 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