AWS SDK for C++

AWS SDK for C++ Version 1.11.763

Loading...
Searching...
No Matches
CodeReview.h
1
6#pragma once
7#include <aws/codeguru-reviewer/CodeGuruReviewer_EXPORTS.h>
8#include <aws/codeguru-reviewer/model/AnalysisType.h>
9#include <aws/codeguru-reviewer/model/ConfigFileState.h>
10#include <aws/codeguru-reviewer/model/JobState.h>
11#include <aws/codeguru-reviewer/model/Metrics.h>
12#include <aws/codeguru-reviewer/model/ProviderType.h>
13#include <aws/codeguru-reviewer/model/SourceCodeType.h>
14#include <aws/codeguru-reviewer/model/Type.h>
15#include <aws/core/utils/DateTime.h>
16#include <aws/core/utils/memory/stl/AWSString.h>
17#include <aws/core/utils/memory/stl/AWSVector.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Json {
24class JsonValue;
25class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace CodeGuruReviewer {
29namespace Model {
30
38 public:
39 AWS_CODEGURUREVIEWER_API CodeReview() = default;
40 AWS_CODEGURUREVIEWER_API CodeReview(Aws::Utils::Json::JsonView jsonValue);
41 AWS_CODEGURUREVIEWER_API CodeReview& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_CODEGURUREVIEWER_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
48 inline const Aws::String& GetName() const { return m_name; }
49 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 template <typename NameT = Aws::String>
51 void SetName(NameT&& value) {
52 m_nameHasBeenSet = true;
53 m_name = std::forward<NameT>(value);
54 }
55 template <typename NameT = Aws::String>
56 CodeReview& WithName(NameT&& value) {
57 SetName(std::forward<NameT>(value));
58 return *this;
59 }
61
63
68 inline const Aws::String& GetCodeReviewArn() const { return m_codeReviewArn; }
69 inline bool CodeReviewArnHasBeenSet() const { return m_codeReviewArnHasBeenSet; }
70 template <typename CodeReviewArnT = Aws::String>
71 void SetCodeReviewArn(CodeReviewArnT&& value) {
72 m_codeReviewArnHasBeenSet = true;
73 m_codeReviewArn = std::forward<CodeReviewArnT>(value);
74 }
75 template <typename CodeReviewArnT = Aws::String>
76 CodeReview& WithCodeReviewArn(CodeReviewArnT&& value) {
77 SetCodeReviewArn(std::forward<CodeReviewArnT>(value));
78 return *this;
79 }
81
83
86 inline const Aws::String& GetRepositoryName() const { return m_repositoryName; }
87 inline bool RepositoryNameHasBeenSet() const { return m_repositoryNameHasBeenSet; }
88 template <typename RepositoryNameT = Aws::String>
89 void SetRepositoryName(RepositoryNameT&& value) {
90 m_repositoryNameHasBeenSet = true;
91 m_repositoryName = std::forward<RepositoryNameT>(value);
92 }
93 template <typename RepositoryNameT = Aws::String>
94 CodeReview& WithRepositoryName(RepositoryNameT&& value) {
95 SetRepositoryName(std::forward<RepositoryNameT>(value));
96 return *this;
97 }
99
101
108 inline const Aws::String& GetOwner() const { return m_owner; }
109 inline bool OwnerHasBeenSet() const { return m_ownerHasBeenSet; }
110 template <typename OwnerT = Aws::String>
111 void SetOwner(OwnerT&& value) {
112 m_ownerHasBeenSet = true;
113 m_owner = std::forward<OwnerT>(value);
114 }
115 template <typename OwnerT = Aws::String>
116 CodeReview& WithOwner(OwnerT&& value) {
117 SetOwner(std::forward<OwnerT>(value));
118 return *this;
119 }
121
123
127 inline ProviderType GetProviderType() const { return m_providerType; }
128 inline bool ProviderTypeHasBeenSet() const { return m_providerTypeHasBeenSet; }
129 inline void SetProviderType(ProviderType value) {
130 m_providerTypeHasBeenSet = true;
131 m_providerType = value;
132 }
134 SetProviderType(value);
135 return *this;
136 }
138
140
147 inline JobState GetState() const { return m_state; }
148 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
149 inline void SetState(JobState value) {
150 m_stateHasBeenSet = true;
151 m_state = value;
152 }
154 SetState(value);
155 return *this;
156 }
158
160
163 inline const Aws::String& GetStateReason() const { return m_stateReason; }
164 inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; }
165 template <typename StateReasonT = Aws::String>
166 void SetStateReason(StateReasonT&& value) {
167 m_stateReasonHasBeenSet = true;
168 m_stateReason = std::forward<StateReasonT>(value);
169 }
170 template <typename StateReasonT = Aws::String>
171 CodeReview& WithStateReason(StateReasonT&& value) {
172 SetStateReason(std::forward<StateReasonT>(value));
173 return *this;
174 }
176
178
182 inline const Aws::Utils::DateTime& GetCreatedTimeStamp() const { return m_createdTimeStamp; }
183 inline bool CreatedTimeStampHasBeenSet() const { return m_createdTimeStampHasBeenSet; }
184 template <typename CreatedTimeStampT = Aws::Utils::DateTime>
185 void SetCreatedTimeStamp(CreatedTimeStampT&& value) {
186 m_createdTimeStampHasBeenSet = true;
187 m_createdTimeStamp = std::forward<CreatedTimeStampT>(value);
188 }
189 template <typename CreatedTimeStampT = Aws::Utils::DateTime>
190 CodeReview& WithCreatedTimeStamp(CreatedTimeStampT&& value) {
191 SetCreatedTimeStamp(std::forward<CreatedTimeStampT>(value));
192 return *this;
193 }
195
197
201 inline const Aws::Utils::DateTime& GetLastUpdatedTimeStamp() const { return m_lastUpdatedTimeStamp; }
202 inline bool LastUpdatedTimeStampHasBeenSet() const { return m_lastUpdatedTimeStampHasBeenSet; }
203 template <typename LastUpdatedTimeStampT = Aws::Utils::DateTime>
204 void SetLastUpdatedTimeStamp(LastUpdatedTimeStampT&& value) {
205 m_lastUpdatedTimeStampHasBeenSet = true;
206 m_lastUpdatedTimeStamp = std::forward<LastUpdatedTimeStampT>(value);
207 }
208 template <typename LastUpdatedTimeStampT = Aws::Utils::DateTime>
209 CodeReview& WithLastUpdatedTimeStamp(LastUpdatedTimeStampT&& value) {
210 SetLastUpdatedTimeStamp(std::forward<LastUpdatedTimeStampT>(value));
211 return *this;
212 }
214
216
219 inline Type GetType() const { return m_type; }
220 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
221 inline void SetType(Type value) {
222 m_typeHasBeenSet = true;
223 m_type = value;
224 }
225 inline CodeReview& WithType(Type value) {
226 SetType(value);
227 return *this;
228 }
230
232
235 inline const Aws::String& GetPullRequestId() const { return m_pullRequestId; }
236 inline bool PullRequestIdHasBeenSet() const { return m_pullRequestIdHasBeenSet; }
237 template <typename PullRequestIdT = Aws::String>
238 void SetPullRequestId(PullRequestIdT&& value) {
239 m_pullRequestIdHasBeenSet = true;
240 m_pullRequestId = std::forward<PullRequestIdT>(value);
241 }
242 template <typename PullRequestIdT = Aws::String>
243 CodeReview& WithPullRequestId(PullRequestIdT&& value) {
244 SetPullRequestId(std::forward<PullRequestIdT>(value));
245 return *this;
246 }
248
250
253 inline const SourceCodeType& GetSourceCodeType() const { return m_sourceCodeType; }
254 inline bool SourceCodeTypeHasBeenSet() const { return m_sourceCodeTypeHasBeenSet; }
255 template <typename SourceCodeTypeT = SourceCodeType>
256 void SetSourceCodeType(SourceCodeTypeT&& value) {
257 m_sourceCodeTypeHasBeenSet = true;
258 m_sourceCodeType = std::forward<SourceCodeTypeT>(value);
259 }
260 template <typename SourceCodeTypeT = SourceCodeType>
261 CodeReview& WithSourceCodeType(SourceCodeTypeT&& value) {
262 SetSourceCodeType(std::forward<SourceCodeTypeT>(value));
263 return *this;
264 }
266
268
275 inline const Aws::String& GetAssociationArn() const { return m_associationArn; }
276 inline bool AssociationArnHasBeenSet() const { return m_associationArnHasBeenSet; }
277 template <typename AssociationArnT = Aws::String>
278 void SetAssociationArn(AssociationArnT&& value) {
279 m_associationArnHasBeenSet = true;
280 m_associationArn = std::forward<AssociationArnT>(value);
281 }
282 template <typename AssociationArnT = Aws::String>
283 CodeReview& WithAssociationArn(AssociationArnT&& value) {
284 SetAssociationArn(std::forward<AssociationArnT>(value));
285 return *this;
286 }
288
290
293 inline const Metrics& GetMetrics() const { return m_metrics; }
294 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; }
295 template <typename MetricsT = Metrics>
296 void SetMetrics(MetricsT&& value) {
297 m_metricsHasBeenSet = true;
298 m_metrics = std::forward<MetricsT>(value);
299 }
300 template <typename MetricsT = Metrics>
301 CodeReview& WithMetrics(MetricsT&& value) {
302 SetMetrics(std::forward<MetricsT>(value));
303 return *this;
304 }
306
308
313 inline const Aws::Vector<AnalysisType>& GetAnalysisTypes() const { return m_analysisTypes; }
314 inline bool AnalysisTypesHasBeenSet() const { return m_analysisTypesHasBeenSet; }
315 template <typename AnalysisTypesT = Aws::Vector<AnalysisType>>
316 void SetAnalysisTypes(AnalysisTypesT&& value) {
317 m_analysisTypesHasBeenSet = true;
318 m_analysisTypes = std::forward<AnalysisTypesT>(value);
319 }
320 template <typename AnalysisTypesT = Aws::Vector<AnalysisType>>
321 CodeReview& WithAnalysisTypes(AnalysisTypesT&& value) {
322 SetAnalysisTypes(std::forward<AnalysisTypesT>(value));
323 return *this;
324 }
326 m_analysisTypesHasBeenSet = true;
327 m_analysisTypes.push_back(value);
328 return *this;
329 }
331
333
339 inline ConfigFileState GetConfigFileState() const { return m_configFileState; }
340 inline bool ConfigFileStateHasBeenSet() const { return m_configFileStateHasBeenSet; }
342 m_configFileStateHasBeenSet = true;
343 m_configFileState = value;
344 }
346 SetConfigFileState(value);
347 return *this;
348 }
350 private:
351 Aws::String m_name;
352
353 Aws::String m_codeReviewArn;
354
355 Aws::String m_repositoryName;
356
357 Aws::String m_owner;
358
359 ProviderType m_providerType{ProviderType::NOT_SET};
360
362
363 Aws::String m_stateReason;
364
365 Aws::Utils::DateTime m_createdTimeStamp{};
366
367 Aws::Utils::DateTime m_lastUpdatedTimeStamp{};
368
369 Type m_type{Type::NOT_SET};
370
371 Aws::String m_pullRequestId;
372
373 SourceCodeType m_sourceCodeType;
374
375 Aws::String m_associationArn;
376
377 Metrics m_metrics;
378
379 Aws::Vector<AnalysisType> m_analysisTypes;
380
381 ConfigFileState m_configFileState{ConfigFileState::NOT_SET};
382 bool m_nameHasBeenSet = false;
383 bool m_codeReviewArnHasBeenSet = false;
384 bool m_repositoryNameHasBeenSet = false;
385 bool m_ownerHasBeenSet = false;
386 bool m_providerTypeHasBeenSet = false;
387 bool m_stateHasBeenSet = false;
388 bool m_stateReasonHasBeenSet = false;
389 bool m_createdTimeStampHasBeenSet = false;
390 bool m_lastUpdatedTimeStampHasBeenSet = false;
391 bool m_typeHasBeenSet = false;
392 bool m_pullRequestIdHasBeenSet = false;
393 bool m_sourceCodeTypeHasBeenSet = false;
394 bool m_associationArnHasBeenSet = false;
395 bool m_metricsHasBeenSet = false;
396 bool m_analysisTypesHasBeenSet = false;
397 bool m_configFileStateHasBeenSet = false;
398};
399
400} // namespace Model
401} // namespace CodeGuruReviewer
402} // namespace Aws
CodeReview & WithName(NameT &&value)
Definition CodeReview.h:56
CodeReview & WithProviderType(ProviderType value)
Definition CodeReview.h:133
AWS_CODEGURUREVIEWER_API Aws::Utils::Json::JsonValue Jsonize() const
void SetSourceCodeType(SourceCodeTypeT &&value)
Definition CodeReview.h:256
CodeReview & AddAnalysisTypes(AnalysisType value)
Definition CodeReview.h:325
const Aws::Utils::DateTime & GetLastUpdatedTimeStamp() const
Definition CodeReview.h:201
void SetProviderType(ProviderType value)
Definition CodeReview.h:129
CodeReview & WithType(Type value)
Definition CodeReview.h:225
AWS_CODEGURUREVIEWER_API CodeReview()=default
const Aws::String & GetPullRequestId() const
Definition CodeReview.h:235
void SetCreatedTimeStamp(CreatedTimeStampT &&value)
Definition CodeReview.h:185
CodeReview & WithSourceCodeType(SourceCodeTypeT &&value)
Definition CodeReview.h:261
void SetConfigFileState(ConfigFileState value)
Definition CodeReview.h:341
void SetAssociationArn(AssociationArnT &&value)
Definition CodeReview.h:278
void SetCodeReviewArn(CodeReviewArnT &&value)
Definition CodeReview.h:71
CodeReview & WithStateReason(StateReasonT &&value)
Definition CodeReview.h:171
const Aws::String & GetName() const
Definition CodeReview.h:48
CodeReview & WithPullRequestId(PullRequestIdT &&value)
Definition CodeReview.h:243
CodeReview & WithAssociationArn(AssociationArnT &&value)
Definition CodeReview.h:283
const Aws::String & GetRepositoryName() const
Definition CodeReview.h:86
const Aws::String & GetOwner() const
Definition CodeReview.h:108
CodeReview & WithLastUpdatedTimeStamp(LastUpdatedTimeStampT &&value)
Definition CodeReview.h:209
AWS_CODEGURUREVIEWER_API CodeReview & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetCodeReviewArn() const
Definition CodeReview.h:68
CodeReview & WithConfigFileState(ConfigFileState value)
Definition CodeReview.h:345
CodeReview & WithCodeReviewArn(CodeReviewArnT &&value)
Definition CodeReview.h:76
CodeReview & WithMetrics(MetricsT &&value)
Definition CodeReview.h:301
CodeReview & WithCreatedTimeStamp(CreatedTimeStampT &&value)
Definition CodeReview.h:190
CodeReview & WithRepositoryName(RepositoryNameT &&value)
Definition CodeReview.h:94
CodeReview & WithOwner(OwnerT &&value)
Definition CodeReview.h:116
void SetStateReason(StateReasonT &&value)
Definition CodeReview.h:166
const Aws::Vector< AnalysisType > & GetAnalysisTypes() const
Definition CodeReview.h:313
const Aws::String & GetAssociationArn() const
Definition CodeReview.h:275
void SetLastUpdatedTimeStamp(LastUpdatedTimeStampT &&value)
Definition CodeReview.h:204
ConfigFileState GetConfigFileState() const
Definition CodeReview.h:339
AWS_CODEGURUREVIEWER_API CodeReview(Aws::Utils::Json::JsonView jsonValue)
const Aws::Utils::DateTime & GetCreatedTimeStamp() const
Definition CodeReview.h:182
void SetAnalysisTypes(AnalysisTypesT &&value)
Definition CodeReview.h:316
CodeReview & WithState(JobState value)
Definition CodeReview.h:153
const SourceCodeType & GetSourceCodeType() const
Definition CodeReview.h:253
CodeReview & WithAnalysisTypes(AnalysisTypesT &&value)
Definition CodeReview.h:321
const Aws::String & GetStateReason() const
Definition CodeReview.h:163
void SetRepositoryName(RepositoryNameT &&value)
Definition CodeReview.h:89
void SetPullRequestId(PullRequestIdT &&value)
Definition CodeReview.h:238
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue