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/codecommit/CodeCommit_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/DateTime.h>
10 #include <aws/core/utils/memory/stl/AWSVector.h>
11 #include <aws/core/utils/memory/stl/AWSMap.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace CodeCommit
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p>Returns information about a specific comment.</p><p><h3>See Also:</h3>   <a
31    * href="http://docs.aws.amazon.com/goto/WebAPI/codecommit-2015-04-13/Comment">AWS
32    * API Reference</a></p>
33    */
34   class AWS_CODECOMMIT_API Comment
35   {
36   public:
37     Comment();
38     Comment(Aws::Utils::Json::JsonView jsonValue);
39     Comment& operator=(Aws::Utils::Json::JsonView jsonValue);
40     Aws::Utils::Json::JsonValue Jsonize() const;
41 
42 
43     /**
44      * <p>The system-generated comment ID.</p>
45      */
GetCommentId()46     inline const Aws::String& GetCommentId() const{ return m_commentId; }
47 
48     /**
49      * <p>The system-generated comment ID.</p>
50      */
CommentIdHasBeenSet()51     inline bool CommentIdHasBeenSet() const { return m_commentIdHasBeenSet; }
52 
53     /**
54      * <p>The system-generated comment ID.</p>
55      */
SetCommentId(const Aws::String & value)56     inline void SetCommentId(const Aws::String& value) { m_commentIdHasBeenSet = true; m_commentId = value; }
57 
58     /**
59      * <p>The system-generated comment ID.</p>
60      */
SetCommentId(Aws::String && value)61     inline void SetCommentId(Aws::String&& value) { m_commentIdHasBeenSet = true; m_commentId = std::move(value); }
62 
63     /**
64      * <p>The system-generated comment ID.</p>
65      */
SetCommentId(const char * value)66     inline void SetCommentId(const char* value) { m_commentIdHasBeenSet = true; m_commentId.assign(value); }
67 
68     /**
69      * <p>The system-generated comment ID.</p>
70      */
WithCommentId(const Aws::String & value)71     inline Comment& WithCommentId(const Aws::String& value) { SetCommentId(value); return *this;}
72 
73     /**
74      * <p>The system-generated comment ID.</p>
75      */
WithCommentId(Aws::String && value)76     inline Comment& WithCommentId(Aws::String&& value) { SetCommentId(std::move(value)); return *this;}
77 
78     /**
79      * <p>The system-generated comment ID.</p>
80      */
WithCommentId(const char * value)81     inline Comment& WithCommentId(const char* value) { SetCommentId(value); return *this;}
82 
83 
84     /**
85      * <p>The content of the comment.</p>
86      */
GetContent()87     inline const Aws::String& GetContent() const{ return m_content; }
88 
89     /**
90      * <p>The content of the comment.</p>
91      */
ContentHasBeenSet()92     inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
93 
94     /**
95      * <p>The content of the comment.</p>
96      */
SetContent(const Aws::String & value)97     inline void SetContent(const Aws::String& value) { m_contentHasBeenSet = true; m_content = value; }
98 
99     /**
100      * <p>The content of the comment.</p>
101      */
SetContent(Aws::String && value)102     inline void SetContent(Aws::String&& value) { m_contentHasBeenSet = true; m_content = std::move(value); }
103 
104     /**
105      * <p>The content of the comment.</p>
106      */
SetContent(const char * value)107     inline void SetContent(const char* value) { m_contentHasBeenSet = true; m_content.assign(value); }
108 
109     /**
110      * <p>The content of the comment.</p>
111      */
WithContent(const Aws::String & value)112     inline Comment& WithContent(const Aws::String& value) { SetContent(value); return *this;}
113 
114     /**
115      * <p>The content of the comment.</p>
116      */
WithContent(Aws::String && value)117     inline Comment& WithContent(Aws::String&& value) { SetContent(std::move(value)); return *this;}
118 
119     /**
120      * <p>The content of the comment.</p>
121      */
WithContent(const char * value)122     inline Comment& WithContent(const char* value) { SetContent(value); return *this;}
123 
124 
125     /**
126      * <p>The ID of the comment for which this comment is a reply, if any.</p>
127      */
GetInReplyTo()128     inline const Aws::String& GetInReplyTo() const{ return m_inReplyTo; }
129 
130     /**
131      * <p>The ID of the comment for which this comment is a reply, if any.</p>
132      */
InReplyToHasBeenSet()133     inline bool InReplyToHasBeenSet() const { return m_inReplyToHasBeenSet; }
134 
135     /**
136      * <p>The ID of the comment for which this comment is a reply, if any.</p>
137      */
SetInReplyTo(const Aws::String & value)138     inline void SetInReplyTo(const Aws::String& value) { m_inReplyToHasBeenSet = true; m_inReplyTo = value; }
139 
140     /**
141      * <p>The ID of the comment for which this comment is a reply, if any.</p>
142      */
SetInReplyTo(Aws::String && value)143     inline void SetInReplyTo(Aws::String&& value) { m_inReplyToHasBeenSet = true; m_inReplyTo = std::move(value); }
144 
145     /**
146      * <p>The ID of the comment for which this comment is a reply, if any.</p>
147      */
SetInReplyTo(const char * value)148     inline void SetInReplyTo(const char* value) { m_inReplyToHasBeenSet = true; m_inReplyTo.assign(value); }
149 
150     /**
151      * <p>The ID of the comment for which this comment is a reply, if any.</p>
152      */
WithInReplyTo(const Aws::String & value)153     inline Comment& WithInReplyTo(const Aws::String& value) { SetInReplyTo(value); return *this;}
154 
155     /**
156      * <p>The ID of the comment for which this comment is a reply, if any.</p>
157      */
WithInReplyTo(Aws::String && value)158     inline Comment& WithInReplyTo(Aws::String&& value) { SetInReplyTo(std::move(value)); return *this;}
159 
160     /**
161      * <p>The ID of the comment for which this comment is a reply, if any.</p>
162      */
WithInReplyTo(const char * value)163     inline Comment& WithInReplyTo(const char* value) { SetInReplyTo(value); return *this;}
164 
165 
166     /**
167      * <p>The date and time the comment was created, in timestamp format.</p>
168      */
GetCreationDate()169     inline const Aws::Utils::DateTime& GetCreationDate() const{ return m_creationDate; }
170 
171     /**
172      * <p>The date and time the comment was created, in timestamp format.</p>
173      */
CreationDateHasBeenSet()174     inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }
175 
176     /**
177      * <p>The date and time the comment was created, in timestamp format.</p>
178      */
SetCreationDate(const Aws::Utils::DateTime & value)179     inline void SetCreationDate(const Aws::Utils::DateTime& value) { m_creationDateHasBeenSet = true; m_creationDate = value; }
180 
181     /**
182      * <p>The date and time the comment was created, in timestamp format.</p>
183      */
SetCreationDate(Aws::Utils::DateTime && value)184     inline void SetCreationDate(Aws::Utils::DateTime&& value) { m_creationDateHasBeenSet = true; m_creationDate = std::move(value); }
185 
186     /**
187      * <p>The date and time the comment was created, in timestamp format.</p>
188      */
WithCreationDate(const Aws::Utils::DateTime & value)189     inline Comment& WithCreationDate(const Aws::Utils::DateTime& value) { SetCreationDate(value); return *this;}
190 
191     /**
192      * <p>The date and time the comment was created, in timestamp format.</p>
193      */
WithCreationDate(Aws::Utils::DateTime && value)194     inline Comment& WithCreationDate(Aws::Utils::DateTime&& value) { SetCreationDate(std::move(value)); return *this;}
195 
196 
197     /**
198      * <p>The date and time the comment was most recently modified, in timestamp
199      * format.</p>
200      */
GetLastModifiedDate()201     inline const Aws::Utils::DateTime& GetLastModifiedDate() const{ return m_lastModifiedDate; }
202 
203     /**
204      * <p>The date and time the comment was most recently modified, in timestamp
205      * format.</p>
206      */
LastModifiedDateHasBeenSet()207     inline bool LastModifiedDateHasBeenSet() const { return m_lastModifiedDateHasBeenSet; }
208 
209     /**
210      * <p>The date and time the comment was most recently modified, in timestamp
211      * format.</p>
212      */
SetLastModifiedDate(const Aws::Utils::DateTime & value)213     inline void SetLastModifiedDate(const Aws::Utils::DateTime& value) { m_lastModifiedDateHasBeenSet = true; m_lastModifiedDate = value; }
214 
215     /**
216      * <p>The date and time the comment was most recently modified, in timestamp
217      * format.</p>
218      */
SetLastModifiedDate(Aws::Utils::DateTime && value)219     inline void SetLastModifiedDate(Aws::Utils::DateTime&& value) { m_lastModifiedDateHasBeenSet = true; m_lastModifiedDate = std::move(value); }
220 
221     /**
222      * <p>The date and time the comment was most recently modified, in timestamp
223      * format.</p>
224      */
WithLastModifiedDate(const Aws::Utils::DateTime & value)225     inline Comment& WithLastModifiedDate(const Aws::Utils::DateTime& value) { SetLastModifiedDate(value); return *this;}
226 
227     /**
228      * <p>The date and time the comment was most recently modified, in timestamp
229      * format.</p>
230      */
WithLastModifiedDate(Aws::Utils::DateTime && value)231     inline Comment& WithLastModifiedDate(Aws::Utils::DateTime&& value) { SetLastModifiedDate(std::move(value)); return *this;}
232 
233 
234     /**
235      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
236      */
GetAuthorArn()237     inline const Aws::String& GetAuthorArn() const{ return m_authorArn; }
238 
239     /**
240      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
241      */
AuthorArnHasBeenSet()242     inline bool AuthorArnHasBeenSet() const { return m_authorArnHasBeenSet; }
243 
244     /**
245      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
246      */
SetAuthorArn(const Aws::String & value)247     inline void SetAuthorArn(const Aws::String& value) { m_authorArnHasBeenSet = true; m_authorArn = value; }
248 
249     /**
250      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
251      */
SetAuthorArn(Aws::String && value)252     inline void SetAuthorArn(Aws::String&& value) { m_authorArnHasBeenSet = true; m_authorArn = std::move(value); }
253 
254     /**
255      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
256      */
SetAuthorArn(const char * value)257     inline void SetAuthorArn(const char* value) { m_authorArnHasBeenSet = true; m_authorArn.assign(value); }
258 
259     /**
260      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
261      */
WithAuthorArn(const Aws::String & value)262     inline Comment& WithAuthorArn(const Aws::String& value) { SetAuthorArn(value); return *this;}
263 
264     /**
265      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
266      */
WithAuthorArn(Aws::String && value)267     inline Comment& WithAuthorArn(Aws::String&& value) { SetAuthorArn(std::move(value)); return *this;}
268 
269     /**
270      * <p>The Amazon Resource Name (ARN) of the person who posted the comment.</p>
271      */
WithAuthorArn(const char * value)272     inline Comment& WithAuthorArn(const char* value) { SetAuthorArn(value); return *this;}
273 
274 
275     /**
276      * <p>A Boolean value indicating whether the comment has been deleted.</p>
277      */
GetDeleted()278     inline bool GetDeleted() const{ return m_deleted; }
279 
280     /**
281      * <p>A Boolean value indicating whether the comment has been deleted.</p>
282      */
DeletedHasBeenSet()283     inline bool DeletedHasBeenSet() const { return m_deletedHasBeenSet; }
284 
285     /**
286      * <p>A Boolean value indicating whether the comment has been deleted.</p>
287      */
SetDeleted(bool value)288     inline void SetDeleted(bool value) { m_deletedHasBeenSet = true; m_deleted = value; }
289 
290     /**
291      * <p>A Boolean value indicating whether the comment has been deleted.</p>
292      */
WithDeleted(bool value)293     inline Comment& WithDeleted(bool value) { SetDeleted(value); return *this;}
294 
295 
296     /**
297      * <p>A unique, client-generated idempotency token that, when provided in a
298      * request, ensures the request cannot be repeated with a changed parameter. If a
299      * request is received with the same parameters and a token is included, the
300      * request returns information about the initial request that used that token.</p>
301      */
GetClientRequestToken()302     inline const Aws::String& GetClientRequestToken() const{ return m_clientRequestToken; }
303 
304     /**
305      * <p>A unique, client-generated idempotency token that, when provided in a
306      * request, ensures the request cannot be repeated with a changed parameter. If a
307      * request is received with the same parameters and a token is included, the
308      * request returns information about the initial request that used that token.</p>
309      */
ClientRequestTokenHasBeenSet()310     inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
311 
312     /**
313      * <p>A unique, client-generated idempotency token that, when provided in a
314      * request, ensures the request cannot be repeated with a changed parameter. If a
315      * request is received with the same parameters and a token is included, the
316      * request returns information about the initial request that used that token.</p>
317      */
SetClientRequestToken(const Aws::String & value)318     inline void SetClientRequestToken(const Aws::String& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = value; }
319 
320     /**
321      * <p>A unique, client-generated idempotency token that, when provided in a
322      * request, ensures the request cannot be repeated with a changed parameter. If a
323      * request is received with the same parameters and a token is included, the
324      * request returns information about the initial request that used that token.</p>
325      */
SetClientRequestToken(Aws::String && value)326     inline void SetClientRequestToken(Aws::String&& value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken = std::move(value); }
327 
328     /**
329      * <p>A unique, client-generated idempotency token that, when provided in a
330      * request, ensures the request cannot be repeated with a changed parameter. If a
331      * request is received with the same parameters and a token is included, the
332      * request returns information about the initial request that used that token.</p>
333      */
SetClientRequestToken(const char * value)334     inline void SetClientRequestToken(const char* value) { m_clientRequestTokenHasBeenSet = true; m_clientRequestToken.assign(value); }
335 
336     /**
337      * <p>A unique, client-generated idempotency token that, when provided in a
338      * request, ensures the request cannot be repeated with a changed parameter. If a
339      * request is received with the same parameters and a token is included, the
340      * request returns information about the initial request that used that token.</p>
341      */
WithClientRequestToken(const Aws::String & value)342     inline Comment& WithClientRequestToken(const Aws::String& value) { SetClientRequestToken(value); return *this;}
343 
344     /**
345      * <p>A unique, client-generated idempotency token that, when provided in a
346      * request, ensures the request cannot be repeated with a changed parameter. If a
347      * request is received with the same parameters and a token is included, the
348      * request returns information about the initial request that used that token.</p>
349      */
WithClientRequestToken(Aws::String && value)350     inline Comment& WithClientRequestToken(Aws::String&& value) { SetClientRequestToken(std::move(value)); return *this;}
351 
352     /**
353      * <p>A unique, client-generated idempotency token that, when provided in a
354      * request, ensures the request cannot be repeated with a changed parameter. If a
355      * request is received with the same parameters and a token is included, the
356      * request returns information about the initial request that used that token.</p>
357      */
WithClientRequestToken(const char * value)358     inline Comment& WithClientRequestToken(const char* value) { SetClientRequestToken(value); return *this;}
359 
360 
361     /**
362      * <p>The emoji reactions to a comment, if any, submitted by the user whose
363      * credentials are associated with the call to the API.</p>
364      */
GetCallerReactions()365     inline const Aws::Vector<Aws::String>& GetCallerReactions() const{ return m_callerReactions; }
366 
367     /**
368      * <p>The emoji reactions to a comment, if any, submitted by the user whose
369      * credentials are associated with the call to the API.</p>
370      */
CallerReactionsHasBeenSet()371     inline bool CallerReactionsHasBeenSet() const { return m_callerReactionsHasBeenSet; }
372 
373     /**
374      * <p>The emoji reactions to a comment, if any, submitted by the user whose
375      * credentials are associated with the call to the API.</p>
376      */
SetCallerReactions(const Aws::Vector<Aws::String> & value)377     inline void SetCallerReactions(const Aws::Vector<Aws::String>& value) { m_callerReactionsHasBeenSet = true; m_callerReactions = value; }
378 
379     /**
380      * <p>The emoji reactions to a comment, if any, submitted by the user whose
381      * credentials are associated with the call to the API.</p>
382      */
SetCallerReactions(Aws::Vector<Aws::String> && value)383     inline void SetCallerReactions(Aws::Vector<Aws::String>&& value) { m_callerReactionsHasBeenSet = true; m_callerReactions = std::move(value); }
384 
385     /**
386      * <p>The emoji reactions to a comment, if any, submitted by the user whose
387      * credentials are associated with the call to the API.</p>
388      */
WithCallerReactions(const Aws::Vector<Aws::String> & value)389     inline Comment& WithCallerReactions(const Aws::Vector<Aws::String>& value) { SetCallerReactions(value); return *this;}
390 
391     /**
392      * <p>The emoji reactions to a comment, if any, submitted by the user whose
393      * credentials are associated with the call to the API.</p>
394      */
WithCallerReactions(Aws::Vector<Aws::String> && value)395     inline Comment& WithCallerReactions(Aws::Vector<Aws::String>&& value) { SetCallerReactions(std::move(value)); return *this;}
396 
397     /**
398      * <p>The emoji reactions to a comment, if any, submitted by the user whose
399      * credentials are associated with the call to the API.</p>
400      */
AddCallerReactions(const Aws::String & value)401     inline Comment& AddCallerReactions(const Aws::String& value) { m_callerReactionsHasBeenSet = true; m_callerReactions.push_back(value); return *this; }
402 
403     /**
404      * <p>The emoji reactions to a comment, if any, submitted by the user whose
405      * credentials are associated with the call to the API.</p>
406      */
AddCallerReactions(Aws::String && value)407     inline Comment& AddCallerReactions(Aws::String&& value) { m_callerReactionsHasBeenSet = true; m_callerReactions.push_back(std::move(value)); return *this; }
408 
409     /**
410      * <p>The emoji reactions to a comment, if any, submitted by the user whose
411      * credentials are associated with the call to the API.</p>
412      */
AddCallerReactions(const char * value)413     inline Comment& AddCallerReactions(const char* value) { m_callerReactionsHasBeenSet = true; m_callerReactions.push_back(value); return *this; }
414 
415 
416     /**
417      * <p>A string to integer map that represents the number of individual users who
418      * have responded to a comment with the specified reactions.</p>
419      */
GetReactionCounts()420     inline const Aws::Map<Aws::String, int>& GetReactionCounts() const{ return m_reactionCounts; }
421 
422     /**
423      * <p>A string to integer map that represents the number of individual users who
424      * have responded to a comment with the specified reactions.</p>
425      */
ReactionCountsHasBeenSet()426     inline bool ReactionCountsHasBeenSet() const { return m_reactionCountsHasBeenSet; }
427 
428     /**
429      * <p>A string to integer map that represents the number of individual users who
430      * have responded to a comment with the specified reactions.</p>
431      */
SetReactionCounts(const Aws::Map<Aws::String,int> & value)432     inline void SetReactionCounts(const Aws::Map<Aws::String, int>& value) { m_reactionCountsHasBeenSet = true; m_reactionCounts = value; }
433 
434     /**
435      * <p>A string to integer map that represents the number of individual users who
436      * have responded to a comment with the specified reactions.</p>
437      */
SetReactionCounts(Aws::Map<Aws::String,int> && value)438     inline void SetReactionCounts(Aws::Map<Aws::String, int>&& value) { m_reactionCountsHasBeenSet = true; m_reactionCounts = std::move(value); }
439 
440     /**
441      * <p>A string to integer map that represents the number of individual users who
442      * have responded to a comment with the specified reactions.</p>
443      */
WithReactionCounts(const Aws::Map<Aws::String,int> & value)444     inline Comment& WithReactionCounts(const Aws::Map<Aws::String, int>& value) { SetReactionCounts(value); return *this;}
445 
446     /**
447      * <p>A string to integer map that represents the number of individual users who
448      * have responded to a comment with the specified reactions.</p>
449      */
WithReactionCounts(Aws::Map<Aws::String,int> && value)450     inline Comment& WithReactionCounts(Aws::Map<Aws::String, int>&& value) { SetReactionCounts(std::move(value)); return *this;}
451 
452     /**
453      * <p>A string to integer map that represents the number of individual users who
454      * have responded to a comment with the specified reactions.</p>
455      */
AddReactionCounts(const Aws::String & key,int value)456     inline Comment& AddReactionCounts(const Aws::String& key, int value) { m_reactionCountsHasBeenSet = true; m_reactionCounts.emplace(key, value); return *this; }
457 
458     /**
459      * <p>A string to integer map that represents the number of individual users who
460      * have responded to a comment with the specified reactions.</p>
461      */
AddReactionCounts(Aws::String && key,int value)462     inline Comment& AddReactionCounts(Aws::String&& key, int value) { m_reactionCountsHasBeenSet = true; m_reactionCounts.emplace(std::move(key), value); return *this; }
463 
464     /**
465      * <p>A string to integer map that represents the number of individual users who
466      * have responded to a comment with the specified reactions.</p>
467      */
AddReactionCounts(const char * key,int value)468     inline Comment& AddReactionCounts(const char* key, int value) { m_reactionCountsHasBeenSet = true; m_reactionCounts.emplace(key, value); return *this; }
469 
470   private:
471 
472     Aws::String m_commentId;
473     bool m_commentIdHasBeenSet;
474 
475     Aws::String m_content;
476     bool m_contentHasBeenSet;
477 
478     Aws::String m_inReplyTo;
479     bool m_inReplyToHasBeenSet;
480 
481     Aws::Utils::DateTime m_creationDate;
482     bool m_creationDateHasBeenSet;
483 
484     Aws::Utils::DateTime m_lastModifiedDate;
485     bool m_lastModifiedDateHasBeenSet;
486 
487     Aws::String m_authorArn;
488     bool m_authorArnHasBeenSet;
489 
490     bool m_deleted;
491     bool m_deletedHasBeenSet;
492 
493     Aws::String m_clientRequestToken;
494     bool m_clientRequestTokenHasBeenSet;
495 
496     Aws::Vector<Aws::String> m_callerReactions;
497     bool m_callerReactionsHasBeenSet;
498 
499     Aws::Map<Aws::String, int> m_reactionCounts;
500     bool m_reactionCountsHasBeenSet;
501   };
502 
503 } // namespace Model
504 } // namespace CodeCommit
505 } // namespace Aws
506