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

io.fabric8.openshift.api.model.installer.gcp.v1.OSDiskFluentImpl Maven / Gradle / Ivy

package io.fabric8.openshift.api.model.installer.gcp.v1;

import java.lang.SuppressWarnings;
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.Long;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class OSDiskFluentImpl> extends BaseFluent implements OSDiskFluent{
  public OSDiskFluentImpl() {
  }
  public OSDiskFluentImpl(io.fabric8.openshift.api.model.installer.gcp.v1.OSDisk instance) {
    this.withDiskSizeGB(instance.getDiskSizeGB()); 
    this.withDiskType(instance.getDiskType()); 
    this.withEncryptionKey(instance.getEncryptionKey()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private Long diskSizeGB;
  private String diskType;
  private EncryptionKeyReferenceBuilder encryptionKey;
  private Map additionalProperties;
  public java.lang.Long getDiskSizeGB() {
    return this.diskSizeGB;
  }
  public A withDiskSizeGB(java.lang.Long diskSizeGB) {
    this.diskSizeGB=diskSizeGB; return (A) this;
  }
  public Boolean hasDiskSizeGB() {
    return this.diskSizeGB != null;
  }
  public java.lang.String getDiskType() {
    return this.diskType;
  }
  public A withDiskType(java.lang.String diskType) {
    this.diskType=diskType; return (A) this;
  }
  public java.lang.Boolean hasDiskType() {
    return this.diskType != null;
  }
  
  /**
   * This method has been deprecated, please use method buildEncryptionKey instead.
   * @return The buildable object.
   */
  @Deprecated
  public EncryptionKeyReference getEncryptionKey() {
    return this.encryptionKey!=null ?this.encryptionKey.build():null;
  }
  public io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReference buildEncryptionKey() {
    return this.encryptionKey!=null ?this.encryptionKey.build():null;
  }
  public A withEncryptionKey(io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReference encryptionKey) {
    _visitables.get("encryptionKey").remove(this.encryptionKey);
    if (encryptionKey!=null){ this.encryptionKey= new io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceBuilder(encryptionKey); _visitables.get("encryptionKey").add(this.encryptionKey);} return (A) this;
  }
  public java.lang.Boolean hasEncryptionKey() {
    return this.encryptionKey != null;
  }
  public OSDiskFluent.EncryptionKeyNested withNewEncryptionKey() {
    return new OSDiskFluentImpl.EncryptionKeyNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.gcp.v1.OSDiskFluent.EncryptionKeyNested withNewEncryptionKeyLike(io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReference item) {
    return new OSDiskFluentImpl.EncryptionKeyNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.gcp.v1.OSDiskFluent.EncryptionKeyNested editEncryptionKey() {
    return withNewEncryptionKeyLike(getEncryptionKey());
  }
  public io.fabric8.openshift.api.model.installer.gcp.v1.OSDiskFluent.EncryptionKeyNested editOrNewEncryptionKey() {
    return withNewEncryptionKeyLike(getEncryptionKey() != null ? getEncryptionKey(): new io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.gcp.v1.OSDiskFluent.EncryptionKeyNested editOrNewEncryptionKeyLike(io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReference item) {
    return withNewEncryptionKeyLike(getEncryptionKey() != null ? getEncryptionKey(): item);
  }
  public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new 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;
    OSDiskFluentImpl that = (OSDiskFluentImpl) o;
    if (diskSizeGB != null ? !diskSizeGB.equals(that.diskSizeGB) :that.diskSizeGB != null) return false;
    if (diskType != null ? !diskType.equals(that.diskType) :that.diskType != null) return false;
    if (encryptionKey != null ? !encryptionKey.equals(that.encryptionKey) :that.encryptionKey != 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(diskSizeGB,  diskType,  encryptionKey,  additionalProperties,  super.hashCode());
  }
  public java.lang.String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (diskSizeGB != null) { sb.append("diskSizeGB:"); sb.append(diskSizeGB + ","); }
    if (diskType != null) { sb.append("diskType:"); sb.append(diskType + ","); }
    if (encryptionKey != null) { sb.append("encryptionKey:"); sb.append(encryptionKey + ","); }
    if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
    sb.append("}");
    return sb.toString();
  }
  class EncryptionKeyNestedImpl extends EncryptionKeyReferenceFluentImpl> implements io.fabric8.openshift.api.model.installer.gcp.v1.OSDiskFluent.EncryptionKeyNested,Nested{
    EncryptionKeyNestedImpl(EncryptionKeyReference item) {
      this.builder = new EncryptionKeyReferenceBuilder(this, item);
    }
    EncryptionKeyNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.gcp.v1.EncryptionKeyReferenceBuilder builder;
    public N and() {
      return (N) OSDiskFluentImpl.this.withEncryptionKey(builder.build());
    }
    public N endEncryptionKey() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy