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/pinpoint/Pinpoint_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/pinpoint/model/ChannelType.h>
10 #include <aws/core/utils/memory/stl/AWSMap.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace Pinpoint
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>Specifies address-based configuration settings for a message that's sent
31    * directly to an endpoint.</p><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/AddressConfiguration">AWS
33    * API Reference</a></p>
34    */
35   class AWS_PINPOINT_API AddressConfiguration
36   {
37   public:
38     AddressConfiguration();
39     AddressConfiguration(Aws::Utils::Json::JsonView jsonValue);
40     AddressConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p>The message body to use instead of the default message body. This value
46      * overrides the default message body.</p>
47      */
GetBodyOverride()48     inline const Aws::String& GetBodyOverride() const{ return m_bodyOverride; }
49 
50     /**
51      * <p>The message body to use instead of the default message body. This value
52      * overrides the default message body.</p>
53      */
BodyOverrideHasBeenSet()54     inline bool BodyOverrideHasBeenSet() const { return m_bodyOverrideHasBeenSet; }
55 
56     /**
57      * <p>The message body to use instead of the default message body. This value
58      * overrides the default message body.</p>
59      */
SetBodyOverride(const Aws::String & value)60     inline void SetBodyOverride(const Aws::String& value) { m_bodyOverrideHasBeenSet = true; m_bodyOverride = value; }
61 
62     /**
63      * <p>The message body to use instead of the default message body. This value
64      * overrides the default message body.</p>
65      */
SetBodyOverride(Aws::String && value)66     inline void SetBodyOverride(Aws::String&& value) { m_bodyOverrideHasBeenSet = true; m_bodyOverride = std::move(value); }
67 
68     /**
69      * <p>The message body to use instead of the default message body. This value
70      * overrides the default message body.</p>
71      */
SetBodyOverride(const char * value)72     inline void SetBodyOverride(const char* value) { m_bodyOverrideHasBeenSet = true; m_bodyOverride.assign(value); }
73 
74     /**
75      * <p>The message body to use instead of the default message body. This value
76      * overrides the default message body.</p>
77      */
WithBodyOverride(const Aws::String & value)78     inline AddressConfiguration& WithBodyOverride(const Aws::String& value) { SetBodyOverride(value); return *this;}
79 
80     /**
81      * <p>The message body to use instead of the default message body. This value
82      * overrides the default message body.</p>
83      */
WithBodyOverride(Aws::String && value)84     inline AddressConfiguration& WithBodyOverride(Aws::String&& value) { SetBodyOverride(std::move(value)); return *this;}
85 
86     /**
87      * <p>The message body to use instead of the default message body. This value
88      * overrides the default message body.</p>
89      */
WithBodyOverride(const char * value)90     inline AddressConfiguration& WithBodyOverride(const char* value) { SetBodyOverride(value); return *this;}
91 
92 
93     /**
94      * <p>The channel to use when sending the message.</p>
95      */
GetChannelType()96     inline const ChannelType& GetChannelType() const{ return m_channelType; }
97 
98     /**
99      * <p>The channel to use when sending the message.</p>
100      */
ChannelTypeHasBeenSet()101     inline bool ChannelTypeHasBeenSet() const { return m_channelTypeHasBeenSet; }
102 
103     /**
104      * <p>The channel to use when sending the message.</p>
105      */
SetChannelType(const ChannelType & value)106     inline void SetChannelType(const ChannelType& value) { m_channelTypeHasBeenSet = true; m_channelType = value; }
107 
108     /**
109      * <p>The channel to use when sending the message.</p>
110      */
SetChannelType(ChannelType && value)111     inline void SetChannelType(ChannelType&& value) { m_channelTypeHasBeenSet = true; m_channelType = std::move(value); }
112 
113     /**
114      * <p>The channel to use when sending the message.</p>
115      */
WithChannelType(const ChannelType & value)116     inline AddressConfiguration& WithChannelType(const ChannelType& value) { SetChannelType(value); return *this;}
117 
118     /**
119      * <p>The channel to use when sending the message.</p>
120      */
WithChannelType(ChannelType && value)121     inline AddressConfiguration& WithChannelType(ChannelType&& value) { SetChannelType(std::move(value)); return *this;}
122 
123 
124     /**
125      * <p>An object that maps custom attributes to attributes for the address and is
126      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
127      * notification, this payload is added to the data.pinpoint object. For an email or
128      * text message, this payload is added to email/SMS delivery receipt event
129      * attributes.</p>
130      */
GetContext()131     inline const Aws::Map<Aws::String, Aws::String>& GetContext() const{ return m_context; }
132 
133     /**
134      * <p>An object that maps custom attributes to attributes for the address and is
135      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
136      * notification, this payload is added to the data.pinpoint object. For an email or
137      * text message, this payload is added to email/SMS delivery receipt event
138      * attributes.</p>
139      */
ContextHasBeenSet()140     inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
141 
142     /**
143      * <p>An object that maps custom attributes to attributes for the address and is
144      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
145      * notification, this payload is added to the data.pinpoint object. For an email or
146      * text message, this payload is added to email/SMS delivery receipt event
147      * attributes.</p>
148      */
SetContext(const Aws::Map<Aws::String,Aws::String> & value)149     inline void SetContext(const Aws::Map<Aws::String, Aws::String>& value) { m_contextHasBeenSet = true; m_context = value; }
150 
151     /**
152      * <p>An object that maps custom attributes to attributes for the address and is
153      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
154      * notification, this payload is added to the data.pinpoint object. For an email or
155      * text message, this payload is added to email/SMS delivery receipt event
156      * attributes.</p>
157      */
SetContext(Aws::Map<Aws::String,Aws::String> && value)158     inline void SetContext(Aws::Map<Aws::String, Aws::String>&& value) { m_contextHasBeenSet = true; m_context = std::move(value); }
159 
160     /**
161      * <p>An object that maps custom attributes to attributes for the address and is
162      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
163      * notification, this payload is added to the data.pinpoint object. For an email or
164      * text message, this payload is added to email/SMS delivery receipt event
165      * attributes.</p>
166      */
WithContext(const Aws::Map<Aws::String,Aws::String> & value)167     inline AddressConfiguration& WithContext(const Aws::Map<Aws::String, Aws::String>& value) { SetContext(value); return *this;}
168 
169     /**
170      * <p>An object that maps custom attributes to attributes for the address and is
171      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
172      * notification, this payload is added to the data.pinpoint object. For an email or
173      * text message, this payload is added to email/SMS delivery receipt event
174      * attributes.</p>
175      */
WithContext(Aws::Map<Aws::String,Aws::String> && value)176     inline AddressConfiguration& WithContext(Aws::Map<Aws::String, Aws::String>&& value) { SetContext(std::move(value)); return *this;}
177 
178     /**
179      * <p>An object that maps custom attributes to attributes for the address and is
180      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
181      * notification, this payload is added to the data.pinpoint object. For an email or
182      * text message, this payload is added to email/SMS delivery receipt event
183      * attributes.</p>
184      */
AddContext(const Aws::String & key,const Aws::String & value)185     inline AddressConfiguration& AddContext(const Aws::String& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; }
186 
187     /**
188      * <p>An object that maps custom attributes to attributes for the address and is
189      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
190      * notification, this payload is added to the data.pinpoint object. For an email or
191      * text message, this payload is added to email/SMS delivery receipt event
192      * attributes.</p>
193      */
AddContext(Aws::String && key,const Aws::String & value)194     inline AddressConfiguration& AddContext(Aws::String&& key, const Aws::String& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; }
195 
196     /**
197      * <p>An object that maps custom attributes to attributes for the address and is
198      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
199      * notification, this payload is added to the data.pinpoint object. For an email or
200      * text message, this payload is added to email/SMS delivery receipt event
201      * attributes.</p>
202      */
AddContext(const Aws::String & key,Aws::String && value)203     inline AddressConfiguration& AddContext(const Aws::String& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; }
204 
205     /**
206      * <p>An object that maps custom attributes to attributes for the address and is
207      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
208      * notification, this payload is added to the data.pinpoint object. For an email or
209      * text message, this payload is added to email/SMS delivery receipt event
210      * attributes.</p>
211      */
AddContext(Aws::String && key,Aws::String && value)212     inline AddressConfiguration& AddContext(Aws::String&& key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), std::move(value)); return *this; }
213 
214     /**
215      * <p>An object that maps custom attributes to attributes for the address and is
216      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
217      * notification, this payload is added to the data.pinpoint object. For an email or
218      * text message, this payload is added to email/SMS delivery receipt event
219      * attributes.</p>
220      */
AddContext(const char * key,Aws::String && value)221     inline AddressConfiguration& AddContext(const char* key, Aws::String&& value) { m_contextHasBeenSet = true; m_context.emplace(key, std::move(value)); return *this; }
222 
223     /**
224      * <p>An object that maps custom attributes to attributes for the address and is
225      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
226      * notification, this payload is added to the data.pinpoint object. For an email or
227      * text message, this payload is added to email/SMS delivery receipt event
228      * attributes.</p>
229      */
AddContext(Aws::String && key,const char * value)230     inline AddressConfiguration& AddContext(Aws::String&& key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(std::move(key), value); return *this; }
231 
232     /**
233      * <p>An object that maps custom attributes to attributes for the address and is
234      * attached to the message. Attribute names are case sensitive.</p> <p>For a push
235      * notification, this payload is added to the data.pinpoint object. For an email or
236      * text message, this payload is added to email/SMS delivery receipt event
237      * attributes.</p>
238      */
AddContext(const char * key,const char * value)239     inline AddressConfiguration& AddContext(const char* key, const char* value) { m_contextHasBeenSet = true; m_context.emplace(key, value); return *this; }
240 
241 
242     /**
243      * <p>The raw, JSON-formatted string to use as the payload for the message. If
244      * specified, this value overrides all other values for the message.</p>
245      */
GetRawContent()246     inline const Aws::String& GetRawContent() const{ return m_rawContent; }
247 
248     /**
249      * <p>The raw, JSON-formatted string to use as the payload for the message. If
250      * specified, this value overrides all other values for the message.</p>
251      */
RawContentHasBeenSet()252     inline bool RawContentHasBeenSet() const { return m_rawContentHasBeenSet; }
253 
254     /**
255      * <p>The raw, JSON-formatted string to use as the payload for the message. If
256      * specified, this value overrides all other values for the message.</p>
257      */
SetRawContent(const Aws::String & value)258     inline void SetRawContent(const Aws::String& value) { m_rawContentHasBeenSet = true; m_rawContent = value; }
259 
260     /**
261      * <p>The raw, JSON-formatted string to use as the payload for the message. If
262      * specified, this value overrides all other values for the message.</p>
263      */
SetRawContent(Aws::String && value)264     inline void SetRawContent(Aws::String&& value) { m_rawContentHasBeenSet = true; m_rawContent = std::move(value); }
265 
266     /**
267      * <p>The raw, JSON-formatted string to use as the payload for the message. If
268      * specified, this value overrides all other values for the message.</p>
269      */
SetRawContent(const char * value)270     inline void SetRawContent(const char* value) { m_rawContentHasBeenSet = true; m_rawContent.assign(value); }
271 
272     /**
273      * <p>The raw, JSON-formatted string to use as the payload for the message. If
274      * specified, this value overrides all other values for the message.</p>
275      */
WithRawContent(const Aws::String & value)276     inline AddressConfiguration& WithRawContent(const Aws::String& value) { SetRawContent(value); return *this;}
277 
278     /**
279      * <p>The raw, JSON-formatted string to use as the payload for the message. If
280      * specified, this value overrides all other values for the message.</p>
281      */
WithRawContent(Aws::String && value)282     inline AddressConfiguration& WithRawContent(Aws::String&& value) { SetRawContent(std::move(value)); return *this;}
283 
284     /**
285      * <p>The raw, JSON-formatted string to use as the payload for the message. If
286      * specified, this value overrides all other values for the message.</p>
287      */
WithRawContent(const char * value)288     inline AddressConfiguration& WithRawContent(const char* value) { SetRawContent(value); return *this;}
289 
290 
291     /**
292      * <p>A map of the message variables to merge with the variables specified by
293      * properties of the DefaultMessage object. The variables specified in this map
294      * take precedence over all other variables.</p>
295      */
GetSubstitutions()296     inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetSubstitutions() const{ return m_substitutions; }
297 
298     /**
299      * <p>A map of the message variables to merge with the variables specified by
300      * properties of the DefaultMessage object. The variables specified in this map
301      * take precedence over all other variables.</p>
302      */
SubstitutionsHasBeenSet()303     inline bool SubstitutionsHasBeenSet() const { return m_substitutionsHasBeenSet; }
304 
305     /**
306      * <p>A map of the message variables to merge with the variables specified by
307      * properties of the DefaultMessage object. The variables specified in this map
308      * take precedence over all other variables.</p>
309      */
SetSubstitutions(const Aws::Map<Aws::String,Aws::Vector<Aws::String>> & value)310     inline void SetSubstitutions(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { m_substitutionsHasBeenSet = true; m_substitutions = value; }
311 
312     /**
313      * <p>A map of the message variables to merge with the variables specified by
314      * properties of the DefaultMessage object. The variables specified in this map
315      * take precedence over all other variables.</p>
316      */
SetSubstitutions(Aws::Map<Aws::String,Aws::Vector<Aws::String>> && value)317     inline void SetSubstitutions(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { m_substitutionsHasBeenSet = true; m_substitutions = std::move(value); }
318 
319     /**
320      * <p>A map of the message variables to merge with the variables specified by
321      * properties of the DefaultMessage object. The variables specified in this map
322      * take precedence over all other variables.</p>
323      */
WithSubstitutions(const Aws::Map<Aws::String,Aws::Vector<Aws::String>> & value)324     inline AddressConfiguration& WithSubstitutions(const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& value) { SetSubstitutions(value); return *this;}
325 
326     /**
327      * <p>A map of the message variables to merge with the variables specified by
328      * properties of the DefaultMessage object. The variables specified in this map
329      * take precedence over all other variables.</p>
330      */
WithSubstitutions(Aws::Map<Aws::String,Aws::Vector<Aws::String>> && value)331     inline AddressConfiguration& WithSubstitutions(Aws::Map<Aws::String, Aws::Vector<Aws::String>>&& value) { SetSubstitutions(std::move(value)); return *this;}
332 
333     /**
334      * <p>A map of the message variables to merge with the variables specified by
335      * properties of the DefaultMessage object. The variables specified in this map
336      * take precedence over all other variables.</p>
337      */
AddSubstitutions(const Aws::String & key,const Aws::Vector<Aws::String> & value)338     inline AddressConfiguration& AddSubstitutions(const Aws::String& key, const Aws::Vector<Aws::String>& value) { m_substitutionsHasBeenSet = true; m_substitutions.emplace(key, value); return *this; }
339 
340     /**
341      * <p>A map of the message variables to merge with the variables specified by
342      * properties of the DefaultMessage object. The variables specified in this map
343      * take precedence over all other variables.</p>
344      */
AddSubstitutions(Aws::String && key,const Aws::Vector<Aws::String> & value)345     inline AddressConfiguration& AddSubstitutions(Aws::String&& key, const Aws::Vector<Aws::String>& value) { m_substitutionsHasBeenSet = true; m_substitutions.emplace(std::move(key), value); return *this; }
346 
347     /**
348      * <p>A map of the message variables to merge with the variables specified by
349      * properties of the DefaultMessage object. The variables specified in this map
350      * take precedence over all other variables.</p>
351      */
AddSubstitutions(const Aws::String & key,Aws::Vector<Aws::String> && value)352     inline AddressConfiguration& AddSubstitutions(const Aws::String& key, Aws::Vector<Aws::String>&& value) { m_substitutionsHasBeenSet = true; m_substitutions.emplace(key, std::move(value)); return *this; }
353 
354     /**
355      * <p>A map of the message variables to merge with the variables specified by
356      * properties of the DefaultMessage object. The variables specified in this map
357      * take precedence over all other variables.</p>
358      */
AddSubstitutions(Aws::String && key,Aws::Vector<Aws::String> && value)359     inline AddressConfiguration& AddSubstitutions(Aws::String&& key, Aws::Vector<Aws::String>&& value) { m_substitutionsHasBeenSet = true; m_substitutions.emplace(std::move(key), std::move(value)); return *this; }
360 
361     /**
362      * <p>A map of the message variables to merge with the variables specified by
363      * properties of the DefaultMessage object. The variables specified in this map
364      * take precedence over all other variables.</p>
365      */
AddSubstitutions(const char * key,Aws::Vector<Aws::String> && value)366     inline AddressConfiguration& AddSubstitutions(const char* key, Aws::Vector<Aws::String>&& value) { m_substitutionsHasBeenSet = true; m_substitutions.emplace(key, std::move(value)); return *this; }
367 
368     /**
369      * <p>A map of the message variables to merge with the variables specified by
370      * properties of the DefaultMessage object. The variables specified in this map
371      * take precedence over all other variables.</p>
372      */
AddSubstitutions(const char * key,const Aws::Vector<Aws::String> & value)373     inline AddressConfiguration& AddSubstitutions(const char* key, const Aws::Vector<Aws::String>& value) { m_substitutionsHasBeenSet = true; m_substitutions.emplace(key, value); return *this; }
374 
375 
376     /**
377      * <p>The message title to use instead of the default message title. This value
378      * overrides the default message title.</p>
379      */
GetTitleOverride()380     inline const Aws::String& GetTitleOverride() const{ return m_titleOverride; }
381 
382     /**
383      * <p>The message title to use instead of the default message title. This value
384      * overrides the default message title.</p>
385      */
TitleOverrideHasBeenSet()386     inline bool TitleOverrideHasBeenSet() const { return m_titleOverrideHasBeenSet; }
387 
388     /**
389      * <p>The message title to use instead of the default message title. This value
390      * overrides the default message title.</p>
391      */
SetTitleOverride(const Aws::String & value)392     inline void SetTitleOverride(const Aws::String& value) { m_titleOverrideHasBeenSet = true; m_titleOverride = value; }
393 
394     /**
395      * <p>The message title to use instead of the default message title. This value
396      * overrides the default message title.</p>
397      */
SetTitleOverride(Aws::String && value)398     inline void SetTitleOverride(Aws::String&& value) { m_titleOverrideHasBeenSet = true; m_titleOverride = std::move(value); }
399 
400     /**
401      * <p>The message title to use instead of the default message title. This value
402      * overrides the default message title.</p>
403      */
SetTitleOverride(const char * value)404     inline void SetTitleOverride(const char* value) { m_titleOverrideHasBeenSet = true; m_titleOverride.assign(value); }
405 
406     /**
407      * <p>The message title to use instead of the default message title. This value
408      * overrides the default message title.</p>
409      */
WithTitleOverride(const Aws::String & value)410     inline AddressConfiguration& WithTitleOverride(const Aws::String& value) { SetTitleOverride(value); return *this;}
411 
412     /**
413      * <p>The message title to use instead of the default message title. This value
414      * overrides the default message title.</p>
415      */
WithTitleOverride(Aws::String && value)416     inline AddressConfiguration& WithTitleOverride(Aws::String&& value) { SetTitleOverride(std::move(value)); return *this;}
417 
418     /**
419      * <p>The message title to use instead of the default message title. This value
420      * overrides the default message title.</p>
421      */
WithTitleOverride(const char * value)422     inline AddressConfiguration& WithTitleOverride(const char* value) { SetTitleOverride(value); return *this;}
423 
424   private:
425 
426     Aws::String m_bodyOverride;
427     bool m_bodyOverrideHasBeenSet;
428 
429     ChannelType m_channelType;
430     bool m_channelTypeHasBeenSet;
431 
432     Aws::Map<Aws::String, Aws::String> m_context;
433     bool m_contextHasBeenSet;
434 
435     Aws::String m_rawContent;
436     bool m_rawContentHasBeenSet;
437 
438     Aws::Map<Aws::String, Aws::Vector<Aws::String>> m_substitutions;
439     bool m_substitutionsHasBeenSet;
440 
441     Aws::String m_titleOverride;
442     bool m_titleOverrideHasBeenSet;
443   };
444 
445 } // namespace Model
446 } // namespace Pinpoint
447 } // namespace Aws
448