me.snowdrop.istio.api.networking.v1alpha3.ConsistentHashLBFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.networking.v1alpha3;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Object;
public class ConsistentHashLBFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements ConsistentHashLBFluent{
private VisitableBuilder extends me.snowdrop.istio.api.networking.v1alpha3.ConsistentHashLB.HashKey,?> hashKey;
private Integer minimumRingSize;
public ConsistentHashLBFluentImpl(){
}
public ConsistentHashLBFluentImpl(ConsistentHashLB instance){
this.withHashKey(instance.getHashKey());
this.withMinimumRingSize(instance.getMinimumRingSize());
}
/**
* This method has been deprecated, please use method buildHashKey instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1alpha3.ConsistentHashLB.HashKey getHashKey(){
return this.hashKey!=null?this.hashKey.build():null;
}
public me.snowdrop.istio.api.networking.v1alpha3.ConsistentHashLB.HashKey buildHashKey(){
return this.hashKey!=null?this.hashKey.build():null;
}
public A withHashKey(me.snowdrop.istio.api.networking.v1alpha3.ConsistentHashLB.HashKey hashKey){
if (hashKey instanceof HttpCookieHashKey){ this.hashKey= new HttpCookieHashKeyBuilder((HttpCookieHashKey)hashKey); _visitables.add(this.hashKey);}
if (hashKey instanceof UseSourceIpHashKey){ this.hashKey= new UseSourceIpHashKeyBuilder((UseSourceIpHashKey)hashKey); _visitables.add(this.hashKey);}
if (hashKey instanceof HttpHeaderNameHashKey){ this.hashKey= new HttpHeaderNameHashKeyBuilder((HttpHeaderNameHashKey)hashKey); _visitables.add(this.hashKey);}
return (A) this;
}
public Boolean hasHashKey(){
return this.hashKey != null;
}
public A withHttpCookieHashKey(HttpCookieHashKey httpCookieHashKey){
_visitables.remove(this.hashKey);
if (httpCookieHashKey!=null){ this.hashKey= new HttpCookieHashKeyBuilder(httpCookieHashKey); _visitables.add(this.hashKey);} return (A) this;
}
public ConsistentHashLBFluent.HttpCookieHashKeyNested withNewHttpCookieHashKey(){
return new HttpCookieHashKeyNestedImpl();
}
public ConsistentHashLBFluent.HttpCookieHashKeyNested withNewHttpCookieHashKeyLike(HttpCookieHashKey item){
return new HttpCookieHashKeyNestedImpl(item);
}
public A withUseSourceIpHashKey(UseSourceIpHashKey useSourceIpHashKey){
_visitables.remove(this.hashKey);
if (useSourceIpHashKey!=null){ this.hashKey= new UseSourceIpHashKeyBuilder(useSourceIpHashKey); _visitables.add(this.hashKey);} return (A) this;
}
public ConsistentHashLBFluent.UseSourceIpHashKeyNested withNewUseSourceIpHashKey(){
return new UseSourceIpHashKeyNestedImpl();
}
public ConsistentHashLBFluent.UseSourceIpHashKeyNested withNewUseSourceIpHashKeyLike(UseSourceIpHashKey item){
return new UseSourceIpHashKeyNestedImpl(item);
}
public A withNewUseSourceIpHashKey(Boolean useSourceIp){
return (A)withUseSourceIpHashKey(new UseSourceIpHashKey(useSourceIp));
}
public A withHttpHeaderNameHashKey(HttpHeaderNameHashKey httpHeaderNameHashKey){
_visitables.remove(this.hashKey);
if (httpHeaderNameHashKey!=null){ this.hashKey= new HttpHeaderNameHashKeyBuilder(httpHeaderNameHashKey); _visitables.add(this.hashKey);} return (A) this;
}
public ConsistentHashLBFluent.HttpHeaderNameHashKeyNested withNewHttpHeaderNameHashKey(){
return new HttpHeaderNameHashKeyNestedImpl();
}
public ConsistentHashLBFluent.HttpHeaderNameHashKeyNested withNewHttpHeaderNameHashKeyLike(HttpHeaderNameHashKey item){
return new HttpHeaderNameHashKeyNestedImpl(item);
}
public A withNewHttpHeaderNameHashKey(String httpHeaderName){
return (A)withHttpHeaderNameHashKey(new HttpHeaderNameHashKey(httpHeaderName));
}
public Integer getMinimumRingSize(){
return this.minimumRingSize;
}
public A withMinimumRingSize(Integer minimumRingSize){
this.minimumRingSize=minimumRingSize; return (A) this;
}
public Boolean hasMinimumRingSize(){
return this.minimumRingSize != null;
}
public A withNewMinimumRingSize(String arg1){
return (A)withMinimumRingSize(new Integer(arg1));
}
public A withNewMinimumRingSize(int arg1){
return (A)withMinimumRingSize(new Integer(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;
ConsistentHashLBFluentImpl that = (ConsistentHashLBFluentImpl) o;
if (hashKey != null ? !hashKey.equals(that.hashKey) :that.hashKey != null) return false;
if (minimumRingSize != null ? !minimumRingSize.equals(that.minimumRingSize) :that.minimumRingSize != null) return false;
return true;
}
public class HttpCookieHashKeyNestedImpl extends HttpCookieHashKeyFluentImpl> implements ConsistentHashLBFluent.HttpCookieHashKeyNested,io.fabric8.kubernetes.api.builder.Nested{
private final HttpCookieHashKeyBuilder builder;
HttpCookieHashKeyNestedImpl(HttpCookieHashKey item){
this.builder = new HttpCookieHashKeyBuilder(this, item);
}
HttpCookieHashKeyNestedImpl(){
this.builder = new HttpCookieHashKeyBuilder(this);
}
public N and(){
return (N) ConsistentHashLBFluentImpl.this.withHttpCookieHashKey(builder.build());
}
public N endHttpCookieHashKey(){
return and();
}
}
public class UseSourceIpHashKeyNestedImpl extends UseSourceIpHashKeyFluentImpl> implements ConsistentHashLBFluent.UseSourceIpHashKeyNested,io.fabric8.kubernetes.api.builder.Nested{
private final UseSourceIpHashKeyBuilder builder;
UseSourceIpHashKeyNestedImpl(UseSourceIpHashKey item){
this.builder = new UseSourceIpHashKeyBuilder(this, item);
}
UseSourceIpHashKeyNestedImpl(){
this.builder = new UseSourceIpHashKeyBuilder(this);
}
public N and(){
return (N) ConsistentHashLBFluentImpl.this.withUseSourceIpHashKey(builder.build());
}
public N endUseSourceIpHashKey(){
return and();
}
}
public class HttpHeaderNameHashKeyNestedImpl extends HttpHeaderNameHashKeyFluentImpl> implements ConsistentHashLBFluent.HttpHeaderNameHashKeyNested,io.fabric8.kubernetes.api.builder.Nested{
private final HttpHeaderNameHashKeyBuilder builder;
HttpHeaderNameHashKeyNestedImpl(HttpHeaderNameHashKey item){
this.builder = new HttpHeaderNameHashKeyBuilder(this, item);
}
HttpHeaderNameHashKeyNestedImpl(){
this.builder = new HttpHeaderNameHashKeyBuilder(this);
}
public N and(){
return (N) ConsistentHashLBFluentImpl.this.withHttpHeaderNameHashKey(builder.build());
}
public N endHttpHeaderNameHashKey(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy