All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openmetadata.schema.api.data.CreateCustomProperty Maven / Gradle / Ivy

There is a newer version: 1.6.0-rc1
Show newest version

package org.openmetadata.schema.api.data;

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;
import org.openmetadata.schema.type.CustomPropertyConfig;
import org.openmetadata.schema.type.EntityReference;


/**
 * CreateCustomPropertyRequest
 * 

* Create Custom Property Model entity request * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "name", "description", "propertyType", "customPropertyConfig" }) @Generated("jsonschema2pojo") public class CreateCustomProperty { /** * 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; /** * Text in Markdown format.@om-field-type * */ @JsonProperty("description") @JsonPropertyDescription("Text in Markdown format.") private String description; /** * 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. * (Required) * */ @JsonProperty("propertyType") @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 @NotNull private EntityReference propertyType; /** * CustomPropertyConfig *

* Config to define constraints around CustomProperty * */ @JsonProperty("customPropertyConfig") @JsonPropertyDescription("Config to define constraints around CustomProperty") @Valid private CustomPropertyConfig customPropertyConfig; /** * 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 CreateCustomProperty withName(String name) { this.name = name; 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 CreateCustomProperty withDescription(String description) { this.description = description; 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. * (Required) * */ @JsonProperty("propertyType") public EntityReference getPropertyType() { return propertyType; } /** * 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. * (Required) * */ @JsonProperty("propertyType") public void setPropertyType(EntityReference propertyType) { this.propertyType = propertyType; } public CreateCustomProperty withPropertyType(EntityReference propertyType) { this.propertyType = propertyType; return this; } /** * CustomPropertyConfig *

* Config to define constraints around CustomProperty * */ @JsonProperty("customPropertyConfig") public CustomPropertyConfig getCustomPropertyConfig() { return customPropertyConfig; } /** * CustomPropertyConfig *

* Config to define constraints around CustomProperty * */ @JsonProperty("customPropertyConfig") public void setCustomPropertyConfig(CustomPropertyConfig customPropertyConfig) { this.customPropertyConfig = customPropertyConfig; } public CreateCustomProperty withCustomPropertyConfig(CustomPropertyConfig customPropertyConfig) { this.customPropertyConfig = customPropertyConfig; return this; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(CreateCustomProperty.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("description"); sb.append('='); sb.append(((this.description == null)?"":this.description)); sb.append(','); sb.append("propertyType"); sb.append('='); sb.append(((this.propertyType == null)?"":this.propertyType)); sb.append(','); sb.append("customPropertyConfig"); sb.append('='); sb.append(((this.customPropertyConfig == null)?"":this.customPropertyConfig)); 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.name == null)? 0 :this.name.hashCode())); result = ((result* 31)+((this.description == null)? 0 :this.description.hashCode())); result = ((result* 31)+((this.propertyType == null)? 0 :this.propertyType.hashCode())); result = ((result* 31)+((this.customPropertyConfig == null)? 0 :this.customPropertyConfig.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof CreateCustomProperty) == false) { return false; } CreateCustomProperty rhs = ((CreateCustomProperty) other); return (((((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.propertyType == rhs.propertyType)||((this.propertyType!= null)&&this.propertyType.equals(rhs.propertyType))))&&((this.customPropertyConfig == rhs.customPropertyConfig)||((this.customPropertyConfig!= null)&&this.customPropertyConfig.equals(rhs.customPropertyConfig)))); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy