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

io.fabric8.openshift.api.model.miscellaneous.metal3.v1alpha1.BareMetalHostStatusFluentImpl Maven / Gradle / Ivy

package io.fabric8.openshift.api.model.miscellaneous.metal3.v1alpha1;

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

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class BareMetalHostStatusFluentImpl> extends BaseFluent implements BareMetalHostStatusFluent{
  public BareMetalHostStatusFluentImpl() {
  }
  public BareMetalHostStatusFluentImpl(BareMetalHostStatus instance) {
    if (instance != null) {
      this.withErrorCount(instance.getErrorCount());
      this.withErrorMessage(instance.getErrorMessage());
      this.withErrorType(instance.getErrorType());
      this.withGoodCredentials(instance.getGoodCredentials());
      this.withHardware(instance.getHardware());
      this.withHardwareProfile(instance.getHardwareProfile());
      this.withLastUpdated(instance.getLastUpdated());
      this.withOperationHistory(instance.getOperationHistory());
      this.withOperationalStatus(instance.getOperationalStatus());
      this.withPoweredOn(instance.getPoweredOn());
      this.withProvisioning(instance.getProvisioning());
      this.withTriedCredentials(instance.getTriedCredentials());
      this.withAdditionalProperties(instance.getAdditionalProperties());
    }
  }
  private Integer errorCount;
  private String errorMessage;
  private String errorType;
  private CredentialsStatusBuilder goodCredentials;
  private HardwareDetailsBuilder hardware;
  private String hardwareProfile;
  private String lastUpdated;
  private OperationHistoryBuilder operationHistory;
  private String operationalStatus;
  private Boolean poweredOn;
  private ProvisionStatusBuilder provisioning;
  private CredentialsStatusBuilder triedCredentials;
  private Map additionalProperties;
  public Integer getErrorCount() {
    return this.errorCount;
  }
  public A withErrorCount(Integer errorCount) {
    this.errorCount=errorCount; return (A) this;
  }
  public Boolean hasErrorCount() {
    return this.errorCount != null;
  }
  public String getErrorMessage() {
    return this.errorMessage;
  }
  public A withErrorMessage(String errorMessage) {
    this.errorMessage=errorMessage; return (A) this;
  }
  public Boolean hasErrorMessage() {
    return this.errorMessage != null;
  }
  public String getErrorType() {
    return this.errorType;
  }
  public A withErrorType(String errorType) {
    this.errorType=errorType; return (A) this;
  }
  public Boolean hasErrorType() {
    return this.errorType != null;
  }
  
  /**
   * This method has been deprecated, please use method buildGoodCredentials instead.
   * @return The buildable object.
   */
  @Deprecated
  public CredentialsStatus getGoodCredentials() {
    return this.goodCredentials!=null ?this.goodCredentials.build():null;
  }
  public CredentialsStatus buildGoodCredentials() {
    return this.goodCredentials!=null ?this.goodCredentials.build():null;
  }
  public A withGoodCredentials(CredentialsStatus goodCredentials) {
    _visitables.get("goodCredentials").remove(this.goodCredentials);
    if (goodCredentials!=null){ this.goodCredentials= new CredentialsStatusBuilder(goodCredentials); _visitables.get("goodCredentials").add(this.goodCredentials);} else { this.goodCredentials = null; _visitables.get("goodCredentials").remove(this.goodCredentials); } return (A) this;
  }
  public Boolean hasGoodCredentials() {
    return this.goodCredentials != null;
  }
  public BareMetalHostStatusFluentImpl.GoodCredentialsNested withNewGoodCredentials() {
    return new BareMetalHostStatusFluentImpl.GoodCredentialsNestedImpl();
  }
  public BareMetalHostStatusFluentImpl.GoodCredentialsNested withNewGoodCredentialsLike(CredentialsStatus item) {
    return new BareMetalHostStatusFluentImpl.GoodCredentialsNestedImpl(item);
  }
  public BareMetalHostStatusFluentImpl.GoodCredentialsNested editGoodCredentials() {
    return withNewGoodCredentialsLike(getGoodCredentials());
  }
  public BareMetalHostStatusFluentImpl.GoodCredentialsNested editOrNewGoodCredentials() {
    return withNewGoodCredentialsLike(getGoodCredentials() != null ? getGoodCredentials(): new CredentialsStatusBuilder().build());
  }
  public BareMetalHostStatusFluentImpl.GoodCredentialsNested editOrNewGoodCredentialsLike(CredentialsStatus item) {
    return withNewGoodCredentialsLike(getGoodCredentials() != null ? getGoodCredentials(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildHardware instead.
   * @return The buildable object.
   */
  @Deprecated
  public HardwareDetails getHardware() {
    return this.hardware!=null ?this.hardware.build():null;
  }
  public HardwareDetails buildHardware() {
    return this.hardware!=null ?this.hardware.build():null;
  }
  public A withHardware(HardwareDetails hardware) {
    _visitables.get("hardware").remove(this.hardware);
    if (hardware!=null){ this.hardware= new HardwareDetailsBuilder(hardware); _visitables.get("hardware").add(this.hardware);} else { this.hardware = null; _visitables.get("hardware").remove(this.hardware); } return (A) this;
  }
  public Boolean hasHardware() {
    return this.hardware != null;
  }
  public BareMetalHostStatusFluentImpl.HardwareNested withNewHardware() {
    return new BareMetalHostStatusFluentImpl.HardwareNestedImpl();
  }
  public BareMetalHostStatusFluentImpl.HardwareNested withNewHardwareLike(HardwareDetails item) {
    return new BareMetalHostStatusFluentImpl.HardwareNestedImpl(item);
  }
  public BareMetalHostStatusFluentImpl.HardwareNested editHardware() {
    return withNewHardwareLike(getHardware());
  }
  public BareMetalHostStatusFluentImpl.HardwareNested editOrNewHardware() {
    return withNewHardwareLike(getHardware() != null ? getHardware(): new HardwareDetailsBuilder().build());
  }
  public BareMetalHostStatusFluentImpl.HardwareNested editOrNewHardwareLike(HardwareDetails item) {
    return withNewHardwareLike(getHardware() != null ? getHardware(): item);
  }
  public String getHardwareProfile() {
    return this.hardwareProfile;
  }
  public A withHardwareProfile(String hardwareProfile) {
    this.hardwareProfile=hardwareProfile; return (A) this;
  }
  public Boolean hasHardwareProfile() {
    return this.hardwareProfile != null;
  }
  public String getLastUpdated() {
    return this.lastUpdated;
  }
  public A withLastUpdated(String lastUpdated) {
    this.lastUpdated=lastUpdated; return (A) this;
  }
  public Boolean hasLastUpdated() {
    return this.lastUpdated != null;
  }
  
  /**
   * This method has been deprecated, please use method buildOperationHistory instead.
   * @return The buildable object.
   */
  @Deprecated
  public OperationHistory getOperationHistory() {
    return this.operationHistory!=null ?this.operationHistory.build():null;
  }
  public OperationHistory buildOperationHistory() {
    return this.operationHistory!=null ?this.operationHistory.build():null;
  }
  public A withOperationHistory(OperationHistory operationHistory) {
    _visitables.get("operationHistory").remove(this.operationHistory);
    if (operationHistory!=null){ this.operationHistory= new OperationHistoryBuilder(operationHistory); _visitables.get("operationHistory").add(this.operationHistory);} else { this.operationHistory = null; _visitables.get("operationHistory").remove(this.operationHistory); } return (A) this;
  }
  public Boolean hasOperationHistory() {
    return this.operationHistory != null;
  }
  public BareMetalHostStatusFluentImpl.OperationHistoryNested withNewOperationHistory() {
    return new BareMetalHostStatusFluentImpl.OperationHistoryNestedImpl();
  }
  public BareMetalHostStatusFluentImpl.OperationHistoryNested withNewOperationHistoryLike(OperationHistory item) {
    return new BareMetalHostStatusFluentImpl.OperationHistoryNestedImpl(item);
  }
  public BareMetalHostStatusFluentImpl.OperationHistoryNested editOperationHistory() {
    return withNewOperationHistoryLike(getOperationHistory());
  }
  public BareMetalHostStatusFluentImpl.OperationHistoryNested editOrNewOperationHistory() {
    return withNewOperationHistoryLike(getOperationHistory() != null ? getOperationHistory(): new OperationHistoryBuilder().build());
  }
  public BareMetalHostStatusFluentImpl.OperationHistoryNested editOrNewOperationHistoryLike(OperationHistory item) {
    return withNewOperationHistoryLike(getOperationHistory() != null ? getOperationHistory(): item);
  }
  public String getOperationalStatus() {
    return this.operationalStatus;
  }
  public A withOperationalStatus(String operationalStatus) {
    this.operationalStatus=operationalStatus; return (A) this;
  }
  public Boolean hasOperationalStatus() {
    return this.operationalStatus != null;
  }
  public Boolean getPoweredOn() {
    return this.poweredOn;
  }
  public A withPoweredOn(Boolean poweredOn) {
    this.poweredOn=poweredOn; return (A) this;
  }
  public Boolean hasPoweredOn() {
    return this.poweredOn != null;
  }
  
  /**
   * This method has been deprecated, please use method buildProvisioning instead.
   * @return The buildable object.
   */
  @Deprecated
  public ProvisionStatus getProvisioning() {
    return this.provisioning!=null ?this.provisioning.build():null;
  }
  public ProvisionStatus buildProvisioning() {
    return this.provisioning!=null ?this.provisioning.build():null;
  }
  public A withProvisioning(ProvisionStatus provisioning) {
    _visitables.get("provisioning").remove(this.provisioning);
    if (provisioning!=null){ this.provisioning= new ProvisionStatusBuilder(provisioning); _visitables.get("provisioning").add(this.provisioning);} else { this.provisioning = null; _visitables.get("provisioning").remove(this.provisioning); } return (A) this;
  }
  public Boolean hasProvisioning() {
    return this.provisioning != null;
  }
  public BareMetalHostStatusFluentImpl.ProvisioningNested withNewProvisioning() {
    return new BareMetalHostStatusFluentImpl.ProvisioningNestedImpl();
  }
  public BareMetalHostStatusFluentImpl.ProvisioningNested withNewProvisioningLike(ProvisionStatus item) {
    return new BareMetalHostStatusFluentImpl.ProvisioningNestedImpl(item);
  }
  public BareMetalHostStatusFluentImpl.ProvisioningNested editProvisioning() {
    return withNewProvisioningLike(getProvisioning());
  }
  public BareMetalHostStatusFluentImpl.ProvisioningNested editOrNewProvisioning() {
    return withNewProvisioningLike(getProvisioning() != null ? getProvisioning(): new ProvisionStatusBuilder().build());
  }
  public BareMetalHostStatusFluentImpl.ProvisioningNested editOrNewProvisioningLike(ProvisionStatus item) {
    return withNewProvisioningLike(getProvisioning() != null ? getProvisioning(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildTriedCredentials instead.
   * @return The buildable object.
   */
  @Deprecated
  public CredentialsStatus getTriedCredentials() {
    return this.triedCredentials!=null ?this.triedCredentials.build():null;
  }
  public CredentialsStatus buildTriedCredentials() {
    return this.triedCredentials!=null ?this.triedCredentials.build():null;
  }
  public A withTriedCredentials(CredentialsStatus triedCredentials) {
    _visitables.get("triedCredentials").remove(this.triedCredentials);
    if (triedCredentials!=null){ this.triedCredentials= new CredentialsStatusBuilder(triedCredentials); _visitables.get("triedCredentials").add(this.triedCredentials);} else { this.triedCredentials = null; _visitables.get("triedCredentials").remove(this.triedCredentials); } return (A) this;
  }
  public Boolean hasTriedCredentials() {
    return this.triedCredentials != null;
  }
  public BareMetalHostStatusFluentImpl.TriedCredentialsNested withNewTriedCredentials() {
    return new BareMetalHostStatusFluentImpl.TriedCredentialsNestedImpl();
  }
  public BareMetalHostStatusFluentImpl.TriedCredentialsNested withNewTriedCredentialsLike(CredentialsStatus item) {
    return new BareMetalHostStatusFluentImpl.TriedCredentialsNestedImpl(item);
  }
  public BareMetalHostStatusFluentImpl.TriedCredentialsNested editTriedCredentials() {
    return withNewTriedCredentialsLike(getTriedCredentials());
  }
  public BareMetalHostStatusFluentImpl.TriedCredentialsNested editOrNewTriedCredentials() {
    return withNewTriedCredentialsLike(getTriedCredentials() != null ? getTriedCredentials(): new CredentialsStatusBuilder().build());
  }
  public BareMetalHostStatusFluentImpl.TriedCredentialsNested editOrNewTriedCredentialsLike(CredentialsStatus item) {
    return withNewTriedCredentialsLike(getTriedCredentials() != null ? getTriedCredentials(): item);
  }
  public A addToAdditionalProperties(String key,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(Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  public A removeFromAdditionalProperties(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(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 Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  public A withAdditionalProperties(Map additionalProperties) {
    if (additionalProperties == null) { this.additionalProperties =  null;} else {this.additionalProperties = new LinkedHashMap(additionalProperties);} return (A) this;
  }
  public Boolean hasAdditionalProperties() {
    return this.additionalProperties != null;
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    BareMetalHostStatusFluentImpl that = (BareMetalHostStatusFluentImpl) o;
    if (!java.util.Objects.equals(errorCount, that.errorCount)) return false;

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

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

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

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

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

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

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

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

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

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

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

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

    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(errorCount,  errorMessage,  errorType,  goodCredentials,  hardware,  hardwareProfile,  lastUpdated,  operationHistory,  operationalStatus,  poweredOn,  provisioning,  triedCredentials,  additionalProperties,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (errorCount != null) { sb.append("errorCount:"); sb.append(errorCount + ","); }
    if (errorMessage != null) { sb.append("errorMessage:"); sb.append(errorMessage + ","); }
    if (errorType != null) { sb.append("errorType:"); sb.append(errorType + ","); }
    if (goodCredentials != null) { sb.append("goodCredentials:"); sb.append(goodCredentials + ","); }
    if (hardware != null) { sb.append("hardware:"); sb.append(hardware + ","); }
    if (hardwareProfile != null) { sb.append("hardwareProfile:"); sb.append(hardwareProfile + ","); }
    if (lastUpdated != null) { sb.append("lastUpdated:"); sb.append(lastUpdated + ","); }
    if (operationHistory != null) { sb.append("operationHistory:"); sb.append(operationHistory + ","); }
    if (operationalStatus != null) { sb.append("operationalStatus:"); sb.append(operationalStatus + ","); }
    if (poweredOn != null) { sb.append("poweredOn:"); sb.append(poweredOn + ","); }
    if (provisioning != null) { sb.append("provisioning:"); sb.append(provisioning + ","); }
    if (triedCredentials != null) { sb.append("triedCredentials:"); sb.append(triedCredentials + ","); }
    if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
    sb.append("}");
    return sb.toString();
  }
  public A withPoweredOn() {
    return withPoweredOn(true);
  }
  class GoodCredentialsNestedImpl extends CredentialsStatusFluentImpl> implements BareMetalHostStatusFluentImpl.GoodCredentialsNested,Nested{
    GoodCredentialsNestedImpl(CredentialsStatus item) {
      this.builder = new CredentialsStatusBuilder(this, item);
    }
    GoodCredentialsNestedImpl() {
      this.builder = new CredentialsStatusBuilder(this);
    }
    CredentialsStatusBuilder builder;
    public N and() {
      return (N) BareMetalHostStatusFluentImpl.this.withGoodCredentials(builder.build());
    }
    public N endGoodCredentials() {
      return and();
    }
    
  }
  class HardwareNestedImpl extends HardwareDetailsFluentImpl> implements BareMetalHostStatusFluentImpl.HardwareNested,Nested{
    HardwareNestedImpl(HardwareDetails item) {
      this.builder = new HardwareDetailsBuilder(this, item);
    }
    HardwareNestedImpl() {
      this.builder = new HardwareDetailsBuilder(this);
    }
    HardwareDetailsBuilder builder;
    public N and() {
      return (N) BareMetalHostStatusFluentImpl.this.withHardware(builder.build());
    }
    public N endHardware() {
      return and();
    }
    
  }
  class OperationHistoryNestedImpl extends OperationHistoryFluentImpl> implements BareMetalHostStatusFluentImpl.OperationHistoryNested,Nested{
    OperationHistoryNestedImpl(OperationHistory item) {
      this.builder = new OperationHistoryBuilder(this, item);
    }
    OperationHistoryNestedImpl() {
      this.builder = new OperationHistoryBuilder(this);
    }
    OperationHistoryBuilder builder;
    public N and() {
      return (N) BareMetalHostStatusFluentImpl.this.withOperationHistory(builder.build());
    }
    public N endOperationHistory() {
      return and();
    }
    
  }
  class ProvisioningNestedImpl extends ProvisionStatusFluentImpl> implements BareMetalHostStatusFluentImpl.ProvisioningNested,Nested{
    ProvisioningNestedImpl(ProvisionStatus item) {
      this.builder = new ProvisionStatusBuilder(this, item);
    }
    ProvisioningNestedImpl() {
      this.builder = new ProvisionStatusBuilder(this);
    }
    ProvisionStatusBuilder builder;
    public N and() {
      return (N) BareMetalHostStatusFluentImpl.this.withProvisioning(builder.build());
    }
    public N endProvisioning() {
      return and();
    }
    
  }
  class TriedCredentialsNestedImpl extends CredentialsStatusFluentImpl> implements BareMetalHostStatusFluentImpl.TriedCredentialsNested,Nested{
    TriedCredentialsNestedImpl(CredentialsStatus item) {
      this.builder = new CredentialsStatusBuilder(this, item);
    }
    TriedCredentialsNestedImpl() {
      this.builder = new CredentialsStatusBuilder(this);
    }
    CredentialsStatusBuilder builder;
    public N and() {
      return (N) BareMetalHostStatusFluentImpl.this.withTriedCredentials(builder.build());
    }
    public N endTriedCredentials() {
      return and();
    }
    
  }
  
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy