io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model.installer.baremetal.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.Object;
import java.lang.Boolean;
import java.util.Map;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class HostFluentImpl> extends BaseFluent implements 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 BMCBuilder bmc;
private 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 RootDeviceHintsBuilder rootDeviceHints;
private Map additionalProperties;
/**
* This method has been deprecated, please use method buildBmc instead.
* @return The buildable object.
*/
@Deprecated
public 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 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 HostFluent.BmcNested withNewBmc() {
return new 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 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;
}
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;
}
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;
}
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;
}
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;
}
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;
}
/**
* This method has been deprecated, please use method buildRootDeviceHints instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public 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 HostFluent.RootDeviceHintsNested withNewRootDeviceHints() {
return new 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 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 java.lang.String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (bmc != null) { sb.append("bmc:"); sb.append(bmc + ","); }
if (bootMACAddress != null) { sb.append("bootMACAddress:"); sb.append(bootMACAddress + ","); }
if (bootMode != null) { sb.append("bootMode:"); sb.append(bootMode + ","); }
if (hardwareProfile != null) { sb.append("hardwareProfile:"); sb.append(hardwareProfile + ","); }
if (name != null) { sb.append("name:"); sb.append(name + ","); }
if (networkConfig != null) { sb.append("networkConfig:"); sb.append(networkConfig + ","); }
if (role != null) { sb.append("role:"); sb.append(role + ","); }
if (rootDeviceHints != null) { sb.append("rootDeviceHints:"); sb.append(rootDeviceHints + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
sb.append("}");
return sb.toString();
}
class BmcNestedImpl extends BMCFluentImpl> implements io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.BmcNested,Nested{
BmcNestedImpl(io.fabric8.openshift.api.model.installer.baremetal.v1.BMC item) {
this.builder = new 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();
}
}
class RootDeviceHintsNestedImpl extends RootDeviceHintsFluentImpl> implements io.fabric8.openshift.api.model.installer.baremetal.v1.HostFluent.RootDeviceHintsNested,io.fabric8.kubernetes.api.builder.Nested{
RootDeviceHintsNestedImpl(RootDeviceHints item) {
this.builder = new 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