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

io.kubernetes.client.openapi.models.V1SessionAffinityConfigFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.openapi.models;

import java.lang.SuppressWarnings;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class V1SessionAffinityConfigFluentImpl> extends BaseFluent implements V1SessionAffinityConfigFluent{
  public V1SessionAffinityConfigFluentImpl() {
  }
  public V1SessionAffinityConfigFluentImpl(V1SessionAffinityConfig instance) {
    if (instance != null) {
      this.withClientIP(instance.getClientIP());
    }
  }
  private V1ClientIPConfigBuilder clientIP;
  
  /**
   * This method has been deprecated, please use method buildClientIP instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1ClientIPConfig getClientIP() {
    return this.clientIP!=null ?this.clientIP.build():null;
  }
  public V1ClientIPConfig buildClientIP() {
    return this.clientIP!=null ?this.clientIP.build():null;
  }
  public A withClientIP(V1ClientIPConfig clientIP) {
    _visitables.get("clientIP").remove(this.clientIP);
    if (clientIP!=null){ this.clientIP= new V1ClientIPConfigBuilder(clientIP); _visitables.get("clientIP").add(this.clientIP);} else { this.clientIP = null; _visitables.get("clientIP").remove(this.clientIP); } return (A) this;
  }
  public Boolean hasClientIP() {
    return this.clientIP != null;
  }
  public V1SessionAffinityConfigFluentImpl.ClientIPNested withNewClientIP() {
    return new V1SessionAffinityConfigFluentImpl.ClientIPNestedImpl();
  }
  public V1SessionAffinityConfigFluentImpl.ClientIPNested withNewClientIPLike(V1ClientIPConfig item) {
    return new V1SessionAffinityConfigFluentImpl.ClientIPNestedImpl(item);
  }
  public V1SessionAffinityConfigFluentImpl.ClientIPNested editClientIP() {
    return withNewClientIPLike(getClientIP());
  }
  public V1SessionAffinityConfigFluentImpl.ClientIPNested editOrNewClientIP() {
    return withNewClientIPLike(getClientIP() != null ? getClientIP(): new V1ClientIPConfigBuilder().build());
  }
  public V1SessionAffinityConfigFluentImpl.ClientIPNested editOrNewClientIPLike(V1ClientIPConfig 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;
    if (!super.equals(o)) return false;
    V1SessionAffinityConfigFluentImpl that = (V1SessionAffinityConfigFluentImpl) o;
    if (!java.util.Objects.equals(clientIP, that.clientIP)) return false;

    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(clientIP,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (clientIP != null) { sb.append("clientIP:"); sb.append(clientIP); }
    sb.append("}");
    return sb.toString();
  }
  class ClientIPNestedImpl extends V1ClientIPConfigFluentImpl> implements V1SessionAffinityConfigFluentImpl.ClientIPNested,Nested{
    ClientIPNestedImpl(V1ClientIPConfig item) {
      this.builder = new V1ClientIPConfigBuilder(this, item);
    }
    ClientIPNestedImpl() {
      this.builder = new V1ClientIPConfigBuilder(this);
    }
    V1ClientIPConfigBuilder builder;
    public N and() {
      return (N) V1SessionAffinityConfigFluentImpl.this.withClientIP(builder.build());
    }
    public N endClientIP() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy