org.openmetadata.schema.metadataIngestion.storage.ContainerMetadataEntry Maven / Gradle / Ivy
package org.openmetadata.schema.metadataIngestion.storage;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.processing.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
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.Column;
/**
* Config properties for a container found in a user-supplied metadata config
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"dataPath",
"structureFormat",
"unstructuredFormats",
"separator",
"isPartitioned",
"partitionColumns"
})
@Generated("jsonschema2pojo")
public class ContainerMetadataEntry {
/**
* Data path
*
* The path where the data resides in the container, excluding the bucket name
* (Required)
*
*/
@JsonProperty("dataPath")
@JsonPropertyDescription("The path where the data resides in the container, excluding the bucket name")
@NotNull
private String dataPath;
/**
* Schema format
*
* What's the schema format for the container, eg. avro, parquet, csv.
*
*/
@JsonProperty("structureFormat")
@JsonPropertyDescription("What's the schema format for the container, eg. avro, parquet, csv.")
private String structureFormat = null;
/**
* Unstructured format
*
* What the unstructured formats you want to ingest, eg. png, pdf, jpg.
*
*/
@JsonProperty("unstructuredFormats")
@JsonPropertyDescription("What the unstructured formats you want to ingest, eg. png, pdf, jpg.")
@Valid
private List unstructuredFormats = null;
/**
* Separator
*
* For delimited files such as CSV, what is the separator being used?
*
*/
@JsonProperty("separator")
@JsonPropertyDescription("For delimited files such as CSV, what is the separator being used?")
private String separator = null;
/**
* Is Partitioned
*
* Flag indicating whether the container's data is partitioned
*
*/
@JsonProperty("isPartitioned")
@JsonPropertyDescription("Flag indicating whether the container's data is partitioned")
private Boolean isPartitioned = false;
/**
* Partition Columns
*
* What are the partition columns in case the container's data is partitioned
*
*/
@JsonProperty("partitionColumns")
@JsonPropertyDescription("What are the partition columns in case the container's data is partitioned")
@Valid
private List partitionColumns = null;
@JsonIgnore
@Valid
private Map additionalProperties = new LinkedHashMap();
/**
* Data path
*
* The path where the data resides in the container, excluding the bucket name
* (Required)
*
*/
@JsonProperty("dataPath")
public String getDataPath() {
return dataPath;
}
/**
* Data path
*
* The path where the data resides in the container, excluding the bucket name
* (Required)
*
*/
@JsonProperty("dataPath")
public void setDataPath(String dataPath) {
this.dataPath = dataPath;
}
public ContainerMetadataEntry withDataPath(String dataPath) {
this.dataPath = dataPath;
return this;
}
/**
* Schema format
*
* What's the schema format for the container, eg. avro, parquet, csv.
*
*/
@JsonProperty("structureFormat")
public String getStructureFormat() {
return structureFormat;
}
/**
* Schema format
*
* What's the schema format for the container, eg. avro, parquet, csv.
*
*/
@JsonProperty("structureFormat")
public void setStructureFormat(String structureFormat) {
this.structureFormat = structureFormat;
}
public ContainerMetadataEntry withStructureFormat(String structureFormat) {
this.structureFormat = structureFormat;
return this;
}
/**
* Unstructured format
*
* What the unstructured formats you want to ingest, eg. png, pdf, jpg.
*
*/
@JsonProperty("unstructuredFormats")
public List getUnstructuredFormats() {
return unstructuredFormats;
}
/**
* Unstructured format
*
* What the unstructured formats you want to ingest, eg. png, pdf, jpg.
*
*/
@JsonProperty("unstructuredFormats")
public void setUnstructuredFormats(List unstructuredFormats) {
this.unstructuredFormats = unstructuredFormats;
}
public ContainerMetadataEntry withUnstructuredFormats(List unstructuredFormats) {
this.unstructuredFormats = unstructuredFormats;
return this;
}
/**
* Separator
*
* For delimited files such as CSV, what is the separator being used?
*
*/
@JsonProperty("separator")
public String getSeparator() {
return separator;
}
/**
* Separator
*
* For delimited files such as CSV, what is the separator being used?
*
*/
@JsonProperty("separator")
public void setSeparator(String separator) {
this.separator = separator;
}
public ContainerMetadataEntry withSeparator(String separator) {
this.separator = separator;
return this;
}
/**
* Is Partitioned
*
* Flag indicating whether the container's data is partitioned
*
*/
@JsonProperty("isPartitioned")
public Boolean getIsPartitioned() {
return isPartitioned;
}
/**
* Is Partitioned
*
* Flag indicating whether the container's data is partitioned
*
*/
@JsonProperty("isPartitioned")
public void setIsPartitioned(Boolean isPartitioned) {
this.isPartitioned = isPartitioned;
}
public ContainerMetadataEntry withIsPartitioned(Boolean isPartitioned) {
this.isPartitioned = isPartitioned;
return this;
}
/**
* Partition Columns
*
* What are the partition columns in case the container's data is partitioned
*
*/
@JsonProperty("partitionColumns")
public List getPartitionColumns() {
return partitionColumns;
}
/**
* Partition Columns
*
* What are the partition columns in case the container's data is partitioned
*
*/
@JsonProperty("partitionColumns")
public void setPartitionColumns(List partitionColumns) {
this.partitionColumns = partitionColumns;
}
public ContainerMetadataEntry withPartitionColumns(List partitionColumns) {
this.partitionColumns = partitionColumns;
return this;
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
public ContainerMetadataEntry withAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(ContainerMetadataEntry.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("dataPath");
sb.append('=');
sb.append(((this.dataPath == null)?"":this.dataPath));
sb.append(',');
sb.append("structureFormat");
sb.append('=');
sb.append(((this.structureFormat == null)?"":this.structureFormat));
sb.append(',');
sb.append("unstructuredFormats");
sb.append('=');
sb.append(((this.unstructuredFormats == null)?"":this.unstructuredFormats));
sb.append(',');
sb.append("separator");
sb.append('=');
sb.append(((this.separator == null)?"":this.separator));
sb.append(',');
sb.append("isPartitioned");
sb.append('=');
sb.append(((this.isPartitioned == null)?"":this.isPartitioned));
sb.append(',');
sb.append("partitionColumns");
sb.append('=');
sb.append(((this.partitionColumns == null)?"":this.partitionColumns));
sb.append(',');
sb.append("additionalProperties");
sb.append('=');
sb.append(((this.additionalProperties == null)?"":this.additionalProperties));
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.structureFormat == null)? 0 :this.structureFormat.hashCode()));
result = ((result* 31)+((this.partitionColumns == null)? 0 :this.partitionColumns.hashCode()));
result = ((result* 31)+((this.unstructuredFormats == null)? 0 :this.unstructuredFormats.hashCode()));
result = ((result* 31)+((this.isPartitioned == null)? 0 :this.isPartitioned.hashCode()));
result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
result = ((result* 31)+((this.separator == null)? 0 :this.separator.hashCode()));
result = ((result* 31)+((this.dataPath == null)? 0 :this.dataPath.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof ContainerMetadataEntry) == false) {
return false;
}
ContainerMetadataEntry rhs = ((ContainerMetadataEntry) other);
return ((((((((this.structureFormat == rhs.structureFormat)||((this.structureFormat!= null)&&this.structureFormat.equals(rhs.structureFormat)))&&((this.partitionColumns == rhs.partitionColumns)||((this.partitionColumns!= null)&&this.partitionColumns.equals(rhs.partitionColumns))))&&((this.unstructuredFormats == rhs.unstructuredFormats)||((this.unstructuredFormats!= null)&&this.unstructuredFormats.equals(rhs.unstructuredFormats))))&&((this.isPartitioned == rhs.isPartitioned)||((this.isPartitioned!= null)&&this.isPartitioned.equals(rhs.isPartitioned))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.separator == rhs.separator)||((this.separator!= null)&&this.separator.equals(rhs.separator))))&&((this.dataPath == rhs.dataPath)||((this.dataPath!= null)&&this.dataPath.equals(rhs.dataPath))));
}
}