me.snowdrop.istio.api.model.v1.mixer.template.QuotaFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.mixer.template;
import me.snowdrop.istio.api.model.IstioBaseSpecFluentImpl;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
import java.util.Map;
import java.util.LinkedHashMap;
import me.snowdrop.istio.api.model.v1.cexl.TypedValue;
public class QuotaFluentImpl> extends IstioBaseSpecFluentImpl implements QuotaFluent{
private Map dimensions;
public QuotaFluentImpl(){
}
public QuotaFluentImpl(Quota instance){
this.withDimensions(instance.getDimensions());
}
public A addToDimensions(String key,TypedValue value){
if(this.dimensions == null && key != null && value != null) { this.dimensions = new LinkedHashMap(); }
if(key != null && value != null) {this.dimensions.put(key, value);} return (A)this;
}
public A addToDimensions(Map map){
if(this.dimensions == null && map != null) { this.dimensions = new LinkedHashMap(); }
if(map != null) { this.dimensions.putAll(map);} return (A)this;
}
public A removeFromDimensions(String key){
if(this.dimensions == null) { return (A) this; }
if(key != null && this.dimensions != null) {this.dimensions.remove(key);} return (A)this;
}
public A removeFromDimensions(Map map){
if(this.dimensions == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.dimensions != null){this.dimensions.remove(key);}}} return (A)this;
}
public Map getDimensions(){
return this.dimensions;
}
public A withDimensions(Map dimensions){
if (dimensions == null) { this.dimensions = null;} else {this.dimensions = new LinkedHashMap(dimensions);} return (A) this;
}
public Boolean hasDimensions(){
return this.dimensions != 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;
QuotaFluentImpl that = (QuotaFluentImpl) o;
if (dimensions != null ? !dimensions.equals(that.dimensions) :that.dimensions != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy