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/connectparticipant/ConnectParticipant_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/connectparticipant/model/ChatItemType.h>
10 #include <aws/connectparticipant/model/ParticipantRole.h>
11 #include <aws/core/utils/memory/stl/AWSVector.h>
12 #include <aws/connectparticipant/model/AttachmentItem.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Json
20 {
21   class JsonValue;
22   class JsonView;
23 } // namespace Json
24 } // namespace Utils
25 namespace ConnectParticipant
26 {
27 namespace Model
28 {
29 
30   /**
31    * <p>An item - message or event - that has been sent. </p><p><h3>See Also:</h3>
32    * <a
33    * href="http://docs.aws.amazon.com/goto/WebAPI/connectparticipant-2018-09-07/Item">AWS
34    * API Reference</a></p>
35    */
36   class AWS_CONNECTPARTICIPANT_API Item
37   {
38   public:
39     Item();
40     Item(Aws::Utils::Json::JsonView jsonValue);
41     Item& operator=(Aws::Utils::Json::JsonView jsonValue);
42     Aws::Utils::Json::JsonValue Jsonize() const;
43 
44 
45     /**
46      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
47      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
48      * 2019-11-08T02:41:28.172Z.</p>
49      */
GetAbsoluteTime()50     inline const Aws::String& GetAbsoluteTime() const{ return m_absoluteTime; }
51 
52     /**
53      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
54      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
55      * 2019-11-08T02:41:28.172Z.</p>
56      */
AbsoluteTimeHasBeenSet()57     inline bool AbsoluteTimeHasBeenSet() const { return m_absoluteTimeHasBeenSet; }
58 
59     /**
60      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
61      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
62      * 2019-11-08T02:41:28.172Z.</p>
63      */
SetAbsoluteTime(const Aws::String & value)64     inline void SetAbsoluteTime(const Aws::String& value) { m_absoluteTimeHasBeenSet = true; m_absoluteTime = value; }
65 
66     /**
67      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
68      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
69      * 2019-11-08T02:41:28.172Z.</p>
70      */
SetAbsoluteTime(Aws::String && value)71     inline void SetAbsoluteTime(Aws::String&& value) { m_absoluteTimeHasBeenSet = true; m_absoluteTime = std::move(value); }
72 
73     /**
74      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
75      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
76      * 2019-11-08T02:41:28.172Z.</p>
77      */
SetAbsoluteTime(const char * value)78     inline void SetAbsoluteTime(const char* value) { m_absoluteTimeHasBeenSet = true; m_absoluteTime.assign(value); }
79 
80     /**
81      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
82      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
83      * 2019-11-08T02:41:28.172Z.</p>
84      */
WithAbsoluteTime(const Aws::String & value)85     inline Item& WithAbsoluteTime(const Aws::String& value) { SetAbsoluteTime(value); return *this;}
86 
87     /**
88      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
89      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
90      * 2019-11-08T02:41:28.172Z.</p>
91      */
WithAbsoluteTime(Aws::String && value)92     inline Item& WithAbsoluteTime(Aws::String&& value) { SetAbsoluteTime(std::move(value)); return *this;}
93 
94     /**
95      * <p>The time when the message or event was sent.</p> <p>It's specified in ISO
96      * 8601 format: yyyy-MM-ddThh:mm:ss.SSSZ. For example,
97      * 2019-11-08T02:41:28.172Z.</p>
98      */
WithAbsoluteTime(const char * value)99     inline Item& WithAbsoluteTime(const char* value) { SetAbsoluteTime(value); return *this;}
100 
101 
102     /**
103      * <p>The content of the message or event.</p>
104      */
GetContent()105     inline const Aws::String& GetContent() const{ return m_content; }
106 
107     /**
108      * <p>The content of the message or event.</p>
109      */
ContentHasBeenSet()110     inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
111 
112     /**
113      * <p>The content of the message or event.</p>
114      */
SetContent(const Aws::String & value)115     inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; }
116 
117     /**
118      * <p>The content of the message or event.</p>
119      */
SetContent(Aws::String && value)120     inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
121 
122     /**
123      * <p>The content of the message or event.</p>
124      */
SetContent(const char * value)125     inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); }
126 
127     /**
128      * <p>The content of the message or event.</p>
129      */
WithContent(const Aws::String & value)130     inline Item& WithContent(const Aws::String& value) { SetContent(value); return *this;}
131 
132     /**
133      * <p>The content of the message or event.</p>
134      */
WithContent(Aws::String && value)135     inline Item& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;}
136 
137     /**
138      * <p>The content of the message or event.</p>
139      */
WithContent(const char * value)140     inline Item& WithContent(const char* value) { SetContent(value); return *this;}
141 
142 
143     /**
144      * <p>The type of content of the item.</p>
145      */
GetContentType()146     inline const Aws::String& GetContentType() const{ return m_contentType; }
147 
148     /**
149      * <p>The type of content of the item.</p>
150      */
ContentTypeHasBeenSet()151     inline bool ContentTypeHasBeenSet() const { return m_contentTypeHasBeenSet; }
152 
153     /**
154      * <p>The type of content of the item.</p>
155      */
SetContentType(const Aws::String & value)156     inline void SetContentType(const Aws::String& value) { m_contentTypeHasBeenSet = true; m_contentType = value; }
157 
158     /**
159      * <p>The type of content of the item.</p>
160      */
SetContentType(Aws::String && value)161     inline void SetContentType(Aws::String&& value) { m_contentTypeHasBeenSet = true; m_contentType = std::move(value); }
162 
163     /**
164      * <p>The type of content of the item.</p>
165      */
SetContentType(const char * value)166     inline void SetContentType(const char* value) { m_contentTypeHasBeenSet = true; m_contentType.assign(value); }
167 
168     /**
169      * <p>The type of content of the item.</p>
170      */
WithContentType(const Aws::String & value)171     inline Item& WithContentType(const Aws::String& value) { SetContentType(value); return *this;}
172 
173     /**
174      * <p>The type of content of the item.</p>
175      */
WithContentType(Aws::String && value)176     inline Item& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;}
177 
178     /**
179      * <p>The type of content of the item.</p>
180      */
WithContentType(const char * value)181     inline Item& WithContentType(const char* value) { SetContentType(value); return *this;}
182 
183 
184     /**
185      * <p>The ID of the item.</p>
186      */
GetId()187     inline const Aws::String& GetId() const{ return m_id; }
188 
189     /**
190      * <p>The ID of the item.</p>
191      */
IdHasBeenSet()192     inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
193 
194     /**
195      * <p>The ID of the item.</p>
196      */
SetId(const Aws::String & value)197     inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
198 
199     /**
200      * <p>The ID of the item.</p>
201      */
SetId(Aws::String && value)202     inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
203 
204     /**
205      * <p>The ID of the item.</p>
206      */
SetId(const char * value)207     inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
208 
209     /**
210      * <p>The ID of the item.</p>
211      */
WithId(const Aws::String & value)212     inline Item& WithId(const Aws::String& value) { SetId(value); return *this;}
213 
214     /**
215      * <p>The ID of the item.</p>
216      */
WithId(Aws::String && value)217     inline Item& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
218 
219     /**
220      * <p>The ID of the item.</p>
221      */
WithId(const char * value)222     inline Item& WithId(const char* value) { SetId(value); return *this;}
223 
224 
225     /**
226      * <p>Type of the item: message or event. </p>
227      */
GetType()228     inline const ChatItemType& GetType() const{ return m_type; }
229 
230     /**
231      * <p>Type of the item: message or event. </p>
232      */
TypeHasBeenSet()233     inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
234 
235     /**
236      * <p>Type of the item: message or event. </p>
237      */
SetType(const ChatItemType & value)238     inline void SetType(const ChatItemType& value) { m_typeHasBeenSet = true; m_type = value; }
239 
240     /**
241      * <p>Type of the item: message or event. </p>
242      */
SetType(ChatItemType && value)243     inline void SetType(ChatItemType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
244 
245     /**
246      * <p>Type of the item: message or event. </p>
247      */
WithType(const ChatItemType & value)248     inline Item& WithType(const ChatItemType& value) { SetType(value); return *this;}
249 
250     /**
251      * <p>Type of the item: message or event. </p>
252      */
WithType(ChatItemType && value)253     inline Item& WithType(ChatItemType&& value) { SetType(std::move(value)); return *this;}
254 
255 
256     /**
257      * <p>The ID of the sender in the session.</p>
258      */
GetParticipantId()259     inline const Aws::String& GetParticipantId() const{ return m_participantId; }
260 
261     /**
262      * <p>The ID of the sender in the session.</p>
263      */
ParticipantIdHasBeenSet()264     inline bool ParticipantIdHasBeenSet() const { return m_participantIdHasBeenSet; }
265 
266     /**
267      * <p>The ID of the sender in the session.</p>
268      */
SetParticipantId(const Aws::String & value)269     inline void SetParticipantId(const Aws::String& value) { m_participantIdHasBeenSet = true; m_participantId = value; }
270 
271     /**
272      * <p>The ID of the sender in the session.</p>
273      */
SetParticipantId(Aws::String && value)274     inline void SetParticipantId(Aws::String&& value) { m_participantIdHasBeenSet = true; m_participantId = std::move(value); }
275 
276     /**
277      * <p>The ID of the sender in the session.</p>
278      */
SetParticipantId(const char * value)279     inline void SetParticipantId(const char* value) { m_participantIdHasBeenSet = true; m_participantId.assign(value); }
280 
281     /**
282      * <p>The ID of the sender in the session.</p>
283      */
WithParticipantId(const Aws::String & value)284     inline Item& WithParticipantId(const Aws::String& value) { SetParticipantId(value); return *this;}
285 
286     /**
287      * <p>The ID of the sender in the session.</p>
288      */
WithParticipantId(Aws::String && value)289     inline Item& WithParticipantId(Aws::String&& value) { SetParticipantId(std::move(value)); return *this;}
290 
291     /**
292      * <p>The ID of the sender in the session.</p>
293      */
WithParticipantId(const char * value)294     inline Item& WithParticipantId(const char* value) { SetParticipantId(value); return *this;}
295 
296 
297     /**
298      * <p>The chat display name of the sender.</p>
299      */
GetDisplayName()300     inline const Aws::String& GetDisplayName() const{ return m_displayName; }
301 
302     /**
303      * <p>The chat display name of the sender.</p>
304      */
DisplayNameHasBeenSet()305     inline bool DisplayNameHasBeenSet() const { return m_displayNameHasBeenSet; }
306 
307     /**
308      * <p>The chat display name of the sender.</p>
309      */
SetDisplayName(const Aws::String & value)310     inline void SetDisplayName(const Aws::String& value) { m_displayNameHasBeenSet = true; m_displayName = value; }
311 
312     /**
313      * <p>The chat display name of the sender.</p>
314      */
SetDisplayName(Aws::String && value)315     inline void SetDisplayName(Aws::String&& value) { m_displayNameHasBeenSet = true; m_displayName = std::move(value); }
316 
317     /**
318      * <p>The chat display name of the sender.</p>
319      */
SetDisplayName(const char * value)320     inline void SetDisplayName(const char* value) { m_displayNameHasBeenSet = true; m_displayName.assign(value); }
321 
322     /**
323      * <p>The chat display name of the sender.</p>
324      */
WithDisplayName(const Aws::String & value)325     inline Item& WithDisplayName(const Aws::String& value) { SetDisplayName(value); return *this;}
326 
327     /**
328      * <p>The chat display name of the sender.</p>
329      */
WithDisplayName(Aws::String && value)330     inline Item& WithDisplayName(Aws::String&& value) { SetDisplayName(std::move(value)); return *this;}
331 
332     /**
333      * <p>The chat display name of the sender.</p>
334      */
WithDisplayName(const char * value)335     inline Item& WithDisplayName(const char* value) { SetDisplayName(value); return *this;}
336 
337 
338     /**
339      * <p>The role of the sender. For example, is it a customer, agent, or system.</p>
340      */
GetParticipantRole()341     inline const ParticipantRole& GetParticipantRole() const{ return m_participantRole; }
342 
343     /**
344      * <p>The role of the sender. For example, is it a customer, agent, or system.</p>
345      */
ParticipantRoleHasBeenSet()346     inline bool ParticipantRoleHasBeenSet() const { return m_participantRoleHasBeenSet; }
347 
348     /**
349      * <p>The role of the sender. For example, is it a customer, agent, or system.</p>
350      */
SetParticipantRole(const ParticipantRole & value)351     inline void SetParticipantRole(const ParticipantRole& value) { m_participantRoleHasBeenSet = true; m_participantRole = value; }
352 
353     /**
354      * <p>The role of the sender. For example, is it a customer, agent, or system.</p>
355      */
SetParticipantRole(ParticipantRole && value)356     inline void SetParticipantRole(ParticipantRole&& value) { m_participantRoleHasBeenSet = true; m_participantRole = std::move(value); }
357 
358     /**
359      * <p>The role of the sender. For example, is it a customer, agent, or system.</p>
360      */
WithParticipantRole(const ParticipantRole & value)361     inline Item& WithParticipantRole(const ParticipantRole& value) { SetParticipantRole(value); return *this;}
362 
363     /**
364      * <p>The role of the sender. For example, is it a customer, agent, or system.</p>
365      */
WithParticipantRole(ParticipantRole && value)366     inline Item& WithParticipantRole(ParticipantRole&& value) { SetParticipantRole(std::move(value)); return *this;}
367 
368 
369     /**
370      * <p>Provides information about the attachments.</p>
371      */
GetAttachments()372     inline const Aws::Vector<AttachmentItem>& GetAttachments() const{ return m_attachments; }
373 
374     /**
375      * <p>Provides information about the attachments.</p>
376      */
AttachmentsHasBeenSet()377     inline bool AttachmentsHasBeenSet() const { return m_attachmentsHasBeenSet; }
378 
379     /**
380      * <p>Provides information about the attachments.</p>
381      */
SetAttachments(const Aws::Vector<AttachmentItem> & value)382     inline void SetAttachments(const Aws::Vector<AttachmentItem>& value) { m_attachmentsHasBeenSet = true; m_attachments = value; }
383 
384     /**
385      * <p>Provides information about the attachments.</p>
386      */
SetAttachments(Aws::Vector<AttachmentItem> && value)387     inline void SetAttachments(Aws::Vector<AttachmentItem>&& value) { m_attachmentsHasBeenSet = true; m_attachments = std::move(value); }
388 
389     /**
390      * <p>Provides information about the attachments.</p>
391      */
WithAttachments(const Aws::Vector<AttachmentItem> & value)392     inline Item& WithAttachments(const Aws::Vector<AttachmentItem>& value) { SetAttachments(value); return *this;}
393 
394     /**
395      * <p>Provides information about the attachments.</p>
396      */
WithAttachments(Aws::Vector<AttachmentItem> && value)397     inline Item& WithAttachments(Aws::Vector<AttachmentItem>&& value) { SetAttachments(std::move(value)); return *this;}
398 
399     /**
400      * <p>Provides information about the attachments.</p>
401      */
AddAttachments(const AttachmentItem & value)402     inline Item& AddAttachments(const AttachmentItem& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(value); return *this; }
403 
404     /**
405      * <p>Provides information about the attachments.</p>
406      */
AddAttachments(AttachmentItem && value)407     inline Item& AddAttachments(AttachmentItem&& value) { m_attachmentsHasBeenSet = true; m_attachments.push_back(std::move(value)); return *this; }
408 
409   private:
410 
411     Aws::String m_absoluteTime;
412     bool m_absoluteTimeHasBeenSet;
413 
414     Aws::String m_content;
415     bool m_contentHasBeenSet;
416 
417     Aws::String m_contentType;
418     bool m_contentTypeHasBeenSet;
419 
420     Aws::String m_id;
421     bool m_idHasBeenSet;
422 
423     ChatItemType m_type;
424     bool m_typeHasBeenSet;
425 
426     Aws::String m_participantId;
427     bool m_participantIdHasBeenSet;
428 
429     Aws::String m_displayName;
430     bool m_displayNameHasBeenSet;
431 
432     ParticipantRole m_participantRole;
433     bool m_participantRoleHasBeenSet;
434 
435     Aws::Vector<AttachmentItem> m_attachments;
436     bool m_attachmentsHasBeenSet;
437   };
438 
439 } // namespace Model
440 } // namespace ConnectParticipant
441 } // namespace Aws
442