io.fabric8.kubernetes.api.model.SessionAffinityConfigFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Integer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class SessionAffinityConfigFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements SessionAffinityConfigFluent{
private ClientIPConfigBuilder clientIP;
public SessionAffinityConfigFluentImpl(){
}
public SessionAffinityConfigFluentImpl(SessionAffinityConfig instance){
this.withClientIP(instance.getClientIP());
}
/**
* This method has been deprecated, please use method buildClientIP instead.
* @return The buildable object.
*/
@Deprecated public ClientIPConfig getClientIP(){
return this.clientIP!=null?this.clientIP.build():null;
}
public ClientIPConfig buildClientIP(){
return this.clientIP!=null?this.clientIP.build():null;
}
public A withClientIP(ClientIPConfig clientIP){
_visitables.get("clientIP").remove(this.clientIP);
if (clientIP!=null){ this.clientIP= new ClientIPConfigBuilder(clientIP); _visitables.get("clientIP").add(this.clientIP);} return (A) this;
}
public Boolean hasClientIP(){
return this.clientIP != null;
}
public A withNewClientIP(Integer timeoutSeconds){
return (A)withClientIP(new ClientIPConfig(timeoutSeconds));
}
public SessionAffinityConfigFluent.ClientIPNested withNewClientIP(){
return new ClientIPNestedImpl();
}
public SessionAffinityConfigFluent.ClientIPNested withNewClientIPLike(ClientIPConfig item){
return new ClientIPNestedImpl(item);
}
public SessionAffinityConfigFluent.ClientIPNested editClientIP(){
return withNewClientIPLike(getClientIP());
}
public SessionAffinityConfigFluent.ClientIPNested editOrNewClientIP(){
return withNewClientIPLike(getClientIP() != null ? getClientIP(): new ClientIPConfigBuilder().build());
}
public SessionAffinityConfigFluent.ClientIPNested editOrNewClientIPLike(ClientIPConfig item){
return withNewClientIPLike(getClientIP() != null ? getClientIP(): item);
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SessionAffinityConfigFluentImpl that = (SessionAffinityConfigFluentImpl) o;
if (clientIP != null ? !clientIP.equals(that.clientIP) :that.clientIP != null) return false;
return true;
}
public class ClientIPNestedImpl extends ClientIPConfigFluentImpl> implements SessionAffinityConfigFluent.ClientIPNested,io.fabric8.kubernetes.api.builder.Nested{
private final ClientIPConfigBuilder builder;
ClientIPNestedImpl(ClientIPConfig item){
this.builder = new ClientIPConfigBuilder(this, item);
}
ClientIPNestedImpl(){
this.builder = new ClientIPConfigBuilder(this);
}
public N and(){
return (N) SessionAffinityConfigFluentImpl.this.withClientIP(builder.build());
}
public N endClientIP(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy