All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fabric8.kubernetes.api.model.SessionAffinityConfigFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Integer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

 /**
  * Generated
  */
public class SessionAffinityConfigFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.SessionAffinityConfigFluent{
  public SessionAffinityConfigFluentImpl() {
  }
  public SessionAffinityConfigFluentImpl(io.fabric8.kubernetes.api.model.SessionAffinityConfig instance) {
    this.withClientIP(instance.getClientIP()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private io.fabric8.kubernetes.api.model.ClientIPConfigBuilder clientIP;
  private java.util.Map additionalProperties;
  
  /**
   * This method has been deprecated, please use method buildClientIP instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.ClientIPConfig getClientIP() {
    return this.clientIP!=null?this.clientIP.build():null;
  }
  public io.fabric8.kubernetes.api.model.ClientIPConfig buildClientIP() {
    return this.clientIP!=null?this.clientIP.build():null;
  }
  public A withClientIP(io.fabric8.kubernetes.api.model.ClientIPConfig clientIP) {
    _visitables.get("clientIP").remove(this.clientIP);
    if (clientIP!=null){ this.clientIP= new io.fabric8.kubernetes.api.model.ClientIPConfigBuilder(clientIP); _visitables.get("clientIP").add(this.clientIP);} return (A) this;
  }
  public java.lang.Boolean hasClientIP() {
    return this.clientIP != null;
  }
  public A withNewClientIP(java.lang.Integer timeoutSeconds) {
    return (A)withClientIP(new ClientIPConfig(timeoutSeconds));
  }
  public io.fabric8.kubernetes.api.model.SessionAffinityConfigFluent.ClientIPNested withNewClientIP() {
    return new io.fabric8.kubernetes.api.model.SessionAffinityConfigFluentImpl.ClientIPNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.SessionAffinityConfigFluent.ClientIPNested withNewClientIPLike(io.fabric8.kubernetes.api.model.ClientIPConfig item) {
    return new io.fabric8.kubernetes.api.model.SessionAffinityConfigFluentImpl.ClientIPNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.SessionAffinityConfigFluent.ClientIPNested editClientIP() {
    return withNewClientIPLike(getClientIP());
  }
  public io.fabric8.kubernetes.api.model.SessionAffinityConfigFluent.ClientIPNested editOrNewClientIP() {
    return withNewClientIPLike(getClientIP() != null ? getClientIP(): new io.fabric8.kubernetes.api.model.ClientIPConfigBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.SessionAffinityConfigFluent.ClientIPNested editOrNewClientIPLike(io.fabric8.kubernetes.api.model.ClientIPConfig item) {
    return withNewClientIPLike(getClientIP() != null ? getClientIP(): item);
  }
  public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  public A addToAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.lang.String key) {
    if(this.additionalProperties == null) { return (A) this; }
    if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
  }
  public java.util.Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  public A withAdditionalProperties(java.util.Map additionalProperties) {
    if (additionalProperties == null) { this.additionalProperties =  null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
  }
  public java.lang.Boolean hasAdditionalProperties() {
    return this.additionalProperties != null;
  }
  public boolean equals(java.lang.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;
    if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(clientIP,  additionalProperties,  super.hashCode());
  }
  public class ClientIPNestedImpl extends io.fabric8.kubernetes.api.model.ClientIPConfigFluentImpl> implements io.fabric8.kubernetes.api.model.SessionAffinityConfigFluent.ClientIPNested,io.fabric8.kubernetes.api.builder.Nested{
    ClientIPNestedImpl(io.fabric8.kubernetes.api.model.ClientIPConfig item) {
      this.builder = new io.fabric8.kubernetes.api.model.ClientIPConfigBuilder(this, item);
    }
    ClientIPNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ClientIPConfigBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ClientIPConfigBuilder builder;
    public N and() {
      return (N) SessionAffinityConfigFluentImpl.this.withClientIP(builder.build());
    }
    public N endClientIP() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy