annotations.me.snowdrop.istio.api.model.v1.mixer.CompressedAttributesFluentImpl Maven / Gradle / Ivy
package me.snowdrop.istio.api.model.v1.mixer;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.lang.String;
import java.lang.Double;
import java.util.LinkedHashMap;
import me.snowdrop.istio.api.builder.Predicate;
import java.lang.Integer;
import javax.validation.Valid;
import java.lang.Long;
import me.snowdrop.istio.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 CompressedAttributesFluentImpl> extends me.snowdrop.istio.api.builder.BaseFluent implements CompressedAttributesFluent{
private Map bools;
private Map bytes;
private Map doubles;
private Map durations;
private Map int64s;
private Map stringMaps;
private Map strings;
private Map timestamps;
private List words;
public CompressedAttributesFluentImpl(){
}
public CompressedAttributesFluentImpl(CompressedAttributes instance){
this.withBools(instance.getBools());
this.withBytes(instance.getBytes());
this.withDoubles(instance.getDoubles());
this.withDurations(instance.getDurations());
this.withInt64s(instance.getInt64s());
this.withStringMaps(instance.getStringMaps());
this.withStrings(instance.getStrings());
this.withTimestamps(instance.getTimestamps());
this.withWords(instance.getWords());
}
public A addToBools(String key,Boolean value){
if(key != null && value != null) {this.bools.put(key, value);} return (A)this;
}
public A addToBools(Map map){
if(map != null) { this.bools.putAll(map);} return (A)this;
}
public A removeFromBools(String key){
if(key != null && this.bools != null) {this.bools.remove(key);} return (A)this;
}
public A removeFromBools(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.bools != null){this.bools.remove(key);}}} return (A)this;
}
public Map getBools(){
return this.bools;
}
public A withBools(Map bools){
if (this.bools == null) { this.bools = new LinkedHashMap();} else {this.bools.clear();}
if (bools != null) {this.bools.putAll(bools);} return (A) this;
}
public Boolean hasBools(){
return this.bools != null;
}
public A addToBytes(String key,String value){
if(key != null && value != null) {this.bytes.put(key, value);} return (A)this;
}
public A addToBytes(Map map){
if(map != null) { this.bytes.putAll(map);} return (A)this;
}
public A removeFromBytes(String key){
if(key != null && this.bytes != null) {this.bytes.remove(key);} return (A)this;
}
public A removeFromBytes(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.bytes != null){this.bytes.remove(key);}}} return (A)this;
}
public Map getBytes(){
return this.bytes;
}
public A withBytes(Map bytes){
if (this.bytes == null) { this.bytes = new LinkedHashMap();} else {this.bytes.clear();}
if (bytes != null) {this.bytes.putAll(bytes);} return (A) this;
}
public Boolean hasBytes(){
return this.bytes != null;
}
public A addToDoubles(String key,Double value){
if(key != null && value != null) {this.doubles.put(key, value);} return (A)this;
}
public A addToDoubles(Map map){
if(map != null) { this.doubles.putAll(map);} return (A)this;
}
public A removeFromDoubles(String key){
if(key != null && this.doubles != null) {this.doubles.remove(key);} return (A)this;
}
public A removeFromDoubles(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.doubles != null){this.doubles.remove(key);}}} return (A)this;
}
public Map getDoubles(){
return this.doubles;
}
public A withDoubles(Map doubles){
if (this.doubles == null) { this.doubles = new LinkedHashMap();} else {this.doubles.clear();}
if (doubles != null) {this.doubles.putAll(doubles);} return (A) this;
}
public Boolean hasDoubles(){
return this.doubles != null;
}
public A addToDurations(String key,Long value){
if(key != null && value != null) {this.durations.put(key, value);} return (A)this;
}
public A addToDurations(Map map){
if(map != null) { this.durations.putAll(map);} return (A)this;
}
public A removeFromDurations(String key){
if(key != null && this.durations != null) {this.durations.remove(key);} return (A)this;
}
public A removeFromDurations(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.durations != null){this.durations.remove(key);}}} return (A)this;
}
public Map getDurations(){
return this.durations;
}
public A withDurations(Map durations){
if (this.durations == null) { this.durations = new LinkedHashMap();} else {this.durations.clear();}
if (durations != null) {this.durations.putAll(durations);} return (A) this;
}
public Boolean hasDurations(){
return this.durations != null;
}
public A addToInt64s(String key,Long value){
if(key != null && value != null) {this.int64s.put(key, value);} return (A)this;
}
public A addToInt64s(Map map){
if(map != null) { this.int64s.putAll(map);} return (A)this;
}
public A removeFromInt64s(String key){
if(key != null && this.int64s != null) {this.int64s.remove(key);} return (A)this;
}
public A removeFromInt64s(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.int64s != null){this.int64s.remove(key);}}} return (A)this;
}
public Map getInt64s(){
return this.int64s;
}
public A withInt64s(Map int64s){
if (this.int64s == null) { this.int64s = new LinkedHashMap();} else {this.int64s.clear();}
if (int64s != null) {this.int64s.putAll(int64s);} return (A) this;
}
public Boolean hasInt64s(){
return this.int64s != null;
}
public A addToStringMaps(String key,StringMap value){
if(key != null && value != null) {this.stringMaps.put(key, value);} return (A)this;
}
public A addToStringMaps(Map map){
if(map != null) { this.stringMaps.putAll(map);} return (A)this;
}
public A removeFromStringMaps(String key){
if(key != null && this.stringMaps != null) {this.stringMaps.remove(key);} return (A)this;
}
public A removeFromStringMaps(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.stringMaps != null){this.stringMaps.remove(key);}}} return (A)this;
}
public Map getStringMaps(){
return this.stringMaps;
}
public A withStringMaps(Map stringMaps){
if (this.stringMaps == null) { this.stringMaps = new LinkedHashMap();} else {this.stringMaps.clear();}
if (stringMaps != null) {this.stringMaps.putAll(stringMaps);} return (A) this;
}
public Boolean hasStringMaps(){
return this.stringMaps != null;
}
public A addToStrings(String key,Integer value){
if(key != null && value != null) {this.strings.put(key, value);} return (A)this;
}
public A addToStrings(Map map){
if(map != null) { this.strings.putAll(map);} return (A)this;
}
public A removeFromStrings(String key){
if(key != null && this.strings != null) {this.strings.remove(key);} return (A)this;
}
public A removeFromStrings(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.strings != null){this.strings.remove(key);}}} return (A)this;
}
public Map getStrings(){
return this.strings;
}
public A withStrings(Map strings){
if (this.strings == null) { this.strings = new LinkedHashMap();} else {this.strings.clear();}
if (strings != null) {this.strings.putAll(strings);} return (A) this;
}
public Boolean hasStrings(){
return this.strings != null;
}
public A addToTimestamps(String key,String value){
if(key != null && value != null) {this.timestamps.put(key, value);} return (A)this;
}
public A addToTimestamps(Map map){
if(map != null) { this.timestamps.putAll(map);} return (A)this;
}
public A removeFromTimestamps(String key){
if(key != null && this.timestamps != null) {this.timestamps.remove(key);} return (A)this;
}
public A removeFromTimestamps(Map map){
if(map != null) { for(Object key : map.keySet()) {if (this.timestamps != null){this.timestamps.remove(key);}}} return (A)this;
}
public Map getTimestamps(){
return this.timestamps;
}
public A withTimestamps(Map timestamps){
if (this.timestamps == null) { this.timestamps = new LinkedHashMap();} else {this.timestamps.clear();}
if (timestamps != null) {this.timestamps.putAll(timestamps);} return (A) this;
}
public Boolean hasTimestamps(){
return this.timestamps != null;
}
public A addToWords(int index,String item){
if (this.words == null) {this.words = new ArrayList();}
this.words.add(index, item);
return (A)this;
}
public A setToWords(int index,String item){
this.words.set(index, item); return (A)this;
}
public A addToWords(String... items){
for (String item : items) {this.words.add(item);} return (A)this;
}
public A addAllToWords(Collection items){
for (String item : items) {this.words.add(item);} return (A)this;
}
public A removeFromWords(String... items){
for (String item : items) {if (this.words!= null){ this.words.remove(item);}} return (A)this;
}
public A removeAllFromWords(Collection items){
for (String item : items) {if (this.words!= null){ this.words.remove(item);}} return (A)this;
}
public List getWords(){
return this.words;
}
public String getWord(int index){
return this.words.get(index);
}
public String getFirstWord(){
return this.words.get(0);
}
public String getLastWord(){
return this.words.get(words.size() - 1);
}
public String getMatchingWord(me.snowdrop.istio.api.builder.Predicate predicate){
for (String item: words) { if(predicate.apply(item)){return item;} } return null;
}
public A withWords(List words){
if (this.words == null) { this.words = new ArrayList();} else {_visitables.removeAll(this.words); this.words.clear();}
if (words != null) {for (String item : words){this.addToWords(item);}} return (A) this;
}
public A withWords(String... words){
this.words.clear(); if (words != null) {for (String item :words){ this.addToWords(item);}} return (A) this;
}
public Boolean hasWords(){
return words != null && !words.isEmpty();
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
CompressedAttributesFluentImpl that = (CompressedAttributesFluentImpl) o;
if (bools != null ? !bools.equals(that.bools) :that.bools != null) return false;
if (bytes != null ? !bytes.equals(that.bytes) :that.bytes != null) return false;
if (doubles != null ? !doubles.equals(that.doubles) :that.doubles != null) return false;
if (durations != null ? !durations.equals(that.durations) :that.durations != null) return false;
if (int64s != null ? !int64s.equals(that.int64s) :that.int64s != null) return false;
if (stringMaps != null ? !stringMaps.equals(that.stringMaps) :that.stringMaps != null) return false;
if (strings != null ? !strings.equals(that.strings) :that.strings != null) return false;
if (timestamps != null ? !timestamps.equals(that.timestamps) :that.timestamps != null) return false;
if (words != null ? !words.equals(that.words) :that.words != null) return false;
return true;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy