org.openmetadata.schema.api.dataInsight.custom.CreateDataInsightCustomChart Maven / Gradle / Ivy
package org.openmetadata.schema.api.dataInsight.custom;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
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;
import org.openmetadata.schema.CreateEntity;
import org.openmetadata.schema.type.EntityReference;
/**
* CreateDataInsightCustomChart
*
* Payload to create a data insight custom chart
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"name",
"displayName",
"description",
"chartType",
"chartDetails",
"owner",
"dashboard"
})
@Generated("jsonschema2pojo")
public class CreateDataInsightCustomChart implements CreateEntity
{
/**
* Name that identifies an entity.
* (Required)
*
*/
@JsonProperty("name")
@JsonPropertyDescription("Name that identifies an entity.")
@Pattern(regexp = "^((?!::).)*$")
@Size(min = 1, max = 256)
@NotNull
private String name;
/**
* Display Name the data insight chart.
*
*/
@JsonProperty("displayName")
@JsonPropertyDescription("Display Name the data insight chart.")
private String displayName;
/**
* Text in Markdown format.@om-field-type
*
*/
@JsonProperty("description")
@JsonPropertyDescription("Text in Markdown format.")
private String description;
/**
* Type of chart, used for UI to render the chart
*
*/
@JsonProperty("chartType")
@JsonPropertyDescription("Type of chart, used for UI to render the chart")
private CreateDataInsightCustomChart.ChartType chartType;
/**
*
* (Required)
*
*/
@JsonProperty("chartDetails")
@NotNull
private Object chartDetails;
/**
* Entity Reference
*
* This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.
*
*/
@JsonProperty("owner")
@JsonPropertyDescription("This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.")
@Valid
private EntityReference owner;
/**
* Entity Reference
*
* This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.
*
*/
@JsonProperty("dashboard")
@JsonPropertyDescription("This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.")
@Valid
private EntityReference dashboard;
/**
* Name that identifies an entity.
* (Required)
*
*/
@JsonProperty("name")
public String getName() {
return name;
}
/**
* Name that identifies an entity.
* (Required)
*
*/
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
public CreateDataInsightCustomChart withName(String name) {
this.name = name;
return this;
}
/**
* Display Name the data insight chart.
*
*/
@JsonProperty("displayName")
public String getDisplayName() {
return displayName;
}
/**
* Display Name the data insight chart.
*
*/
@JsonProperty("displayName")
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public CreateDataInsightCustomChart withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}
/**
* Text in Markdown format.@om-field-type
*
*/
@JsonProperty("description")
public String getDescription() {
return description;
}
/**
* Text in Markdown format.@om-field-type
*
*/
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
public CreateDataInsightCustomChart withDescription(String description) {
this.description = description;
return this;
}
/**
* Type of chart, used for UI to render the chart
*
*/
@JsonProperty("chartType")
public CreateDataInsightCustomChart.ChartType getChartType() {
return chartType;
}
/**
* Type of chart, used for UI to render the chart
*
*/
@JsonProperty("chartType")
public void setChartType(CreateDataInsightCustomChart.ChartType chartType) {
this.chartType = chartType;
}
public CreateDataInsightCustomChart withChartType(CreateDataInsightCustomChart.ChartType chartType) {
this.chartType = chartType;
return this;
}
/**
*
* (Required)
*
*/
@JsonProperty("chartDetails")
public Object getChartDetails() {
return chartDetails;
}
/**
*
* (Required)
*
*/
@JsonProperty("chartDetails")
public void setChartDetails(Object chartDetails) {
this.chartDetails = chartDetails;
}
public CreateDataInsightCustomChart withChartDetails(Object chartDetails) {
this.chartDetails = chartDetails;
return this;
}
/**
* Entity Reference
*
* This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.
*
*/
@JsonProperty("owner")
public EntityReference getOwner() {
return owner;
}
/**
* Entity Reference
*
* This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.
*
*/
@JsonProperty("owner")
public void setOwner(EntityReference owner) {
this.owner = owner;
}
public CreateDataInsightCustomChart withOwner(EntityReference owner) {
this.owner = owner;
return this;
}
/**
* Entity Reference
*
* This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.
*
*/
@JsonProperty("dashboard")
public EntityReference getDashboard() {
return dashboard;
}
/**
* Entity Reference
*
* This schema defines the EntityReference type used for referencing an entity. EntityReference is used for capturing relationships from one entity to another. For example, a table has an attribute called database of type EntityReference that captures the relationship of a table `belongs to a` database.
*
*/
@JsonProperty("dashboard")
public void setDashboard(EntityReference dashboard) {
this.dashboard = dashboard;
}
public CreateDataInsightCustomChart withDashboard(EntityReference dashboard) {
this.dashboard = dashboard;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(CreateDataInsightCustomChart.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("name");
sb.append('=');
sb.append(((this.name == null)?"":this.name));
sb.append(',');
sb.append("displayName");
sb.append('=');
sb.append(((this.displayName == null)?"":this.displayName));
sb.append(',');
sb.append("description");
sb.append('=');
sb.append(((this.description == null)?"":this.description));
sb.append(',');
sb.append("chartType");
sb.append('=');
sb.append(((this.chartType == null)?"":this.chartType));
sb.append(',');
sb.append("chartDetails");
sb.append('=');
sb.append(((this.chartDetails == null)?"":this.chartDetails));
sb.append(',');
sb.append("owner");
sb.append('=');
sb.append(((this.owner == null)?"":this.owner));
sb.append(',');
sb.append("dashboard");
sb.append('=');
sb.append(((this.dashboard == null)?"":this.dashboard));
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.owner == null)? 0 :this.owner.hashCode()));
result = ((result* 31)+((this.displayName == null)? 0 :this.displayName.hashCode()));
result = ((result* 31)+((this.chartDetails == null)? 0 :this.chartDetails.hashCode()));
result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
result = ((result* 31)+((this.chartType == null)? 0 :this.chartType.hashCode()));
result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode()));
result = ((result* 31)+((this.dashboard == null)? 0 :this.dashboard.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof CreateDataInsightCustomChart) == false) {
return false;
}
CreateDataInsightCustomChart rhs = ((CreateDataInsightCustomChart) other);
return ((((((((this.owner == rhs.owner)||((this.owner!= null)&&this.owner.equals(rhs.owner)))&&((this.displayName == rhs.displayName)||((this.displayName!= null)&&this.displayName.equals(rhs.displayName))))&&((this.chartDetails == rhs.chartDetails)||((this.chartDetails!= null)&&this.chartDetails.equals(rhs.chartDetails))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.chartType == rhs.chartType)||((this.chartType!= null)&&this.chartType.equals(rhs.chartType))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.dashboard == rhs.dashboard)||((this.dashboard!= null)&&this.dashboard.equals(rhs.dashboard))));
}
/**
* Type of chart, used for UI to render the chart
*
*/
@Generated("jsonschema2pojo")
public enum ChartType {
LINE_CHART("LineChart"),
AREA_CHART("AreaChart"),
BAR_CHART("BarChart"),
SUMMARY_CARD("SummaryCard");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (CreateDataInsightCustomChart.ChartType c: values()) {
CONSTANTS.put(c.value, c);
}
}
ChartType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static CreateDataInsightCustomChart.ChartType fromValue(String value) {
CreateDataInsightCustomChart.ChartType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}