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/chime-sdk-messaging/ChimeSDKMessaging_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/chime-sdk-messaging/model/ChannelMessageType.h>
10 #include <aws/core/utils/DateTime.h>
11 #include <aws/chime-sdk-messaging/model/Identity.h>
12 #include <aws/chime-sdk-messaging/model/ChannelMessagePersistenceType.h>
13 #include <aws/chime-sdk-messaging/model/ChannelMessageStatusStructure.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace Utils
19 {
20 namespace Json
21 {
22   class JsonValue;
23   class JsonView;
24 } // namespace Json
25 } // namespace Utils
26 namespace ChimeSDKMessaging
27 {
28 namespace Model
29 {
30 
31   /**
32    * <p>The details of a message in a channel.</p><p><h3>See Also:</h3>   <a
33    * href="http://docs.aws.amazon.com/goto/WebAPI/chime-sdk-messaging-2021-05-15/ChannelMessage">AWS
34    * API Reference</a></p>
35    */
36   class AWS_CHIMESDKMESSAGING_API ChannelMessage
37   {
38   public:
39     ChannelMessage();
40     ChannelMessage(Aws::Utils::Json::JsonView jsonValue);
41     ChannelMessage& operator=(Aws::Utils::Json::JsonView jsonValue);
42     Aws::Utils::Json::JsonValue Jsonize() const;
43 
44 
45     /**
46      * <p>The ARN of the channel.</p>
47      */
GetChannelArn()48     inline const Aws::String& GetChannelArn() const{ return m_channelArn; }
49 
50     /**
51      * <p>The ARN of the channel.</p>
52      */
ChannelArnHasBeenSet()53     inline bool ChannelArnHasBeenSet() const { return m_channelArnHasBeenSet; }
54 
55     /**
56      * <p>The ARN of the channel.</p>
57      */
SetChannelArn(const Aws::String & value)58     inline void SetChannelArn(const Aws::String& value) { m_channelArnHasBeenSet = true; m_channelArn = value; }
59 
60     /**
61      * <p>The ARN of the channel.</p>
62      */
SetChannelArn(Aws::String && value)63     inline void SetChannelArn(Aws::String&& value) { m_channelArnHasBeenSet = true; m_channelArn = std::move(value); }
64 
65     /**
66      * <p>The ARN of the channel.</p>
67      */
SetChannelArn(const char * value)68     inline void SetChannelArn(const char* value) { m_channelArnHasBeenSet = true; m_channelArn.assign(value); }
69 
70     /**
71      * <p>The ARN of the channel.</p>
72      */
WithChannelArn(const Aws::String & value)73     inline ChannelMessage& WithChannelArn(const Aws::String& value) { SetChannelArn(value); return *this;}
74 
75     /**
76      * <p>The ARN of the channel.</p>
77      */
WithChannelArn(Aws::String && value)78     inline ChannelMessage& WithChannelArn(Aws::String&& value) { SetChannelArn(std::move(value)); return *this;}
79 
80     /**
81      * <p>The ARN of the channel.</p>
82      */
WithChannelArn(const char * value)83     inline ChannelMessage& WithChannelArn(const char* value) { SetChannelArn(value); return *this;}
84 
85 
86     /**
87      * <p>The ID of a message.</p>
88      */
GetMessageId()89     inline const Aws::String& GetMessageId() const{ return m_messageId; }
90 
91     /**
92      * <p>The ID of a message.</p>
93      */
MessageIdHasBeenSet()94     inline bool MessageIdHasBeenSet() const { return m_messageIdHasBeenSet; }
95 
96     /**
97      * <p>The ID of a message.</p>
98      */
SetMessageId(const Aws::String & value)99     inline void SetMessageId(const Aws::String& value) { m_messageIdHasBeenSet = true; m_messageId = value; }
100 
101     /**
102      * <p>The ID of a message.</p>
103      */
SetMessageId(Aws::String && value)104     inline void SetMessageId(Aws::String&& value) { m_messageIdHasBeenSet = true; m_messageId = std::move(value); }
105 
106     /**
107      * <p>The ID of a message.</p>
108      */
SetMessageId(const char * value)109     inline void SetMessageId(const char* value) { m_messageIdHasBeenSet = true; m_messageId.assign(value); }
110 
111     /**
112      * <p>The ID of a message.</p>
113      */
WithMessageId(const Aws::String & value)114     inline ChannelMessage& WithMessageId(const Aws::String& value) { SetMessageId(value); return *this;}
115 
116     /**
117      * <p>The ID of a message.</p>
118      */
WithMessageId(Aws::String && value)119     inline ChannelMessage& WithMessageId(Aws::String&& value) { SetMessageId(std::move(value)); return *this;}
120 
121     /**
122      * <p>The ID of a message.</p>
123      */
WithMessageId(const char * value)124     inline ChannelMessage& WithMessageId(const char* value) { SetMessageId(value); return *this;}
125 
126 
127     /**
128      * <p>The message content.</p>
129      */
GetContent()130     inline const Aws::String& GetContent() const{ return m_content; }
131 
132     /**
133      * <p>The message content.</p>
134      */
ContentHasBeenSet()135     inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
136 
137     /**
138      * <p>The message content.</p>
139      */
SetContent(const Aws::String & value)140     inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; }
141 
142     /**
143      * <p>The message content.</p>
144      */
SetContent(Aws::String && value)145     inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
146 
147     /**
148      * <p>The message content.</p>
149      */
SetContent(const char * value)150     inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); }
151 
152     /**
153      * <p>The message content.</p>
154      */
WithContent(const Aws::String & value)155     inline ChannelMessage& WithContent(const Aws::String& value) { SetContent(value); return *this;}
156 
157     /**
158      * <p>The message content.</p>
159      */
WithContent(Aws::String && value)160     inline ChannelMessage& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;}
161 
162     /**
163      * <p>The message content.</p>
164      */
WithContent(const char * value)165     inline ChannelMessage& WithContent(const char* value) { SetContent(value); return *this;}
166 
167 
168     /**
169      * <p>The message metadata.</p>
170      */
GetMetadata()171     inline const Aws::String& GetMetadata() const{ return m_metadata; }
172 
173     /**
174      * <p>The message metadata.</p>
175      */
MetadataHasBeenSet()176     inline bool MetadataHasBeenSet() const { return m_metadataHasBeenSet; }
177 
178     /**
179      * <p>The message metadata.</p>
180      */
SetMetadata(const Aws::String & value)181     inline void SetMetadata(const Aws::String& value) { m_metadataHasBeenSet = true; m_metadata = value; }
182 
183     /**
184      * <p>The message metadata.</p>
185      */
SetMetadata(Aws::String && value)186     inline void SetMetadata(Aws::String&& value) { m_metadataHasBeenSet = true; m_metadata = std::move(value); }
187 
188     /**
189      * <p>The message metadata.</p>
190      */
SetMetadata(const char * value)191     inline void SetMetadata(const char* value) { m_metadataHasBeenSet = true; m_metadata.assign(value); }
192 
193     /**
194      * <p>The message metadata.</p>
195      */
WithMetadata(const Aws::String & value)196     inline ChannelMessage& WithMetadata(const Aws::String& value) { SetMetadata(value); return *this;}
197 
198     /**
199      * <p>The message metadata.</p>
200      */
WithMetadata(Aws::String && value)201     inline ChannelMessage& WithMetadata(Aws::String&& value) { SetMetadata(std::move(value)); return *this;}
202 
203     /**
204      * <p>The message metadata.</p>
205      */
WithMetadata(const char * value)206     inline ChannelMessage& WithMetadata(const char* value) { SetMetadata(value); return *this;}
207 
208 
209     /**
210      * <p>The message type.</p>
211      */
GetType()212     inline const ChannelMessageType& GetType() const{ return m_type; }
213 
214     /**
215      * <p>The message type.</p>
216      */
TypeHasBeenSet()217     inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
218 
219     /**
220      * <p>The message type.</p>
221      */
SetType(const ChannelMessageType & value)222     inline void SetType(const ChannelMessageType& value) { m_typeHasBeenSet = true; m_type = value; }
223 
224     /**
225      * <p>The message type.</p>
226      */
SetType(ChannelMessageType && value)227     inline void SetType(ChannelMessageType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
228 
229     /**
230      * <p>The message type.</p>
231      */
WithType(const ChannelMessageType & value)232     inline ChannelMessage& WithType(const ChannelMessageType& value) { SetType(value); return *this;}
233 
234     /**
235      * <p>The message type.</p>
236      */
WithType(ChannelMessageType && value)237     inline ChannelMessage& WithType(ChannelMessageType&& value) { SetType(std::move(value)); return *this;}
238 
239 
240     /**
241      * <p>The time at which the message was created.</p>
242      */
GetCreatedTimestamp()243     inline const Aws::Utils::DateTime& GetCreatedTimestamp() const{ return m_createdTimestamp; }
244 
245     /**
246      * <p>The time at which the message was created.</p>
247      */
CreatedTimestampHasBeenSet()248     inline bool CreatedTimestampHasBeenSet() const { return m_createdTimestampHasBeenSet; }
249 
250     /**
251      * <p>The time at which the message was created.</p>
252      */
SetCreatedTimestamp(const Aws::Utils::DateTime & value)253     inline void SetCreatedTimestamp(const Aws::Utils::DateTime& value) { m_createdTimestampHasBeenSet = true; m_createdTimestamp = value; }
254 
255     /**
256      * <p>The time at which the message was created.</p>
257      */
SetCreatedTimestamp(Aws::Utils::DateTime && value)258     inline void SetCreatedTimestamp(Aws::Utils::DateTime&& value) { m_createdTimestampHasBeenSet = true; m_createdTimestamp = std::move(value); }
259 
260     /**
261      * <p>The time at which the message was created.</p>
262      */
WithCreatedTimestamp(const Aws::Utils::DateTime & value)263     inline ChannelMessage& WithCreatedTimestamp(const Aws::Utils::DateTime& value) { SetCreatedTimestamp(value); return *this;}
264 
265     /**
266      * <p>The time at which the message was created.</p>
267      */
WithCreatedTimestamp(Aws::Utils::DateTime && value)268     inline ChannelMessage& WithCreatedTimestamp(Aws::Utils::DateTime&& value) { SetCreatedTimestamp(std::move(value)); return *this;}
269 
270 
271     /**
272      * <p>The time at which a message was edited.</p>
273      */
GetLastEditedTimestamp()274     inline const Aws::Utils::DateTime& GetLastEditedTimestamp() const{ return m_lastEditedTimestamp; }
275 
276     /**
277      * <p>The time at which a message was edited.</p>
278      */
LastEditedTimestampHasBeenSet()279     inline bool LastEditedTimestampHasBeenSet() const { return m_lastEditedTimestampHasBeenSet; }
280 
281     /**
282      * <p>The time at which a message was edited.</p>
283      */
SetLastEditedTimestamp(const Aws::Utils::DateTime & value)284     inline void SetLastEditedTimestamp(const Aws::Utils::DateTime& value) { m_lastEditedTimestampHasBeenSet = true; m_lastEditedTimestamp = value; }
285 
286     /**
287      * <p>The time at which a message was edited.</p>
288      */
SetLastEditedTimestamp(Aws::Utils::DateTime && value)289     inline void SetLastEditedTimestamp(Aws::Utils::DateTime&& value) { m_lastEditedTimestampHasBeenSet = true; m_lastEditedTimestamp = std::move(value); }
290 
291     /**
292      * <p>The time at which a message was edited.</p>
293      */
WithLastEditedTimestamp(const Aws::Utils::DateTime & value)294     inline ChannelMessage& WithLastEditedTimestamp(const Aws::Utils::DateTime& value) { SetLastEditedTimestamp(value); return *this;}
295 
296     /**
297      * <p>The time at which a message was edited.</p>
298      */
WithLastEditedTimestamp(Aws::Utils::DateTime && value)299     inline ChannelMessage& WithLastEditedTimestamp(Aws::Utils::DateTime&& value) { SetLastEditedTimestamp(std::move(value)); return *this;}
300 
301 
302     /**
303      * <p>The time at which a message was updated.</p>
304      */
GetLastUpdatedTimestamp()305     inline const Aws::Utils::DateTime& GetLastUpdatedTimestamp() const{ return m_lastUpdatedTimestamp; }
306 
307     /**
308      * <p>The time at which a message was updated.</p>
309      */
LastUpdatedTimestampHasBeenSet()310     inline bool LastUpdatedTimestampHasBeenSet() const { return m_lastUpdatedTimestampHasBeenSet; }
311 
312     /**
313      * <p>The time at which a message was updated.</p>
314      */
SetLastUpdatedTimestamp(const Aws::Utils::DateTime & value)315     inline void SetLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = value; }
316 
317     /**
318      * <p>The time at which a message was updated.</p>
319      */
SetLastUpdatedTimestamp(Aws::Utils::DateTime && value)320     inline void SetLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { m_lastUpdatedTimestampHasBeenSet = true; m_lastUpdatedTimestamp = std::move(value); }
321 
322     /**
323      * <p>The time at which a message was updated.</p>
324      */
WithLastUpdatedTimestamp(const Aws::Utils::DateTime & value)325     inline ChannelMessage& WithLastUpdatedTimestamp(const Aws::Utils::DateTime& value) { SetLastUpdatedTimestamp(value); return *this;}
326 
327     /**
328      * <p>The time at which a message was updated.</p>
329      */
WithLastUpdatedTimestamp(Aws::Utils::DateTime && value)330     inline ChannelMessage& WithLastUpdatedTimestamp(Aws::Utils::DateTime&& value) { SetLastUpdatedTimestamp(std::move(value)); return *this;}
331 
332 
333     /**
334      * <p>The message sender.</p>
335      */
GetSender()336     inline const Identity& GetSender() const{ return m_sender; }
337 
338     /**
339      * <p>The message sender.</p>
340      */
SenderHasBeenSet()341     inline bool SenderHasBeenSet() const { return m_senderHasBeenSet; }
342 
343     /**
344      * <p>The message sender.</p>
345      */
SetSender(const Identity & value)346     inline void SetSender(const Identity& value) { m_senderHasBeenSet = true; m_sender = value; }
347 
348     /**
349      * <p>The message sender.</p>
350      */
SetSender(Identity && value)351     inline void SetSender(Identity&& value) { m_senderHasBeenSet = true; m_sender = std::move(value); }
352 
353     /**
354      * <p>The message sender.</p>
355      */
WithSender(const Identity & value)356     inline ChannelMessage& WithSender(const Identity& value) { SetSender(value); return *this;}
357 
358     /**
359      * <p>The message sender.</p>
360      */
WithSender(Identity && value)361     inline ChannelMessage& WithSender(Identity&& value) { SetSender(std::move(value)); return *this;}
362 
363 
364     /**
365      * <p>Hides the content of a message.</p>
366      */
GetRedacted()367     inline bool GetRedacted() const{ return m_redacted; }
368 
369     /**
370      * <p>Hides the content of a message.</p>
371      */
RedactedHasBeenSet()372     inline bool RedactedHasBeenSet() const { return m_redactedHasBeenSet; }
373 
374     /**
375      * <p>Hides the content of a message.</p>
376      */
SetRedacted(bool value)377     inline void SetRedacted(bool value) { m_redactedHasBeenSet = true; m_redacted = value; }
378 
379     /**
380      * <p>Hides the content of a message.</p>
381      */
WithRedacted(bool value)382     inline ChannelMessage& WithRedacted(bool value) { SetRedacted(value); return *this;}
383 
384 
385     /**
386      * <p>The persistence setting for a channel message.</p>
387      */
GetPersistence()388     inline const ChannelMessagePersistenceType& GetPersistence() const{ return m_persistence; }
389 
390     /**
391      * <p>The persistence setting for a channel message.</p>
392      */
PersistenceHasBeenSet()393     inline bool PersistenceHasBeenSet() const { return m_persistenceHasBeenSet; }
394 
395     /**
396      * <p>The persistence setting for a channel message.</p>
397      */
SetPersistence(const ChannelMessagePersistenceType & value)398     inline void SetPersistence(const ChannelMessagePersistenceType& value) { m_persistenceHasBeenSet = true; m_persistence = value; }
399 
400     /**
401      * <p>The persistence setting for a channel message.</p>
402      */
SetPersistence(ChannelMessagePersistenceType && value)403     inline void SetPersistence(ChannelMessagePersistenceType&& value) { m_persistenceHasBeenSet = true; m_persistence = std::move(value); }
404 
405     /**
406      * <p>The persistence setting for a channel message.</p>
407      */
WithPersistence(const ChannelMessagePersistenceType & value)408     inline ChannelMessage& WithPersistence(const ChannelMessagePersistenceType& value) { SetPersistence(value); return *this;}
409 
410     /**
411      * <p>The persistence setting for a channel message.</p>
412      */
WithPersistence(ChannelMessagePersistenceType && value)413     inline ChannelMessage& WithPersistence(ChannelMessagePersistenceType&& value) { SetPersistence(std::move(value)); return *this;}
414 
415 
416     /**
417      * <p>The status of the channel message.</p>
418      */
GetStatus()419     inline const ChannelMessageStatusStructure& GetStatus() const{ return m_status; }
420 
421     /**
422      * <p>The status of the channel message.</p>
423      */
StatusHasBeenSet()424     inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
425 
426     /**
427      * <p>The status of the channel message.</p>
428      */
SetStatus(const ChannelMessageStatusStructure & value)429     inline void SetStatus(const ChannelMessageStatusStructure& value) { m_statusHasBeenSet = true; m_status = value; }
430 
431     /**
432      * <p>The status of the channel message.</p>
433      */
SetStatus(ChannelMessageStatusStructure && value)434     inline void SetStatus(ChannelMessageStatusStructure&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
435 
436     /**
437      * <p>The status of the channel message.</p>
438      */
WithStatus(const ChannelMessageStatusStructure & value)439     inline ChannelMessage& WithStatus(const ChannelMessageStatusStructure& value) { SetStatus(value); return *this;}
440 
441     /**
442      * <p>The status of the channel message.</p>
443      */
WithStatus(ChannelMessageStatusStructure && value)444     inline ChannelMessage& WithStatus(ChannelMessageStatusStructure&& value) { SetStatus(std::move(value)); return *this;}
445 
446   private:
447 
448     Aws::String m_channelArn;
449     bool m_channelArnHasBeenSet;
450 
451     Aws::String m_messageId;
452     bool m_messageIdHasBeenSet;
453 
454     Aws::String m_content;
455     bool m_contentHasBeenSet;
456 
457     Aws::String m_metadata;
458     bool m_metadataHasBeenSet;
459 
460     ChannelMessageType m_type;
461     bool m_typeHasBeenSet;
462 
463     Aws::Utils::DateTime m_createdTimestamp;
464     bool m_createdTimestampHasBeenSet;
465 
466     Aws::Utils::DateTime m_lastEditedTimestamp;
467     bool m_lastEditedTimestampHasBeenSet;
468 
469     Aws::Utils::DateTime m_lastUpdatedTimestamp;
470     bool m_lastUpdatedTimestampHasBeenSet;
471 
472     Identity m_sender;
473     bool m_senderHasBeenSet;
474 
475     bool m_redacted;
476     bool m_redactedHasBeenSet;
477 
478     ChannelMessagePersistenceType m_persistence;
479     bool m_persistenceHasBeenSet;
480 
481     ChannelMessageStatusStructure m_status;
482     bool m_statusHasBeenSet;
483   };
484 
485 } // namespace Model
486 } // namespace ChimeSDKMessaging
487 } // namespace Aws
488