me.snowdrop.istio.api.model.v1.mixer.AttributesFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.mixer;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.String;
import java.util.LinkedHashMap;
import javax.validation.Valid;
import me.snowdrop.istio.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;
public class AttributesFluentImpl> extends me.snowdrop.istio.api.builder.BaseFluent implements AttributesFluent{
private Map attributes;
public AttributesFluentImpl(){
}
public AttributesFluentImpl(Attributes instance){
this.withAttributes(instance.getAttributes());
}
public A addToAttributes(String key,AttributeValue value){
if(key != null && value != null) {this.attributes.put(key, value);} return (A)this;
}
public A addToAttributes(Map map){
if(map != null) { this.attributes.putAll(map);} return (A)this;
}
public A removeFromAttributes(String key){
if(key != null && this.attributes != null) {this.attributes.remove(key);} return (A)this;
}
public A removeFromAttributes(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.attributes != null){this.attributes.remove(key);}}} return (A)this;
}
public Map getAttributes(){
return this.attributes;
}
public A withAttributes(Map attributes){
if (this.attributes == null) { this.attributes = new LinkedHashMap();} else {this.attributes.clear();}
if (attributes != null) {this.attributes.putAll(attributes);} return (A) this;
}
public Boolean hasAttributes(){
return this.attributes != 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;
AttributesFluentImpl that = (AttributesFluentImpl) o;
if (attributes != null ? !attributes.equals(that.attributes) :that.attributes != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy