me.snowdrop.istio.api.model.v1.routing.PortBuilder 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 PortBuilder extends me.snowdrop.istio.api.model.v1.routing.PortFluentImpl implements VisitableBuilder{
me.snowdrop.istio.api.model.v1.routing.PortFluent> fluent;
Boolean validationEnabled;
public PortBuilder(){
this(true);
}
public PortBuilder(Boolean validationEnabled){
this(new Port(), validationEnabled);
}
public PortBuilder(me.snowdrop.istio.api.model.v1.routing.PortFluent> fluent){
this(fluent, true);
}
public PortBuilder(me.snowdrop.istio.api.model.v1.routing.PortFluent> fluent,Boolean validationEnabled){
this(fluent, new Port(), validationEnabled);
}
public PortBuilder(me.snowdrop.istio.api.model.v1.routing.PortFluent> fluent,me.snowdrop.istio.api.model.v1.routing.Port instance){
this(fluent, instance, true);
}
public PortBuilder(me.snowdrop.istio.api.model.v1.routing.PortFluent> fluent,me.snowdrop.istio.api.model.v1.routing.Port instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withPort(instance.getPort());
fluent.withProtocol(instance.getProtocol());
this.validationEnabled = validationEnabled;
}
public PortBuilder(me.snowdrop.istio.api.model.v1.routing.Port instance){
this(instance,true);
}
public PortBuilder(me.snowdrop.istio.api.model.v1.routing.Port instance,Boolean validationEnabled){
this.fluent = this;
this.withPort(instance.getPort());
this.withProtocol(instance.getProtocol());
this.validationEnabled = validationEnabled;
}
public me.snowdrop.istio.api.model.v1.routing.Port build(){
Port buildable = new Port(fluent.getPort(),fluent.getProtocol());
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;
PortBuilder that = (PortBuilder) 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