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

io.fabric8.kubernetes.api.model.CSIVolumeSourceFluentImpl 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.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

 /**
  * Generated
  */
public class CSIVolumeSourceFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.CSIVolumeSourceFluent{
  public CSIVolumeSourceFluentImpl() {
  }
  public CSIVolumeSourceFluentImpl(io.fabric8.kubernetes.api.model.CSIVolumeSource instance) {
    this.withDriver(instance.getDriver()); 
    this.withFsType(instance.getFsType()); 
    this.withNodePublishSecretRef(instance.getNodePublishSecretRef()); 
    this.withReadOnly(instance.getReadOnly()); 
    this.withVolumeAttributes(instance.getVolumeAttributes()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.String driver;
  private java.lang.String fsType;
  private io.fabric8.kubernetes.api.model.LocalObjectReferenceBuilder nodePublishSecretRef;
  private java.lang.Boolean readOnly;
  private java.util.Map volumeAttributes;
  private java.util.Map additionalProperties;
  public java.lang.String getDriver() {
    return this.driver;
  }
  public A withDriver(java.lang.String driver) {
    this.driver=driver; return (A) this;
  }
  public java.lang.Boolean hasDriver() {
    return this.driver != null;
  }
  
  /**
   * Method is deprecated. use withDriver instead.
   */
  @java.lang.Deprecated
  public A withNewDriver(java.lang.String arg0) {
    return (A)withDriver(new String(arg0));
  }
  public java.lang.String getFsType() {
    return this.fsType;
  }
  public A withFsType(java.lang.String fsType) {
    this.fsType=fsType; return (A) this;
  }
  public java.lang.Boolean hasFsType() {
    return this.fsType != null;
  }
  
  /**
   * Method is deprecated. use withFsType instead.
   */
  @java.lang.Deprecated
  public A withNewFsType(java.lang.String arg0) {
    return (A)withFsType(new String(arg0));
  }
  
  /**
   * This method has been deprecated, please use method buildNodePublishSecretRef instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.LocalObjectReference getNodePublishSecretRef() {
    return this.nodePublishSecretRef!=null?this.nodePublishSecretRef.build():null;
  }
  public io.fabric8.kubernetes.api.model.LocalObjectReference buildNodePublishSecretRef() {
    return this.nodePublishSecretRef!=null?this.nodePublishSecretRef.build():null;
  }
  public A withNodePublishSecretRef(io.fabric8.kubernetes.api.model.LocalObjectReference nodePublishSecretRef) {
    _visitables.get("nodePublishSecretRef").remove(this.nodePublishSecretRef);
    if (nodePublishSecretRef!=null){ this.nodePublishSecretRef= new io.fabric8.kubernetes.api.model.LocalObjectReferenceBuilder(nodePublishSecretRef); _visitables.get("nodePublishSecretRef").add(this.nodePublishSecretRef);} return (A) this;
  }
  public java.lang.Boolean hasNodePublishSecretRef() {
    return this.nodePublishSecretRef != null;
  }
  public A withNewNodePublishSecretRef(java.lang.String name) {
    return (A)withNodePublishSecretRef(new LocalObjectReference(name));
  }
  public io.fabric8.kubernetes.api.model.CSIVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRef() {
    return new io.fabric8.kubernetes.api.model.CSIVolumeSourceFluentImpl.NodePublishSecretRefNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.CSIVolumeSourceFluent.NodePublishSecretRefNested withNewNodePublishSecretRefLike(io.fabric8.kubernetes.api.model.LocalObjectReference item) {
    return new io.fabric8.kubernetes.api.model.CSIVolumeSourceFluentImpl.NodePublishSecretRefNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.CSIVolumeSourceFluent.NodePublishSecretRefNested editNodePublishSecretRef() {
    return withNewNodePublishSecretRefLike(getNodePublishSecretRef());
  }
  public io.fabric8.kubernetes.api.model.CSIVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRef() {
    return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): new io.fabric8.kubernetes.api.model.LocalObjectReferenceBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.CSIVolumeSourceFluent.NodePublishSecretRefNested editOrNewNodePublishSecretRefLike(io.fabric8.kubernetes.api.model.LocalObjectReference item) {
    return withNewNodePublishSecretRefLike(getNodePublishSecretRef() != null ? getNodePublishSecretRef(): item);
  }
  public java.lang.Boolean getReadOnly() {
    return this.readOnly;
  }
  public A withReadOnly(java.lang.Boolean readOnly) {
    this.readOnly=readOnly; return (A) this;
  }
  public java.lang.Boolean hasReadOnly() {
    return this.readOnly != null;
  }
  public A addToVolumeAttributes(java.lang.String key,java.lang.String value) {
    if(this.volumeAttributes == null && key != null && value != null) { this.volumeAttributes = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.volumeAttributes.put(key, value);} return (A)this;
  }
  public A addToVolumeAttributes(java.util.Map map) {
    if(this.volumeAttributes == null && map != null) { this.volumeAttributes = new java.util.LinkedHashMap(); }
    if(map != null) { this.volumeAttributes.putAll(map);} return (A)this;
  }
  public A removeFromVolumeAttributes(java.lang.String key) {
    if(this.volumeAttributes == null) { return (A) this; }
    if(key != null && this.volumeAttributes != null) {this.volumeAttributes.remove(key);} return (A)this;
  }
  public A removeFromVolumeAttributes(java.util.Map map) {
    if(this.volumeAttributes == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.volumeAttributes != null){this.volumeAttributes.remove(key);}}} return (A)this;
  }
  public java.util.Map getVolumeAttributes() {
    return this.volumeAttributes;
  }
  public A withVolumeAttributes(java.util.Map volumeAttributes) {
    if (volumeAttributes == null) { this.volumeAttributes =  null;} else {this.volumeAttributes = new java.util.LinkedHashMap(volumeAttributes);} return (A) this;
  }
  public java.lang.Boolean hasVolumeAttributes() {
    return this.volumeAttributes != null;
  }
  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;
    CSIVolumeSourceFluentImpl that = (CSIVolumeSourceFluentImpl) o;
    if (driver != null ? !driver.equals(that.driver) :that.driver != null) return false;
    if (fsType != null ? !fsType.equals(that.fsType) :that.fsType != null) return false;
    if (nodePublishSecretRef != null ? !nodePublishSecretRef.equals(that.nodePublishSecretRef) :that.nodePublishSecretRef != null) return false;
    if (readOnly != null ? !readOnly.equals(that.readOnly) :that.readOnly != null) return false;
    if (volumeAttributes != null ? !volumeAttributes.equals(that.volumeAttributes) :that.volumeAttributes != 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(driver,  fsType,  nodePublishSecretRef,  readOnly,  volumeAttributes,  additionalProperties,  super.hashCode());
  }
  public class NodePublishSecretRefNestedImpl extends io.fabric8.kubernetes.api.model.LocalObjectReferenceFluentImpl> implements io.fabric8.kubernetes.api.model.CSIVolumeSourceFluent.NodePublishSecretRefNested,io.fabric8.kubernetes.api.builder.Nested{
    NodePublishSecretRefNestedImpl(io.fabric8.kubernetes.api.model.LocalObjectReference item) {
      this.builder = new io.fabric8.kubernetes.api.model.LocalObjectReferenceBuilder(this, item);
    }
    NodePublishSecretRefNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.LocalObjectReferenceBuilder(this);
    }
    io.fabric8.kubernetes.api.model.LocalObjectReferenceBuilder builder;
    public N and() {
      return (N) CSIVolumeSourceFluentImpl.this.withNodePublishSecretRef(builder.build());
    }
    public N endNodePublishSecretRef() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy