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

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

There is a newer version: 22.0.0
Show newest version
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 V1IngressClassSpecFluentImpl> extends BaseFluent implements V1IngressClassSpecFluent{
  public V1IngressClassSpecFluentImpl() {
  }
  public V1IngressClassSpecFluentImpl(V1IngressClassSpec instance) {
    if (instance != null) {
      this.withController(instance.getController());
      this.withParameters(instance.getParameters());
    }
  }
  private String controller;
  private V1IngressClassParametersReferenceBuilder parameters;
  public String getController() {
    return this.controller;
  }
  public A withController(String controller) {
    this.controller=controller; return (A) this;
  }
  public Boolean hasController() {
    return this.controller != null;
  }
  
  /**
   * This method has been deprecated, please use method buildParameters instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1IngressClassParametersReference getParameters() {
    return this.parameters!=null ?this.parameters.build():null;
  }
  public V1IngressClassParametersReference buildParameters() {
    return this.parameters!=null ?this.parameters.build():null;
  }
  public A withParameters(V1IngressClassParametersReference parameters) {
    _visitables.get("parameters").remove(this.parameters);
    if (parameters!=null){ this.parameters= new V1IngressClassParametersReferenceBuilder(parameters); _visitables.get("parameters").add(this.parameters);} else { this.parameters = null; _visitables.get("parameters").remove(this.parameters); } return (A) this;
  }
  public Boolean hasParameters() {
    return this.parameters != null;
  }
  public V1IngressClassSpecFluentImpl.ParametersNested withNewParameters() {
    return new V1IngressClassSpecFluentImpl.ParametersNestedImpl();
  }
  public V1IngressClassSpecFluentImpl.ParametersNested withNewParametersLike(V1IngressClassParametersReference item) {
    return new V1IngressClassSpecFluentImpl.ParametersNestedImpl(item);
  }
  public V1IngressClassSpecFluentImpl.ParametersNested editParameters() {
    return withNewParametersLike(getParameters());
  }
  public V1IngressClassSpecFluentImpl.ParametersNested editOrNewParameters() {
    return withNewParametersLike(getParameters() != null ? getParameters(): new V1IngressClassParametersReferenceBuilder().build());
  }
  public V1IngressClassSpecFluentImpl.ParametersNested editOrNewParametersLike(V1IngressClassParametersReference item) {
    return withNewParametersLike(getParameters() != null ? getParameters(): 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;
    V1IngressClassSpecFluentImpl that = (V1IngressClassSpecFluentImpl) o;
    if (!java.util.Objects.equals(controller, that.controller)) return false;

    if (!java.util.Objects.equals(parameters, that.parameters)) return false;

    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(controller,  parameters,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (controller != null) { sb.append("controller:"); sb.append(controller + ","); }
    if (parameters != null) { sb.append("parameters:"); sb.append(parameters); }
    sb.append("}");
    return sb.toString();
  }
  class ParametersNestedImpl extends V1IngressClassParametersReferenceFluentImpl> implements V1IngressClassSpecFluentImpl.ParametersNested,Nested{
    ParametersNestedImpl(V1IngressClassParametersReference item) {
      this.builder = new V1IngressClassParametersReferenceBuilder(this, item);
    }
    ParametersNestedImpl() {
      this.builder = new V1IngressClassParametersReferenceBuilder(this);
    }
    V1IngressClassParametersReferenceBuilder builder;
    public N and() {
      return (N) V1IngressClassSpecFluentImpl.this.withParameters(builder.build());
    }
    public N endParameters() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy