1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/email/SES_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSVector.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19   class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace SES
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Represents the destination of the message, consisting of To:, CC:, and BCC:
29    * fields.</p>  <p>Amazon SES does not support the SMTPUTF8 extension, as
30    * described in <a href="https://tools.ietf.org/html/rfc6531">RFC6531</a>. For this
31    * reason, the <i>local part</i> of a destination email address (the part of the
32    * email address that precedes the @ sign) may only contain <a
33    * href="https://en.wikipedia.org/wiki/Email_address#Local-part">7-bit ASCII
34    * characters</a>. If the <i>domain part</i> of an address (the part after the @
35    * sign) contains non-ASCII characters, they must be encoded using Punycode, as
36    * described in <a href="https://tools.ietf.org/html/rfc3492.html">RFC3492</a>.</p>
37    * <p><h3>See Also:</h3>   <a
38    * href="http://docs.aws.amazon.com/goto/WebAPI/email-2010-12-01/Destination">AWS
39    * API Reference</a></p>
40    */
41   class AWS_SES_API Destination
42   {
43   public:
44     Destination();
45     Destination(const Aws::Utils::Xml::XmlNode& xmlNode);
46     Destination& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
47 
48     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
49     void OutputToStream(Aws::OStream& oStream, const char* location) const;
50 
51 
52     /**
53      * <p>The recipients to place on the To: line of the message.</p>
54      */
GetToAddresses()55     inline const Aws::Vector<Aws::String>& GetToAddresses() const{ return m_toAddresses; }
56 
57     /**
58      * <p>The recipients to place on the To: line of the message.</p>
59      */
ToAddressesHasBeenSet()60     inline bool ToAddressesHasBeenSet() const { return m_toAddressesHasBeenSet; }
61 
62     /**
63      * <p>The recipients to place on the To: line of the message.</p>
64      */
SetToAddresses(const Aws::Vector<Aws::String> & value)65     inline void SetToAddresses(const Aws::Vector<Aws::String>& value) { m_toAddressesHasBeenSet = true; m_toAddresses = value; }
66 
67     /**
68      * <p>The recipients to place on the To: line of the message.</p>
69      */
SetToAddresses(Aws::Vector<Aws::String> && value)70     inline void SetToAddresses(Aws::Vector<Aws::String>&& value) { m_toAddressesHasBeenSet = true; m_toAddresses = std::move(value); }
71 
72     /**
73      * <p>The recipients to place on the To: line of the message.</p>
74      */
WithToAddresses(const Aws::Vector<Aws::String> & value)75     inline Destination& WithToAddresses(const Aws::Vector<Aws::String>& value) { SetToAddresses(value); return *this;}
76 
77     /**
78      * <p>The recipients to place on the To: line of the message.</p>
79      */
WithToAddresses(Aws::Vector<Aws::String> && value)80     inline Destination& WithToAddresses(Aws::Vector<Aws::String>&& value) { SetToAddresses(std::move(value)); return *this;}
81 
82     /**
83      * <p>The recipients to place on the To: line of the message.</p>
84      */
AddToAddresses(const Aws::String & value)85     inline Destination& AddToAddresses(const Aws::String& value) { m_toAddressesHasBeenSet = true; m_toAddresses.push_back(value); return *this; }
86 
87     /**
88      * <p>The recipients to place on the To: line of the message.</p>
89      */
AddToAddresses(Aws::String && value)90     inline Destination& AddToAddresses(Aws::String&& value) { m_toAddressesHasBeenSet = true; m_toAddresses.push_back(std::move(value)); return *this; }
91 
92     /**
93      * <p>The recipients to place on the To: line of the message.</p>
94      */
AddToAddresses(const char * value)95     inline Destination& AddToAddresses(const char* value) { m_toAddressesHasBeenSet = true; m_toAddresses.push_back(value); return *this; }
96 
97 
98     /**
99      * <p>The recipients to place on the CC: line of the message.</p>
100      */
GetCcAddresses()101     inline const Aws::Vector<Aws::String>& GetCcAddresses() const{ return m_ccAddresses; }
102 
103     /**
104      * <p>The recipients to place on the CC: line of the message.</p>
105      */
CcAddressesHasBeenSet()106     inline bool CcAddressesHasBeenSet() const { return m_ccAddressesHasBeenSet; }
107 
108     /**
109      * <p>The recipients to place on the CC: line of the message.</p>
110      */
SetCcAddresses(const Aws::Vector<Aws::String> & value)111     inline void SetCcAddresses(const Aws::Vector<Aws::String>& value) { m_ccAddressesHasBeenSet = true; m_ccAddresses = value; }
112 
113     /**
114      * <p>The recipients to place on the CC: line of the message.</p>
115      */
SetCcAddresses(Aws::Vector<Aws::String> && value)116     inline void SetCcAddresses(Aws::Vector<Aws::String>&& value) { m_ccAddressesHasBeenSet = true; m_ccAddresses = std::move(value); }
117 
118     /**
119      * <p>The recipients to place on the CC: line of the message.</p>
120      */
WithCcAddresses(const Aws::Vector<Aws::String> & value)121     inline Destination& WithCcAddresses(const Aws::Vector<Aws::String>& value) { SetCcAddresses(value); return *this;}
122 
123     /**
124      * <p>The recipients to place on the CC: line of the message.</p>
125      */
WithCcAddresses(Aws::Vector<Aws::String> && value)126     inline Destination& WithCcAddresses(Aws::Vector<Aws::String>&& value) { SetCcAddresses(std::move(value)); return *this;}
127 
128     /**
129      * <p>The recipients to place on the CC: line of the message.</p>
130      */
AddCcAddresses(const Aws::String & value)131     inline Destination& AddCcAddresses(const Aws::String& value) { m_ccAddressesHasBeenSet = true; m_ccAddresses.push_back(value); return *this; }
132 
133     /**
134      * <p>The recipients to place on the CC: line of the message.</p>
135      */
AddCcAddresses(Aws::String && value)136     inline Destination& AddCcAddresses(Aws::String&& value) { m_ccAddressesHasBeenSet = true; m_ccAddresses.push_back(std::move(value)); return *this; }
137 
138     /**
139      * <p>The recipients to place on the CC: line of the message.</p>
140      */
AddCcAddresses(const char * value)141     inline Destination& AddCcAddresses(const char* value) { m_ccAddressesHasBeenSet = true; m_ccAddresses.push_back(value); return *this; }
142 
143 
144     /**
145      * <p>The recipients to place on the BCC: line of the message.</p>
146      */
GetBccAddresses()147     inline const Aws::Vector<Aws::String>& GetBccAddresses() const{ return m_bccAddresses; }
148 
149     /**
150      * <p>The recipients to place on the BCC: line of the message.</p>
151      */
BccAddressesHasBeenSet()152     inline bool BccAddressesHasBeenSet() const { return m_bccAddressesHasBeenSet; }
153 
154     /**
155      * <p>The recipients to place on the BCC: line of the message.</p>
156      */
SetBccAddresses(const Aws::Vector<Aws::String> & value)157     inline void SetBccAddresses(const Aws::Vector<Aws::String>& value) { m_bccAddressesHasBeenSet = true; m_bccAddresses = value; }
158 
159     /**
160      * <p>The recipients to place on the BCC: line of the message.</p>
161      */
SetBccAddresses(Aws::Vector<Aws::String> && value)162     inline void SetBccAddresses(Aws::Vector<Aws::String>&& value) { m_bccAddressesHasBeenSet = true; m_bccAddresses = std::move(value); }
163 
164     /**
165      * <p>The recipients to place on the BCC: line of the message.</p>
166      */
WithBccAddresses(const Aws::Vector<Aws::String> & value)167     inline Destination& WithBccAddresses(const Aws::Vector<Aws::String>& value) { SetBccAddresses(value); return *this;}
168 
169     /**
170      * <p>The recipients to place on the BCC: line of the message.</p>
171      */
WithBccAddresses(Aws::Vector<Aws::String> && value)172     inline Destination& WithBccAddresses(Aws::Vector<Aws::String>&& value) { SetBccAddresses(std::move(value)); return *this;}
173 
174     /**
175      * <p>The recipients to place on the BCC: line of the message.</p>
176      */
AddBccAddresses(const Aws::String & value)177     inline Destination& AddBccAddresses(const Aws::String& value) { m_bccAddressesHasBeenSet = true; m_bccAddresses.push_back(value); return *this; }
178 
179     /**
180      * <p>The recipients to place on the BCC: line of the message.</p>
181      */
AddBccAddresses(Aws::String && value)182     inline Destination& AddBccAddresses(Aws::String&& value) { m_bccAddressesHasBeenSet = true; m_bccAddresses.push_back(std::move(value)); return *this; }
183 
184     /**
185      * <p>The recipients to place on the BCC: line of the message.</p>
186      */
AddBccAddresses(const char * value)187     inline Destination& AddBccAddresses(const char* value) { m_bccAddressesHasBeenSet = true; m_bccAddresses.push_back(value); return *this; }
188 
189   private:
190 
191     Aws::Vector<Aws::String> m_toAddresses;
192     bool m_toAddressesHasBeenSet;
193 
194     Aws::Vector<Aws::String> m_ccAddresses;
195     bool m_ccAddressesHasBeenSet;
196 
197     Aws::Vector<Aws::String> m_bccAddresses;
198     bool m_bccAddressesHasBeenSet;
199   };
200 
201 } // namespace Model
202 } // namespace SES
203 } // namespace Aws
204