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

io.kubernetes.client.openapi.models.V1VolumeNodeAffinityFluentImpl 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 V1VolumeNodeAffinityFluentImpl> extends BaseFluent implements V1VolumeNodeAffinityFluent{
  public V1VolumeNodeAffinityFluentImpl() {
  }
  public V1VolumeNodeAffinityFluentImpl(V1VolumeNodeAffinity instance) {
    this.withRequired(instance.getRequired());

  }
  private V1NodeSelectorBuilder required;
  
  /**
   * This method has been deprecated, please use method buildRequired instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1NodeSelector getRequired() {
    return this.required!=null ?this.required.build():null;
  }
  public V1NodeSelector buildRequired() {
    return this.required!=null ?this.required.build():null;
  }
  public A withRequired(V1NodeSelector required) {
    _visitables.get("required").remove(this.required);
    if (required!=null){ this.required= new V1NodeSelectorBuilder(required); _visitables.get("required").add(this.required);} else { this.required = null; _visitables.get("required").remove(this.required); } return (A) this;
  }
  public Boolean hasRequired() {
    return this.required != null;
  }
  public V1VolumeNodeAffinityFluent.RequiredNested withNewRequired() {
    return new V1VolumeNodeAffinityFluentImpl.RequiredNestedImpl();
  }
  public V1VolumeNodeAffinityFluent.RequiredNested withNewRequiredLike(V1NodeSelector item) {
    return new V1VolumeNodeAffinityFluentImpl.RequiredNestedImpl(item);
  }
  public V1VolumeNodeAffinityFluent.RequiredNested editRequired() {
    return withNewRequiredLike(getRequired());
  }
  public V1VolumeNodeAffinityFluent.RequiredNested editOrNewRequired() {
    return withNewRequiredLike(getRequired() != null ? getRequired(): new V1NodeSelectorBuilder().build());
  }
  public V1VolumeNodeAffinityFluent.RequiredNested editOrNewRequiredLike(V1NodeSelector item) {
    return withNewRequiredLike(getRequired() != null ? getRequired(): item);
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    V1VolumeNodeAffinityFluentImpl that = (V1VolumeNodeAffinityFluentImpl) o;
    if (required != null ? !required.equals(that.required) :that.required != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(required,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (required != null) { sb.append("required:"); sb.append(required); }
    sb.append("}");
    return sb.toString();
  }
  class RequiredNestedImpl extends V1NodeSelectorFluentImpl> implements V1VolumeNodeAffinityFluent.RequiredNested,Nested{
    RequiredNestedImpl(V1NodeSelector item) {
      this.builder = new V1NodeSelectorBuilder(this, item);
    }
    RequiredNestedImpl() {
      this.builder = new V1NodeSelectorBuilder(this);
    }
    V1NodeSelectorBuilder builder;
    public N and() {
      return (N) V1VolumeNodeAffinityFluentImpl.this.withRequired(builder.build());
    }
    public N endRequired() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy