me.snowdrop.istio.api.model.v1.networking.HTTPRetryFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.networking;
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.Integer;
import javax.validation.Valid;
import java.lang.Long;
import java.lang.Object;
import me.snowdrop.istio.api.model.DurationBuilder;
public class HTTPRetryFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements HTTPRetryFluent{
private Integer attempts;
private DurationBuilder perTryTimeout;
public HTTPRetryFluentImpl(){
}
public HTTPRetryFluentImpl(HTTPRetry instance){
this.withAttempts(instance.getAttempts());
this.withPerTryTimeout(instance.getPerTryTimeout());
}
public Integer getAttempts(){
return this.attempts;
}
public A withAttempts(Integer attempts){
this.attempts=attempts; return (A) this;
}
public Boolean hasAttempts(){
return this.attempts != null;
}
public A withNewAttempts(int arg1){
return (A)withAttempts(new Integer(arg1));
}
public A withNewAttempts(String arg1){
return (A)withAttempts(new Integer(arg1));
}
/**
* This method has been deprecated, please use method buildPerTryTimeout instead.
*/
@Deprecated public Duration getPerTryTimeout(){
return this.perTryTimeout!=null?this.perTryTimeout.build():null;
}
public Duration buildPerTryTimeout(){
return this.perTryTimeout!=null?this.perTryTimeout.build():null;
}
public A withPerTryTimeout(Duration perTryTimeout){
_visitables.remove(this.perTryTimeout);
if (perTryTimeout!=null){ this.perTryTimeout= new DurationBuilder(perTryTimeout); _visitables.add(this.perTryTimeout);} return (A) this;
}
public Boolean hasPerTryTimeout(){
return this.perTryTimeout != null;
}
public A withNewPerTryTimeout(Integer nanos,Long seconds){
return (A)withPerTryTimeout(new Duration(nanos, seconds));
}
public HTTPRetryFluent.PerTryTimeoutNested withNewPerTryTimeout(){
return new PerTryTimeoutNestedImpl();
}
public HTTPRetryFluent.PerTryTimeoutNested withNewPerTryTimeoutLike(Duration item){
return new PerTryTimeoutNestedImpl(item);
}
public HTTPRetryFluent.PerTryTimeoutNested editPerTryTimeout(){
return withNewPerTryTimeoutLike(getPerTryTimeout());
}
public HTTPRetryFluent.PerTryTimeoutNested editOrNewPerTryTimeout(){
return withNewPerTryTimeoutLike(getPerTryTimeout() != null ? getPerTryTimeout(): new DurationBuilder().build());
}
public HTTPRetryFluent.PerTryTimeoutNested editOrNewPerTryTimeoutLike(Duration item){
return withNewPerTryTimeoutLike(getPerTryTimeout() != null ? getPerTryTimeout(): item);
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
HTTPRetryFluentImpl that = (HTTPRetryFluentImpl) o;
if (attempts != null ? !attempts.equals(that.attempts) :that.attempts != null) return false;
if (perTryTimeout != null ? !perTryTimeout.equals(that.perTryTimeout) :that.perTryTimeout != null) return false;
return true;
}
public class PerTryTimeoutNestedImpl extends DurationFluentImpl> implements HTTPRetryFluent.PerTryTimeoutNested,io.fabric8.kubernetes.api.builder.Nested{
private final DurationBuilder builder;
PerTryTimeoutNestedImpl(Duration item){
this.builder = new DurationBuilder(this, item);
}
PerTryTimeoutNestedImpl(){
this.builder = new DurationBuilder(this);
}
public N and(){
return (N) HTTPRetryFluentImpl.this.withPerTryTimeout(builder.build());
}
public N endPerTryTimeout(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy