me.snowdrop.istio.api.model.v1.mixer.config.AttributeManifestFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.mixer.config;
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 AttributeManifestFluentImpl> extends me.snowdrop.istio.api.builder.BaseFluent implements AttributeManifestFluent{
private Map attributes;
private String name;
private String revision;
public AttributeManifestFluentImpl(){
}
public AttributeManifestFluentImpl(AttributeManifest instance){
this.withAttributes(instance.getAttributes());
this.withName(instance.getName());
this.withRevision(instance.getRevision());
}
public A addToAttributes(String key,AttributeInfo value){
if(this.attributes == null && key != null && value != null) { this.attributes = new LinkedHashMap(); }
if(key != null && value != null) {this.attributes.put(key, value);} return (A)this;
}
public A addToAttributes(Map map){
if(this.attributes == null && map != null) { this.attributes = new LinkedHashMap(); }
if(map != null) { this.attributes.putAll(map);} return (A)this;
}
public A removeFromAttributes(String key){
if(this.attributes == null) { return (A) this; }
if(key != null && this.attributes != null) {this.attributes.remove(key);} return (A)this;
}
public A removeFromAttributes(Map map){
if(this.attributes == null) { return (A) this; }
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 (attributes == null) { this.attributes = null;} else {this.attributes = new LinkedHashMap(attributes);} return (A) this;
}
public Boolean hasAttributes(){
return this.attributes != null;
}
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 String getRevision(){
return this.revision;
}
public A withRevision(String revision){
this.revision=revision; return (A) this;
}
public Boolean hasRevision(){
return this.revision != 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;
AttributeManifestFluentImpl that = (AttributeManifestFluentImpl) o;
if (attributes != null ? !attributes.equals(that.attributes) :that.attributes != null) return false;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (revision != null ? !revision.equals(that.revision) :that.revision != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy