me.snowdrop.istio.mixer.adapter.dogstatsd.MetricInfoFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.mixer.adapter.dogstatsd;
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 io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;
public class MetricInfoFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements me.snowdrop.istio.mixer.adapter.dogstatsd.MetricInfoFluent{
private String name;
private Map tags;
private me.snowdrop.istio.mixer.adapter.dogstatsd.Type type;
public MetricInfoFluentImpl(){
}
public MetricInfoFluentImpl(me.snowdrop.istio.mixer.adapter.dogstatsd.MetricInfo instance){
this.withName(instance.getName());
this.withTags(instance.getTags());
this.withType(instance.getType());
}
public String getName(){
return this.name;
}
public A withName(String name){
this.name=name; return (A) this;
}
public Boolean hasName(){
return this.name != null;
}
public A addToTags(String key,String value){
if(this.tags == null && key != null && value != null) { this.tags = new LinkedHashMap(); }
if(key != null && value != null) {this.tags.put(key, value);} return (A)this;
}
public A addToTags(Map map){
if(this.tags == null && map != null) { this.tags = new LinkedHashMap(); }
if(map != null) { this.tags.putAll(map);} return (A)this;
}
public A removeFromTags(String key){
if(this.tags == null) { return (A) this; }
if(key != null && this.tags != null) {this.tags.remove(key);} return (A)this;
}
public A removeFromTags(Map map){
if(this.tags == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.tags != null){this.tags.remove(key);}}} return (A)this;
}
public Map getTags(){
return this.tags;
}
public A withTags(Map tags){
if (tags == null) { this.tags = null;} else {this.tags = new LinkedHashMap(tags);} return (A) this;
}
public Boolean hasTags(){
return this.tags != null;
}
public me.snowdrop.istio.mixer.adapter.dogstatsd.Type getType(){
return this.type;
}
public A withType(me.snowdrop.istio.mixer.adapter.dogstatsd.Type type){
this.type=type; return (A) this;
}
public Boolean hasType(){
return this.type != 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;
MetricInfoFluentImpl that = (MetricInfoFluentImpl) o;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (tags != null ? !tags.equals(that.tags) :that.tags != null) return false;
if (type != null ? !type.equals(that.type) :that.type != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy