org.openmetadata.schema.dataInsight.custom.SummaryCard Maven / Gradle / Ivy
package org.openmetadata.schema.dataInsight.custom;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* SummaryCard
*
* Summary Card
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"function",
"field",
"filter",
"treeFilter",
"formula"
})
@Generated("jsonschema2pojo")
public class SummaryCard {
/**
* Type of the data insight chart.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Type of the data insight chart.")
private SummaryCard.Type type = SummaryCard.Type.fromValue("SummaryCard");
/**
* aggregation function for chart
*
*/
@JsonProperty("function")
@JsonPropertyDescription("aggregation function for chart")
private Function function;
/**
* Filter field for the data insight chart.
*
*/
@JsonProperty("field")
@JsonPropertyDescription("Filter field for the data insight chart.")
private String field;
/**
* Filter value for the data insight chart.
*
*/
@JsonProperty("filter")
@JsonPropertyDescription("Filter value for the data insight chart.")
private String filter;
/**
* Tree filter value for the data insight chart. Needed for UI to recreate advance filter tree.
*
*/
@JsonProperty("treeFilter")
@JsonPropertyDescription("Tree filter value for the data insight chart. Needed for UI to recreate advance filter tree.")
private String treeFilter;
/**
* Formula for the data insight chart calculation.
*
*/
@JsonProperty("formula")
@JsonPropertyDescription("Formula for the data insight chart calculation.")
private String formula;
/**
* Type of the data insight chart.
*
*/
@JsonProperty("type")
public SummaryCard.Type getType() {
return type;
}
/**
* Type of the data insight chart.
*
*/
@JsonProperty("type")
public void setType(SummaryCard.Type type) {
this.type = type;
}
public SummaryCard withType(SummaryCard.Type type) {
this.type = type;
return this;
}
/**
* aggregation function for chart
*
*/
@JsonProperty("function")
public Function getFunction() {
return function;
}
/**
* aggregation function for chart
*
*/
@JsonProperty("function")
public void setFunction(Function function) {
this.function = function;
}
public SummaryCard withFunction(Function function) {
this.function = function;
return this;
}
/**
* Filter field for the data insight chart.
*
*/
@JsonProperty("field")
public String getField() {
return field;
}
/**
* Filter field for the data insight chart.
*
*/
@JsonProperty("field")
public void setField(String field) {
this.field = field;
}
public SummaryCard withField(String field) {
this.field = field;
return this;
}
/**
* Filter value for the data insight chart.
*
*/
@JsonProperty("filter")
public String getFilter() {
return filter;
}
/**
* Filter value for the data insight chart.
*
*/
@JsonProperty("filter")
public void setFilter(String filter) {
this.filter = filter;
}
public SummaryCard withFilter(String filter) {
this.filter = filter;
return this;
}
/**
* Tree filter value for the data insight chart. Needed for UI to recreate advance filter tree.
*
*/
@JsonProperty("treeFilter")
public String getTreeFilter() {
return treeFilter;
}
/**
* Tree filter value for the data insight chart. Needed for UI to recreate advance filter tree.
*
*/
@JsonProperty("treeFilter")
public void setTreeFilter(String treeFilter) {
this.treeFilter = treeFilter;
}
public SummaryCard withTreeFilter(String treeFilter) {
this.treeFilter = treeFilter;
return this;
}
/**
* Formula for the data insight chart calculation.
*
*/
@JsonProperty("formula")
public String getFormula() {
return formula;
}
/**
* Formula for the data insight chart calculation.
*
*/
@JsonProperty("formula")
public void setFormula(String formula) {
this.formula = formula;
}
public SummaryCard withFormula(String formula) {
this.formula = formula;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(SummaryCard.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("type");
sb.append('=');
sb.append(((this.type == null)?"":this.type));
sb.append(',');
sb.append("function");
sb.append('=');
sb.append(((this.function == null)?"":this.function));
sb.append(',');
sb.append("field");
sb.append('=');
sb.append(((this.field == null)?"":this.field));
sb.append(',');
sb.append("filter");
sb.append('=');
sb.append(((this.filter == null)?"":this.filter));
sb.append(',');
sb.append("treeFilter");
sb.append('=');
sb.append(((this.treeFilter == null)?"":this.treeFilter));
sb.append(',');
sb.append("formula");
sb.append('=');
sb.append(((this.formula == null)?"":this.formula));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.filter == null)? 0 :this.filter.hashCode()));
result = ((result* 31)+((this.field == null)? 0 :this.field.hashCode()));
result = ((result* 31)+((this.function == null)? 0 :this.function.hashCode()));
result = ((result* 31)+((this.formula == null)? 0 :this.formula.hashCode()));
result = ((result* 31)+((this.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.treeFilter == null)? 0 :this.treeFilter.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof SummaryCard) == false) {
return false;
}
SummaryCard rhs = ((SummaryCard) other);
return (((((((this.filter == rhs.filter)||((this.filter!= null)&&this.filter.equals(rhs.filter)))&&((this.field == rhs.field)||((this.field!= null)&&this.field.equals(rhs.field))))&&((this.function == rhs.function)||((this.function!= null)&&this.function.equals(rhs.function))))&&((this.formula == rhs.formula)||((this.formula!= null)&&this.formula.equals(rhs.formula))))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.treeFilter == rhs.treeFilter)||((this.treeFilter!= null)&&this.treeFilter.equals(rhs.treeFilter))));
}
/**
* Type of the data insight chart.
*
*/
@Generated("jsonschema2pojo")
public enum Type {
SUMMARY_CARD("SummaryCard");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (SummaryCard.Type c: values()) {
CONSTANTS.put(c.value, c);
}
}
Type(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static SummaryCard.Type fromValue(String value) {
SummaryCard.Type constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}