annotations.me.snowdrop.istio.api.model.v1.routing.IstioServiceFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.routing;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.Valid;
import me.snowdrop.istio.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
import java.util.Map;
import java.util.LinkedHashMap;
public class IstioServiceFluentImpl> extends me.snowdrop.istio.api.builder.BaseFluent implements IstioServiceFluent{
private String domain;
private Map labels;
private String name;
private String namespace;
private String service;
public IstioServiceFluentImpl(){
}
public IstioServiceFluentImpl(IstioService instance){
this.withDomain(instance.getDomain());
this.withLabels(instance.getLabels());
this.withName(instance.getName());
this.withNamespace(instance.getNamespace());
this.withService(instance.getService());
}
public String getDomain(){
return this.domain;
}
public A withDomain(String domain){
this.domain=domain; return (A) this;
}
public Boolean hasDomain(){
return this.domain != null;
}
public A addToLabels(String key,String value){
if(key != null && value != null) {this.labels.put(key, value);} return (A)this;
}
public A addToLabels(Map map){
if(map != null) { this.labels.putAll(map);} return (A)this;
}
public A removeFromLabels(String key){
if(key != null && this.labels != null) {this.labels.remove(key);} return (A)this;
}
public A removeFromLabels(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.labels != null){this.labels.remove(key);}}} return (A)this;
}
public Map getLabels(){
return this.labels;
}
public A withLabels(Map labels){
if (this.labels == null) { this.labels = new LinkedHashMap();} else {this.labels.clear();}
if (labels != null) {this.labels.putAll(labels);} return (A) this;
}
public Boolean hasLabels(){
return this.labels != 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 getNamespace(){
return this.namespace;
}
public A withNamespace(String namespace){
this.namespace=namespace; return (A) this;
}
public Boolean hasNamespace(){
return this.namespace != null;
}
public String getService(){
return this.service;
}
public A withService(String service){
this.service=service; return (A) this;
}
public Boolean hasService(){
return this.service != 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;
IstioServiceFluentImpl that = (IstioServiceFluentImpl) o;
if (domain != null ? !domain.equals(that.domain) :that.domain != null) return false;
if (labels != null ? !labels.equals(that.labels) :that.labels != null) return false;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (namespace != null ? !namespace.equals(that.namespace) :that.namespace != null) return false;
if (service != null ? !service.equals(that.service) :that.service != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy