com.scaleset.search.Bucket Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaleset-search Show documentation
Show all versions of scaleset-search Show documentation
Java object model for representing query requests in REST protocols.
package com.scaleset.search;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.scaleset.utils.Extensible;
import java.util.HashMap;
import java.util.Map;
@JsonInclude(Include.NON_EMPTY)
@JsonPropertyOrder({"label", "key", "count", "stats", "aggs"})
public final class Bucket extends Extensible {
private long count;
private String label;
private Object key;
private Stats stats;
private Map aggs = new HashMap<>();
public Bucket() {
}
public Bucket(Object key, long count) {
this.key = key;
this.count = count;
this.label = null;
}
public Bucket(Object key, long count, String label) {
this.key = key;
this.count = count;
this.label = label;
}
public Bucket(Object key, long count, String label, Stats stats) {
this.key = key;
this.count = count;
this.label = label;
this.stats = stats;
}
public Map getAggs() {
return aggs;
}
public long getCount() {
return count;
}
public String getLabel() {
return label;
}
public Stats getStats() {
return stats;
}
public void setStats(Stats stats) {
this.stats = stats;
}
public Object getKey() {
return key;
}
public void setAggs(Map aggs) {
this.aggs = aggs;
}
public void setLabel(String label) {
this.label = label;
}
public void setKey(Object key) {
this.key = key;
}
}