me.snowdrop.istio.api.model.v1.routing.MatchRequestFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.routing;
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 MatchRequestFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements MatchRequestFluent{
private Map headers;
public MatchRequestFluentImpl(){
}
public MatchRequestFluentImpl(MatchRequest instance){
this.withHeaders(instance.getHeaders());
}
public A addToHeaders(String key,me.snowdrop.istio.api.model.v1.routing.StringMatch value){
if(this.headers == null && key != null && value != null) { this.headers = new LinkedHashMap(); }
if(key != null && value != null) {this.headers.put(key, value);} return (A)this;
}
public A addToHeaders(Map map){
if(this.headers == null && map != null) { this.headers = new LinkedHashMap(); }
if(map != null) { this.headers.putAll(map);} return (A)this;
}
public A removeFromHeaders(String key){
if(this.headers == null) { return (A) this; }
if(key != null && this.headers != null) {this.headers.remove(key);} return (A)this;
}
public A removeFromHeaders(Map map){
if(this.headers == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.headers != null){this.headers.remove(key);}}} return (A)this;
}
public Map getHeaders(){
return this.headers;
}
public A withHeaders(Map headers){
if (headers == null) { this.headers = null;} else {this.headers = new LinkedHashMap(headers);} return (A) this;
}
public Boolean hasHeaders(){
return this.headers != 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;
MatchRequestFluentImpl that = (MatchRequestFluentImpl) o;
if (headers != null ? !headers.equals(that.headers) :that.headers != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy