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/workdocs/WorkDocs_EXPORTS.h>
8 #include <aws/workdocs/model/ActivityType.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <aws/core/utils/memory/stl/AWSString.h>
11 #include <aws/workdocs/model/UserMetadata.h>
12 #include <aws/workdocs/model/Participants.h>
13 #include <aws/workdocs/model/ResourceMetadata.h>
14 #include <aws/workdocs/model/CommentMetadata.h>
15 #include <utility>
16 
17 namespace Aws
18 {
19 namespace Utils
20 {
21 namespace Json
22 {
23   class JsonValue;
24   class JsonView;
25 } // namespace Json
26 } // namespace Utils
27 namespace WorkDocs
28 {
29 namespace Model
30 {
31 
32   /**
33    * <p>Describes the activity information.</p><p><h3>See Also:</h3>   <a
34    * href="http://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/Activity">AWS
35    * API Reference</a></p>
36    */
37   class AWS_WORKDOCS_API Activity
38   {
39   public:
40     Activity();
41     Activity(Aws::Utils::Json::JsonView jsonValue);
42     Activity& operator=(Aws::Utils::Json::JsonView jsonValue);
43     Aws::Utils::Json::JsonValue Jsonize() const;
44 
45 
46     /**
47      * <p>The activity type.</p>
48      */
GetType()49     inline const ActivityType& GetType() const{ return m_type; }
50 
51     /**
52      * <p>The activity type.</p>
53      */
TypeHasBeenSet()54     inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
55 
56     /**
57      * <p>The activity type.</p>
58      */
SetType(const ActivityType & value)59     inline void SetType(const ActivityType& value) { m_typeHasBeenSet = true; m_type = value; }
60 
61     /**
62      * <p>The activity type.</p>
63      */
SetType(ActivityType && value)64     inline void SetType(ActivityType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
65 
66     /**
67      * <p>The activity type.</p>
68      */
WithType(const ActivityType & value)69     inline Activity& WithType(const ActivityType& value) { SetType(value); return *this;}
70 
71     /**
72      * <p>The activity type.</p>
73      */
WithType(ActivityType && value)74     inline Activity& WithType(ActivityType&& value) { SetType(std::move(value)); return *this;}
75 
76 
77     /**
78      * <p>The timestamp when the action was performed.</p>
79      */
GetTimeStamp()80     inline const Aws::Utils::DateTime& GetTimeStamp() const{ return m_timeStamp; }
81 
82     /**
83      * <p>The timestamp when the action was performed.</p>
84      */
TimeStampHasBeenSet()85     inline bool TimeStampHasBeenSet() const { return m_timeStampHasBeenSet; }
86 
87     /**
88      * <p>The timestamp when the action was performed.</p>
89      */
SetTimeStamp(const Aws::Utils::DateTime & value)90     inline void SetTimeStamp(const Aws::Utils::DateTime& value) { m_timeStampHasBeenSet = true; m_timeStamp = value; }
91 
92     /**
93      * <p>The timestamp when the action was performed.</p>
94      */
SetTimeStamp(Aws::Utils::DateTime && value)95     inline void SetTimeStamp(Aws::Utils::DateTime&& value) { m_timeStampHasBeenSet = true; m_timeStamp = std::move(value); }
96 
97     /**
98      * <p>The timestamp when the action was performed.</p>
99      */
WithTimeStamp(const Aws::Utils::DateTime & value)100     inline Activity& WithTimeStamp(const Aws::Utils::DateTime& value) { SetTimeStamp(value); return *this;}
101 
102     /**
103      * <p>The timestamp when the action was performed.</p>
104      */
WithTimeStamp(Aws::Utils::DateTime && value)105     inline Activity& WithTimeStamp(Aws::Utils::DateTime&& value) { SetTimeStamp(std::move(value)); return *this;}
106 
107 
108     /**
109      * <p>Indicates whether an activity is indirect or direct. An indirect activity
110      * results from a direct activity performed on a parent resource. For example,
111      * sharing a parent folder (the direct activity) shares all of the subfolders and
112      * documents within the parent folder (the indirect activity).</p>
113      */
GetIsIndirectActivity()114     inline bool GetIsIndirectActivity() const{ return m_isIndirectActivity; }
115 
116     /**
117      * <p>Indicates whether an activity is indirect or direct. An indirect activity
118      * results from a direct activity performed on a parent resource. For example,
119      * sharing a parent folder (the direct activity) shares all of the subfolders and
120      * documents within the parent folder (the indirect activity).</p>
121      */
IsIndirectActivityHasBeenSet()122     inline bool IsIndirectActivityHasBeenSet() const { return m_isIndirectActivityHasBeenSet; }
123 
124     /**
125      * <p>Indicates whether an activity is indirect or direct. An indirect activity
126      * results from a direct activity performed on a parent resource. For example,
127      * sharing a parent folder (the direct activity) shares all of the subfolders and
128      * documents within the parent folder (the indirect activity).</p>
129      */
SetIsIndirectActivity(bool value)130     inline void SetIsIndirectActivity(bool value) { m_isIndirectActivityHasBeenSet = true; m_isIndirectActivity = value; }
131 
132     /**
133      * <p>Indicates whether an activity is indirect or direct. An indirect activity
134      * results from a direct activity performed on a parent resource. For example,
135      * sharing a parent folder (the direct activity) shares all of the subfolders and
136      * documents within the parent folder (the indirect activity).</p>
137      */
WithIsIndirectActivity(bool value)138     inline Activity& WithIsIndirectActivity(bool value) { SetIsIndirectActivity(value); return *this;}
139 
140 
141     /**
142      * <p>The ID of the organization.</p>
143      */
GetOrganizationId()144     inline const Aws::String& GetOrganizationId() const{ return m_organizationId; }
145 
146     /**
147      * <p>The ID of the organization.</p>
148      */
OrganizationIdHasBeenSet()149     inline bool OrganizationIdHasBeenSet() const { return m_organizationIdHasBeenSet; }
150 
151     /**
152      * <p>The ID of the organization.</p>
153      */
SetOrganizationId(const Aws::String & value)154     inline void SetOrganizationId(const Aws::String& value) { m_organizationIdHasBeenSet = true; m_organizationId = value; }
155 
156     /**
157      * <p>The ID of the organization.</p>
158      */
SetOrganizationId(Aws::String && value)159     inline void SetOrganizationId(Aws::String&& value) { m_organizationIdHasBeenSet = true; m_organizationId = std::move(value); }
160 
161     /**
162      * <p>The ID of the organization.</p>
163      */
SetOrganizationId(const char * value)164     inline void SetOrganizationId(const char* value) { m_organizationIdHasBeenSet = true; m_organizationId.assign(value); }
165 
166     /**
167      * <p>The ID of the organization.</p>
168      */
WithOrganizationId(const Aws::String & value)169     inline Activity& WithOrganizationId(const Aws::String& value) { SetOrganizationId(value); return *this;}
170 
171     /**
172      * <p>The ID of the organization.</p>
173      */
WithOrganizationId(Aws::String && value)174     inline Activity& WithOrganizationId(Aws::String&& value) { SetOrganizationId(std::move(value)); return *this;}
175 
176     /**
177      * <p>The ID of the organization.</p>
178      */
WithOrganizationId(const char * value)179     inline Activity& WithOrganizationId(const char* value) { SetOrganizationId(value); return *this;}
180 
181 
182     /**
183      * <p>The user who performed the action.</p>
184      */
GetInitiator()185     inline const UserMetadata& GetInitiator() const{ return m_initiator; }
186 
187     /**
188      * <p>The user who performed the action.</p>
189      */
InitiatorHasBeenSet()190     inline bool InitiatorHasBeenSet() const { return m_initiatorHasBeenSet; }
191 
192     /**
193      * <p>The user who performed the action.</p>
194      */
SetInitiator(const UserMetadata & value)195     inline void SetInitiator(const UserMetadata& value) { m_initiatorHasBeenSet = true; m_initiator = value; }
196 
197     /**
198      * <p>The user who performed the action.</p>
199      */
SetInitiator(UserMetadata && value)200     inline void SetInitiator(UserMetadata&& value) { m_initiatorHasBeenSet = true; m_initiator = std::move(value); }
201 
202     /**
203      * <p>The user who performed the action.</p>
204      */
WithInitiator(const UserMetadata & value)205     inline Activity& WithInitiator(const UserMetadata& value) { SetInitiator(value); return *this;}
206 
207     /**
208      * <p>The user who performed the action.</p>
209      */
WithInitiator(UserMetadata && value)210     inline Activity& WithInitiator(UserMetadata&& value) { SetInitiator(std::move(value)); return *this;}
211 
212 
213     /**
214      * <p>The list of users or groups impacted by this action. This is an optional
215      * field and is filled for the following sharing activities: DOCUMENT_SHARED,
216      * DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.</p>
217      */
GetParticipants()218     inline const Participants& GetParticipants() const{ return m_participants; }
219 
220     /**
221      * <p>The list of users or groups impacted by this action. This is an optional
222      * field and is filled for the following sharing activities: DOCUMENT_SHARED,
223      * DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.</p>
224      */
ParticipantsHasBeenSet()225     inline bool ParticipantsHasBeenSet() const { return m_participantsHasBeenSet; }
226 
227     /**
228      * <p>The list of users or groups impacted by this action. This is an optional
229      * field and is filled for the following sharing activities: DOCUMENT_SHARED,
230      * DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.</p>
231      */
SetParticipants(const Participants & value)232     inline void SetParticipants(const Participants& value) { m_participantsHasBeenSet = true; m_participants = value; }
233 
234     /**
235      * <p>The list of users or groups impacted by this action. This is an optional
236      * field and is filled for the following sharing activities: DOCUMENT_SHARED,
237      * DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.</p>
238      */
SetParticipants(Participants && value)239     inline void SetParticipants(Participants&& value) { m_participantsHasBeenSet = true; m_participants = std::move(value); }
240 
241     /**
242      * <p>The list of users or groups impacted by this action. This is an optional
243      * field and is filled for the following sharing activities: DOCUMENT_SHARED,
244      * DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.</p>
245      */
WithParticipants(const Participants & value)246     inline Activity& WithParticipants(const Participants& value) { SetParticipants(value); return *this;}
247 
248     /**
249      * <p>The list of users or groups impacted by this action. This is an optional
250      * field and is filled for the following sharing activities: DOCUMENT_SHARED,
251      * DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.</p>
252      */
WithParticipants(Participants && value)253     inline Activity& WithParticipants(Participants&& value) { SetParticipants(std::move(value)); return *this;}
254 
255 
256     /**
257      * <p>The metadata of the resource involved in the user action.</p>
258      */
GetResourceMetadata()259     inline const ResourceMetadata& GetResourceMetadata() const{ return m_resourceMetadata; }
260 
261     /**
262      * <p>The metadata of the resource involved in the user action.</p>
263      */
ResourceMetadataHasBeenSet()264     inline bool ResourceMetadataHasBeenSet() const { return m_resourceMetadataHasBeenSet; }
265 
266     /**
267      * <p>The metadata of the resource involved in the user action.</p>
268      */
SetResourceMetadata(const ResourceMetadata & value)269     inline void SetResourceMetadata(const ResourceMetadata& value) { m_resourceMetadataHasBeenSet = true; m_resourceMetadata = value; }
270 
271     /**
272      * <p>The metadata of the resource involved in the user action.</p>
273      */
SetResourceMetadata(ResourceMetadata && value)274     inline void SetResourceMetadata(ResourceMetadata&& value) { m_resourceMetadataHasBeenSet = true; m_resourceMetadata = std::move(value); }
275 
276     /**
277      * <p>The metadata of the resource involved in the user action.</p>
278      */
WithResourceMetadata(const ResourceMetadata & value)279     inline Activity& WithResourceMetadata(const ResourceMetadata& value) { SetResourceMetadata(value); return *this;}
280 
281     /**
282      * <p>The metadata of the resource involved in the user action.</p>
283      */
WithResourceMetadata(ResourceMetadata && value)284     inline Activity& WithResourceMetadata(ResourceMetadata&& value) { SetResourceMetadata(std::move(value)); return *this;}
285 
286 
287     /**
288      * <p>The original parent of the resource. This is an optional field and is filled
289      * for move activities.</p>
290      */
GetOriginalParent()291     inline const ResourceMetadata& GetOriginalParent() const{ return m_originalParent; }
292 
293     /**
294      * <p>The original parent of the resource. This is an optional field and is filled
295      * for move activities.</p>
296      */
OriginalParentHasBeenSet()297     inline bool OriginalParentHasBeenSet() const { return m_originalParentHasBeenSet; }
298 
299     /**
300      * <p>The original parent of the resource. This is an optional field and is filled
301      * for move activities.</p>
302      */
SetOriginalParent(const ResourceMetadata & value)303     inline void SetOriginalParent(const ResourceMetadata& value) { m_originalParentHasBeenSet = true; m_originalParent = value; }
304 
305     /**
306      * <p>The original parent of the resource. This is an optional field and is filled
307      * for move activities.</p>
308      */
SetOriginalParent(ResourceMetadata && value)309     inline void SetOriginalParent(ResourceMetadata&& value) { m_originalParentHasBeenSet = true; m_originalParent = std::move(value); }
310 
311     /**
312      * <p>The original parent of the resource. This is an optional field and is filled
313      * for move activities.</p>
314      */
WithOriginalParent(const ResourceMetadata & value)315     inline Activity& WithOriginalParent(const ResourceMetadata& value) { SetOriginalParent(value); return *this;}
316 
317     /**
318      * <p>The original parent of the resource. This is an optional field and is filled
319      * for move activities.</p>
320      */
WithOriginalParent(ResourceMetadata && value)321     inline Activity& WithOriginalParent(ResourceMetadata&& value) { SetOriginalParent(std::move(value)); return *this;}
322 
323 
324     /**
325      * <p>Metadata of the commenting activity. This is an optional field and is filled
326      * for commenting activities.</p>
327      */
GetCommentMetadata()328     inline const CommentMetadata& GetCommentMetadata() const{ return m_commentMetadata; }
329 
330     /**
331      * <p>Metadata of the commenting activity. This is an optional field and is filled
332      * for commenting activities.</p>
333      */
CommentMetadataHasBeenSet()334     inline bool CommentMetadataHasBeenSet() const { return m_commentMetadataHasBeenSet; }
335 
336     /**
337      * <p>Metadata of the commenting activity. This is an optional field and is filled
338      * for commenting activities.</p>
339      */
SetCommentMetadata(const CommentMetadata & value)340     inline void SetCommentMetadata(const CommentMetadata& value) { m_commentMetadataHasBeenSet = true; m_commentMetadata = value; }
341 
342     /**
343      * <p>Metadata of the commenting activity. This is an optional field and is filled
344      * for commenting activities.</p>
345      */
SetCommentMetadata(CommentMetadata && value)346     inline void SetCommentMetadata(CommentMetadata&& value) { m_commentMetadataHasBeenSet = true; m_commentMetadata = std::move(value); }
347 
348     /**
349      * <p>Metadata of the commenting activity. This is an optional field and is filled
350      * for commenting activities.</p>
351      */
WithCommentMetadata(const CommentMetadata & value)352     inline Activity& WithCommentMetadata(const CommentMetadata& value) { SetCommentMetadata(value); return *this;}
353 
354     /**
355      * <p>Metadata of the commenting activity. This is an optional field and is filled
356      * for commenting activities.</p>
357      */
WithCommentMetadata(CommentMetadata && value)358     inline Activity& WithCommentMetadata(CommentMetadata&& value) { SetCommentMetadata(std::move(value)); return *this;}
359 
360   private:
361 
362     ActivityType m_type;
363     bool m_typeHasBeenSet;
364 
365     Aws::Utils::DateTime m_timeStamp;
366     bool m_timeStampHasBeenSet;
367 
368     bool m_isIndirectActivity;
369     bool m_isIndirectActivityHasBeenSet;
370 
371     Aws::String m_organizationId;
372     bool m_organizationIdHasBeenSet;
373 
374     UserMetadata m_initiator;
375     bool m_initiatorHasBeenSet;
376 
377     Participants m_participants;
378     bool m_participantsHasBeenSet;
379 
380     ResourceMetadata m_resourceMetadata;
381     bool m_resourceMetadataHasBeenSet;
382 
383     ResourceMetadata m_originalParent;
384     bool m_originalParentHasBeenSet;
385 
386     CommentMetadata m_commentMetadata;
387     bool m_commentMetadataHasBeenSet;
388   };
389 
390 } // namespace Model
391 } // namespace WorkDocs
392 } // namespace Aws
393