me.snowdrop.istio.api.networking.v1alpha3.HeaderOperationsFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.networking.v1alpha3;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.lang.String;
import io.fabric8.kubernetes.api.builder.Predicate;
import java.util.LinkedHashMap;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.Boolean;
import java.util.Map;
public class HeaderOperationsFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements HeaderOperationsFluent{
private Map add;
private List remove;
private Map set;
public HeaderOperationsFluentImpl(){
}
public HeaderOperationsFluentImpl(HeaderOperations instance){
this.withAdd(instance.getAdd());
this.withRemove(instance.getRemove());
this.withSet(instance.getSet());
}
public A addToAdd(String key,String value){
if(this.add == null && key != null && value != null) { this.add = new LinkedHashMap(); }
if(key != null && value != null) {this.add.put(key, value);} return (A)this;
}
public A addToAdd(Map map){
if(this.add == null && map != null) { this.add = new LinkedHashMap(); }
if(map != null) { this.add.putAll(map);} return (A)this;
}
public A removeFromAdd(String key){
if(this.add == null) { return (A) this; }
if(key != null && this.add != null) {this.add.remove(key);} return (A)this;
}
public A removeFromAdd(Map map){
if(this.add == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.add != null){this.add.remove(key);}}} return (A)this;
}
public Map getAdd(){
return this.add;
}
public A withAdd(Map add){
if (add == null) { this.add = null;} else {this.add = new LinkedHashMap(add);} return (A) this;
}
public Boolean hasAdd(){
return this.add != null;
}
public A addToRemove(int index,String item){
if (this.remove == null) {this.remove = new ArrayList();}
this.remove.add(index, item);
return (A)this;
}
public A setToRemove(int index,String item){
if (this.remove == null) {this.remove = new ArrayList();}
this.remove.set(index, item); return (A)this;
}
public A addToRemove(String... items){
if (this.remove == null) {this.remove = new ArrayList();}
for (String item : items) {this.remove.add(item);} return (A)this;
}
public A addAllToRemove(Collection items){
if (this.remove == null) {this.remove = new ArrayList();}
for (String item : items) {this.remove.add(item);} return (A)this;
}
public A removeFromRemove(String... items){
for (String item : items) {if (this.remove!= null){ this.remove.remove(item);}} return (A)this;
}
public A removeAllFromRemove(Collection items){
for (String item : items) {if (this.remove!= null){ this.remove.remove(item);}} return (A)this;
}
public List getRemove(){
return this.remove;
}
public String getRemoves(int index){
return this.remove.get(index);
}
public String getFirstRemoves(){
return this.remove.get(0);
}
public String getLastRemoves(){
return this.remove.get(remove.size() - 1);
}
public String getMatchingRemoves(io.fabric8.kubernetes.api.builder.Predicate predicate){
for (String item: remove) { if(predicate.apply(item)){return item;} } return null;
}
public A withRemove(List remove){
if (this.remove != null) { _visitables.removeAll(this.remove);}
if (remove != null) {this.remove = new ArrayList(); for (String item : remove){this.addToRemove(item);}} else { this.remove = null;} return (A) this;
}
public A withRemove(String... remove){
if (this.remove != null) {this.remove.clear();}
if (remove != null) {for (String item :remove){ this.addToRemove(item);}} return (A) this;
}
public Boolean hasRemove(){
return remove != null && !remove.isEmpty();
}
public A addToSet(String key,String value){
if(this.set == null && key != null && value != null) { this.set = new LinkedHashMap(); }
if(key != null && value != null) {this.set.put(key, value);} return (A)this;
}
public A addToSet(Map map){
if(this.set == null && map != null) { this.set = new LinkedHashMap(); }
if(map != null) { this.set.putAll(map);} return (A)this;
}
public A removeFromSet(String key){
if(this.set == null) { return (A) this; }
if(key != null && this.set != null) {this.set.remove(key);} return (A)this;
}
public A removeFromSet(Map map){
if(this.set == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.set != null){this.set.remove(key);}}} return (A)this;
}
public Map getSet(){
return this.set;
}
public A withSet(Map set){
if (set == null) { this.set = null;} else {this.set = new LinkedHashMap(set);} return (A) this;
}
public Boolean hasSet(){
return this.set != 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;
HeaderOperationsFluentImpl that = (HeaderOperationsFluentImpl) o;
if (add != null ? !add.equals(that.add) :that.add != null) return false;
if (remove != null ? !remove.equals(that.remove) :that.remove != null) return false;
if (set != null ? !set.equals(that.set) :that.set != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy