io.fabric8.openshift.api.model.installer.v1.MachinePoolFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model.installer.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.Long;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class MachinePoolFluentImpl> extends BaseFluent implements MachinePoolFluent{
public MachinePoolFluentImpl() {
}
public MachinePoolFluentImpl(io.fabric8.openshift.api.model.installer.v1.MachinePool instance) {
this.withArchitecture(instance.getArchitecture());
this.withHyperthreading(instance.getHyperthreading());
this.withName(instance.getName());
this.withPlatform(instance.getPlatform());
this.withReplicas(instance.getReplicas());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
private String architecture;
private java.lang.String hyperthreading;
private java.lang.String name;
private MachinePoolPlatformBuilder platform;
private Long replicas;
private Map additionalProperties;
public java.lang.String getArchitecture() {
return this.architecture;
}
public A withArchitecture(java.lang.String architecture) {
this.architecture=architecture; return (A) this;
}
public Boolean hasArchitecture() {
return this.architecture != null;
}
public java.lang.String getHyperthreading() {
return this.hyperthreading;
}
public A withHyperthreading(java.lang.String hyperthreading) {
this.hyperthreading=hyperthreading; return (A) this;
}
public java.lang.Boolean hasHyperthreading() {
return this.hyperthreading != 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;
}
/**
* This method has been deprecated, please use method buildPlatform instead.
* @return The buildable object.
*/
@Deprecated
public io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform getPlatform() {
return this.platform!=null ?this.platform.build():null;
}
public io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform buildPlatform() {
return this.platform!=null ?this.platform.build():null;
}
public A withPlatform(io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform platform) {
_visitables.get("platform").remove(this.platform);
if (platform!=null){ this.platform= new MachinePoolPlatformBuilder(platform); _visitables.get("platform").add(this.platform);} return (A) this;
}
public java.lang.Boolean hasPlatform() {
return this.platform != null;
}
public MachinePoolFluent.PlatformNested withNewPlatform() {
return new MachinePoolFluentImpl.PlatformNestedImpl();
}
public io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested withNewPlatformLike(io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform item) {
return new MachinePoolFluentImpl.PlatformNestedImpl(item);
}
public io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested editPlatform() {
return withNewPlatformLike(getPlatform());
}
public io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested editOrNewPlatform() {
return withNewPlatformLike(getPlatform() != null ? getPlatform(): new io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatformBuilder().build());
}
public io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested editOrNewPlatformLike(io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform item) {
return withNewPlatformLike(getPlatform() != null ? getPlatform(): item);
}
public java.lang.Long getReplicas() {
return this.replicas;
}
public A withReplicas(java.lang.Long replicas) {
this.replicas=replicas; return (A) this;
}
public java.lang.Boolean hasReplicas() {
return this.replicas != null;
}
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;
MachinePoolFluentImpl that = (MachinePoolFluentImpl) o;
if (architecture != null ? !architecture.equals(that.architecture) :that.architecture != null) return false;
if (hyperthreading != null ? !hyperthreading.equals(that.hyperthreading) :that.hyperthreading != null) return false;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (platform != null ? !platform.equals(that.platform) :that.platform != null) return false;
if (replicas != null ? !replicas.equals(that.replicas) :that.replicas != 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(architecture, hyperthreading, name, platform, replicas, additionalProperties, super.hashCode());
}
public java.lang.String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (architecture != null) { sb.append("architecture:"); sb.append(architecture + ","); }
if (hyperthreading != null) { sb.append("hyperthreading:"); sb.append(hyperthreading + ","); }
if (name != null) { sb.append("name:"); sb.append(name + ","); }
if (platform != null) { sb.append("platform:"); sb.append(platform + ","); }
if (replicas != null) { sb.append("replicas:"); sb.append(replicas + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
sb.append("}");
return sb.toString();
}
class PlatformNestedImpl extends MachinePoolPlatformFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested,Nested{
PlatformNestedImpl(io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform item) {
this.builder = new MachinePoolPlatformBuilder(this, item);
}
PlatformNestedImpl() {
this.builder = new io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatformBuilder(this);
}
io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatformBuilder builder;
public N and() {
return (N) MachinePoolFluentImpl.this.withPlatform(builder.build());
}
public N endPlatform() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy