AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Comment.h
1
6#pragma once
7#include <aws/codecommit/CodeCommit_EXPORTS.h>
8#include <aws/core/utils/DateTime.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace CodeCommit {
23namespace Model {
24
30class Comment {
31 public:
32 AWS_CODECOMMIT_API Comment() = default;
33 AWS_CODECOMMIT_API Comment(Aws::Utils::Json::JsonView jsonValue);
34 AWS_CODECOMMIT_API Comment& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_CODECOMMIT_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetCommentId() const { return m_commentId; }
42 inline bool CommentIdHasBeenSet() const { return m_commentIdHasBeenSet; }
43 template <typename CommentIdT = Aws::String>
44 void SetCommentId(CommentIdT&& value) {
45 m_commentIdHasBeenSet = true;
46 m_commentId = std::forward<CommentIdT>(value);
47 }
48 template <typename CommentIdT = Aws::String>
49 Comment& WithCommentId(CommentIdT&& value) {
50 SetCommentId(std::forward<CommentIdT>(value));
51 return *this;
52 }
54
56
59 inline const Aws::String& GetContent() const { return m_content; }
60 inline bool ContentHasBeenSet() const { return m_contentHasBeenSet; }
61 template <typename ContentT = Aws::String>
62 void SetContent(ContentT&& value) {
63 m_contentHasBeenSet = true;
64 m_content = std::forward<ContentT>(value);
65 }
66 template <typename ContentT = Aws::String>
67 Comment& WithContent(ContentT&& value) {
68 SetContent(std::forward<ContentT>(value));
69 return *this;
70 }
72
74
77 inline const Aws::String& GetInReplyTo() const { return m_inReplyTo; }
78 inline bool InReplyToHasBeenSet() const { return m_inReplyToHasBeenSet; }
79 template <typename InReplyToT = Aws::String>
80 void SetInReplyTo(InReplyToT&& value) {
81 m_inReplyToHasBeenSet = true;
82 m_inReplyTo = std::forward<InReplyToT>(value);
83 }
84 template <typename InReplyToT = Aws::String>
85 Comment& WithInReplyTo(InReplyToT&& value) {
86 SetInReplyTo(std::forward<InReplyToT>(value));
87 return *this;
88 }
90
92
95 inline const Aws::Utils::DateTime& GetCreationDate() const { return m_creationDate; }
96 inline bool CreationDateHasBeenSet() const { return m_creationDateHasBeenSet; }
97 template <typename CreationDateT = Aws::Utils::DateTime>
98 void SetCreationDate(CreationDateT&& value) {
99 m_creationDateHasBeenSet = true;
100 m_creationDate = std::forward<CreationDateT>(value);
101 }
102 template <typename CreationDateT = Aws::Utils::DateTime>
103 Comment& WithCreationDate(CreationDateT&& value) {
104 SetCreationDate(std::forward<CreationDateT>(value));
105 return *this;
106 }
108
110
114 inline const Aws::Utils::DateTime& GetLastModifiedDate() const { return m_lastModifiedDate; }
115 inline bool LastModifiedDateHasBeenSet() const { return m_lastModifiedDateHasBeenSet; }
116 template <typename LastModifiedDateT = Aws::Utils::DateTime>
117 void SetLastModifiedDate(LastModifiedDateT&& value) {
118 m_lastModifiedDateHasBeenSet = true;
119 m_lastModifiedDate = std::forward<LastModifiedDateT>(value);
120 }
121 template <typename LastModifiedDateT = Aws::Utils::DateTime>
122 Comment& WithLastModifiedDate(LastModifiedDateT&& value) {
123 SetLastModifiedDate(std::forward<LastModifiedDateT>(value));
124 return *this;
125 }
127
129
132 inline const Aws::String& GetAuthorArn() const { return m_authorArn; }
133 inline bool AuthorArnHasBeenSet() const { return m_authorArnHasBeenSet; }
134 template <typename AuthorArnT = Aws::String>
135 void SetAuthorArn(AuthorArnT&& value) {
136 m_authorArnHasBeenSet = true;
137 m_authorArn = std::forward<AuthorArnT>(value);
138 }
139 template <typename AuthorArnT = Aws::String>
140 Comment& WithAuthorArn(AuthorArnT&& value) {
141 SetAuthorArn(std::forward<AuthorArnT>(value));
142 return *this;
143 }
145
147
150 inline bool GetDeleted() const { return m_deleted; }
151 inline bool DeletedHasBeenSet() const { return m_deletedHasBeenSet; }
152 inline void SetDeleted(bool value) {
153 m_deletedHasBeenSet = true;
154 m_deleted = value;
155 }
156 inline Comment& WithDeleted(bool value) {
157 SetDeleted(value);
158 return *this;
159 }
161
163
169 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
170 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
171 template <typename ClientRequestTokenT = Aws::String>
172 void SetClientRequestToken(ClientRequestTokenT&& value) {
173 m_clientRequestTokenHasBeenSet = true;
174 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
175 }
176 template <typename ClientRequestTokenT = Aws::String>
177 Comment& WithClientRequestToken(ClientRequestTokenT&& value) {
178 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
179 return *this;
180 }
182
184
188 inline const Aws::Vector<Aws::String>& GetCallerReactions() const { return m_callerReactions; }
189 inline bool CallerReactionsHasBeenSet() const { return m_callerReactionsHasBeenSet; }
190 template <typename CallerReactionsT = Aws::Vector<Aws::String>>
191 void SetCallerReactions(CallerReactionsT&& value) {
192 m_callerReactionsHasBeenSet = true;
193 m_callerReactions = std::forward<CallerReactionsT>(value);
194 }
195 template <typename CallerReactionsT = Aws::Vector<Aws::String>>
196 Comment& WithCallerReactions(CallerReactionsT&& value) {
197 SetCallerReactions(std::forward<CallerReactionsT>(value));
198 return *this;
199 }
200 template <typename CallerReactionsT = Aws::String>
201 Comment& AddCallerReactions(CallerReactionsT&& value) {
202 m_callerReactionsHasBeenSet = true;
203 m_callerReactions.emplace_back(std::forward<CallerReactionsT>(value));
204 return *this;
205 }
207
209
213 inline const Aws::Map<Aws::String, int>& GetReactionCounts() const { return m_reactionCounts; }
214 inline bool ReactionCountsHasBeenSet() const { return m_reactionCountsHasBeenSet; }
215 template <typename ReactionCountsT = Aws::Map<Aws::String, int>>
216 void SetReactionCounts(ReactionCountsT&& value) {
217 m_reactionCountsHasBeenSet = true;
218 m_reactionCounts = std::forward<ReactionCountsT>(value);
219 }
220 template <typename ReactionCountsT = Aws::Map<Aws::String, int>>
221 Comment& WithReactionCounts(ReactionCountsT&& value) {
222 SetReactionCounts(std::forward<ReactionCountsT>(value));
223 return *this;
224 }
225 inline Comment& AddReactionCounts(Aws::String key, int value) {
226 m_reactionCountsHasBeenSet = true;
227 m_reactionCounts.emplace(key, value);
228 return *this;
229 }
231 private:
232 Aws::String m_commentId;
233
234 Aws::String m_content;
235
236 Aws::String m_inReplyTo;
237
238 Aws::Utils::DateTime m_creationDate{};
239
240 Aws::Utils::DateTime m_lastModifiedDate{};
241
242 Aws::String m_authorArn;
243
244 bool m_deleted{false};
245
246 Aws::String m_clientRequestToken;
247
248 Aws::Vector<Aws::String> m_callerReactions;
249
250 Aws::Map<Aws::String, int> m_reactionCounts;
251 bool m_commentIdHasBeenSet = false;
252 bool m_contentHasBeenSet = false;
253 bool m_inReplyToHasBeenSet = false;
254 bool m_creationDateHasBeenSet = false;
255 bool m_lastModifiedDateHasBeenSet = false;
256 bool m_authorArnHasBeenSet = false;
257 bool m_deletedHasBeenSet = false;
258 bool m_clientRequestTokenHasBeenSet = false;
259 bool m_callerReactionsHasBeenSet = false;
260 bool m_reactionCountsHasBeenSet = false;
261};
262
263} // namespace Model
264} // namespace CodeCommit
265} // namespace Aws
bool CreationDateHasBeenSet() const
Definition Comment.h:96
AWS_CODECOMMIT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetCommentId() const
Definition Comment.h:41
bool LastModifiedDateHasBeenSet() const
Definition Comment.h:115
const Aws::Utils::DateTime & GetLastModifiedDate() const
Definition Comment.h:114
AWS_CODECOMMIT_API Comment()=default
Comment & WithContent(ContentT &&value)
Definition Comment.h:67
void SetAuthorArn(AuthorArnT &&value)
Definition Comment.h:135
void SetReactionCounts(ReactionCountsT &&value)
Definition Comment.h:216
void SetLastModifiedDate(LastModifiedDateT &&value)
Definition Comment.h:117
Comment & AddReactionCounts(Aws::String key, int value)
Definition Comment.h:225
AWS_CODECOMMIT_API Comment(Aws::Utils::Json::JsonView jsonValue)
void SetInReplyTo(InReplyToT &&value)
Definition Comment.h:80
Comment & WithInReplyTo(InReplyToT &&value)
Definition Comment.h:85
const Aws::Vector< Aws::String > & GetCallerReactions() const
Definition Comment.h:188
const Aws::Map< Aws::String, int > & GetReactionCounts() const
Definition Comment.h:213
Comment & WithClientRequestToken(ClientRequestTokenT &&value)
Definition Comment.h:177
const Aws::String & GetInReplyTo() const
Definition Comment.h:77
const Aws::String & GetClientRequestToken() const
Definition Comment.h:169
Comment & AddCallerReactions(CallerReactionsT &&value)
Definition Comment.h:201
bool CallerReactionsHasBeenSet() const
Definition Comment.h:189
const Aws::String & GetAuthorArn() const
Definition Comment.h:132
Comment & WithCommentId(CommentIdT &&value)
Definition Comment.h:49
void SetCallerReactions(CallerReactionsT &&value)
Definition Comment.h:191
bool CommentIdHasBeenSet() const
Definition Comment.h:42
const Aws::String & GetContent() const
Definition Comment.h:59
Comment & WithDeleted(bool value)
Definition Comment.h:156
Comment & WithCreationDate(CreationDateT &&value)
Definition Comment.h:103
Comment & WithReactionCounts(ReactionCountsT &&value)
Definition Comment.h:221
void SetContent(ContentT &&value)
Definition Comment.h:62
Comment & WithCallerReactions(CallerReactionsT &&value)
Definition Comment.h:196
bool InReplyToHasBeenSet() const
Definition Comment.h:78
void SetCreationDate(CreationDateT &&value)
Definition Comment.h:98
void SetClientRequestToken(ClientRequestTokenT &&value)
Definition Comment.h:172
bool ReactionCountsHasBeenSet() const
Definition Comment.h:214
Comment & WithLastModifiedDate(LastModifiedDateT &&value)
Definition Comment.h:122
AWS_CODECOMMIT_API Comment & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetDeleted(bool value)
Definition Comment.h:152
bool ClientRequestTokenHasBeenSet() const
Definition Comment.h:170
void SetCommentId(CommentIdT &&value)
Definition Comment.h:44
Comment & WithAuthorArn(AuthorArnT &&value)
Definition Comment.h:140
const Aws::Utils::DateTime & GetCreationDate() const
Definition Comment.h:95
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue