AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
APNSMessage.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/pinpoint/Pinpoint_EXPORTS.h>
11#include <aws/pinpoint/model/Action.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace Pinpoint {
23namespace Model {
24
33 public:
34 AWS_PINPOINT_API APNSMessage() = default;
35 AWS_PINPOINT_API APNSMessage(Aws::Utils::Json::JsonView jsonValue);
36 AWS_PINPOINT_API APNSMessage& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
60 inline const Aws::String& GetAPNSPushType() const { return m_aPNSPushType; }
61 inline bool APNSPushTypeHasBeenSet() const { return m_aPNSPushTypeHasBeenSet; }
62 template <typename APNSPushTypeT = Aws::String>
63 void SetAPNSPushType(APNSPushTypeT&& value) {
64 m_aPNSPushTypeHasBeenSet = true;
65 m_aPNSPushType = std::forward<APNSPushTypeT>(value);
66 }
67 template <typename APNSPushTypeT = Aws::String>
68 APNSMessage& WithAPNSPushType(APNSPushTypeT&& value) {
69 SetAPNSPushType(std::forward<APNSPushTypeT>(value));
70 return *this;
71 }
73
75
84 inline Action GetAction() const { return m_action; }
85 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
86 inline void SetAction(Action value) {
87 m_actionHasBeenSet = true;
88 m_action = value;
89 }
90 inline APNSMessage& WithAction(Action value) {
91 SetAction(value);
92 return *this;
93 }
95
97
103 inline int GetBadge() const { return m_badge; }
104 inline bool BadgeHasBeenSet() const { return m_badgeHasBeenSet; }
105 inline void SetBadge(int value) {
106 m_badgeHasBeenSet = true;
107 m_badge = value;
108 }
109 inline APNSMessage& WithBadge(int value) {
110 SetBadge(value);
111 return *this;
112 }
114
116
119 inline const Aws::String& GetBody() const { return m_body; }
120 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
121 template <typename BodyT = Aws::String>
122 void SetBody(BodyT&& value) {
123 m_bodyHasBeenSet = true;
124 m_body = std::forward<BodyT>(value);
125 }
126 template <typename BodyT = Aws::String>
127 APNSMessage& WithBody(BodyT&& value) {
128 SetBody(std::forward<BodyT>(value));
129 return *this;
130 }
132
134
139 inline const Aws::String& GetCategory() const { return m_category; }
140 inline bool CategoryHasBeenSet() const { return m_categoryHasBeenSet; }
141 template <typename CategoryT = Aws::String>
142 void SetCategory(CategoryT&& value) {
143 m_categoryHasBeenSet = true;
144 m_category = std::forward<CategoryT>(value);
145 }
146 template <typename CategoryT = Aws::String>
147 APNSMessage& WithCategory(CategoryT&& value) {
148 SetCategory(std::forward<CategoryT>(value));
149 return *this;
150 }
152
154
161 inline const Aws::String& GetCollapseId() const { return m_collapseId; }
162 inline bool CollapseIdHasBeenSet() const { return m_collapseIdHasBeenSet; }
163 template <typename CollapseIdT = Aws::String>
164 void SetCollapseId(CollapseIdT&& value) {
165 m_collapseIdHasBeenSet = true;
166 m_collapseId = std::forward<CollapseIdT>(value);
167 }
168 template <typename CollapseIdT = Aws::String>
169 APNSMessage& WithCollapseId(CollapseIdT&& value) {
170 SetCollapseId(std::forward<CollapseIdT>(value));
171 return *this;
172 }
174
176
180 inline const Aws::Map<Aws::String, Aws::String>& GetData() const { return m_data; }
181 inline bool DataHasBeenSet() const { return m_dataHasBeenSet; }
182 template <typename DataT = Aws::Map<Aws::String, Aws::String>>
183 void SetData(DataT&& value) {
184 m_dataHasBeenSet = true;
185 m_data = std::forward<DataT>(value);
186 }
187 template <typename DataT = Aws::Map<Aws::String, Aws::String>>
188 APNSMessage& WithData(DataT&& value) {
189 SetData(std::forward<DataT>(value));
190 return *this;
191 }
192 template <typename DataKeyT = Aws::String, typename DataValueT = Aws::String>
193 APNSMessage& AddData(DataKeyT&& key, DataValueT&& value) {
194 m_dataHasBeenSet = true;
195 m_data.emplace(std::forward<DataKeyT>(key), std::forward<DataValueT>(value));
196 return *this;
197 }
199
201
204 inline const Aws::String& GetMediaUrl() const { return m_mediaUrl; }
205 inline bool MediaUrlHasBeenSet() const { return m_mediaUrlHasBeenSet; }
206 template <typename MediaUrlT = Aws::String>
207 void SetMediaUrl(MediaUrlT&& value) {
208 m_mediaUrlHasBeenSet = true;
209 m_mediaUrl = std::forward<MediaUrlT>(value);
210 }
211 template <typename MediaUrlT = Aws::String>
212 APNSMessage& WithMediaUrl(MediaUrlT&& value) {
213 SetMediaUrl(std::forward<MediaUrlT>(value));
214 return *this;
215 }
217
219
223 inline const Aws::String& GetPreferredAuthenticationMethod() const { return m_preferredAuthenticationMethod; }
224 inline bool PreferredAuthenticationMethodHasBeenSet() const { return m_preferredAuthenticationMethodHasBeenSet; }
225 template <typename PreferredAuthenticationMethodT = Aws::String>
226 void SetPreferredAuthenticationMethod(PreferredAuthenticationMethodT&& value) {
227 m_preferredAuthenticationMethodHasBeenSet = true;
228 m_preferredAuthenticationMethod = std::forward<PreferredAuthenticationMethodT>(value);
229 }
230 template <typename PreferredAuthenticationMethodT = Aws::String>
231 APNSMessage& WithPreferredAuthenticationMethod(PreferredAuthenticationMethodT&& value) {
232 SetPreferredAuthenticationMethod(std::forward<PreferredAuthenticationMethodT>(value));
233 return *this;
234 }
236
238
250 inline const Aws::String& GetPriority() const { return m_priority; }
251 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
252 template <typename PriorityT = Aws::String>
253 void SetPriority(PriorityT&& value) {
254 m_priorityHasBeenSet = true;
255 m_priority = std::forward<PriorityT>(value);
256 }
257 template <typename PriorityT = Aws::String>
258 APNSMessage& WithPriority(PriorityT&& value) {
259 SetPriority(std::forward<PriorityT>(value));
260 return *this;
261 }
263
265
280 inline const Aws::String& GetRawContent() const { return m_rawContent; }
281 inline bool RawContentHasBeenSet() const { return m_rawContentHasBeenSet; }
282 template <typename RawContentT = Aws::String>
283 void SetRawContent(RawContentT&& value) {
284 m_rawContentHasBeenSet = true;
285 m_rawContent = std::forward<RawContentT>(value);
286 }
287 template <typename RawContentT = Aws::String>
288 APNSMessage& WithRawContent(RawContentT&& value) {
289 SetRawContent(std::forward<RawContentT>(value));
290 return *this;
291 }
293
295
317 inline bool GetSilentPush() const { return m_silentPush; }
318 inline bool SilentPushHasBeenSet() const { return m_silentPushHasBeenSet; }
319 inline void SetSilentPush(bool value) {
320 m_silentPushHasBeenSet = true;
321 m_silentPush = value;
322 }
323 inline APNSMessage& WithSilentPush(bool value) {
324 SetSilentPush(value);
325 return *this;
326 }
328
330
337 inline const Aws::String& GetSound() const { return m_sound; }
338 inline bool SoundHasBeenSet() const { return m_soundHasBeenSet; }
339 template <typename SoundT = Aws::String>
340 void SetSound(SoundT&& value) {
341 m_soundHasBeenSet = true;
342 m_sound = std::forward<SoundT>(value);
343 }
344 template <typename SoundT = Aws::String>
345 APNSMessage& WithSound(SoundT&& value) {
346 SetSound(std::forward<SoundT>(value));
347 return *this;
348 }
350
352
356 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetSubstitutions() const { return m_substitutions; }
357 inline bool SubstitutionsHasBeenSet() const { return m_substitutionsHasBeenSet; }
358 template <typename SubstitutionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
359 void SetSubstitutions(SubstitutionsT&& value) {
360 m_substitutionsHasBeenSet = true;
361 m_substitutions = std::forward<SubstitutionsT>(value);
362 }
363 template <typename SubstitutionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
364 APNSMessage& WithSubstitutions(SubstitutionsT&& value) {
365 SetSubstitutions(std::forward<SubstitutionsT>(value));
366 return *this;
367 }
368 template <typename SubstitutionsKeyT = Aws::String, typename SubstitutionsValueT = Aws::Vector<Aws::String>>
369 APNSMessage& AddSubstitutions(SubstitutionsKeyT&& key, SubstitutionsValueT&& value) {
370 m_substitutionsHasBeenSet = true;
371 m_substitutions.emplace(std::forward<SubstitutionsKeyT>(key), std::forward<SubstitutionsValueT>(value));
372 return *this;
373 }
375
377
382 inline const Aws::String& GetThreadId() const { return m_threadId; }
383 inline bool ThreadIdHasBeenSet() const { return m_threadIdHasBeenSet; }
384 template <typename ThreadIdT = Aws::String>
385 void SetThreadId(ThreadIdT&& value) {
386 m_threadIdHasBeenSet = true;
387 m_threadId = std::forward<ThreadIdT>(value);
388 }
389 template <typename ThreadIdT = Aws::String>
390 APNSMessage& WithThreadId(ThreadIdT&& value) {
391 SetThreadId(std::forward<ThreadIdT>(value));
392 return *this;
393 }
395
397
405 inline int GetTimeToLive() const { return m_timeToLive; }
406 inline bool TimeToLiveHasBeenSet() const { return m_timeToLiveHasBeenSet; }
407 inline void SetTimeToLive(int value) {
408 m_timeToLiveHasBeenSet = true;
409 m_timeToLive = value;
410 }
411 inline APNSMessage& WithTimeToLive(int value) {
412 SetTimeToLive(value);
413 return *this;
414 }
416
418
422 inline const Aws::String& GetTitle() const { return m_title; }
423 inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; }
424 template <typename TitleT = Aws::String>
425 void SetTitle(TitleT&& value) {
426 m_titleHasBeenSet = true;
427 m_title = std::forward<TitleT>(value);
428 }
429 template <typename TitleT = Aws::String>
430 APNSMessage& WithTitle(TitleT&& value) {
431 SetTitle(std::forward<TitleT>(value));
432 return *this;
433 }
435
437
441 inline const Aws::String& GetUrl() const { return m_url; }
442 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
443 template <typename UrlT = Aws::String>
444 void SetUrl(UrlT&& value) {
445 m_urlHasBeenSet = true;
446 m_url = std::forward<UrlT>(value);
447 }
448 template <typename UrlT = Aws::String>
449 APNSMessage& WithUrl(UrlT&& value) {
450 SetUrl(std::forward<UrlT>(value));
451 return *this;
452 }
454 private:
455 Aws::String m_aPNSPushType;
456
457 Action m_action{Action::NOT_SET};
458
459 int m_badge{0};
460
461 Aws::String m_body;
462
463 Aws::String m_category;
464
465 Aws::String m_collapseId;
466
468
469 Aws::String m_mediaUrl;
470
471 Aws::String m_preferredAuthenticationMethod;
472
473 Aws::String m_priority;
474
475 Aws::String m_rawContent;
476
477 bool m_silentPush{false};
478
479 Aws::String m_sound;
480
482
483 Aws::String m_threadId;
484
485 int m_timeToLive{0};
486
487 Aws::String m_title;
488
489 Aws::String m_url;
490 bool m_aPNSPushTypeHasBeenSet = false;
491 bool m_actionHasBeenSet = false;
492 bool m_badgeHasBeenSet = false;
493 bool m_bodyHasBeenSet = false;
494 bool m_categoryHasBeenSet = false;
495 bool m_collapseIdHasBeenSet = false;
496 bool m_dataHasBeenSet = false;
497 bool m_mediaUrlHasBeenSet = false;
498 bool m_preferredAuthenticationMethodHasBeenSet = false;
499 bool m_priorityHasBeenSet = false;
500 bool m_rawContentHasBeenSet = false;
501 bool m_silentPushHasBeenSet = false;
502 bool m_soundHasBeenSet = false;
503 bool m_substitutionsHasBeenSet = false;
504 bool m_threadIdHasBeenSet = false;
505 bool m_timeToLiveHasBeenSet = false;
506 bool m_titleHasBeenSet = false;
507 bool m_urlHasBeenSet = false;
508};
509
510} // namespace Model
511} // namespace Pinpoint
512} // namespace Aws
APNSMessage & WithAPNSPushType(APNSPushTypeT &&value)
Definition APNSMessage.h:68
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:63
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:60
const Aws::String & GetPreferredAuthenticationMethod() const
APNSMessage & WithAction(Action value)
Definition APNSMessage.h:90
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