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

io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model.storage;

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 VolumeAttachmentStatusFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent{
  public VolumeAttachmentStatusFluentImpl() {
  }
  public VolumeAttachmentStatusFluentImpl(io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatus instance) {
    this.withAttachError(instance.getAttachError()); 
    this.withAttached(instance.getAttached()); 
    this.withAttachmentMetadata(instance.getAttachmentMetadata()); 
    this.withDetachError(instance.getDetachError()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder attachError;
  private java.lang.Boolean attached;
  private java.util.Map attachmentMetadata;
  private io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder detachError;
  private java.util.Map additionalProperties;
  
  /**
   * This method has been deprecated, please use method buildAttachError instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.storage.VolumeError getAttachError() {
    return this.attachError!=null?this.attachError.build():null;
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeError buildAttachError() {
    return this.attachError!=null?this.attachError.build():null;
  }
  public A withAttachError(io.fabric8.kubernetes.api.model.storage.VolumeError attachError) {
    _visitables.get("attachError").remove(this.attachError);
    if (attachError!=null){ this.attachError= new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder(attachError); _visitables.get("attachError").add(this.attachError);} return (A) this;
  }
  public java.lang.Boolean hasAttachError() {
    return this.attachError != null;
  }
  public A withNewAttachError(java.lang.String message,java.lang.String time) {
    return (A)withAttachError(new VolumeError(message, time));
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.AttachErrorNested withNewAttachError() {
    return new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluentImpl.AttachErrorNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.AttachErrorNested withNewAttachErrorLike(io.fabric8.kubernetes.api.model.storage.VolumeError item) {
    return new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluentImpl.AttachErrorNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.AttachErrorNested editAttachError() {
    return withNewAttachErrorLike(getAttachError());
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.AttachErrorNested editOrNewAttachError() {
    return withNewAttachErrorLike(getAttachError() != null ? getAttachError(): new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.AttachErrorNested editOrNewAttachErrorLike(io.fabric8.kubernetes.api.model.storage.VolumeError item) {
    return withNewAttachErrorLike(getAttachError() != null ? getAttachError(): item);
  }
  public java.lang.Boolean getAttached() {
    return this.attached;
  }
  public A withAttached(java.lang.Boolean attached) {
    this.attached=attached; return (A) this;
  }
  public java.lang.Boolean hasAttached() {
    return this.attached != null;
  }
  public A addToAttachmentMetadata(java.lang.String key,java.lang.String value) {
    if(this.attachmentMetadata == null && key != null && value != null) { this.attachmentMetadata = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.attachmentMetadata.put(key, value);} return (A)this;
  }
  public A addToAttachmentMetadata(java.util.Map map) {
    if(this.attachmentMetadata == null && map != null) { this.attachmentMetadata = new java.util.LinkedHashMap(); }
    if(map != null) { this.attachmentMetadata.putAll(map);} return (A)this;
  }
  public A removeFromAttachmentMetadata(java.lang.String key) {
    if(this.attachmentMetadata == null) { return (A) this; }
    if(key != null && this.attachmentMetadata != null) {this.attachmentMetadata.remove(key);} return (A)this;
  }
  public A removeFromAttachmentMetadata(java.util.Map map) {
    if(this.attachmentMetadata == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.attachmentMetadata != null){this.attachmentMetadata.remove(key);}}} return (A)this;
  }
  public java.util.Map getAttachmentMetadata() {
    return this.attachmentMetadata;
  }
  public A withAttachmentMetadata(java.util.Map attachmentMetadata) {
    if (attachmentMetadata == null) { this.attachmentMetadata =  null;} else {this.attachmentMetadata = new java.util.LinkedHashMap(attachmentMetadata);} return (A) this;
  }
  public java.lang.Boolean hasAttachmentMetadata() {
    return this.attachmentMetadata != null;
  }
  
  /**
   * This method has been deprecated, please use method buildDetachError instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.storage.VolumeError getDetachError() {
    return this.detachError!=null?this.detachError.build():null;
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeError buildDetachError() {
    return this.detachError!=null?this.detachError.build():null;
  }
  public A withDetachError(io.fabric8.kubernetes.api.model.storage.VolumeError detachError) {
    _visitables.get("detachError").remove(this.detachError);
    if (detachError!=null){ this.detachError= new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder(detachError); _visitables.get("detachError").add(this.detachError);} return (A) this;
  }
  public java.lang.Boolean hasDetachError() {
    return this.detachError != null;
  }
  public A withNewDetachError(java.lang.String message,java.lang.String time) {
    return (A)withDetachError(new VolumeError(message, time));
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.DetachErrorNested withNewDetachError() {
    return new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluentImpl.DetachErrorNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.DetachErrorNested withNewDetachErrorLike(io.fabric8.kubernetes.api.model.storage.VolumeError item) {
    return new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluentImpl.DetachErrorNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.DetachErrorNested editDetachError() {
    return withNewDetachErrorLike(getDetachError());
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.DetachErrorNested editOrNewDetachError() {
    return withNewDetachErrorLike(getDetachError() != null ? getDetachError(): new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.DetachErrorNested editOrNewDetachErrorLike(io.fabric8.kubernetes.api.model.storage.VolumeError item) {
    return withNewDetachErrorLike(getDetachError() != null ? getDetachError(): item);
  }
  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;
    VolumeAttachmentStatusFluentImpl that = (VolumeAttachmentStatusFluentImpl) o;
    if (attachError != null ? !attachError.equals(that.attachError) :that.attachError != null) return false;
    if (attached != null ? !attached.equals(that.attached) :that.attached != null) return false;
    if (attachmentMetadata != null ? !attachmentMetadata.equals(that.attachmentMetadata) :that.attachmentMetadata != null) return false;
    if (detachError != null ? !detachError.equals(that.detachError) :that.detachError != 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(attachError,  attached,  attachmentMetadata,  detachError,  additionalProperties,  super.hashCode());
  }
  public class AttachErrorNestedImpl extends io.fabric8.kubernetes.api.model.storage.VolumeErrorFluentImpl> implements io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.AttachErrorNested,io.fabric8.kubernetes.api.builder.Nested{
    AttachErrorNestedImpl(io.fabric8.kubernetes.api.model.storage.VolumeError item) {
      this.builder = new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder(this, item);
    }
    AttachErrorNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder(this);
    }
    io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder builder;
    public N and() {
      return (N) VolumeAttachmentStatusFluentImpl.this.withAttachError(builder.build());
    }
    public N endAttachError() {
      return and();
    }
    
  }
  public class DetachErrorNestedImpl extends io.fabric8.kubernetes.api.model.storage.VolumeErrorFluentImpl> implements io.fabric8.kubernetes.api.model.storage.VolumeAttachmentStatusFluent.DetachErrorNested,io.fabric8.kubernetes.api.builder.Nested{
    DetachErrorNestedImpl(io.fabric8.kubernetes.api.model.storage.VolumeError item) {
      this.builder = new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder(this, item);
    }
    DetachErrorNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder(this);
    }
    io.fabric8.kubernetes.api.model.storage.VolumeErrorBuilder builder;
    public N and() {
      return (N) VolumeAttachmentStatusFluentImpl.this.withDetachError(builder.build());
    }
    public N endDetachError() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy