me.snowdrop.istio.api.model.v1.routing.DelayBuilder 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 DelayBuilder extends me.snowdrop.istio.api.model.v1.routing.DelayFluentImpl implements VisitableBuilder{
me.snowdrop.istio.api.model.v1.routing.DelayFluent> fluent;
Boolean validationEnabled;
public DelayBuilder(){
this(true);
}
public DelayBuilder(Boolean validationEnabled){
this(new Delay(), validationEnabled);
}
public DelayBuilder(me.snowdrop.istio.api.model.v1.routing.DelayFluent> fluent){
this(fluent, true);
}
public DelayBuilder(me.snowdrop.istio.api.model.v1.routing.DelayFluent> fluent,Boolean validationEnabled){
this(fluent, new Delay(), validationEnabled);
}
public DelayBuilder(me.snowdrop.istio.api.model.v1.routing.DelayFluent> fluent,me.snowdrop.istio.api.model.v1.routing.Delay instance){
this(fluent, instance, true);
}
public DelayBuilder(me.snowdrop.istio.api.model.v1.routing.DelayFluent> fluent,me.snowdrop.istio.api.model.v1.routing.Delay instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withHttpDelayType(instance.getHttpDelayType());
fluent.withOverrideHeaderName(instance.getOverrideHeaderName());
fluent.withPercent(instance.getPercent());
this.validationEnabled = validationEnabled;
}
public DelayBuilder(me.snowdrop.istio.api.model.v1.routing.Delay instance){
this(instance,true);
}
public DelayBuilder(me.snowdrop.istio.api.model.v1.routing.Delay instance,Boolean validationEnabled){
this.fluent = this;
this.withHttpDelayType(instance.getHttpDelayType());
this.withOverrideHeaderName(instance.getOverrideHeaderName());
this.withPercent(instance.getPercent());
this.validationEnabled = validationEnabled;
}
public me.snowdrop.istio.api.model.v1.routing.Delay build(){
Delay buildable = new Delay(fluent.getHttpDelayType(),fluent.getOverrideHeaderName(),fluent.getPercent());
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;
DelayBuilder that = (DelayBuilder) 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