
io.kubernetes.client.models.V1beta2ScaleStatusFluentImpl Maven / Gradle / Ivy
package io.kubernetes.client.models;
import java.lang.Integer;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
import java.util.Map;
import java.util.LinkedHashMap;
public class V1beta2ScaleStatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta2ScaleStatusFluent{
private Integer replicas;
private Map selector;
private String targetSelector;
public V1beta2ScaleStatusFluentImpl(){
}
public V1beta2ScaleStatusFluentImpl(V1beta2ScaleStatus instance){
this.withReplicas(instance.getReplicas());
this.withSelector(instance.getSelector());
this.withTargetSelector(instance.getTargetSelector());
}
public Integer getReplicas(){
return this.replicas;
}
public A withReplicas(Integer replicas){
this.replicas=replicas; return (A) this;
}
public Boolean hasReplicas(){
return this.replicas != null;
}
public A withNewReplicas(int arg1){
return (A)withReplicas(new Integer(arg1));
}
public A withNewReplicas(String arg1){
return (A)withReplicas(new Integer(arg1));
}
public A addToSelector(String key,String value){
if(this.selector == null && key != null && value != null) { this.selector = new LinkedHashMap(); }
if(key != null && value != null) {this.selector.put(key, value);} return (A)this;
}
public A addToSelector(Map map){
if(this.selector == null && map != null) { this.selector = new LinkedHashMap(); }
if(map != null) { this.selector.putAll(map);} return (A)this;
}
public A removeFromSelector(String key){
if(this.selector == null) { return (A) this; }
if(key != null && this.selector != null) {this.selector.remove(key);} return (A)this;
}
public A removeFromSelector(Map map){
if(this.selector == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.selector != null){this.selector.remove(key);}}} return (A)this;
}
public Map getSelector(){
return this.selector;
}
public A withSelector(Map selector){
if (selector == null) { this.selector = null;} else {this.selector = new LinkedHashMap(selector);} return (A) this;
}
public Boolean hasSelector(){
return this.selector != null;
}
public String getTargetSelector(){
return this.targetSelector;
}
public A withTargetSelector(String targetSelector){
this.targetSelector=targetSelector; return (A) this;
}
public Boolean hasTargetSelector(){
return this.targetSelector != null;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
V1beta2ScaleStatusFluentImpl that = (V1beta2ScaleStatusFluentImpl) o;
if (replicas != null ? !replicas.equals(that.replicas) :that.replicas != null) return false;
if (selector != null ? !selector.equals(that.selector) :that.selector != null) return false;
if (targetSelector != null ? !targetSelector.equals(that.targetSelector) :that.targetSelector != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy