![JAR search and dependency download from the Maven repository](/logo.png)
com.mailslurp.models.ReplyToEmailOptions Maven / Gradle / Ivy
/*
* 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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
/**
* Options for replying to email with API
*/
@ApiModel(description = "Options for replying to email with API")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-05-03T02:14:29.400Z[GMT]")
public class ReplyToEmailOptions {
public static final String SERIALIZED_NAME_BODY = "body";
@SerializedName(SERIALIZED_NAME_BODY)
private String body;
public static final String SERIALIZED_NAME_IS_H_T_M_L = "isHTML";
@SerializedName(SERIALIZED_NAME_IS_H_T_M_L)
private Boolean isHTML;
public static final String SERIALIZED_NAME_FROM = "from";
@SerializedName(SERIALIZED_NAME_FROM)
private String from;
public static final String SERIALIZED_NAME_REPLY_TO = "replyTo";
@SerializedName(SERIALIZED_NAME_REPLY_TO)
private String replyTo;
public static final String SERIALIZED_NAME_CUSTOM_HEADERS = "customHeaders";
@SerializedName(SERIALIZED_NAME_CUSTOM_HEADERS)
private Map customHeaders = null;
public static final String SERIALIZED_NAME_CHARSET = "charset";
@SerializedName(SERIALIZED_NAME_CHARSET)
private String charset;
public static final String SERIALIZED_NAME_ATTACHMENTS = "attachments";
@SerializedName(SERIALIZED_NAME_ATTACHMENTS)
private List attachments = null;
public static final String SERIALIZED_NAME_TEMPLATE_VARIABLES = "templateVariables";
@SerializedName(SERIALIZED_NAME_TEMPLATE_VARIABLES)
private Map templateVariables = null;
public static final String SERIALIZED_NAME_TEMPLATE = "template";
@SerializedName(SERIALIZED_NAME_TEMPLATE)
private UUID template;
/**
* How an email should be sent based on its recipients
*/
@JsonAdapter(SendStrategyEnum.Adapter.class)
public enum SendStrategyEnum {
SINGLE_MESSAGE("SINGLE_MESSAGE");
private String value;
SendStrategyEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static SendStrategyEnum fromValue(String value) {
for (SendStrategyEnum b : SendStrategyEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final SendStrategyEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public SendStrategyEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return SendStrategyEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_SEND_STRATEGY = "sendStrategy";
@SerializedName(SERIALIZED_NAME_SEND_STRATEGY)
private SendStrategyEnum sendStrategy;
public static final String SERIALIZED_NAME_USE_INBOX_NAME = "useInboxName";
@SerializedName(SERIALIZED_NAME_USE_INBOX_NAME)
private Boolean useInboxName;
public static final String SERIALIZED_NAME_HTML = "html";
@SerializedName(SERIALIZED_NAME_HTML)
private Boolean html;
public ReplyToEmailOptions body(String body) {
this.body = body;
return this;
}
/**
* Body of the reply email you want to send
* @return body
**/
@ApiModelProperty(required = true, value = "Body of the reply email you want to send")
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public ReplyToEmailOptions isHTML(Boolean isHTML) {
this.isHTML = isHTML;
return this;
}
/**
* Is the reply HTML
* @return isHTML
**/
@ApiModelProperty(required = true, value = "Is the reply HTML")
public Boolean getIsHTML() {
return isHTML;
}
public void setIsHTML(Boolean isHTML) {
this.isHTML = isHTML;
}
public ReplyToEmailOptions from(String from) {
this.from = from;
return this;
}
/**
* The from header that should be used. Optional
* @return from
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The from header that should be used. Optional")
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public ReplyToEmailOptions replyTo(String replyTo) {
this.replyTo = replyTo;
return this;
}
/**
* The replyTo header that should be used. Optional
* @return replyTo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The replyTo header that should be used. Optional")
public String getReplyTo() {
return replyTo;
}
public void setReplyTo(String replyTo) {
this.replyTo = replyTo;
}
public ReplyToEmailOptions customHeaders(Map customHeaders) {
this.customHeaders = customHeaders;
return this;
}
public ReplyToEmailOptions putCustomHeadersItem(String key, String customHeadersItem) {
if (this.customHeaders == null) {
this.customHeaders = new HashMap<>();
}
this.customHeaders.put(key, customHeadersItem);
return this;
}
/**
* Optional custom headers
* @return customHeaders
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Optional custom headers")
public Map getCustomHeaders() {
return customHeaders;
}
public void setCustomHeaders(Map customHeaders) {
this.customHeaders = customHeaders;
}
public ReplyToEmailOptions charset(String charset) {
this.charset = charset;
return this;
}
/**
* The charset that your message should be sent with. Optional. Default is UTF-8
* @return charset
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The charset that your message should be sent with. Optional. Default is UTF-8")
public String getCharset() {
return charset;
}
public void setCharset(String charset) {
this.charset = charset;
}
public ReplyToEmailOptions attachments(List attachments) {
this.attachments = attachments;
return this;
}
public ReplyToEmailOptions addAttachmentsItem(String attachmentsItem) {
if (this.attachments == null) {
this.attachments = new ArrayList<>();
}
this.attachments.add(attachmentsItem);
return this;
}
/**
* List of uploaded attachments to send with the reply. Optional.
* @return attachments
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "List of uploaded attachments to send with the reply. Optional.")
public List getAttachments() {
return attachments;
}
public void setAttachments(List attachments) {
this.attachments = attachments;
}
public ReplyToEmailOptions templateVariables(Map templateVariables) {
this.templateVariables = templateVariables;
return this;
}
public ReplyToEmailOptions putTemplateVariablesItem(String key, Object templateVariablesItem) {
if (this.templateVariables == null) {
this.templateVariables = new HashMap<>();
}
this.templateVariables.put(key, templateVariablesItem);
return this;
}
/**
* Template variables if using a template
* @return templateVariables
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Template variables if using a template")
public Map getTemplateVariables() {
return templateVariables;
}
public void setTemplateVariables(Map templateVariables) {
this.templateVariables = templateVariables;
}
public ReplyToEmailOptions template(UUID template) {
this.template = template;
return this;
}
/**
* Template ID to use instead of body. Will use template variable map to fill defined variable slots.
* @return template
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Template ID to use instead of body. Will use template variable map to fill defined variable slots.")
public UUID getTemplate() {
return template;
}
public void setTemplate(UUID template) {
this.template = template;
}
public ReplyToEmailOptions sendStrategy(SendStrategyEnum sendStrategy) {
this.sendStrategy = sendStrategy;
return this;
}
/**
* How an email should be sent based on its recipients
* @return sendStrategy
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "How an email should be sent based on its recipients")
public SendStrategyEnum getSendStrategy() {
return sendStrategy;
}
public void setSendStrategy(SendStrategyEnum sendStrategy) {
this.sendStrategy = sendStrategy;
}
public ReplyToEmailOptions useInboxName(Boolean useInboxName) {
this.useInboxName = useInboxName;
return this;
}
/**
* Optionally use inbox name as display name for sender email address
* @return useInboxName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Optionally use inbox name as display name for sender email address")
public Boolean getUseInboxName() {
return useInboxName;
}
public void setUseInboxName(Boolean useInboxName) {
this.useInboxName = useInboxName;
}
public ReplyToEmailOptions html(Boolean html) {
this.html = html;
return this;
}
/**
* Get html
* @return html
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getHtml() {
return html;
}
public void setHtml(Boolean html) {
this.html = html;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReplyToEmailOptions replyToEmailOptions = (ReplyToEmailOptions) o;
return Objects.equals(this.body, replyToEmailOptions.body) &&
Objects.equals(this.isHTML, replyToEmailOptions.isHTML) &&
Objects.equals(this.from, replyToEmailOptions.from) &&
Objects.equals(this.replyTo, replyToEmailOptions.replyTo) &&
Objects.equals(this.customHeaders, replyToEmailOptions.customHeaders) &&
Objects.equals(this.charset, replyToEmailOptions.charset) &&
Objects.equals(this.attachments, replyToEmailOptions.attachments) &&
Objects.equals(this.templateVariables, replyToEmailOptions.templateVariables) &&
Objects.equals(this.template, replyToEmailOptions.template) &&
Objects.equals(this.sendStrategy, replyToEmailOptions.sendStrategy) &&
Objects.equals(this.useInboxName, replyToEmailOptions.useInboxName) &&
Objects.equals(this.html, replyToEmailOptions.html);
}
@Override
public int hashCode() {
return Objects.hash(body, isHTML, from, replyTo, customHeaders, charset, attachments, templateVariables, template, sendStrategy, useInboxName, html);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReplyToEmailOptions {\n");
sb.append(" body: ").append(toIndentedString(body)).append("\n");
sb.append(" isHTML: ").append(toIndentedString(isHTML)).append("\n");
sb.append(" from: ").append(toIndentedString(from)).append("\n");
sb.append(" replyTo: ").append(toIndentedString(replyTo)).append("\n");
sb.append(" customHeaders: ").append(toIndentedString(customHeaders)).append("\n");
sb.append(" charset: ").append(toIndentedString(charset)).append("\n");
sb.append(" attachments: ").append(toIndentedString(attachments)).append("\n");
sb.append(" templateVariables: ").append(toIndentedString(templateVariables)).append("\n");
sb.append(" template: ").append(toIndentedString(template)).append("\n");
sb.append(" sendStrategy: ").append(toIndentedString(sendStrategy)).append("\n");
sb.append(" useInboxName: ").append(toIndentedString(useInboxName)).append("\n");
sb.append(" html: ").append(toIndentedString(html)).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 ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy