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

io.kubernetes.client.openapi.models.V1DownwardAPIVolumeFileFluentImpl 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.Integer;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class V1DownwardAPIVolumeFileFluentImpl> extends BaseFluent implements V1DownwardAPIVolumeFileFluent{
  public V1DownwardAPIVolumeFileFluentImpl() {
  }
  public V1DownwardAPIVolumeFileFluentImpl(V1DownwardAPIVolumeFile instance) {
    if (instance != null) {
      this.withFieldRef(instance.getFieldRef());
      this.withMode(instance.getMode());
      this.withPath(instance.getPath());
      this.withResourceFieldRef(instance.getResourceFieldRef());
    }
  }
  private V1ObjectFieldSelectorBuilder fieldRef;
  private Integer mode;
  private String path;
  private V1ResourceFieldSelectorBuilder resourceFieldRef;
  
  /**
   * This method has been deprecated, please use method buildFieldRef instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1ObjectFieldSelector getFieldRef() {
    return this.fieldRef!=null ?this.fieldRef.build():null;
  }
  public V1ObjectFieldSelector buildFieldRef() {
    return this.fieldRef!=null ?this.fieldRef.build():null;
  }
  public A withFieldRef(V1ObjectFieldSelector fieldRef) {
    _visitables.get("fieldRef").remove(this.fieldRef);
    if (fieldRef!=null){ this.fieldRef= new V1ObjectFieldSelectorBuilder(fieldRef); _visitables.get("fieldRef").add(this.fieldRef);} else { this.fieldRef = null; _visitables.get("fieldRef").remove(this.fieldRef); } return (A) this;
  }
  public Boolean hasFieldRef() {
    return this.fieldRef != null;
  }
  public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested withNewFieldRef() {
    return new V1DownwardAPIVolumeFileFluentImpl.FieldRefNestedImpl();
  }
  public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested withNewFieldRefLike(V1ObjectFieldSelector item) {
    return new V1DownwardAPIVolumeFileFluentImpl.FieldRefNestedImpl(item);
  }
  public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested editFieldRef() {
    return withNewFieldRefLike(getFieldRef());
  }
  public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested editOrNewFieldRef() {
    return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): new V1ObjectFieldSelectorBuilder().build());
  }
  public V1DownwardAPIVolumeFileFluentImpl.FieldRefNested editOrNewFieldRefLike(V1ObjectFieldSelector item) {
    return withNewFieldRefLike(getFieldRef() != null ? getFieldRef(): item);
  }
  public Integer getMode() {
    return this.mode;
  }
  public A withMode(Integer mode) {
    this.mode=mode; return (A) this;
  }
  public Boolean hasMode() {
    return this.mode != null;
  }
  public String getPath() {
    return this.path;
  }
  public A withPath(String path) {
    this.path=path; return (A) this;
  }
  public Boolean hasPath() {
    return this.path != null;
  }
  
  /**
   * This method has been deprecated, please use method buildResourceFieldRef instead.
   * @return The buildable object.
   */
  @Deprecated
  public V1ResourceFieldSelector getResourceFieldRef() {
    return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null;
  }
  public V1ResourceFieldSelector buildResourceFieldRef() {
    return this.resourceFieldRef!=null ?this.resourceFieldRef.build():null;
  }
  public A withResourceFieldRef(V1ResourceFieldSelector resourceFieldRef) {
    _visitables.get("resourceFieldRef").remove(this.resourceFieldRef);
    if (resourceFieldRef!=null){ this.resourceFieldRef= new V1ResourceFieldSelectorBuilder(resourceFieldRef); _visitables.get("resourceFieldRef").add(this.resourceFieldRef);} else { this.resourceFieldRef = null; _visitables.get("resourceFieldRef").remove(this.resourceFieldRef); } return (A) this;
  }
  public Boolean hasResourceFieldRef() {
    return this.resourceFieldRef != null;
  }
  public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested withNewResourceFieldRef() {
    return new V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNestedImpl();
  }
  public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested withNewResourceFieldRefLike(V1ResourceFieldSelector item) {
    return new V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNestedImpl(item);
  }
  public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested editResourceFieldRef() {
    return withNewResourceFieldRefLike(getResourceFieldRef());
  }
  public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested editOrNewResourceFieldRef() {
    return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): new V1ResourceFieldSelectorBuilder().build());
  }
  public V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested editOrNewResourceFieldRefLike(V1ResourceFieldSelector item) {
    return withNewResourceFieldRefLike(getResourceFieldRef() != null ? getResourceFieldRef(): 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;
    V1DownwardAPIVolumeFileFluentImpl that = (V1DownwardAPIVolumeFileFluentImpl) o;
    if (!java.util.Objects.equals(fieldRef, that.fieldRef)) return false;

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

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

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

    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(fieldRef,  mode,  path,  resourceFieldRef,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (fieldRef != null) { sb.append("fieldRef:"); sb.append(fieldRef + ","); }
    if (mode != null) { sb.append("mode:"); sb.append(mode + ","); }
    if (path != null) { sb.append("path:"); sb.append(path + ","); }
    if (resourceFieldRef != null) { sb.append("resourceFieldRef:"); sb.append(resourceFieldRef); }
    sb.append("}");
    return sb.toString();
  }
  class FieldRefNestedImpl extends V1ObjectFieldSelectorFluentImpl> implements V1DownwardAPIVolumeFileFluentImpl.FieldRefNested,Nested{
    FieldRefNestedImpl(V1ObjectFieldSelector item) {
      this.builder = new V1ObjectFieldSelectorBuilder(this, item);
    }
    FieldRefNestedImpl() {
      this.builder = new V1ObjectFieldSelectorBuilder(this);
    }
    V1ObjectFieldSelectorBuilder builder;
    public N and() {
      return (N) V1DownwardAPIVolumeFileFluentImpl.this.withFieldRef(builder.build());
    }
    public N endFieldRef() {
      return and();
    }
    
  }
  class ResourceFieldRefNestedImpl extends V1ResourceFieldSelectorFluentImpl> implements V1DownwardAPIVolumeFileFluentImpl.ResourceFieldRefNested,Nested{
    ResourceFieldRefNestedImpl(V1ResourceFieldSelector item) {
      this.builder = new V1ResourceFieldSelectorBuilder(this, item);
    }
    ResourceFieldRefNestedImpl() {
      this.builder = new V1ResourceFieldSelectorBuilder(this);
    }
    V1ResourceFieldSelectorBuilder builder;
    public N and() {
      return (N) V1DownwardAPIVolumeFileFluentImpl.this.withResourceFieldRef(builder.build());
    }
    public N endResourceFieldRef() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy