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

io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluentImpl Maven / Gradle / Ivy

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

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 HostFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent{
  public HostFluentImpl() {
  }
  public HostFluentImpl(io.fabric8.openshift.api.model.installer.baremetal.v1.Host instance) {
    this.withBmc(instance.getBmc()); 
    this.withBootMACAddress(instance.getBootMACAddress()); 
    this.withBootMode(instance.getBootMode()); 
    this.withHardwareProfile(instance.getHardwareProfile()); 
    this.withName(instance.getName()); 
    this.withNetworkConfig(instance.getNetworkConfig()); 
    this.withRole(instance.getRole()); 
    this.withRootDeviceHints(instance.getRootDeviceHints()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private io.fabric8.openshift.api.model.installer.baremetal.v1.BMCBuilder bmc;
  private java.lang.String bootMACAddress;
  private java.lang.String bootMode;
  private java.lang.String hardwareProfile;
  private java.lang.String name;
  private java.lang.String networkConfig;
  private java.lang.String role;
  private io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHintsBuilder rootDeviceHints;
  private java.util.Map additionalProperties;
  
  /**
   * This method has been deprecated, please use method buildBmc instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.openshift.api.model.installer.baremetal.v1.BMC getBmc() {
    return this.bmc!=null?this.bmc.build():null;
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.BMC buildBmc() {
    return this.bmc!=null?this.bmc.build():null;
  }
  public A withBmc(io.fabric8.openshift.api.model.installer.baremetal.v1.BMC bmc) {
    _visitables.get("bmc").remove(this.bmc);
    if (bmc!=null){ this.bmc= new io.fabric8.openshift.api.model.installer.baremetal.v1.BMCBuilder(bmc); _visitables.get("bmc").add(this.bmc);} return (A) this;
  }
  public java.lang.Boolean hasBmc() {
    return this.bmc != null;
  }
  public A withNewBmc(java.lang.String address,java.lang.Boolean disableCertificateVerification,java.lang.String password,java.lang.String username) {
    return (A)withBmc(new BMC(address, disableCertificateVerification, password, username));
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.BmcNested withNewBmc() {
    return new io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluentImpl.BmcNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.BmcNested withNewBmcLike(io.fabric8.openshift.api.model.installer.baremetal.v1.BMC item) {
    return new io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluentImpl.BmcNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.BmcNested editBmc() {
    return withNewBmcLike(getBmc());
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.BmcNested editOrNewBmc() {
    return withNewBmcLike(getBmc() != null ? getBmc(): new io.fabric8.openshift.api.model.installer.baremetal.v1.BMCBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.BmcNested editOrNewBmcLike(io.fabric8.openshift.api.model.installer.baremetal.v1.BMC item) {
    return withNewBmcLike(getBmc() != null ? getBmc(): item);
  }
  public java.lang.String getBootMACAddress() {
    return this.bootMACAddress;
  }
  public A withBootMACAddress(java.lang.String bootMACAddress) {
    this.bootMACAddress=bootMACAddress; return (A) this;
  }
  public java.lang.Boolean hasBootMACAddress() {
    return this.bootMACAddress != null;
  }
  
  /**
   * Method is deprecated. use withBootMACAddress instead.
   */
  @java.lang.Deprecated
  public A withNewBootMACAddress(java.lang.String arg0) {
    return (A)withBootMACAddress(new String(arg0));
  }
  public java.lang.String getBootMode() {
    return this.bootMode;
  }
  public A withBootMode(java.lang.String bootMode) {
    this.bootMode=bootMode; return (A) this;
  }
  public java.lang.Boolean hasBootMode() {
    return this.bootMode != null;
  }
  
  /**
   * Method is deprecated. use withBootMode instead.
   */
  @java.lang.Deprecated
  public A withNewBootMode(java.lang.String arg0) {
    return (A)withBootMode(new String(arg0));
  }
  public java.lang.String getHardwareProfile() {
    return this.hardwareProfile;
  }
  public A withHardwareProfile(java.lang.String hardwareProfile) {
    this.hardwareProfile=hardwareProfile; return (A) this;
  }
  public java.lang.Boolean hasHardwareProfile() {
    return this.hardwareProfile != null;
  }
  
  /**
   * Method is deprecated. use withHardwareProfile instead.
   */
  @java.lang.Deprecated
  public A withNewHardwareProfile(java.lang.String arg0) {
    return (A)withHardwareProfile(new String(arg0));
  }
  public java.lang.String getName() {
    return this.name;
  }
  public A withName(java.lang.String name) {
    this.name=name; return (A) this;
  }
  public java.lang.Boolean hasName() {
    return this.name != null;
  }
  
  /**
   * Method is deprecated. use withName instead.
   */
  @java.lang.Deprecated
  public A withNewName(java.lang.String arg0) {
    return (A)withName(new String(arg0));
  }
  public java.lang.String getNetworkConfig() {
    return this.networkConfig;
  }
  public A withNetworkConfig(java.lang.String networkConfig) {
    this.networkConfig=networkConfig; return (A) this;
  }
  public java.lang.Boolean hasNetworkConfig() {
    return this.networkConfig != null;
  }
  
  /**
   * Method is deprecated. use withNetworkConfig instead.
   */
  @java.lang.Deprecated
  public A withNewNetworkConfig(java.lang.String arg0) {
    return (A)withNetworkConfig(new String(arg0));
  }
  public java.lang.String getRole() {
    return this.role;
  }
  public A withRole(java.lang.String role) {
    this.role=role; return (A) this;
  }
  public java.lang.Boolean hasRole() {
    return this.role != null;
  }
  
  /**
   * Method is deprecated. use withRole instead.
   */
  @java.lang.Deprecated
  public A withNewRole(java.lang.String arg0) {
    return (A)withRole(new String(arg0));
  }
  
  /**
   * This method has been deprecated, please use method buildRootDeviceHints instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHints getRootDeviceHints() {
    return this.rootDeviceHints!=null?this.rootDeviceHints.build():null;
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHints buildRootDeviceHints() {
    return this.rootDeviceHints!=null?this.rootDeviceHints.build():null;
  }
  public A withRootDeviceHints(io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHints rootDeviceHints) {
    _visitables.get("rootDeviceHints").remove(this.rootDeviceHints);
    if (rootDeviceHints!=null){ this.rootDeviceHints= new io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHintsBuilder(rootDeviceHints); _visitables.get("rootDeviceHints").add(this.rootDeviceHints);} return (A) this;
  }
  public java.lang.Boolean hasRootDeviceHints() {
    return this.rootDeviceHints != null;
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.RootDeviceHintsNested withNewRootDeviceHints() {
    return new io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluentImpl.RootDeviceHintsNestedImpl();
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.RootDeviceHintsNested withNewRootDeviceHintsLike(io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHints item) {
    return new io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluentImpl.RootDeviceHintsNestedImpl(item);
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.RootDeviceHintsNested editRootDeviceHints() {
    return withNewRootDeviceHintsLike(getRootDeviceHints());
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.RootDeviceHintsNested editOrNewRootDeviceHints() {
    return withNewRootDeviceHintsLike(getRootDeviceHints() != null ? getRootDeviceHints(): new io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHintsBuilder().build());
  }
  public io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.RootDeviceHintsNested editOrNewRootDeviceHintsLike(io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHints item) {
    return withNewRootDeviceHintsLike(getRootDeviceHints() != null ? getRootDeviceHints(): 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;
    HostFluentImpl that = (HostFluentImpl) o;
    if (bmc != null ? !bmc.equals(that.bmc) :that.bmc != null) return false;
    if (bootMACAddress != null ? !bootMACAddress.equals(that.bootMACAddress) :that.bootMACAddress != null) return false;
    if (bootMode != null ? !bootMode.equals(that.bootMode) :that.bootMode != null) return false;
    if (hardwareProfile != null ? !hardwareProfile.equals(that.hardwareProfile) :that.hardwareProfile != null) return false;
    if (name != null ? !name.equals(that.name) :that.name != null) return false;
    if (networkConfig != null ? !networkConfig.equals(that.networkConfig) :that.networkConfig != null) return false;
    if (role != null ? !role.equals(that.role) :that.role != null) return false;
    if (rootDeviceHints != null ? !rootDeviceHints.equals(that.rootDeviceHints) :that.rootDeviceHints != 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(bmc,  bootMACAddress,  bootMode,  hardwareProfile,  name,  networkConfig,  role,  rootDeviceHints,  additionalProperties,  super.hashCode());
  }
  public class BmcNestedImpl extends io.fabric8.openshift.api.model.installer.baremetal.v1.BMCFluentImpl> implements io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.BmcNested,io.fabric8.kubernetes.api.builder.Nested{
    BmcNestedImpl(io.fabric8.openshift.api.model.installer.baremetal.v1.BMC item) {
      this.builder = new io.fabric8.openshift.api.model.installer.baremetal.v1.BMCBuilder(this, item);
    }
    BmcNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.baremetal.v1.BMCBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.baremetal.v1.BMCBuilder builder;
    public N and() {
      return (N) HostFluentImpl.this.withBmc(builder.build());
    }
    public N endBmc() {
      return and();
    }
    
  }
  public class RootDeviceHintsNestedImpl extends io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHintsFluentImpl> implements io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.RootDeviceHintsNested,io.fabric8.kubernetes.api.builder.Nested{
    RootDeviceHintsNestedImpl(io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHints item) {
      this.builder = new io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHintsBuilder(this, item);
    }
    RootDeviceHintsNestedImpl() {
      this.builder = new io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHintsBuilder(this);
    }
    io.fabric8.openshift.api.model.installer.baremetal.v1.RootDeviceHintsBuilder builder;
    public N and() {
      return (N) HostFluentImpl.this.withRootDeviceHints(builder.build());
    }
    public N endRootDeviceHints() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy