
io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Integer;
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 WeightedPodAffinityTermFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluent{
public WeightedPodAffinityTermFluentImpl() {
}
public WeightedPodAffinityTermFluentImpl(io.fabric8.kubernetes.api.model.WeightedPodAffinityTerm instance) {
this.withPodAffinityTerm(instance.getPodAffinityTerm());
this.withWeight(instance.getWeight());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
private io.fabric8.kubernetes.api.model.PodAffinityTermBuilder podAffinityTerm;
private java.lang.Integer weight;
private java.util.Map additionalProperties;
/**
* This method has been deprecated, please use method buildPodAffinityTerm instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.kubernetes.api.model.PodAffinityTerm getPodAffinityTerm() {
return this.podAffinityTerm!=null?this.podAffinityTerm.build():null;
}
public io.fabric8.kubernetes.api.model.PodAffinityTerm buildPodAffinityTerm() {
return this.podAffinityTerm!=null?this.podAffinityTerm.build():null;
}
public A withPodAffinityTerm(io.fabric8.kubernetes.api.model.PodAffinityTerm podAffinityTerm) {
_visitables.get("podAffinityTerm").remove(this.podAffinityTerm);
if (podAffinityTerm!=null){ this.podAffinityTerm= new io.fabric8.kubernetes.api.model.PodAffinityTermBuilder(podAffinityTerm); _visitables.get("podAffinityTerm").add(this.podAffinityTerm);} return (A) this;
}
public java.lang.Boolean hasPodAffinityTerm() {
return this.podAffinityTerm != null;
}
public io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluent.PodAffinityTermNested withNewPodAffinityTerm() {
return new io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluentImpl.PodAffinityTermNestedImpl();
}
public io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluent.PodAffinityTermNested withNewPodAffinityTermLike(io.fabric8.kubernetes.api.model.PodAffinityTerm item) {
return new io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluentImpl.PodAffinityTermNestedImpl(item);
}
public io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluent.PodAffinityTermNested editPodAffinityTerm() {
return withNewPodAffinityTermLike(getPodAffinityTerm());
}
public io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluent.PodAffinityTermNested editOrNewPodAffinityTerm() {
return withNewPodAffinityTermLike(getPodAffinityTerm() != null ? getPodAffinityTerm(): new io.fabric8.kubernetes.api.model.PodAffinityTermBuilder().build());
}
public io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluent.PodAffinityTermNested editOrNewPodAffinityTermLike(io.fabric8.kubernetes.api.model.PodAffinityTerm item) {
return withNewPodAffinityTermLike(getPodAffinityTerm() != null ? getPodAffinityTerm(): item);
}
public java.lang.Integer getWeight() {
return this.weight;
}
public A withWeight(java.lang.Integer weight) {
this.weight=weight; return (A) this;
}
public java.lang.Boolean hasWeight() {
return this.weight != 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;
WeightedPodAffinityTermFluentImpl that = (WeightedPodAffinityTermFluentImpl) o;
if (podAffinityTerm != null ? !podAffinityTerm.equals(that.podAffinityTerm) :that.podAffinityTerm != null) return false;
if (weight != null ? !weight.equals(that.weight) :that.weight != 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(podAffinityTerm, weight, additionalProperties, super.hashCode());
}
public class PodAffinityTermNestedImpl extends io.fabric8.kubernetes.api.model.PodAffinityTermFluentImpl> implements io.fabric8.kubernetes.api.model.WeightedPodAffinityTermFluent.PodAffinityTermNested,io.fabric8.kubernetes.api.builder.Nested{
PodAffinityTermNestedImpl(io.fabric8.kubernetes.api.model.PodAffinityTerm item) {
this.builder = new io.fabric8.kubernetes.api.model.PodAffinityTermBuilder(this, item);
}
PodAffinityTermNestedImpl() {
this.builder = new io.fabric8.kubernetes.api.model.PodAffinityTermBuilder(this);
}
io.fabric8.kubernetes.api.model.PodAffinityTermBuilder builder;
public N and() {
return (N) WeightedPodAffinityTermFluentImpl.this.withPodAffinityTerm(builder.build());
}
public N endPodAffinityTerm() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy