io.fabric8.openshift.api.model.installer.v1.MachinePoolFluentImpl Maven / Gradle / Ivy
package io.fabric8.openshift.api.model.installer.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.Long;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;
/**
* Generated
*/
public class MachinePoolFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.openshift.api.model.installer.v1.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 java.lang.String architecture;
private java.lang.String hyperthreading;
private java.lang.String name;
private io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatformBuilder platform;
private java.lang.Long replicas;
private java.util.Map additionalProperties;
public java.lang.String getArchitecture() {
return this.architecture;
}
public A withArchitecture(java.lang.String architecture) {
this.architecture=architecture; return (A) this;
}
public java.lang.Boolean hasArchitecture() {
return this.architecture != null;
}
/**
* Method is deprecated. use withArchitecture instead.
*/
@java.lang.Deprecated
public A withNewArchitecture(java.lang.String arg0) {
return (A)withArchitecture(new String(arg0));
}
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;
}
/**
* Method is deprecated. use withHyperthreading instead.
*/
@java.lang.Deprecated
public A withNewHyperthreading(java.lang.String arg0) {
return (A)withHyperthreading(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));
}
/**
* This method has been deprecated, please use method buildPlatform instead.
* @return The buildable object.
*/
@java.lang.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 io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatformBuilder(platform); _visitables.get("platform").add(this.platform);} return (A) this;
}
public java.lang.Boolean hasPlatform() {
return this.platform != null;
}
public io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested withNewPlatform() {
return new io.fabric8.openshift.api.model.installer.v1.MachinePoolFluentImpl.PlatformNestedImpl();
}
public io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested withNewPlatformLike(io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform item) {
return new io.fabric8.openshift.api.model.installer.v1.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 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;
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 class PlatformNestedImpl extends io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatformFluentImpl> implements io.fabric8.openshift.api.model.installer.v1.MachinePoolFluent.PlatformNested,io.fabric8.kubernetes.api.builder.Nested{
PlatformNestedImpl(io.fabric8.openshift.api.model.installer.v1.MachinePoolPlatform item) {
this.builder = new io.fabric8.openshift.api.model.installer.v1.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