org.openmetadata.schema.email.TemplateValidationResponse Maven / Gradle / Ivy
package org.openmetadata.schema.email;
import java.util.LinkedHashSet;
import java.util.Set;
import javax.annotation.processing.Generated;
import javax.validation.Valid;
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.databind.annotation.JsonDeserialize;
/**
* Email Template Validation Reponse
*
* Schema defining email templates.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"isValid",
"missingPlaceholder",
"additionalPlaceholder",
"message"
})
@Generated("jsonschema2pojo")
public class TemplateValidationResponse {
/**
* Flag indicating if the template is valid.
*
*/
@JsonProperty("isValid")
@JsonPropertyDescription("Flag indicating if the template is valid.")
private Boolean isValid;
/**
* List of missing placeholders.
*
*/
@JsonProperty("missingPlaceholder")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("List of missing placeholders.")
@Valid
private Set missingPlaceholder = new LinkedHashSet();
/**
* List of additional placeholders.
*
*/
@JsonProperty("additionalPlaceholder")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("List of additional placeholders.")
@Valid
private Set additionalPlaceholder = new LinkedHashSet();
/**
* Validation message.
*
*/
@JsonProperty("message")
@JsonPropertyDescription("Validation message.")
private String message;
/**
* Flag indicating if the template is valid.
*
*/
@JsonProperty("isValid")
public Boolean getIsValid() {
return isValid;
}
/**
* Flag indicating if the template is valid.
*
*/
@JsonProperty("isValid")
public void setIsValid(Boolean isValid) {
this.isValid = isValid;
}
public TemplateValidationResponse withIsValid(Boolean isValid) {
this.isValid = isValid;
return this;
}
/**
* List of missing placeholders.
*
*/
@JsonProperty("missingPlaceholder")
public Set getMissingPlaceholder() {
return missingPlaceholder;
}
/**
* List of missing placeholders.
*
*/
@JsonProperty("missingPlaceholder")
public void setMissingPlaceholder(Set missingPlaceholder) {
this.missingPlaceholder = missingPlaceholder;
}
public TemplateValidationResponse withMissingPlaceholder(Set missingPlaceholder) {
this.missingPlaceholder = missingPlaceholder;
return this;
}
/**
* List of additional placeholders.
*
*/
@JsonProperty("additionalPlaceholder")
public Set getAdditionalPlaceholder() {
return additionalPlaceholder;
}
/**
* List of additional placeholders.
*
*/
@JsonProperty("additionalPlaceholder")
public void setAdditionalPlaceholder(Set additionalPlaceholder) {
this.additionalPlaceholder = additionalPlaceholder;
}
public TemplateValidationResponse withAdditionalPlaceholder(Set additionalPlaceholder) {
this.additionalPlaceholder = additionalPlaceholder;
return this;
}
/**
* Validation message.
*
*/
@JsonProperty("message")
public String getMessage() {
return message;
}
/**
* Validation message.
*
*/
@JsonProperty("message")
public void setMessage(String message) {
this.message = message;
}
public TemplateValidationResponse withMessage(String message) {
this.message = message;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(TemplateValidationResponse.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("isValid");
sb.append('=');
sb.append(((this.isValid == null)?"":this.isValid));
sb.append(',');
sb.append("missingPlaceholder");
sb.append('=');
sb.append(((this.missingPlaceholder == null)?"":this.missingPlaceholder));
sb.append(',');
sb.append("additionalPlaceholder");
sb.append('=');
sb.append(((this.additionalPlaceholder == null)?"":this.additionalPlaceholder));
sb.append(',');
sb.append("message");
sb.append('=');
sb.append(((this.message == null)?"":this.message));
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.additionalPlaceholder == null)? 0 :this.additionalPlaceholder.hashCode()));
result = ((result* 31)+((this.message == null)? 0 :this.message.hashCode()));
result = ((result* 31)+((this.missingPlaceholder == null)? 0 :this.missingPlaceholder.hashCode()));
result = ((result* 31)+((this.isValid == null)? 0 :this.isValid.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof TemplateValidationResponse) == false) {
return false;
}
TemplateValidationResponse rhs = ((TemplateValidationResponse) other);
return (((((this.additionalPlaceholder == rhs.additionalPlaceholder)||((this.additionalPlaceholder!= null)&&this.additionalPlaceholder.equals(rhs.additionalPlaceholder)))&&((this.message == rhs.message)||((this.message!= null)&&this.message.equals(rhs.message))))&&((this.missingPlaceholder == rhs.missingPlaceholder)||((this.missingPlaceholder!= null)&&this.missingPlaceholder.equals(rhs.missingPlaceholder))))&&((this.isValid == rhs.isValid)||((this.isValid!= null)&&this.isValid.equals(rhs.isValid))));
}
}