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/pinpoint/model/DeliveryStatus.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace Pinpoint
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Provides information about the results of sending a message directly to an
29    * endpoint address.</p><p><h3>See Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/pinpoint-2016-12-01/MessageResult">AWS
31    * API Reference</a></p>
32    */
33   class AWS_PINPOINT_API MessageResult
34   {
35   public:
36     MessageResult();
37     MessageResult(Aws::Utils::Json::JsonView jsonValue);
38     MessageResult& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The delivery status of the message. Possible values are:</p> <ul>
44      * <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint
45      * address. Amazon Pinpoint won't attempt to send the message again.</p></li>
46      * <li><p>OPT_OUT - The user who's associated with the endpoint address has opted
47      * out of receiving messages from you. Amazon Pinpoint won't attempt to send the
48      * message again.</p></li> <li><p>PERMANENT_FAILURE - An error occurred when
49      * delivering the message to the endpoint address. Amazon Pinpoint won't attempt to
50      * send the message again.</p></li>   <li><p>SUCCESSFUL - The message was
51      * successfully delivered to the endpoint address.</p></li>
52      * <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't
53      * attempt to send the message again.</p></li> <li><p>THROTTLED - Amazon Pinpoint
54      * throttled the operation to send the message to the endpoint address.</p></li>
55      * <li><p>TIMEOUT - The message couldn't be sent within the timeout
56      * period.</p></li> <li><p>UNKNOWN_FAILURE - An unknown error
57      * occurred.</p></li></ul>
58      */
GetDeliveryStatus()59     inline const DeliveryStatus& GetDeliveryStatus() const{ return m_deliveryStatus; }
60 
61     /**
62      * <p>The delivery status of the message. Possible values are:</p> <ul>
63      * <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint
64      * address. Amazon Pinpoint won't attempt to send the message again.</p></li>
65      * <li><p>OPT_OUT - The user who's associated with the endpoint address has opted
66      * out of receiving messages from you. Amazon Pinpoint won't attempt to send the
67      * message again.</p></li> <li><p>PERMANENT_FAILURE - An error occurred when
68      * delivering the message to the endpoint address. Amazon Pinpoint won't attempt to
69      * send the message again.</p></li>   <li><p>SUCCESSFUL - The message was
70      * successfully delivered to the endpoint address.</p></li>
71      * <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't
72      * attempt to send the message again.</p></li> <li><p>THROTTLED - Amazon Pinpoint
73      * throttled the operation to send the message to the endpoint address.</p></li>
74      * <li><p>TIMEOUT - The message couldn't be sent within the timeout
75      * period.</p></li> <li><p>UNKNOWN_FAILURE - An unknown error
76      * occurred.</p></li></ul>
77      */
DeliveryStatusHasBeenSet()78     inline bool DeliveryStatusHasBeenSet() const { return m_deliveryStatusHasBeenSet; }
79 
80     /**
81      * <p>The delivery status of the message. Possible values are:</p> <ul>
82      * <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint
83      * address. Amazon Pinpoint won't attempt to send the message again.</p></li>
84      * <li><p>OPT_OUT - The user who's associated with the endpoint address has opted
85      * out of receiving messages from you. Amazon Pinpoint won't attempt to send the
86      * message again.</p></li> <li><p>PERMANENT_FAILURE - An error occurred when
87      * delivering the message to the endpoint address. Amazon Pinpoint won't attempt to
88      * send the message again.</p></li>   <li><p>SUCCESSFUL - The message was
89      * successfully delivered to the endpoint address.</p></li>
90      * <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't
91      * attempt to send the message again.</p></li> <li><p>THROTTLED - Amazon Pinpoint
92      * throttled the operation to send the message to the endpoint address.</p></li>
93      * <li><p>TIMEOUT - The message couldn't be sent within the timeout
94      * period.</p></li> <li><p>UNKNOWN_FAILURE - An unknown error
95      * occurred.</p></li></ul>
96      */
SetDeliveryStatus(const DeliveryStatus & value)97     inline void SetDeliveryStatus(const DeliveryStatus& value) { m_deliveryStatusHasBeenSet = true; m_deliveryStatus = value; }
98 
99     /**
100      * <p>The delivery status of the message. Possible values are:</p> <ul>
101      * <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint
102      * address. Amazon Pinpoint won't attempt to send the message again.</p></li>
103      * <li><p>OPT_OUT - The user who's associated with the endpoint address has opted
104      * out of receiving messages from you. Amazon Pinpoint won't attempt to send the
105      * message again.</p></li> <li><p>PERMANENT_FAILURE - An error occurred when
106      * delivering the message to the endpoint address. Amazon Pinpoint won't attempt to
107      * send the message again.</p></li>   <li><p>SUCCESSFUL - The message was
108      * successfully delivered to the endpoint address.</p></li>
109      * <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't
110      * attempt to send the message again.</p></li> <li><p>THROTTLED - Amazon Pinpoint
111      * throttled the operation to send the message to the endpoint address.</p></li>
112      * <li><p>TIMEOUT - The message couldn't be sent within the timeout
113      * period.</p></li> <li><p>UNKNOWN_FAILURE - An unknown error
114      * occurred.</p></li></ul>
115      */
SetDeliveryStatus(DeliveryStatus && value)116     inline void SetDeliveryStatus(DeliveryStatus&& value) { m_deliveryStatusHasBeenSet = true; m_deliveryStatus = std::move(value); }
117 
118     /**
119      * <p>The delivery status of the message. Possible values are:</p> <ul>
120      * <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint
121      * address. Amazon Pinpoint won't attempt to send the message again.</p></li>
122      * <li><p>OPT_OUT - The user who's associated with the endpoint address has opted
123      * out of receiving messages from you. Amazon Pinpoint won't attempt to send the
124      * message again.</p></li> <li><p>PERMANENT_FAILURE - An error occurred when
125      * delivering the message to the endpoint address. Amazon Pinpoint won't attempt to
126      * send the message again.</p></li>   <li><p>SUCCESSFUL - The message was
127      * successfully delivered to the endpoint address.</p></li>
128      * <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't
129      * attempt to send the message again.</p></li> <li><p>THROTTLED - Amazon Pinpoint
130      * throttled the operation to send the message to the endpoint address.</p></li>
131      * <li><p>TIMEOUT - The message couldn't be sent within the timeout
132      * period.</p></li> <li><p>UNKNOWN_FAILURE - An unknown error
133      * occurred.</p></li></ul>
134      */
WithDeliveryStatus(const DeliveryStatus & value)135     inline MessageResult& WithDeliveryStatus(const DeliveryStatus& value) { SetDeliveryStatus(value); return *this;}
136 
137     /**
138      * <p>The delivery status of the message. Possible values are:</p> <ul>
139      * <li><p>DUPLICATE - The endpoint address is a duplicate of another endpoint
140      * address. Amazon Pinpoint won't attempt to send the message again.</p></li>
141      * <li><p>OPT_OUT - The user who's associated with the endpoint address has opted
142      * out of receiving messages from you. Amazon Pinpoint won't attempt to send the
143      * message again.</p></li> <li><p>PERMANENT_FAILURE - An error occurred when
144      * delivering the message to the endpoint address. Amazon Pinpoint won't attempt to
145      * send the message again.</p></li>   <li><p>SUCCESSFUL - The message was
146      * successfully delivered to the endpoint address.</p></li>
147      * <li><p>TEMPORARY_FAILURE - A temporary error occurred. Amazon Pinpoint won't
148      * attempt to send the message again.</p></li> <li><p>THROTTLED - Amazon Pinpoint
149      * throttled the operation to send the message to the endpoint address.</p></li>
150      * <li><p>TIMEOUT - The message couldn't be sent within the timeout
151      * period.</p></li> <li><p>UNKNOWN_FAILURE - An unknown error
152      * occurred.</p></li></ul>
153      */
WithDeliveryStatus(DeliveryStatus && value)154     inline MessageResult& WithDeliveryStatus(DeliveryStatus&& value) { SetDeliveryStatus(std::move(value)); return *this;}
155 
156 
157     /**
158      * <p>The unique identifier for the message that was sent.</p>
159      */
GetMessageId()160     inline const Aws::String& GetMessageId() const{ return m_messageId; }
161 
162     /**
163      * <p>The unique identifier for the message that was sent.</p>
164      */
MessageIdHasBeenSet()165     inline bool MessageIdHasBeenSet() const { return m_messageIdHasBeenSet; }
166 
167     /**
168      * <p>The unique identifier for the message that was sent.</p>
169      */
SetMessageId(const Aws::String & value)170     inline void SetMessageId(const Aws::String& value) { m_messageIdHasBeenSet = true; m_messageId = value; }
171 
172     /**
173      * <p>The unique identifier for the message that was sent.</p>
174      */
SetMessageId(Aws::String && value)175     inline void SetMessageId(Aws::String&& value) { m_messageIdHasBeenSet = true; m_messageId = std::move(value); }
176 
177     /**
178      * <p>The unique identifier for the message that was sent.</p>
179      */
SetMessageId(const char * value)180     inline void SetMessageId(const char* value) { m_messageIdHasBeenSet = true; m_messageId.assign(value); }
181 
182     /**
183      * <p>The unique identifier for the message that was sent.</p>
184      */
WithMessageId(const Aws::String & value)185     inline MessageResult& WithMessageId(const Aws::String& value) { SetMessageId(value); return *this;}
186 
187     /**
188      * <p>The unique identifier for the message that was sent.</p>
189      */
WithMessageId(Aws::String && value)190     inline MessageResult& WithMessageId(Aws::String&& value) { SetMessageId(std::move(value)); return *this;}
191 
192     /**
193      * <p>The unique identifier for the message that was sent.</p>
194      */
WithMessageId(const char * value)195     inline MessageResult& WithMessageId(const char* value) { SetMessageId(value); return *this;}
196 
197 
198     /**
199      * <p>The downstream service status code for delivering the message.</p>
200      */
GetStatusCode()201     inline int GetStatusCode() const{ return m_statusCode; }
202 
203     /**
204      * <p>The downstream service status code for delivering the message.</p>
205      */
StatusCodeHasBeenSet()206     inline bool StatusCodeHasBeenSet() const { return m_statusCodeHasBeenSet; }
207 
208     /**
209      * <p>The downstream service status code for delivering the message.</p>
210      */
SetStatusCode(int value)211     inline void SetStatusCode(int value) { m_statusCodeHasBeenSet = true; m_statusCode = value; }
212 
213     /**
214      * <p>The downstream service status code for delivering the message.</p>
215      */
WithStatusCode(int value)216     inline MessageResult& WithStatusCode(int value) { SetStatusCode(value); return *this;}
217 
218 
219     /**
220      * <p>The status message for delivering the message.</p>
221      */
GetStatusMessage()222     inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; }
223 
224     /**
225      * <p>The status message for delivering the message.</p>
226      */
StatusMessageHasBeenSet()227     inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
228 
229     /**
230      * <p>The status message for delivering the message.</p>
231      */
SetStatusMessage(const Aws::String & value)232     inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; }
233 
234     /**
235      * <p>The status message for delivering the message.</p>
236      */
SetStatusMessage(Aws::String && value)237     inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); }
238 
239     /**
240      * <p>The status message for delivering the message.</p>
241      */
SetStatusMessage(const char * value)242     inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); }
243 
244     /**
245      * <p>The status message for delivering the message.</p>
246      */
WithStatusMessage(const Aws::String & value)247     inline MessageResult& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;}
248 
249     /**
250      * <p>The status message for delivering the message.</p>
251      */
WithStatusMessage(Aws::String && value)252     inline MessageResult& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;}
253 
254     /**
255      * <p>The status message for delivering the message.</p>
256      */
WithStatusMessage(const char * value)257     inline MessageResult& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;}
258 
259 
260     /**
261      * <p>For push notifications that are sent through the GCM channel, specifies
262      * whether the endpoint's device registration token was updated as part of
263      * delivering the message.</p>
264      */
GetUpdatedToken()265     inline const Aws::String& GetUpdatedToken() const{ return m_updatedToken; }
266 
267     /**
268      * <p>For push notifications that are sent through the GCM channel, specifies
269      * whether the endpoint's device registration token was updated as part of
270      * delivering the message.</p>
271      */
UpdatedTokenHasBeenSet()272     inline bool UpdatedTokenHasBeenSet() const { return m_updatedTokenHasBeenSet; }
273 
274     /**
275      * <p>For push notifications that are sent through the GCM channel, specifies
276      * whether the endpoint's device registration token was updated as part of
277      * delivering the message.</p>
278      */
SetUpdatedToken(const Aws::String & value)279     inline void SetUpdatedToken(const Aws::String& value) { m_updatedTokenHasBeenSet = true; m_updatedToken = value; }
280 
281     /**
282      * <p>For push notifications that are sent through the GCM channel, specifies
283      * whether the endpoint's device registration token was updated as part of
284      * delivering the message.</p>
285      */
SetUpdatedToken(Aws::String && value)286     inline void SetUpdatedToken(Aws::String&& value) { m_updatedTokenHasBeenSet = true; m_updatedToken = std::move(value); }
287 
288     /**
289      * <p>For push notifications that are sent through the GCM channel, specifies
290      * whether the endpoint's device registration token was updated as part of
291      * delivering the message.</p>
292      */
SetUpdatedToken(const char * value)293     inline void SetUpdatedToken(const char* value) { m_updatedTokenHasBeenSet = true; m_updatedToken.assign(value); }
294 
295     /**
296      * <p>For push notifications that are sent through the GCM channel, specifies
297      * whether the endpoint's device registration token was updated as part of
298      * delivering the message.</p>
299      */
WithUpdatedToken(const Aws::String & value)300     inline MessageResult& WithUpdatedToken(const Aws::String& value) { SetUpdatedToken(value); return *this;}
301 
302     /**
303      * <p>For push notifications that are sent through the GCM channel, specifies
304      * whether the endpoint's device registration token was updated as part of
305      * delivering the message.</p>
306      */
WithUpdatedToken(Aws::String && value)307     inline MessageResult& WithUpdatedToken(Aws::String&& value) { SetUpdatedToken(std::move(value)); return *this;}
308 
309     /**
310      * <p>For push notifications that are sent through the GCM channel, specifies
311      * whether the endpoint's device registration token was updated as part of
312      * delivering the message.</p>
313      */
WithUpdatedToken(const char * value)314     inline MessageResult& WithUpdatedToken(const char* value) { SetUpdatedToken(value); return *this;}
315 
316   private:
317 
318     DeliveryStatus m_deliveryStatus;
319     bool m_deliveryStatusHasBeenSet;
320 
321     Aws::String m_messageId;
322     bool m_messageIdHasBeenSet;
323 
324     int m_statusCode;
325     bool m_statusCodeHasBeenSet;
326 
327     Aws::String m_statusMessage;
328     bool m_statusMessageHasBeenSet;
329 
330     Aws::String m_updatedToken;
331     bool m_updatedTokenHasBeenSet;
332   };
333 
334 } // namespace Model
335 } // namespace Pinpoint
336 } // namespace Aws
337