org.openmetadata.schema.entity.app.external.CollateAIAppConfig Maven / Gradle / Ivy
package org.openmetadata.schema.entity.app.external;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import javax.validation.constraints.NotNull;
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;
/**
* CollateAIAppConfig
*
* Configuration for the CollateAI External Application.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"type",
"filter",
"patchIfEmpty"
})
@Generated("jsonschema2pojo")
public class CollateAIAppConfig {
/**
* Application type.
*
*/
@JsonProperty("type")
@JsonPropertyDescription("Application type.")
private CollateAIAppConfig.CollateAIAppType type = CollateAIAppConfig.CollateAIAppType.fromValue("CollateAI");
/**
* Filter
*
* Query filter to be passed to ES. E.g., `{"query":{"bool":{"must":[{"bool":{"should":[{"term":{"domain.displayName.keyword":"DG Anim"}}]}}]}}}`. This is the same payload as in the Explore page.
* (Required)
*
*/
@JsonProperty("filter")
@JsonPropertyDescription("Query filter to be passed to ES. E.g., `{\"query\":{\"bool\":{\"must\":[{\"bool\":{\"should\":[{\"term\":{\"domain.displayName.keyword\":\"DG Anim\"}}]}}]}}}`. This is the same payload as in the Explore page.")
@NotNull
private String filter;
/**
* Patch Description If Empty
*
* Patch the description if it is empty, instead of raising a suggestion
*
*/
@JsonProperty("patchIfEmpty")
@JsonPropertyDescription("Patch the description if it is empty, instead of raising a suggestion")
private Boolean patchIfEmpty = false;
/**
* Application type.
*
*/
@JsonProperty("type")
public CollateAIAppConfig.CollateAIAppType getType() {
return type;
}
/**
* Application type.
*
*/
@JsonProperty("type")
public void setType(CollateAIAppConfig.CollateAIAppType type) {
this.type = type;
}
public CollateAIAppConfig withType(CollateAIAppConfig.CollateAIAppType type) {
this.type = type;
return this;
}
/**
* Filter
*
* Query filter to be passed to ES. E.g., `{"query":{"bool":{"must":[{"bool":{"should":[{"term":{"domain.displayName.keyword":"DG Anim"}}]}}]}}}`. This is the same payload as in the Explore page.
* (Required)
*
*/
@JsonProperty("filter")
public String getFilter() {
return filter;
}
/**
* Filter
*
* Query filter to be passed to ES. E.g., `{"query":{"bool":{"must":[{"bool":{"should":[{"term":{"domain.displayName.keyword":"DG Anim"}}]}}]}}}`. This is the same payload as in the Explore page.
* (Required)
*
*/
@JsonProperty("filter")
public void setFilter(String filter) {
this.filter = filter;
}
public CollateAIAppConfig withFilter(String filter) {
this.filter = filter;
return this;
}
/**
* Patch Description If Empty
*
* Patch the description if it is empty, instead of raising a suggestion
*
*/
@JsonProperty("patchIfEmpty")
public Boolean getPatchIfEmpty() {
return patchIfEmpty;
}
/**
* Patch Description If Empty
*
* Patch the description if it is empty, instead of raising a suggestion
*
*/
@JsonProperty("patchIfEmpty")
public void setPatchIfEmpty(Boolean patchIfEmpty) {
this.patchIfEmpty = patchIfEmpty;
}
public CollateAIAppConfig withPatchIfEmpty(Boolean patchIfEmpty) {
this.patchIfEmpty = patchIfEmpty;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(CollateAIAppConfig.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("filter");
sb.append('=');
sb.append(((this.filter == null)?"":this.filter));
sb.append(',');
sb.append("patchIfEmpty");
sb.append('=');
sb.append(((this.patchIfEmpty == null)?"":this.patchIfEmpty));
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.type == null)? 0 :this.type.hashCode()));
result = ((result* 31)+((this.patchIfEmpty == null)? 0 :this.patchIfEmpty.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof CollateAIAppConfig) == false) {
return false;
}
CollateAIAppConfig rhs = ((CollateAIAppConfig) other);
return ((((this.filter == rhs.filter)||((this.filter!= null)&&this.filter.equals(rhs.filter)))&&((this.type == rhs.type)||((this.type!= null)&&this.type.equals(rhs.type))))&&((this.patchIfEmpty == rhs.patchIfEmpty)||((this.patchIfEmpty!= null)&&this.patchIfEmpty.equals(rhs.patchIfEmpty))));
}
/**
* Application type.
*
*/
@Generated("jsonschema2pojo")
public enum CollateAIAppType {
COLLATE_AI("CollateAI");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (CollateAIAppConfig.CollateAIAppType c: values()) {
CONSTANTS.put(c.value, c);
}
}
CollateAIAppType(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static CollateAIAppConfig.CollateAIAppType fromValue(String value) {
CollateAIAppConfig.CollateAIAppType constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}