me.snowdrop.istio.api.networking.v1beta1.ConnectionPoolSettingsFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.networking.v1beta1;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class ConnectionPoolSettingsFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements me.snowdrop.istio.api.networking.v1beta1.ConnectionPoolSettingsFluent{
private me.snowdrop.istio.api.networking.v1beta1.HTTPSettingsBuilder http;
private me.snowdrop.istio.api.networking.v1beta1.TCPSettingsBuilder tcp;
public ConnectionPoolSettingsFluentImpl(){
}
public ConnectionPoolSettingsFluentImpl(me.snowdrop.istio.api.networking.v1beta1.ConnectionPoolSettings instance){
this.withHttp(instance.getHttp());
this.withTcp(instance.getTcp());
}
/**
* This method has been deprecated, please use method buildHttp instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1beta1.HTTPSettings getHttp(){
return this.http!=null?this.http.build():null;
}
public me.snowdrop.istio.api.networking.v1beta1.HTTPSettings buildHttp(){
return this.http!=null?this.http.build():null;
}
public A withHttp(me.snowdrop.istio.api.networking.v1beta1.HTTPSettings http){
_visitables.get("http").remove(this.http);
if (http!=null){ this.http= new me.snowdrop.istio.api.networking.v1beta1.HTTPSettingsBuilder(http); _visitables.get("http").add(this.http);} return (A) this;
}
public Boolean hasHttp(){
return this.http != null;
}
public ConnectionPoolSettingsFluent.HttpNested withNewHttp(){
return new HttpNestedImpl();
}
public ConnectionPoolSettingsFluent.HttpNested withNewHttpLike(me.snowdrop.istio.api.networking.v1beta1.HTTPSettings item){
return new HttpNestedImpl(item);
}
public ConnectionPoolSettingsFluent.HttpNested editHttp(){
return withNewHttpLike(getHttp());
}
public ConnectionPoolSettingsFluent.HttpNested editOrNewHttp(){
return withNewHttpLike(getHttp() != null ? getHttp(): new me.snowdrop.istio.api.networking.v1beta1.HTTPSettingsBuilder().build());
}
public ConnectionPoolSettingsFluent.HttpNested editOrNewHttpLike(me.snowdrop.istio.api.networking.v1beta1.HTTPSettings item){
return withNewHttpLike(getHttp() != null ? getHttp(): item);
}
/**
* This method has been deprecated, please use method buildTcp instead.
* @return The buildable object.
*/
@Deprecated public me.snowdrop.istio.api.networking.v1beta1.TCPSettings getTcp(){
return this.tcp!=null?this.tcp.build():null;
}
public me.snowdrop.istio.api.networking.v1beta1.TCPSettings buildTcp(){
return this.tcp!=null?this.tcp.build():null;
}
public A withTcp(me.snowdrop.istio.api.networking.v1beta1.TCPSettings tcp){
_visitables.get("tcp").remove(this.tcp);
if (tcp!=null){ this.tcp= new me.snowdrop.istio.api.networking.v1beta1.TCPSettingsBuilder(tcp); _visitables.get("tcp").add(this.tcp);} return (A) this;
}
public Boolean hasTcp(){
return this.tcp != null;
}
public ConnectionPoolSettingsFluent.TcpNested withNewTcp(){
return new TcpNestedImpl();
}
public ConnectionPoolSettingsFluent.TcpNested withNewTcpLike(me.snowdrop.istio.api.networking.v1beta1.TCPSettings item){
return new TcpNestedImpl(item);
}
public ConnectionPoolSettingsFluent.TcpNested editTcp(){
return withNewTcpLike(getTcp());
}
public ConnectionPoolSettingsFluent.TcpNested editOrNewTcp(){
return withNewTcpLike(getTcp() != null ? getTcp(): new me.snowdrop.istio.api.networking.v1beta1.TCPSettingsBuilder().build());
}
public ConnectionPoolSettingsFluent.TcpNested editOrNewTcpLike(me.snowdrop.istio.api.networking.v1beta1.TCPSettings item){
return withNewTcpLike(getTcp() != null ? getTcp(): item);
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ConnectionPoolSettingsFluentImpl that = (ConnectionPoolSettingsFluentImpl) o;
if (http != null ? !http.equals(that.http) :that.http != null) return false;
if (tcp != null ? !tcp.equals(that.tcp) :that.tcp != null) return false;
return true;
}
public class HttpNestedImpl extends me.snowdrop.istio.api.networking.v1beta1.HTTPSettingsFluentImpl> implements ConnectionPoolSettingsFluent.HttpNested,io.fabric8.kubernetes.api.builder.Nested{
private final me.snowdrop.istio.api.networking.v1beta1.HTTPSettingsBuilder builder;
HttpNestedImpl(me.snowdrop.istio.api.networking.v1beta1.HTTPSettings item){
this.builder = new me.snowdrop.istio.api.networking.v1beta1.HTTPSettingsBuilder(this, item);
}
HttpNestedImpl(){
this.builder = new me.snowdrop.istio.api.networking.v1beta1.HTTPSettingsBuilder(this);
}
public N and(){
return (N) ConnectionPoolSettingsFluentImpl.this.withHttp(builder.build());
}
public N endHttp(){
return and();
}
}
public class TcpNestedImpl extends me.snowdrop.istio.api.networking.v1beta1.TCPSettingsFluentImpl> implements ConnectionPoolSettingsFluent.TcpNested,io.fabric8.kubernetes.api.builder.Nested{
private final me.snowdrop.istio.api.networking.v1beta1.TCPSettingsBuilder builder;
TcpNestedImpl(me.snowdrop.istio.api.networking.v1beta1.TCPSettings item){
this.builder = new me.snowdrop.istio.api.networking.v1beta1.TCPSettingsBuilder(this, item);
}
TcpNestedImpl(){
this.builder = new me.snowdrop.istio.api.networking.v1beta1.TCPSettingsBuilder(this);
}
public N and(){
return (N) ConnectionPoolSettingsFluentImpl.this.withTcp(builder.build());
}
public N endTcp(){
return and();
}
}
}