AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
APNSMessage.h
1
6#pragma once
7#include <aws/pinpoint/Pinpoint_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/pinpoint/model/Action.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <utility>
13
14namespace Aws
15{
16namespace Utils
17{
18namespace Json
19{
20 class JsonValue;
21 class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Pinpoint
25{
26namespace Model
27{
28
37 {
38 public:
39 AWS_PINPOINT_API APNSMessage() = default;
40 AWS_PINPOINT_API APNSMessage(Aws::Utils::Json::JsonView jsonValue);
41 AWS_PINPOINT_API APNSMessage& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
66 inline const Aws::String& GetAPNSPushType() const { return m_aPNSPushType; }
67 inline bool APNSPushTypeHasBeenSet() const { return m_aPNSPushTypeHasBeenSet; }
68 template<typename APNSPushTypeT = Aws::String>
69 void SetAPNSPushType(APNSPushTypeT&& value) { m_aPNSPushTypeHasBeenSet = true; m_aPNSPushType = std::forward<APNSPushTypeT>(value); }
70 template<typename APNSPushTypeT = Aws::String>
71 APNSMessage& WithAPNSPushType(APNSPushTypeT&& value) { SetAPNSPushType(std::forward<APNSPushTypeT>(value)); return *this;}
73
75
84 inline Action GetAction() const { return m_action; }
85 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
86 inline void SetAction(Action value) { m_actionHasBeenSet = true; m_action = value; }
87 inline APNSMessage& WithAction(Action value) { SetAction(value); return *this;}
89
91
97 inline int GetBadge() const { return m_badge; }
98 inline bool BadgeHasBeenSet() const { return m_badgeHasBeenSet; }
99 inline void SetBadge(int value) { m_badgeHasBeenSet = true; m_badge = value; }
100 inline APNSMessage& WithBadge(int value) { SetBadge(value); return *this;}
102
104
107 inline const Aws::String& GetBody() const { return m_body; }
108 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
109 template<typename BodyT = Aws::String>
110 void SetBody(BodyT&& value) { m_bodyHasBeenSet = true; m_body = std::forward<BodyT>(value); }
111 template<typename BodyT = Aws::String>
112 APNSMessage& WithBody(BodyT&& value) { SetBody(std::forward<BodyT>(value)); return *this;}
114
116
121 inline const Aws::String& GetCategory() const { return m_category; }
122 inline bool CategoryHasBeenSet() const { return m_categoryHasBeenSet; }
123 template<typename CategoryT = Aws::String>
124 void SetCategory(CategoryT&& value) { m_categoryHasBeenSet = true; m_category = std::forward<CategoryT>(value); }
125 template<typename CategoryT = Aws::String>
126 APNSMessage& WithCategory(CategoryT&& value) { SetCategory(std::forward<CategoryT>(value)); return *this;}
128
130
137 inline const Aws::String& GetCollapseId() const { return m_collapseId; }
138 inline bool CollapseIdHasBeenSet() const { return m_collapseIdHasBeenSet; }
139 template<typename CollapseIdT = Aws::String>
140 void SetCollapseId(CollapseIdT&& value) { m_collapseIdHasBeenSet = true; m_collapseId = std::forward<CollapseIdT>(value); }
141 template<typename CollapseIdT = Aws::String>
142 APNSMessage& WithCollapseId(CollapseIdT&& value) { SetCollapseId(std::forward<CollapseIdT>(value)); return *this;}
144
146
150 inline const Aws::Map<Aws::String, Aws::String>& GetData() const { return m_data; }
151 inline bool DataHasBeenSet() const { return m_dataHasBeenSet; }
152 template<typename DataT = Aws::Map<Aws::String, Aws::String>>
153 void SetData(DataT&& value) { m_dataHasBeenSet = true; m_data = std::forward<DataT>(value); }
154 template<typename DataT = Aws::Map<Aws::String, Aws::String>>
155 APNSMessage& WithData(DataT&& value) { SetData(std::forward<DataT>(value)); return *this;}
156 template<typename DataKeyT = Aws::String, typename DataValueT = Aws::String>
157 APNSMessage& AddData(DataKeyT&& key, DataValueT&& value) {
158 m_dataHasBeenSet = true; m_data.emplace(std::forward<DataKeyT>(key), std::forward<DataValueT>(value)); return *this;
159 }
161
163
166 inline const Aws::String& GetMediaUrl() const { return m_mediaUrl; }
167 inline bool MediaUrlHasBeenSet() const { return m_mediaUrlHasBeenSet; }
168 template<typename MediaUrlT = Aws::String>
169 void SetMediaUrl(MediaUrlT&& value) { m_mediaUrlHasBeenSet = true; m_mediaUrl = std::forward<MediaUrlT>(value); }
170 template<typename MediaUrlT = Aws::String>
171 APNSMessage& WithMediaUrl(MediaUrlT&& value) { SetMediaUrl(std::forward<MediaUrlT>(value)); return *this;}
173
175
179 inline const Aws::String& GetPreferredAuthenticationMethod() const { return m_preferredAuthenticationMethod; }
180 inline bool PreferredAuthenticationMethodHasBeenSet() const { return m_preferredAuthenticationMethodHasBeenSet; }
181 template<typename PreferredAuthenticationMethodT = Aws::String>
182 void SetPreferredAuthenticationMethod(PreferredAuthenticationMethodT&& value) { m_preferredAuthenticationMethodHasBeenSet = true; m_preferredAuthenticationMethod = std::forward<PreferredAuthenticationMethodT>(value); }
183 template<typename PreferredAuthenticationMethodT = Aws::String>
184 APNSMessage& WithPreferredAuthenticationMethod(PreferredAuthenticationMethodT&& value) { SetPreferredAuthenticationMethod(std::forward<PreferredAuthenticationMethodT>(value)); return *this;}
186
188
200 inline const Aws::String& GetPriority() const { return m_priority; }
201 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
202 template<typename PriorityT = Aws::String>
203 void SetPriority(PriorityT&& value) { m_priorityHasBeenSet = true; m_priority = std::forward<PriorityT>(value); }
204 template<typename PriorityT = Aws::String>
205 APNSMessage& WithPriority(PriorityT&& value) { SetPriority(std::forward<PriorityT>(value)); return *this;}
207
209
224 inline const Aws::String& GetRawContent() const { return m_rawContent; }
225 inline bool RawContentHasBeenSet() const { return m_rawContentHasBeenSet; }
226 template<typename RawContentT = Aws::String>
227 void SetRawContent(RawContentT&& value) { m_rawContentHasBeenSet = true; m_rawContent = std::forward<RawContentT>(value); }
228 template<typename RawContentT = Aws::String>
229 APNSMessage& WithRawContent(RawContentT&& value) { SetRawContent(std::forward<RawContentT>(value)); return *this;}
231
233
255 inline bool GetSilentPush() const { return m_silentPush; }
256 inline bool SilentPushHasBeenSet() const { return m_silentPushHasBeenSet; }
257 inline void SetSilentPush(bool value) { m_silentPushHasBeenSet = true; m_silentPush = value; }
258 inline APNSMessage& WithSilentPush(bool value) { SetSilentPush(value); return *this;}
260
262
269 inline const Aws::String& GetSound() const { return m_sound; }
270 inline bool SoundHasBeenSet() const { return m_soundHasBeenSet; }
271 template<typename SoundT = Aws::String>
272 void SetSound(SoundT&& value) { m_soundHasBeenSet = true; m_sound = std::forward<SoundT>(value); }
273 template<typename SoundT = Aws::String>
274 APNSMessage& WithSound(SoundT&& value) { SetSound(std::forward<SoundT>(value)); return *this;}
276
278
282 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetSubstitutions() const { return m_substitutions; }
283 inline bool SubstitutionsHasBeenSet() const { return m_substitutionsHasBeenSet; }
284 template<typename SubstitutionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
285 void SetSubstitutions(SubstitutionsT&& value) { m_substitutionsHasBeenSet = true; m_substitutions = std::forward<SubstitutionsT>(value); }
286 template<typename SubstitutionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
287 APNSMessage& WithSubstitutions(SubstitutionsT&& value) { SetSubstitutions(std::forward<SubstitutionsT>(value)); return *this;}
288 template<typename SubstitutionsKeyT = Aws::String, typename SubstitutionsValueT = Aws::Vector<Aws::String>>
289 APNSMessage& AddSubstitutions(SubstitutionsKeyT&& key, SubstitutionsValueT&& value) {
290 m_substitutionsHasBeenSet = true; m_substitutions.emplace(std::forward<SubstitutionsKeyT>(key), std::forward<SubstitutionsValueT>(value)); return *this;
291 }
293
295
300 inline const Aws::String& GetThreadId() const { return m_threadId; }
301 inline bool ThreadIdHasBeenSet() const { return m_threadIdHasBeenSet; }
302 template<typename ThreadIdT = Aws::String>
303 void SetThreadId(ThreadIdT&& value) { m_threadIdHasBeenSet = true; m_threadId = std::forward<ThreadIdT>(value); }
304 template<typename ThreadIdT = Aws::String>
305 APNSMessage& WithThreadId(ThreadIdT&& value) { SetThreadId(std::forward<ThreadIdT>(value)); return *this;}
307
309
317 inline int GetTimeToLive() const { return m_timeToLive; }
318 inline bool TimeToLiveHasBeenSet() const { return m_timeToLiveHasBeenSet; }
319 inline void SetTimeToLive(int value) { m_timeToLiveHasBeenSet = true; m_timeToLive = value; }
320 inline APNSMessage& WithTimeToLive(int value) { SetTimeToLive(value); return *this;}
322
324
328 inline const Aws::String& GetTitle() const { return m_title; }
329 inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; }
330 template<typename TitleT = Aws::String>
331 void SetTitle(TitleT&& value) { m_titleHasBeenSet = true; m_title = std::forward<TitleT>(value); }
332 template<typename TitleT = Aws::String>
333 APNSMessage& WithTitle(TitleT&& value) { SetTitle(std::forward<TitleT>(value)); return *this;}
335
337
341 inline const Aws::String& GetUrl() const { return m_url; }
342 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
343 template<typename UrlT = Aws::String>
344 void SetUrl(UrlT&& value) { m_urlHasBeenSet = true; m_url = std::forward<UrlT>(value); }
345 template<typename UrlT = Aws::String>
346 APNSMessage& WithUrl(UrlT&& value) { SetUrl(std::forward<UrlT>(value)); return *this;}
348 private:
349
350 Aws::String m_aPNSPushType;
351 bool m_aPNSPushTypeHasBeenSet = false;
352
353 Action m_action{Action::NOT_SET};
354 bool m_actionHasBeenSet = false;
355
356 int m_badge{0};
357 bool m_badgeHasBeenSet = false;
358
359 Aws::String m_body;
360 bool m_bodyHasBeenSet = false;
361
362 Aws::String m_category;
363 bool m_categoryHasBeenSet = false;
364
365 Aws::String m_collapseId;
366 bool m_collapseIdHasBeenSet = false;
367
369 bool m_dataHasBeenSet = false;
370
371 Aws::String m_mediaUrl;
372 bool m_mediaUrlHasBeenSet = false;
373
374 Aws::String m_preferredAuthenticationMethod;
375 bool m_preferredAuthenticationMethodHasBeenSet = false;
376
377 Aws::String m_priority;
378 bool m_priorityHasBeenSet = false;
379
380 Aws::String m_rawContent;
381 bool m_rawContentHasBeenSet = false;
382
383 bool m_silentPush{false};
384 bool m_silentPushHasBeenSet = false;
385
386 Aws::String m_sound;
387 bool m_soundHasBeenSet = false;
388
390 bool m_substitutionsHasBeenSet = false;
391
392 Aws::String m_threadId;
393 bool m_threadIdHasBeenSet = false;
394
395 int m_timeToLive{0};
396 bool m_timeToLiveHasBeenSet = false;
397
398 Aws::String m_title;
399 bool m_titleHasBeenSet = false;
400
401 Aws::String m_url;
402 bool m_urlHasBeenSet = false;
403 };
404
405} // namespace Model
406} // namespace Pinpoint
407} // namespace Aws
APNSMessage & WithAPNSPushType(APNSPushTypeT &&value)
Definition APNSMessage.h:71
void SetSubstitutions(SubstitutionsT &&value)
APNSMessage & WithThreadId(ThreadIdT &&value)
APNSMessage & WithSubstitutions(SubstitutionsT &&value)
AWS_PINPOINT_API APNSMessage(Aws::Utils::Json::JsonView jsonValue)
APNSMessage & AddSubstitutions(SubstitutionsKeyT &&key, SubstitutionsValueT &&value)
void SetTitle(TitleT &&value)
void SetAPNSPushType(APNSPushTypeT &&value)
Definition APNSMessage.h:69
APNSMessage & AddData(DataKeyT &&key, DataValueT &&value)
APNSMessage & WithMediaUrl(MediaUrlT &&value)
APNSMessage & WithData(DataT &&value)
APNSMessage & WithBadge(int value)
void SetRawContent(RawContentT &&value)
void SetCollapseId(CollapseIdT &&value)
const Aws::Map< Aws::String, Aws::Vector< Aws::String > > & GetSubstitutions() const
const Aws::String & GetThreadId() const
APNSMessage & WithCategory(CategoryT &&value)
void SetMediaUrl(MediaUrlT &&value)
void SetThreadId(ThreadIdT &&value)
const Aws::Map< Aws::String, Aws::String > & GetData() const
APNSMessage & WithSound(SoundT &&value)
AWS_PINPOINT_API APNSMessage & operator=(Aws::Utils::Json::JsonView jsonValue)
APNSMessage & WithTimeToLive(int value)
const Aws::String & GetPriority() const
const Aws::String & GetAPNSPushType() const
Definition APNSMessage.h:66
const Aws::String & GetPreferredAuthenticationMethod() const
APNSMessage & WithAction(Action value)
Definition APNSMessage.h:87
APNSMessage & WithTitle(TitleT &&value)
void SetPriority(PriorityT &&value)
const Aws::String & GetBody() const
const Aws::String & GetCategory() const
bool PreferredAuthenticationMethodHasBeenSet() const
const Aws::String & GetTitle() const
APNSMessage & WithBody(BodyT &&value)
APNSMessage & WithUrl(UrlT &&value)
void SetSound(SoundT &&value)
APNSMessage & WithRawContent(RawContentT &&value)
const Aws::String & GetUrl() const
void SetCategory(CategoryT &&value)
const Aws::String & GetCollapseId() const
const Aws::String & GetMediaUrl() const
APNSMessage & WithPreferredAuthenticationMethod(PreferredAuthenticationMethodT &&value)
AWS_PINPOINT_API APNSMessage()=default
void SetPreferredAuthenticationMethod(PreferredAuthenticationMethodT &&value)
APNSMessage & WithPriority(PriorityT &&value)
APNSMessage & WithCollapseId(CollapseIdT &&value)
APNSMessage & WithSilentPush(bool value)
const Aws::String & GetSound() const
AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetRawContent() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue