/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.pinpoint.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Specifies the default settings and content for a one-time email message that's sent directly to an endpoint. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class EmailMessage implements Serializable, Cloneable, StructuredPojo { /** ** The body of the email message. *
*/ private String body; /** ** The email address to forward bounces and complaints to, if feedback forwarding is enabled. *
*/ private String feedbackForwardingAddress; /** ** The verified email address to send the email message from. The default value is the FromAddress specified for the * email channel. *
*/ private String fromAddress; /** ** The email message, represented as a raw MIME message. *
*/ private RawEmail rawEmail; /** ** The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address * receives the reply. *
*/ private java.util.List* The email message, composed of a subject, a text part, and an HTML part. *
*/ private SimpleEmail simpleEmail; /** ** The default message variables to use in the email message. You can override the default variables with individual * address variables. *
*/ private java.util.Map* The body of the email message. *
* * @param body * The body of the email message. */ public void setBody(String body) { this.body = body; } /** ** The body of the email message. *
* * @return The body of the email message. */ public String getBody() { return this.body; } /** ** The body of the email message. *
* * @param body * The body of the email message. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withBody(String body) { setBody(body); return this; } /** ** The email address to forward bounces and complaints to, if feedback forwarding is enabled. *
* * @param feedbackForwardingAddress * The email address to forward bounces and complaints to, if feedback forwarding is enabled. */ public void setFeedbackForwardingAddress(String feedbackForwardingAddress) { this.feedbackForwardingAddress = feedbackForwardingAddress; } /** ** The email address to forward bounces and complaints to, if feedback forwarding is enabled. *
* * @return The email address to forward bounces and complaints to, if feedback forwarding is enabled. */ public String getFeedbackForwardingAddress() { return this.feedbackForwardingAddress; } /** ** The email address to forward bounces and complaints to, if feedback forwarding is enabled. *
* * @param feedbackForwardingAddress * The email address to forward bounces and complaints to, if feedback forwarding is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withFeedbackForwardingAddress(String feedbackForwardingAddress) { setFeedbackForwardingAddress(feedbackForwardingAddress); return this; } /** ** The verified email address to send the email message from. The default value is the FromAddress specified for the * email channel. *
* * @param fromAddress * The verified email address to send the email message from. The default value is the FromAddress specified * for the email channel. */ public void setFromAddress(String fromAddress) { this.fromAddress = fromAddress; } /** ** The verified email address to send the email message from. The default value is the FromAddress specified for the * email channel. *
* * @return The verified email address to send the email message from. The default value is the FromAddress specified * for the email channel. */ public String getFromAddress() { return this.fromAddress; } /** ** The verified email address to send the email message from. The default value is the FromAddress specified for the * email channel. *
* * @param fromAddress * The verified email address to send the email message from. The default value is the FromAddress specified * for the email channel. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withFromAddress(String fromAddress) { setFromAddress(fromAddress); return this; } /** ** The email message, represented as a raw MIME message. *
* * @param rawEmail * The email message, represented as a raw MIME message. */ public void setRawEmail(RawEmail rawEmail) { this.rawEmail = rawEmail; } /** ** The email message, represented as a raw MIME message. *
* * @return The email message, represented as a raw MIME message. */ public RawEmail getRawEmail() { return this.rawEmail; } /** ** The email message, represented as a raw MIME message. *
* * @param rawEmail * The email message, represented as a raw MIME message. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withRawEmail(RawEmail rawEmail) { setRawEmail(rawEmail); return this; } /** ** The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address * receives the reply. *
* * @return The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to * address receives the reply. */ public java.util.List* The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address * receives the reply. *
* * @param replyToAddresses * The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to * address receives the reply. */ public void setReplyToAddresses(java.util.Collection* The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address * receives the reply. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setReplyToAddresses(java.util.Collection)} or {@link #withReplyToAddresses(java.util.Collection)} if you * want to override the existing values. *
* * @param replyToAddresses * The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to * address receives the reply. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withReplyToAddresses(String... replyToAddresses) { if (this.replyToAddresses == null) { setReplyToAddresses(new java.util.ArrayList* The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to address * receives the reply. *
* * @param replyToAddresses * The reply-to email address(es) for the email message. If a recipient replies to the email, each reply-to * address receives the reply. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withReplyToAddresses(java.util.Collection* The email message, composed of a subject, a text part, and an HTML part. *
* * @param simpleEmail * The email message, composed of a subject, a text part, and an HTML part. */ public void setSimpleEmail(SimpleEmail simpleEmail) { this.simpleEmail = simpleEmail; } /** ** The email message, composed of a subject, a text part, and an HTML part. *
* * @return The email message, composed of a subject, a text part, and an HTML part. */ public SimpleEmail getSimpleEmail() { return this.simpleEmail; } /** ** The email message, composed of a subject, a text part, and an HTML part. *
* * @param simpleEmail * The email message, composed of a subject, a text part, and an HTML part. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withSimpleEmail(SimpleEmail simpleEmail) { setSimpleEmail(simpleEmail); return this; } /** ** The default message variables to use in the email message. You can override the default variables with individual * address variables. *
* * @return The default message variables to use in the email message. You can override the default variables with * individual address variables. */ public java.util.Map* The default message variables to use in the email message. You can override the default variables with individual * address variables. *
* * @param substitutions * The default message variables to use in the email message. You can override the default variables with * individual address variables. */ public void setSubstitutions(java.util.Map* The default message variables to use in the email message. You can override the default variables with individual * address variables. *
* * @param substitutions * The default message variables to use in the email message. You can override the default variables with * individual address variables. * @return Returns a reference to this object so that method calls can be chained together. */ public EmailMessage withSubstitutions(java.util.Map