io.fabric8.openshift.api.model.miscellaneous.metal3.v1alpha1.HardwareRAIDVolumeFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model.miscellaneous.metal3.v1alpha1;
import java.lang.Integer;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
import java.util.Map;
import java.util.LinkedHashMap;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class HardwareRAIDVolumeFluentImpl> extends BaseFluent implements HardwareRAIDVolumeFluent{
public HardwareRAIDVolumeFluentImpl() {
}
public HardwareRAIDVolumeFluentImpl(HardwareRAIDVolume instance) {
this.withLevel(instance.getLevel());
this.withName(instance.getName());
this.withNumberOfPhysicalDisks(instance.getNumberOfPhysicalDisks());
this.withRotational(instance.getRotational());
this.withSizeGibibytes(instance.getSizeGibibytes());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
private String level;
private String name;
private Integer numberOfPhysicalDisks;
private Boolean rotational;
private Integer sizeGibibytes;
private Map additionalProperties;
public String getLevel() {
return this.level;
}
public A withLevel(String level) {
this.level=level; return (A) this;
}
public Boolean hasLevel() {
return this.level != null;
}
public String getName() {
return this.name;
}
public A withName(String name) {
this.name=name; return (A) this;
}
public Boolean hasName() {
return this.name != null;
}
public Integer getNumberOfPhysicalDisks() {
return this.numberOfPhysicalDisks;
}
public A withNumberOfPhysicalDisks(Integer numberOfPhysicalDisks) {
this.numberOfPhysicalDisks=numberOfPhysicalDisks; return (A) this;
}
public Boolean hasNumberOfPhysicalDisks() {
return this.numberOfPhysicalDisks != null;
}
public Boolean getRotational() {
return this.rotational;
}
public A withRotational(Boolean rotational) {
this.rotational=rotational; return (A) this;
}
public Boolean hasRotational() {
return this.rotational != null;
}
public Integer getSizeGibibytes() {
return this.sizeGibibytes;
}
public A withSizeGibibytes(Integer sizeGibibytes) {
this.sizeGibibytes=sizeGibibytes; return (A) this;
}
public Boolean hasSizeGibibytes() {
return this.sizeGibibytes != null;
}
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;
HardwareRAIDVolumeFluentImpl that = (HardwareRAIDVolumeFluentImpl) o;
if (level != null ? !level.equals(that.level) :that.level != null) return false;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (numberOfPhysicalDisks != null ? !numberOfPhysicalDisks.equals(that.numberOfPhysicalDisks) :that.numberOfPhysicalDisks != null) return false;
if (rotational != null ? !rotational.equals(that.rotational) :that.rotational != null) return false;
if (sizeGibibytes != null ? !sizeGibibytes.equals(that.sizeGibibytes) :that.sizeGibibytes != 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(level, name, numberOfPhysicalDisks, rotational, sizeGibibytes, additionalProperties, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (level != null) { sb.append("level:"); sb.append(level + ","); }
if (name != null) { sb.append("name:"); sb.append(name + ","); }
if (numberOfPhysicalDisks != null) { sb.append("numberOfPhysicalDisks:"); sb.append(numberOfPhysicalDisks + ","); }
if (rotational != null) { sb.append("rotational:"); sb.append(rotational + ","); }
if (sizeGibibytes != null) { sb.append("sizeGibibytes:"); sb.append(sizeGibibytes + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
sb.append("}");
return sb.toString();
}
public A withRotational() {
return withRotational(true);
}
}