org.openmetadata.schema.email.EmailTemplate 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 javax.validation.constraints.NotNull;
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
*
* Schema defining email templates.
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"template",
"placeHolders"
})
@Generated("jsonschema2pojo")
public class EmailTemplate {
/**
* Template data.
* (Required)
*
*/
@JsonProperty("template")
@JsonPropertyDescription("Template data.")
@NotNull
private String template;
/**
* List of placeholders.
* (Required)
*
*/
@JsonProperty("placeHolders")
@JsonDeserialize(as = java.util.LinkedHashSet.class)
@JsonPropertyDescription("List of placeholders.")
@Valid
@NotNull
private Set placeHolders = new LinkedHashSet();
/**
* Template data.
* (Required)
*
*/
@JsonProperty("template")
public String getTemplate() {
return template;
}
/**
* Template data.
* (Required)
*
*/
@JsonProperty("template")
public void setTemplate(String template) {
this.template = template;
}
public EmailTemplate withTemplate(String template) {
this.template = template;
return this;
}
/**
* List of placeholders.
* (Required)
*
*/
@JsonProperty("placeHolders")
public Set getPlaceHolders() {
return placeHolders;
}
/**
* List of placeholders.
* (Required)
*
*/
@JsonProperty("placeHolders")
public void setPlaceHolders(Set placeHolders) {
this.placeHolders = placeHolders;
}
public EmailTemplate withPlaceHolders(Set placeHolders) {
this.placeHolders = placeHolders;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(EmailTemplate.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("template");
sb.append('=');
sb.append(((this.template == null)?"":this.template));
sb.append(',');
sb.append("placeHolders");
sb.append('=');
sb.append(((this.placeHolders == null)?"":this.placeHolders));
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.template == null)? 0 :this.template.hashCode()));
result = ((result* 31)+((this.placeHolders == null)? 0 :this.placeHolders.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof EmailTemplate) == false) {
return false;
}
EmailTemplate rhs = ((EmailTemplate) other);
return (((this.template == rhs.template)||((this.template!= null)&&this.template.equals(rhs.template)))&&((this.placeHolders == rhs.placeHolders)||((this.placeHolders!= null)&&this.placeHolders.equals(rhs.placeHolders))));
}
}