org.openmetadata.schema.entity.data.EntityHierarchy Maven / Gradle / Ivy
package org.openmetadata.schema.entity.data;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* EntityHierarchy
*
* This schema defines the entity hierarchy structure.@om-entity-type
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"name",
"displayName",
"description",
"fullyQualifiedName",
"children"
})
@Generated("jsonschema2pojo")
public class EntityHierarchy {
/**
* Unique id used to identify an entity.
* (Required)
*
*/
@JsonProperty("id")
@JsonPropertyDescription("Unique id used to identify an entity.")
@NotNull
private UUID id;
/**
* 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 that identifies this hierarchy.
*
*/
@JsonProperty("displayName")
@JsonPropertyDescription("Display name that identifies this hierarchy.")
private String displayName;
/**
* Text in Markdown format.@om-field-type
* (Required)
*
*/
@JsonProperty("description")
@JsonPropertyDescription("Text in Markdown format.")
@NotNull
private String description;
/**
* A unique name that identifies an entity. Example for table 'DatabaseService.Database.Schema.Table'.
*
*/
@JsonProperty("fullyQualifiedName")
@JsonPropertyDescription("A unique name that identifies an entity. Example for table 'DatabaseService.Database.Schema.Table'.")
@Size(min = 1, max = 3072)
private String fullyQualifiedName;
/**
* Other entities that are children of this entity.
*
*/
@JsonProperty("children")
@JsonPropertyDescription("Other entities that are children of this entity.")
@Valid
private List children = new ArrayList();
/**
* Unique id used to identify an entity.
* (Required)
*
*/
@JsonProperty("id")
public UUID getId() {
return id;
}
/**
* Unique id used to identify an entity.
* (Required)
*
*/
@JsonProperty("id")
public void setId(UUID id) {
this.id = id;
}
public EntityHierarchy withId(UUID id) {
this.id = id;
return this;
}
/**
* 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 EntityHierarchy withName(String name) {
this.name = name;
return this;
}
/**
* Display name that identifies this hierarchy.
*
*/
@JsonProperty("displayName")
public String getDisplayName() {
return displayName;
}
/**
* Display name that identifies this hierarchy.
*
*/
@JsonProperty("displayName")
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public EntityHierarchy withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}
/**
* Text in Markdown format.@om-field-type
* (Required)
*
*/
@JsonProperty("description")
public String getDescription() {
return description;
}
/**
* Text in Markdown format.@om-field-type
* (Required)
*
*/
@JsonProperty("description")
public void setDescription(String description) {
this.description = description;
}
public EntityHierarchy withDescription(String description) {
this.description = description;
return this;
}
/**
* A unique name that identifies an entity. Example for table 'DatabaseService.Database.Schema.Table'.
*
*/
@JsonProperty("fullyQualifiedName")
public String getFullyQualifiedName() {
return fullyQualifiedName;
}
/**
* A unique name that identifies an entity. Example for table 'DatabaseService.Database.Schema.Table'.
*
*/
@JsonProperty("fullyQualifiedName")
public void setFullyQualifiedName(String fullyQualifiedName) {
this.fullyQualifiedName = fullyQualifiedName;
}
public EntityHierarchy withFullyQualifiedName(String fullyQualifiedName) {
this.fullyQualifiedName = fullyQualifiedName;
return this;
}
/**
* Other entities that are children of this entity.
*
*/
@JsonProperty("children")
public List getChildren() {
return children;
}
/**
* Other entities that are children of this entity.
*
*/
@JsonProperty("children")
public void setChildren(List children) {
this.children = children;
}
public EntityHierarchy withChildren(List children) {
this.children = children;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(EntityHierarchy.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("id");
sb.append('=');
sb.append(((this.id == null)?"":this.id));
sb.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("fullyQualifiedName");
sb.append('=');
sb.append(((this.fullyQualifiedName == null)?"":this.fullyQualifiedName));
sb.append(',');
sb.append("children");
sb.append('=');
sb.append(((this.children == null)?"":this.children));
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.children == null)? 0 :this.children.hashCode()));
result = ((result* 31)+((this.displayName == null)? 0 :this.displayName.hashCode()));
result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode()));
result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode()));
result = ((result* 31)+((this.fullyQualifiedName == null)? 0 :this.fullyQualifiedName.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof EntityHierarchy) == false) {
return false;
}
EntityHierarchy rhs = ((EntityHierarchy) other);
return (((((((this.children == rhs.children)||((this.children!= null)&&this.children.equals(rhs.children)))&&((this.displayName == rhs.displayName)||((this.displayName!= null)&&this.displayName.equals(rhs.displayName))))&&((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name))))&&((this.description == rhs.description)||((this.description!= null)&&this.description.equals(rhs.description))))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.fullyQualifiedName == rhs.fullyQualifiedName)||((this.fullyQualifiedName!= null)&&this.fullyQualifiedName.equals(rhs.fullyQualifiedName))));
}
}