AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
Webhook.h
1
6#pragma once
7#include <aws/codebuild/CodeBuild_EXPORTS.h>
8#include <aws/codebuild/model/PullRequestBuildPolicy.h>
9#include <aws/codebuild/model/ScopeConfiguration.h>
10#include <aws/codebuild/model/WebhookBuildType.h>
11#include <aws/codebuild/model/WebhookFilter.h>
12#include <aws/codebuild/model/WebhookStatus.h>
13#include <aws/core/utils/DateTime.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace CodeBuild {
27namespace Model {
28
35class Webhook {
36 public:
37 AWS_CODEBUILD_API Webhook() = default;
38 AWS_CODEBUILD_API Webhook(Aws::Utils::Json::JsonView jsonValue);
39 AWS_CODEBUILD_API Webhook& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_CODEBUILD_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetUrl() const { return m_url; }
47 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
48 template <typename UrlT = Aws::String>
49 void SetUrl(UrlT&& value) {
50 m_urlHasBeenSet = true;
51 m_url = std::forward<UrlT>(value);
52 }
53 template <typename UrlT = Aws::String>
54 Webhook& WithUrl(UrlT&& value) {
55 SetUrl(std::forward<UrlT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetPayloadUrl() const { return m_payloadUrl; }
65 inline bool PayloadUrlHasBeenSet() const { return m_payloadUrlHasBeenSet; }
66 template <typename PayloadUrlT = Aws::String>
67 void SetPayloadUrl(PayloadUrlT&& value) {
68 m_payloadUrlHasBeenSet = true;
69 m_payloadUrl = std::forward<PayloadUrlT>(value);
70 }
71 template <typename PayloadUrlT = Aws::String>
72 Webhook& WithPayloadUrl(PayloadUrlT&& value) {
73 SetPayloadUrl(std::forward<PayloadUrlT>(value));
74 return *this;
75 }
77
79
83 inline const Aws::String& GetSecret() const { return m_secret; }
84 inline bool SecretHasBeenSet() const { return m_secretHasBeenSet; }
85 template <typename SecretT = Aws::String>
86 void SetSecret(SecretT&& value) {
87 m_secretHasBeenSet = true;
88 m_secret = std::forward<SecretT>(value);
89 }
90 template <typename SecretT = Aws::String>
91 Webhook& WithSecret(SecretT&& value) {
92 SetSecret(std::forward<SecretT>(value));
93 return *this;
94 }
96
98
105 inline const Aws::String& GetBranchFilter() const { return m_branchFilter; }
106 inline bool BranchFilterHasBeenSet() const { return m_branchFilterHasBeenSet; }
107 template <typename BranchFilterT = Aws::String>
108 void SetBranchFilter(BranchFilterT&& value) {
109 m_branchFilterHasBeenSet = true;
110 m_branchFilter = std::forward<BranchFilterT>(value);
111 }
112 template <typename BranchFilterT = Aws::String>
113 Webhook& WithBranchFilter(BranchFilterT&& value) {
114 SetBranchFilter(std::forward<BranchFilterT>(value));
115 return *this;
116 }
118
120
128 inline const Aws::Vector<Aws::Vector<WebhookFilter>>& GetFilterGroups() const { return m_filterGroups; }
129 inline bool FilterGroupsHasBeenSet() const { return m_filterGroupsHasBeenSet; }
130 template <typename FilterGroupsT = Aws::Vector<Aws::Vector<WebhookFilter>>>
131 void SetFilterGroups(FilterGroupsT&& value) {
132 m_filterGroupsHasBeenSet = true;
133 m_filterGroups = std::forward<FilterGroupsT>(value);
134 }
135 template <typename FilterGroupsT = Aws::Vector<Aws::Vector<WebhookFilter>>>
136 Webhook& WithFilterGroups(FilterGroupsT&& value) {
137 SetFilterGroups(std::forward<FilterGroupsT>(value));
138 return *this;
139 }
140 template <typename FilterGroupsT = Aws::Vector<WebhookFilter>>
141 Webhook& AddFilterGroups(FilterGroupsT&& value) {
142 m_filterGroupsHasBeenSet = true;
143 m_filterGroups.emplace_back(std::forward<FilterGroupsT>(value));
144 return *this;
145 }
147
149
158 inline WebhookBuildType GetBuildType() const { return m_buildType; }
159 inline bool BuildTypeHasBeenSet() const { return m_buildTypeHasBeenSet; }
160 inline void SetBuildType(WebhookBuildType value) {
161 m_buildTypeHasBeenSet = true;
162 m_buildType = value;
163 }
165 SetBuildType(value);
166 return *this;
167 }
169
171
178 inline bool GetManualCreation() const { return m_manualCreation; }
179 inline bool ManualCreationHasBeenSet() const { return m_manualCreationHasBeenSet; }
180 inline void SetManualCreation(bool value) {
181 m_manualCreationHasBeenSet = true;
182 m_manualCreation = value;
183 }
184 inline Webhook& WithManualCreation(bool value) {
185 SetManualCreation(value);
186 return *this;
187 }
189
191
195 inline const Aws::Utils::DateTime& GetLastModifiedSecret() const { return m_lastModifiedSecret; }
196 inline bool LastModifiedSecretHasBeenSet() const { return m_lastModifiedSecretHasBeenSet; }
197 template <typename LastModifiedSecretT = Aws::Utils::DateTime>
198 void SetLastModifiedSecret(LastModifiedSecretT&& value) {
199 m_lastModifiedSecretHasBeenSet = true;
200 m_lastModifiedSecret = std::forward<LastModifiedSecretT>(value);
201 }
202 template <typename LastModifiedSecretT = Aws::Utils::DateTime>
203 Webhook& WithLastModifiedSecret(LastModifiedSecretT&& value) {
204 SetLastModifiedSecret(std::forward<LastModifiedSecretT>(value));
205 return *this;
206 }
208
210
215 inline const ScopeConfiguration& GetScopeConfiguration() const { return m_scopeConfiguration; }
216 inline bool ScopeConfigurationHasBeenSet() const { return m_scopeConfigurationHasBeenSet; }
217 template <typename ScopeConfigurationT = ScopeConfiguration>
218 void SetScopeConfiguration(ScopeConfigurationT&& value) {
219 m_scopeConfigurationHasBeenSet = true;
220 m_scopeConfiguration = std::forward<ScopeConfigurationT>(value);
221 }
222 template <typename ScopeConfigurationT = ScopeConfiguration>
223 Webhook& WithScopeConfiguration(ScopeConfigurationT&& value) {
224 SetScopeConfiguration(std::forward<ScopeConfigurationT>(value));
225 return *this;
226 }
228
230
237 inline WebhookStatus GetStatus() const { return m_status; }
238 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
239 inline void SetStatus(WebhookStatus value) {
240 m_statusHasBeenSet = true;
241 m_status = value;
242 }
244 SetStatus(value);
245 return *this;
246 }
248
250
253 inline const Aws::String& GetStatusMessage() const { return m_statusMessage; }
254 inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
255 template <typename StatusMessageT = Aws::String>
256 void SetStatusMessage(StatusMessageT&& value) {
257 m_statusMessageHasBeenSet = true;
258 m_statusMessage = std::forward<StatusMessageT>(value);
259 }
260 template <typename StatusMessageT = Aws::String>
261 Webhook& WithStatusMessage(StatusMessageT&& value) {
262 SetStatusMessage(std::forward<StatusMessageT>(value));
263 return *this;
264 }
266
268
269 inline const PullRequestBuildPolicy& GetPullRequestBuildPolicy() const { return m_pullRequestBuildPolicy; }
270 inline bool PullRequestBuildPolicyHasBeenSet() const { return m_pullRequestBuildPolicyHasBeenSet; }
271 template <typename PullRequestBuildPolicyT = PullRequestBuildPolicy>
272 void SetPullRequestBuildPolicy(PullRequestBuildPolicyT&& value) {
273 m_pullRequestBuildPolicyHasBeenSet = true;
274 m_pullRequestBuildPolicy = std::forward<PullRequestBuildPolicyT>(value);
275 }
276 template <typename PullRequestBuildPolicyT = PullRequestBuildPolicy>
277 Webhook& WithPullRequestBuildPolicy(PullRequestBuildPolicyT&& value) {
278 SetPullRequestBuildPolicy(std::forward<PullRequestBuildPolicyT>(value));
279 return *this;
280 }
282 private:
283 Aws::String m_url;
284
285 Aws::String m_payloadUrl;
286
287 Aws::String m_secret;
288
289 Aws::String m_branchFilter;
290
292
294
295 bool m_manualCreation{false};
296
297 Aws::Utils::DateTime m_lastModifiedSecret{};
298
299 ScopeConfiguration m_scopeConfiguration;
300
302
303 Aws::String m_statusMessage;
304
305 PullRequestBuildPolicy m_pullRequestBuildPolicy;
306 bool m_urlHasBeenSet = false;
307 bool m_payloadUrlHasBeenSet = false;
308 bool m_secretHasBeenSet = false;
309 bool m_branchFilterHasBeenSet = false;
310 bool m_filterGroupsHasBeenSet = false;
311 bool m_buildTypeHasBeenSet = false;
312 bool m_manualCreationHasBeenSet = false;
313 bool m_lastModifiedSecretHasBeenSet = false;
314 bool m_scopeConfigurationHasBeenSet = false;
315 bool m_statusHasBeenSet = false;
316 bool m_statusMessageHasBeenSet = false;
317 bool m_pullRequestBuildPolicyHasBeenSet = false;
318};
319
320} // namespace Model
321} // namespace CodeBuild
322} // namespace Aws
Webhook & WithPullRequestBuildPolicy(PullRequestBuildPolicyT &&value)
Definition Webhook.h:277
void SetSecret(SecretT &&value)
Definition Webhook.h:86
Webhook & WithManualCreation(bool value)
Definition Webhook.h:184
WebhookStatus GetStatus() const
Definition Webhook.h:237
Webhook & WithBranchFilter(BranchFilterT &&value)
Definition Webhook.h:113
bool PullRequestBuildPolicyHasBeenSet() const
Definition Webhook.h:270
void SetScopeConfiguration(ScopeConfigurationT &&value)
Definition Webhook.h:218
bool SecretHasBeenSet() const
Definition Webhook.h:84
const Aws::String & GetSecret() const
Definition Webhook.h:83
void SetStatus(WebhookStatus value)
Definition Webhook.h:239
Webhook & WithSecret(SecretT &&value)
Definition Webhook.h:91
bool FilterGroupsHasBeenSet() const
Definition Webhook.h:129
void SetPayloadUrl(PayloadUrlT &&value)
Definition Webhook.h:67
Webhook & WithFilterGroups(FilterGroupsT &&value)
Definition Webhook.h:136
void SetLastModifiedSecret(LastModifiedSecretT &&value)
Definition Webhook.h:198
WebhookBuildType GetBuildType() const
Definition Webhook.h:158
bool StatusMessageHasBeenSet() const
Definition Webhook.h:254
const Aws::String & GetBranchFilter() const
Definition Webhook.h:105
void SetPullRequestBuildPolicy(PullRequestBuildPolicyT &&value)
Definition Webhook.h:272
const Aws::String & GetStatusMessage() const
Definition Webhook.h:253
void SetUrl(UrlT &&value)
Definition Webhook.h:49
Webhook & WithPayloadUrl(PayloadUrlT &&value)
Definition Webhook.h:72
Webhook & WithScopeConfiguration(ScopeConfigurationT &&value)
Definition Webhook.h:223
Webhook & WithStatusMessage(StatusMessageT &&value)
Definition Webhook.h:261
bool PayloadUrlHasBeenSet() const
Definition Webhook.h:65
bool ScopeConfigurationHasBeenSet() const
Definition Webhook.h:216
AWS_CODEBUILD_API Webhook(Aws::Utils::Json::JsonView jsonValue)
void SetManualCreation(bool value)
Definition Webhook.h:180
bool ManualCreationHasBeenSet() const
Definition Webhook.h:179
Webhook & WithStatus(WebhookStatus value)
Definition Webhook.h:243
Webhook & WithUrl(UrlT &&value)
Definition Webhook.h:54
void SetBuildType(WebhookBuildType value)
Definition Webhook.h:160
const Aws::Vector< Aws::Vector< WebhookFilter > > & GetFilterGroups() const
Definition Webhook.h:128
const Aws::String & GetPayloadUrl() const
Definition Webhook.h:64
void SetBranchFilter(BranchFilterT &&value)
Definition Webhook.h:108
void SetStatusMessage(StatusMessageT &&value)
Definition Webhook.h:256
const PullRequestBuildPolicy & GetPullRequestBuildPolicy() const
Definition Webhook.h:269
const ScopeConfiguration & GetScopeConfiguration() const
Definition Webhook.h:215
Webhook & WithBuildType(WebhookBuildType value)
Definition Webhook.h:164
AWS_CODEBUILD_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_CODEBUILD_API Webhook()=default
AWS_CODEBUILD_API Webhook & operator=(Aws::Utils::Json::JsonView jsonValue)
Webhook & AddFilterGroups(FilterGroupsT &&value)
Definition Webhook.h:141
const Aws::Utils::DateTime & GetLastModifiedSecret() const
Definition Webhook.h:195
Webhook & WithLastModifiedSecret(LastModifiedSecretT &&value)
Definition Webhook.h:203
bool BranchFilterHasBeenSet() const
Definition Webhook.h:106
void SetFilterGroups(FilterGroupsT &&value)
Definition Webhook.h:131
bool LastModifiedSecretHasBeenSet() const
Definition Webhook.h:196
bool BuildTypeHasBeenSet() const
Definition Webhook.h:159
const Aws::String & GetUrl() const
Definition Webhook.h:46
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue