com.mailslurp.models.TemplateDto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mailslurp-client-java Show documentation
Show all versions of mailslurp-client-java Show documentation
Official MailSlurp email API - create real inboxes then send and receive emails and attachments from tests and code.
The newest version!
/*
* MailSlurp API
* MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
*
* The version of the OpenAPI document: 6.5.2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.mailslurp.models;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.mailslurp.models.TemplateVariable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
* Email template
*/
@ApiModel(description = "Email template")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-06-03T06:03:24.997Z[GMT]")
public class TemplateDto {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private UUID id;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_VARIABLES = "variables";
@SerializedName(SERIALIZED_NAME_VARIABLES)
private List variables = new ArrayList<>();
public static final String SERIALIZED_NAME_CONTENT = "content";
@SerializedName(SERIALIZED_NAME_CONTENT)
private String content;
public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
@SerializedName(SERIALIZED_NAME_CREATED_AT)
private OffsetDateTime createdAt;
public TemplateDto id(UUID id) {
this.id = id;
return this;
}
/**
* ID of template
* @return id
**/
@ApiModelProperty(required = true, value = "ID of template")
public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public TemplateDto name(String name) {
this.name = name;
return this;
}
/**
* Template name
* @return name
**/
@ApiModelProperty(required = true, value = "Template name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public TemplateDto variables(List variables) {
this.variables = variables;
return this;
}
public TemplateDto addVariablesItem(TemplateVariable variablesItem) {
this.variables.add(variablesItem);
return this;
}
/**
* Variables available in template that can be replaced with values
* @return variables
**/
@ApiModelProperty(required = true, value = "Variables available in template that can be replaced with values")
public List getVariables() {
return variables;
}
public void setVariables(List variables) {
this.variables = variables;
}
public TemplateDto content(String content) {
this.content = content;
return this;
}
/**
* Content of the template
* @return content
**/
@ApiModelProperty(required = true, value = "Content of the template")
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public TemplateDto createdAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* Created at time
* @return createdAt
**/
@ApiModelProperty(required = true, value = "Created at time")
public OffsetDateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TemplateDto templateDto = (TemplateDto) o;
return Objects.equals(this.id, templateDto.id) &&
Objects.equals(this.name, templateDto.name) &&
Objects.equals(this.variables, templateDto.variables) &&
Objects.equals(this.content, templateDto.content) &&
Objects.equals(this.createdAt, templateDto.createdAt);
}
@Override
public int hashCode() {
return Objects.hash(id, name, variables, content, createdAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TemplateDto {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" variables: ").append(toIndentedString(variables)).append("\n");
sb.append(" content: ").append(toIndentedString(content)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}