annotations.me.snowdrop.istio.api.model.v1.routing.ThrottleFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.routing;
import me.snowdrop.istio.api.model.DurationFluentImpl;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import com.fasterxml.jackson.databind.JsonSerializer;
import java.lang.String;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.lang.Boolean;
import java.lang.Override;
import com.fasterxml.jackson.core.JsonParser;
import me.snowdrop.istio.api.model.Duration;
import java.lang.Double;
import java.lang.Integer;
import javax.validation.Valid;
import java.lang.Long;
import java.lang.Object;
import me.snowdrop.istio.api.model.DurationBuilder;
public class ThrottleFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements ThrottleFluent{
private Object throttleAfter;
private Long downstreamLimitBps;
private Double percent;
private DurationBuilder throttleForPeriod;
private Long upstreamLimitBps;
public ThrottleFluentImpl(){
}
public ThrottleFluentImpl(Throttle instance){
this.withThrottleAfter(instance.getThrottleAfter());
this.withDownstreamLimitBps(instance.getDownstreamLimitBps());
this.withPercent(instance.getPercent());
this.withThrottleForPeriod(instance.getThrottleForPeriod());
this.withUpstreamLimitBps(instance.getUpstreamLimitBps());
}
public Object getThrottleAfter(){
return this.throttleAfter;
}
public A withThrottleAfter(Object throttleAfter){
this.throttleAfter=throttleAfter; return (A) this;
}
public Boolean hasThrottleAfter(){
return this.throttleAfter != null;
}
public Long getDownstreamLimitBps(){
return this.downstreamLimitBps;
}
public A withDownstreamLimitBps(Long downstreamLimitBps){
this.downstreamLimitBps=downstreamLimitBps; return (A) this;
}
public Boolean hasDownstreamLimitBps(){
return this.downstreamLimitBps != null;
}
public A withNewDownstreamLimitBps(String arg1){
return (A)withDownstreamLimitBps(new Long(arg1));
}
public A withNewDownstreamLimitBps(long arg1){
return (A)withDownstreamLimitBps(new Long(arg1));
}
public Double getPercent(){
return this.percent;
}
public A withPercent(Double percent){
this.percent=percent; return (A) this;
}
public Boolean hasPercent(){
return this.percent != null;
}
public A withNewPercent(double arg1){
return (A)withPercent(new Double(arg1));
}
public A withNewPercent(String arg1){
return (A)withPercent(new Double(arg1));
}
/**
* This method has been deprecated, please use method buildThrottleForPeriod instead.
*/
@Deprecated public Duration getThrottleForPeriod(){
return this.throttleForPeriod!=null?this.throttleForPeriod.build():null;
}
public Duration buildThrottleForPeriod(){
return this.throttleForPeriod!=null?this.throttleForPeriod.build():null;
}
public A withThrottleForPeriod(Duration throttleForPeriod){
_visitables.remove(this.throttleForPeriod);
if (throttleForPeriod!=null){ this.throttleForPeriod= new DurationBuilder(throttleForPeriod); _visitables.add(this.throttleForPeriod);} return (A) this;
}
public Boolean hasThrottleForPeriod(){
return this.throttleForPeriod != null;
}
public A withNewThrottleForPeriod(Integer nanos,Long seconds){
return (A)withThrottleForPeriod(new Duration(nanos, seconds));
}
public ThrottleFluent.ThrottleForPeriodNested withNewThrottleForPeriod(){
return new ThrottleForPeriodNestedImpl();
}
public ThrottleFluent.ThrottleForPeriodNested withNewThrottleForPeriodLike(Duration item){
return new ThrottleForPeriodNestedImpl(item);
}
public ThrottleFluent.ThrottleForPeriodNested editThrottleForPeriod(){
return withNewThrottleForPeriodLike(getThrottleForPeriod());
}
public ThrottleFluent.ThrottleForPeriodNested editOrNewThrottleForPeriod(){
return withNewThrottleForPeriodLike(getThrottleForPeriod() != null ? getThrottleForPeriod(): new DurationBuilder().build());
}
public ThrottleFluent.ThrottleForPeriodNested editOrNewThrottleForPeriodLike(Duration item){
return withNewThrottleForPeriodLike(getThrottleForPeriod() != null ? getThrottleForPeriod(): item);
}
public Long getUpstreamLimitBps(){
return this.upstreamLimitBps;
}
public A withUpstreamLimitBps(Long upstreamLimitBps){
this.upstreamLimitBps=upstreamLimitBps; return (A) this;
}
public Boolean hasUpstreamLimitBps(){
return this.upstreamLimitBps != null;
}
public A withNewUpstreamLimitBps(String arg1){
return (A)withUpstreamLimitBps(new Long(arg1));
}
public A withNewUpstreamLimitBps(long arg1){
return (A)withUpstreamLimitBps(new Long(arg1));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ThrottleFluentImpl that = (ThrottleFluentImpl) o;
if (throttleAfter != null &&throttleAfter != this ? !throttleAfter.equals(that.throttleAfter) :that.throttleAfter != null &&throttleAfter != this ) return false;
if (downstreamLimitBps != null ? !downstreamLimitBps.equals(that.downstreamLimitBps) :that.downstreamLimitBps != null) return false;
if (percent != null ? !percent.equals(that.percent) :that.percent != null) return false;
if (throttleForPeriod != null ? !throttleForPeriod.equals(that.throttleForPeriod) :that.throttleForPeriod != null) return false;
if (upstreamLimitBps != null ? !upstreamLimitBps.equals(that.upstreamLimitBps) :that.upstreamLimitBps != null) return false;
return true;
}
public class ThrottleForPeriodNestedImpl extends DurationFluentImpl> implements ThrottleFluent.ThrottleForPeriodNested,io.fabric8.kubernetes.api.builder.Nested{
private final DurationBuilder builder;
ThrottleForPeriodNestedImpl(Duration item){
this.builder = new DurationBuilder(this, item);
}
ThrottleForPeriodNestedImpl(){
this.builder = new DurationBuilder(this);
}
public N and(){
return (N) ThrottleFluentImpl.this.withThrottleForPeriod(builder.build());
}
public N endThrottleForPeriod(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy