AWS SDK for C++

AWS SDK for C++ Version 1.11.683

Loading...
Searching...
No Matches
GCMMessage.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
34 public:
35 AWS_PINPOINT_API GCMMessage() = default;
36 AWS_PINPOINT_API GCMMessage(Aws::Utils::Json::JsonView jsonValue);
37 AWS_PINPOINT_API GCMMessage& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
50 inline Action GetAction() const { return m_action; }
51 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
52 inline void SetAction(Action value) {
53 m_actionHasBeenSet = true;
54 m_action = value;
55 }
56 inline GCMMessage& WithAction(Action value) {
57 SetAction(value);
58 return *this;
59 }
61
63
66 inline const Aws::String& GetBody() const { return m_body; }
67 inline bool BodyHasBeenSet() const { return m_bodyHasBeenSet; }
68 template <typename BodyT = Aws::String>
69 void SetBody(BodyT&& value) {
70 m_bodyHasBeenSet = true;
71 m_body = std::forward<BodyT>(value);
72 }
73 template <typename BodyT = Aws::String>
74 GCMMessage& WithBody(BodyT&& value) {
75 SetBody(std::forward<BodyT>(value));
76 return *this;
77 }
79
81
89 inline const Aws::String& GetCollapseKey() const { return m_collapseKey; }
90 inline bool CollapseKeyHasBeenSet() const { return m_collapseKeyHasBeenSet; }
91 template <typename CollapseKeyT = Aws::String>
92 void SetCollapseKey(CollapseKeyT&& value) {
93 m_collapseKeyHasBeenSet = true;
94 m_collapseKey = std::forward<CollapseKeyT>(value);
95 }
96 template <typename CollapseKeyT = Aws::String>
97 GCMMessage& WithCollapseKey(CollapseKeyT&& value) {
98 SetCollapseKey(std::forward<CollapseKeyT>(value));
99 return *this;
100 }
102
104
109 inline const Aws::Map<Aws::String, Aws::String>& GetData() const { return m_data; }
110 inline bool DataHasBeenSet() const { return m_dataHasBeenSet; }
111 template <typename DataT = Aws::Map<Aws::String, Aws::String>>
112 void SetData(DataT&& value) {
113 m_dataHasBeenSet = true;
114 m_data = std::forward<DataT>(value);
115 }
116 template <typename DataT = Aws::Map<Aws::String, Aws::String>>
117 GCMMessage& WithData(DataT&& value) {
118 SetData(std::forward<DataT>(value));
119 return *this;
120 }
121 template <typename DataKeyT = Aws::String, typename DataValueT = Aws::String>
122 GCMMessage& AddData(DataKeyT&& key, DataValueT&& value) {
123 m_dataHasBeenSet = true;
124 m_data.emplace(std::forward<DataKeyT>(key), std::forward<DataValueT>(value));
125 return *this;
126 }
128
130
133 inline const Aws::String& GetIconReference() const { return m_iconReference; }
134 inline bool IconReferenceHasBeenSet() const { return m_iconReferenceHasBeenSet; }
135 template <typename IconReferenceT = Aws::String>
136 void SetIconReference(IconReferenceT&& value) {
137 m_iconReferenceHasBeenSet = true;
138 m_iconReference = std::forward<IconReferenceT>(value);
139 }
140 template <typename IconReferenceT = Aws::String>
141 GCMMessage& WithIconReference(IconReferenceT&& value) {
142 SetIconReference(std::forward<IconReferenceT>(value));
143 return *this;
144 }
146
148
152 inline const Aws::String& GetImageIconUrl() const { return m_imageIconUrl; }
153 inline bool ImageIconUrlHasBeenSet() const { return m_imageIconUrlHasBeenSet; }
154 template <typename ImageIconUrlT = Aws::String>
155 void SetImageIconUrl(ImageIconUrlT&& value) {
156 m_imageIconUrlHasBeenSet = true;
157 m_imageIconUrl = std::forward<ImageIconUrlT>(value);
158 }
159 template <typename ImageIconUrlT = Aws::String>
160 GCMMessage& WithImageIconUrl(ImageIconUrlT&& value) {
161 SetImageIconUrl(std::forward<ImageIconUrlT>(value));
162 return *this;
163 }
165
167
170 inline const Aws::String& GetImageUrl() const { return m_imageUrl; }
171 inline bool ImageUrlHasBeenSet() const { return m_imageUrlHasBeenSet; }
172 template <typename ImageUrlT = Aws::String>
173 void SetImageUrl(ImageUrlT&& value) {
174 m_imageUrlHasBeenSet = true;
175 m_imageUrl = std::forward<ImageUrlT>(value);
176 }
177 template <typename ImageUrlT = Aws::String>
178 GCMMessage& WithImageUrl(ImageUrlT&& value) {
179 SetImageUrl(std::forward<ImageUrlT>(value));
180 return *this;
181 }
183
185
189 inline const Aws::String& GetPreferredAuthenticationMethod() const { return m_preferredAuthenticationMethod; }
190 inline bool PreferredAuthenticationMethodHasBeenSet() const { return m_preferredAuthenticationMethodHasBeenSet; }
191 template <typename PreferredAuthenticationMethodT = Aws::String>
192 void SetPreferredAuthenticationMethod(PreferredAuthenticationMethodT&& value) {
193 m_preferredAuthenticationMethodHasBeenSet = true;
194 m_preferredAuthenticationMethod = std::forward<PreferredAuthenticationMethodT>(value);
195 }
196 template <typename PreferredAuthenticationMethodT = Aws::String>
197 GCMMessage& WithPreferredAuthenticationMethod(PreferredAuthenticationMethodT&& value) {
198 SetPreferredAuthenticationMethod(std::forward<PreferredAuthenticationMethodT>(value));
199 return *this;
200 }
202
204
215 inline const Aws::String& GetPriority() const { return m_priority; }
216 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
217 template <typename PriorityT = Aws::String>
218 void SetPriority(PriorityT&& value) {
219 m_priorityHasBeenSet = true;
220 m_priority = std::forward<PriorityT>(value);
221 }
222 template <typename PriorityT = Aws::String>
223 GCMMessage& WithPriority(PriorityT&& value) {
224 SetPriority(std::forward<PriorityT>(value));
225 return *this;
226 }
228
230
235 inline const Aws::String& GetRawContent() const { return m_rawContent; }
236 inline bool RawContentHasBeenSet() const { return m_rawContentHasBeenSet; }
237 template <typename RawContentT = Aws::String>
238 void SetRawContent(RawContentT&& value) {
239 m_rawContentHasBeenSet = true;
240 m_rawContent = std::forward<RawContentT>(value);
241 }
242 template <typename RawContentT = Aws::String>
243 GCMMessage& WithRawContent(RawContentT&& value) {
244 SetRawContent(std::forward<RawContentT>(value));
245 return *this;
246 }
248
250
254 inline const Aws::String& GetRestrictedPackageName() const { return m_restrictedPackageName; }
255 inline bool RestrictedPackageNameHasBeenSet() const { return m_restrictedPackageNameHasBeenSet; }
256 template <typename RestrictedPackageNameT = Aws::String>
257 void SetRestrictedPackageName(RestrictedPackageNameT&& value) {
258 m_restrictedPackageNameHasBeenSet = true;
259 m_restrictedPackageName = std::forward<RestrictedPackageNameT>(value);
260 }
261 template <typename RestrictedPackageNameT = Aws::String>
262 GCMMessage& WithRestrictedPackageName(RestrictedPackageNameT&& value) {
263 SetRestrictedPackageName(std::forward<RestrictedPackageNameT>(value));
264 return *this;
265 }
267
269
275 inline bool GetSilentPush() const { return m_silentPush; }
276 inline bool SilentPushHasBeenSet() const { return m_silentPushHasBeenSet; }
277 inline void SetSilentPush(bool value) {
278 m_silentPushHasBeenSet = true;
279 m_silentPush = value;
280 }
281 inline GCMMessage& WithSilentPush(bool value) {
282 SetSilentPush(value);
283 return *this;
284 }
286
288
292 inline const Aws::String& GetSmallImageIconUrl() const { return m_smallImageIconUrl; }
293 inline bool SmallImageIconUrlHasBeenSet() const { return m_smallImageIconUrlHasBeenSet; }
294 template <typename SmallImageIconUrlT = Aws::String>
295 void SetSmallImageIconUrl(SmallImageIconUrlT&& value) {
296 m_smallImageIconUrlHasBeenSet = true;
297 m_smallImageIconUrl = std::forward<SmallImageIconUrlT>(value);
298 }
299 template <typename SmallImageIconUrlT = Aws::String>
300 GCMMessage& WithSmallImageIconUrl(SmallImageIconUrlT&& value) {
301 SetSmallImageIconUrl(std::forward<SmallImageIconUrlT>(value));
302 return *this;
303 }
305
307
313 inline const Aws::String& GetSound() const { return m_sound; }
314 inline bool SoundHasBeenSet() const { return m_soundHasBeenSet; }
315 template <typename SoundT = Aws::String>
316 void SetSound(SoundT&& value) {
317 m_soundHasBeenSet = true;
318 m_sound = std::forward<SoundT>(value);
319 }
320 template <typename SoundT = Aws::String>
321 GCMMessage& WithSound(SoundT&& value) {
322 SetSound(std::forward<SoundT>(value));
323 return *this;
324 }
326
328
332 inline const Aws::Map<Aws::String, Aws::Vector<Aws::String>>& GetSubstitutions() const { return m_substitutions; }
333 inline bool SubstitutionsHasBeenSet() const { return m_substitutionsHasBeenSet; }
334 template <typename SubstitutionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
335 void SetSubstitutions(SubstitutionsT&& value) {
336 m_substitutionsHasBeenSet = true;
337 m_substitutions = std::forward<SubstitutionsT>(value);
338 }
339 template <typename SubstitutionsT = Aws::Map<Aws::String, Aws::Vector<Aws::String>>>
340 GCMMessage& WithSubstitutions(SubstitutionsT&& value) {
341 SetSubstitutions(std::forward<SubstitutionsT>(value));
342 return *this;
343 }
344 template <typename SubstitutionsKeyT = Aws::String, typename SubstitutionsValueT = Aws::Vector<Aws::String>>
345 GCMMessage& AddSubstitutions(SubstitutionsKeyT&& key, SubstitutionsValueT&& value) {
346 m_substitutionsHasBeenSet = true;
347 m_substitutions.emplace(std::forward<SubstitutionsKeyT>(key), std::forward<SubstitutionsValueT>(value));
348 return *this;
349 }
351
353
361 inline int GetTimeToLive() const { return m_timeToLive; }
362 inline bool TimeToLiveHasBeenSet() const { return m_timeToLiveHasBeenSet; }
363 inline void SetTimeToLive(int value) {
364 m_timeToLiveHasBeenSet = true;
365 m_timeToLive = value;
366 }
367 inline GCMMessage& WithTimeToLive(int value) {
368 SetTimeToLive(value);
369 return *this;
370 }
372
374
378 inline const Aws::String& GetTitle() const { return m_title; }
379 inline bool TitleHasBeenSet() const { return m_titleHasBeenSet; }
380 template <typename TitleT = Aws::String>
381 void SetTitle(TitleT&& value) {
382 m_titleHasBeenSet = true;
383 m_title = std::forward<TitleT>(value);
384 }
385 template <typename TitleT = Aws::String>
386 GCMMessage& WithTitle(TitleT&& value) {
387 SetTitle(std::forward<TitleT>(value));
388 return *this;
389 }
391
393
397 inline const Aws::String& GetUrl() const { return m_url; }
398 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
399 template <typename UrlT = Aws::String>
400 void SetUrl(UrlT&& value) {
401 m_urlHasBeenSet = true;
402 m_url = std::forward<UrlT>(value);
403 }
404 template <typename UrlT = Aws::String>
405 GCMMessage& WithUrl(UrlT&& value) {
406 SetUrl(std::forward<UrlT>(value));
407 return *this;
408 }
410 private:
411 Action m_action{Action::NOT_SET};
412 bool m_actionHasBeenSet = false;
413
414 Aws::String m_body;
415 bool m_bodyHasBeenSet = false;
416
417 Aws::String m_collapseKey;
418 bool m_collapseKeyHasBeenSet = false;
419
421 bool m_dataHasBeenSet = false;
422
423 Aws::String m_iconReference;
424 bool m_iconReferenceHasBeenSet = false;
425
426 Aws::String m_imageIconUrl;
427 bool m_imageIconUrlHasBeenSet = false;
428
429 Aws::String m_imageUrl;
430 bool m_imageUrlHasBeenSet = false;
431
432 Aws::String m_preferredAuthenticationMethod;
433 bool m_preferredAuthenticationMethodHasBeenSet = false;
434
435 Aws::String m_priority;
436 bool m_priorityHasBeenSet = false;
437
438 Aws::String m_rawContent;
439 bool m_rawContentHasBeenSet = false;
440
441 Aws::String m_restrictedPackageName;
442 bool m_restrictedPackageNameHasBeenSet = false;
443
444 bool m_silentPush{false};
445 bool m_silentPushHasBeenSet = false;
446
447 Aws::String m_smallImageIconUrl;
448 bool m_smallImageIconUrlHasBeenSet = false;
449
450 Aws::String m_sound;
451 bool m_soundHasBeenSet = false;
452
454 bool m_substitutionsHasBeenSet = false;
455
456 int m_timeToLive{0};
457 bool m_timeToLiveHasBeenSet = false;
458
459 Aws::String m_title;
460 bool m_titleHasBeenSet = false;
461
462 Aws::String m_url;
463 bool m_urlHasBeenSet = false;
464};
465
466} // namespace Model
467} // namespace Pinpoint
468} // namespace Aws
const Aws::String & GetImageUrl() const
Definition GCMMessage.h:170
void SetImageIconUrl(ImageIconUrlT &&value)
Definition GCMMessage.h:155
void SetAction(Action value)
Definition GCMMessage.h:52
const Aws::String & GetRawContent() const
Definition GCMMessage.h:235
GCMMessage & WithBody(BodyT &&value)
Definition GCMMessage.h:74
void SetRawContent(RawContentT &&value)
Definition GCMMessage.h:238
void SetBody(BodyT &&value)
Definition GCMMessage.h:69
void SetPreferredAuthenticationMethod(PreferredAuthenticationMethodT &&value)
Definition GCMMessage.h:192
AWS_PINPOINT_API GCMMessage()=default
GCMMessage & WithCollapseKey(CollapseKeyT &&value)
Definition GCMMessage.h:97
GCMMessage & WithRawContent(RawContentT &&value)
Definition GCMMessage.h:243
void SetRestrictedPackageName(RestrictedPackageNameT &&value)
Definition GCMMessage.h:257
GCMMessage & WithTimeToLive(int value)
Definition GCMMessage.h:367
const Aws::String & GetSmallImageIconUrl() const
Definition GCMMessage.h:292
GCMMessage & AddData(DataKeyT &&key, DataValueT &&value)
Definition GCMMessage.h:122
void SetImageUrl(ImageUrlT &&value)
Definition GCMMessage.h:173
void SetTitle(TitleT &&value)
Definition GCMMessage.h:381
GCMMessage & AddSubstitutions(SubstitutionsKeyT &&key, SubstitutionsValueT &&value)
Definition GCMMessage.h:345
GCMMessage & WithSubstitutions(SubstitutionsT &&value)
Definition GCMMessage.h:340
const Aws::Map< Aws::String, Aws::Vector< Aws::String > > & GetSubstitutions() const
Definition GCMMessage.h:332
void SetSmallImageIconUrl(SmallImageIconUrlT &&value)
Definition GCMMessage.h:295
bool PreferredAuthenticationMethodHasBeenSet() const
Definition GCMMessage.h:190
void SetCollapseKey(CollapseKeyT &&value)
Definition GCMMessage.h:92
GCMMessage & WithSound(SoundT &&value)
Definition GCMMessage.h:321
void SetSubstitutions(SubstitutionsT &&value)
Definition GCMMessage.h:335
const Aws::String & GetPriority() const
Definition GCMMessage.h:215
GCMMessage & WithSmallImageIconUrl(SmallImageIconUrlT &&value)
Definition GCMMessage.h:300
const Aws::String & GetImageIconUrl() const
Definition GCMMessage.h:152
const Aws::String & GetRestrictedPackageName() const
Definition GCMMessage.h:254
void SetSound(SoundT &&value)
Definition GCMMessage.h:316
GCMMessage & WithAction(Action value)
Definition GCMMessage.h:56
GCMMessage & WithUrl(UrlT &&value)
Definition GCMMessage.h:405
AWS_PINPOINT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetUrl() const
Definition GCMMessage.h:397
GCMMessage & WithPriority(PriorityT &&value)
Definition GCMMessage.h:223
AWS_PINPOINT_API GCMMessage(Aws::Utils::Json::JsonView jsonValue)
bool RestrictedPackageNameHasBeenSet() const
Definition GCMMessage.h:255
GCMMessage & WithImageUrl(ImageUrlT &&value)
Definition GCMMessage.h:178
GCMMessage & WithData(DataT &&value)
Definition GCMMessage.h:117
const Aws::String & GetIconReference() const
Definition GCMMessage.h:133
GCMMessage & WithIconReference(IconReferenceT &&value)
Definition GCMMessage.h:141
GCMMessage & WithPreferredAuthenticationMethod(PreferredAuthenticationMethodT &&value)
Definition GCMMessage.h:197
void SetData(DataT &&value)
Definition GCMMessage.h:112
const Aws::String & GetBody() const
Definition GCMMessage.h:66
void SetPriority(PriorityT &&value)
Definition GCMMessage.h:218
const Aws::Map< Aws::String, Aws::String > & GetData() const
Definition GCMMessage.h:109
const Aws::String & GetCollapseKey() const
Definition GCMMessage.h:89
GCMMessage & WithSilentPush(bool value)
Definition GCMMessage.h:281
const Aws::String & GetTitle() const
Definition GCMMessage.h:378
GCMMessage & WithImageIconUrl(ImageIconUrlT &&value)
Definition GCMMessage.h:160
const Aws::String & GetPreferredAuthenticationMethod() const
Definition GCMMessage.h:189
void SetIconReference(IconReferenceT &&value)
Definition GCMMessage.h:136
GCMMessage & WithRestrictedPackageName(RestrictedPackageNameT &&value)
Definition GCMMessage.h:262
GCMMessage & WithTitle(TitleT &&value)
Definition GCMMessage.h:386
AWS_PINPOINT_API GCMMessage & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetSound() const
Definition GCMMessage.h:313
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