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

io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluentImpl Maven / Gradle / Ivy

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

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Integer;
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
  */
public class MachinePoolFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluent{
  public MachinePoolFluentImpl() {
  }
  public MachinePoolFluentImpl(io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePool instance) {
    this.withCoresPerSocket(instance.getCoresPerSocket()); 
    this.withCpus(instance.getCpus()); 
    this.withMemoryMB(instance.getMemoryMB()); 
    this.withOsDisk(instance.getOsDisk()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.Integer coresPerSocket;
  private java.lang.Integer cpus;
  private java.lang.Long memoryMB;
  private io.fabric8.openshift.api.model.installer.vsphere.v1.OSDiskBuilder osDisk;
  private java.util.Map additionalProperties;
  public java.lang.Integer getCoresPerSocket() {
    return this.coresPerSocket;
  }
  public A withCoresPerSocket(java.lang.Integer coresPerSocket) {
    this.coresPerSocket=coresPerSocket; return (A) this;
  }
  public java.lang.Boolean hasCoresPerSocket() {
    return this.coresPerSocket != null;
  }
  public java.lang.Integer getCpus() {
    return this.cpus;
  }
  public A withCpus(java.lang.Integer cpus) {
    this.cpus=cpus; return (A) this;
  }
  public java.lang.Boolean hasCpus() {
    return this.cpus != null;
  }
  public java.lang.Long getMemoryMB() {
    return this.memoryMB;
  }
  public A withMemoryMB(java.lang.Long memoryMB) {
    this.memoryMB=memoryMB; return (A) this;
  }
  public java.lang.Boolean hasMemoryMB() {
    return this.memoryMB != null;
  }
  
  /**
   * This method has been deprecated, please use method buildOsDisk instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.openshift.api.model.installer.vsphere.v1.OSDisk getOsDisk() {
    return this.osDisk!=null?this.osDisk.build():null;
  }
  public io.fabric8.openshift.api.model.installer.vsphere.v1.OSDisk buildOsDisk() {
    return this.osDisk!=null?this.osDisk.build():null;
  }
  public A withOsDisk(io.fabric8.openshift.api.model.installer.vsphere.v1.OSDisk osDisk) {
    _visitables.get("osDisk").remove(this.osDisk);
    if (osDisk!=null){ this.osDisk= new io.fabric8.openshift.api.model.installer.vsphere.v1.OSDiskBuilder(osDisk); _visitables.get("osDisk").add(this.osDisk);} return (A) this;
  }
  public java.lang.Boolean hasOsDisk() {
    return this.osDisk != null;
  }
  public A withNewOsDisk(java.lang.Integer diskSizeGB) {
    return (A)withOsDisk(new OSDisk(diskSizeGB));
  }
  public io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluent.OsDiskNested withNewOsDisk() {
    return new io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluentImpl.OsDiskNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluent.OsDiskNested withNewOsDiskLike(io.fabric8.openshift.api.model.installer.vsphere.v1.OSDisk item) {
    return new io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluentImpl.OsDiskNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluent.OsDiskNested editOsDisk() {
    return withNewOsDiskLike(getOsDisk());
  }
  public io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluent.OsDiskNested editOrNewOsDisk() {
    return withNewOsDiskLike(getOsDisk() != null ? getOsDisk(): new io.fabric8.openshift.api.model.installer.vsphere.v1.OSDiskBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluent.OsDiskNested editOrNewOsDiskLike(io.fabric8.openshift.api.model.installer.vsphere.v1.OSDisk item) {
    return withNewOsDiskLike(getOsDisk() != null ? getOsDisk(): 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;
    MachinePoolFluentImpl that = (MachinePoolFluentImpl) o;
    if (coresPerSocket != null ? !coresPerSocket.equals(that.coresPerSocket) :that.coresPerSocket != null) return false;
    if (cpus != null ? !cpus.equals(that.cpus) :that.cpus != null) return false;
    if (memoryMB != null ? !memoryMB.equals(that.memoryMB) :that.memoryMB != null) return false;
    if (osDisk != null ? !osDisk.equals(that.osDisk) :that.osDisk != 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(coresPerSocket,  cpus,  memoryMB,  osDisk,  additionalProperties,  super.hashCode());
  }
  public class OsDiskNestedImpl extends io.fabric8.openshift.api.model.installer.vsphere.v1.OSDiskFluentImpl> implements io.fabric8.openshift.api.model.installer.vsphere.v1.MachinePoolFluent.OsDiskNested,io.fabric8.kubernetes.api.builder.Nested{
    OsDiskNestedImpl(io.fabric8.openshift.api.model.installer.vsphere.v1.OSDisk item) {
      this.builder = new io.fabric8.openshift.api.model.installer.vsphere.v1.OSDiskBuilder(this, item);
    }
    OsDiskNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.vsphere.v1.OSDiskBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.vsphere.v1.OSDiskBuilder builder;
    public N and() {
      return (N) MachinePoolFluentImpl.this.withOsDisk(builder.build());
    }
    public N endOsDisk() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy