AWS SDK for C++

AWS SDK for C++ Version 1.11.636

Loading...
Searching...
No Matches
Webhook.h
1
6#pragma once
7#include <aws/codebuild/CodeBuild_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/codebuild/model/WebhookBuildType.h>
11#include <aws/core/utils/DateTime.h>
12#include <aws/codebuild/model/ScopeConfiguration.h>
13#include <aws/codebuild/model/WebhookStatus.h>
14#include <aws/codebuild/model/PullRequestBuildPolicy.h>
15#include <aws/codebuild/model/WebhookFilter.h>
16#include <utility>
17
18namespace Aws
19{
20namespace Utils
21{
22namespace Json
23{
24 class JsonValue;
25 class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace CodeBuild
29{
30namespace Model
31{
32
39 class Webhook
40 {
41 public:
42 AWS_CODEBUILD_API Webhook() = default;
43 AWS_CODEBUILD_API Webhook(Aws::Utils::Json::JsonView jsonValue);
44 AWS_CODEBUILD_API Webhook& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_CODEBUILD_API Aws::Utils::Json::JsonValue Jsonize() const;
46
47
49
52 inline const Aws::String& GetUrl() const { return m_url; }
53 inline bool UrlHasBeenSet() const { return m_urlHasBeenSet; }
54 template<typename UrlT = Aws::String>
55 void SetUrl(UrlT&& value) { m_urlHasBeenSet = true; m_url = std::forward<UrlT>(value); }
56 template<typename UrlT = Aws::String>
57 Webhook& WithUrl(UrlT&& value) { SetUrl(std::forward<UrlT>(value)); return *this;}
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) { m_payloadUrlHasBeenSet = true; m_payloadUrl = std::forward<PayloadUrlT>(value); }
68 template<typename PayloadUrlT = Aws::String>
69 Webhook& WithPayloadUrl(PayloadUrlT&& value) { SetPayloadUrl(std::forward<PayloadUrlT>(value)); return *this;}
71
73
77 inline const Aws::String& GetSecret() const { return m_secret; }
78 inline bool SecretHasBeenSet() const { return m_secretHasBeenSet; }
79 template<typename SecretT = Aws::String>
80 void SetSecret(SecretT&& value) { m_secretHasBeenSet = true; m_secret = std::forward<SecretT>(value); }
81 template<typename SecretT = Aws::String>
82 Webhook& WithSecret(SecretT&& value) { SetSecret(std::forward<SecretT>(value)); return *this;}
84
86
93 inline const Aws::String& GetBranchFilter() const { return m_branchFilter; }
94 inline bool BranchFilterHasBeenSet() const { return m_branchFilterHasBeenSet; }
95 template<typename BranchFilterT = Aws::String>
96 void SetBranchFilter(BranchFilterT&& value) { m_branchFilterHasBeenSet = true; m_branchFilter = std::forward<BranchFilterT>(value); }
97 template<typename BranchFilterT = Aws::String>
98 Webhook& WithBranchFilter(BranchFilterT&& value) { SetBranchFilter(std::forward<BranchFilterT>(value)); return *this;}
100
102
110 inline const Aws::Vector<Aws::Vector<WebhookFilter>>& GetFilterGroups() const { return m_filterGroups; }
111 inline bool FilterGroupsHasBeenSet() const { return m_filterGroupsHasBeenSet; }
112 template<typename FilterGroupsT = Aws::Vector<Aws::Vector<WebhookFilter>>>
113 void SetFilterGroups(FilterGroupsT&& value) { m_filterGroupsHasBeenSet = true; m_filterGroups = std::forward<FilterGroupsT>(value); }
114 template<typename FilterGroupsT = Aws::Vector<Aws::Vector<WebhookFilter>>>
115 Webhook& WithFilterGroups(FilterGroupsT&& value) { SetFilterGroups(std::forward<FilterGroupsT>(value)); return *this;}
116 template<typename FilterGroupsT = Aws::Vector<WebhookFilter>>
117 Webhook& AddFilterGroups(FilterGroupsT&& value) { m_filterGroupsHasBeenSet = true; m_filterGroups.emplace_back(std::forward<FilterGroupsT>(value)); return *this; }
119
121
130 inline WebhookBuildType GetBuildType() const { return m_buildType; }
131 inline bool BuildTypeHasBeenSet() const { return m_buildTypeHasBeenSet; }
132 inline void SetBuildType(WebhookBuildType value) { m_buildTypeHasBeenSet = true; m_buildType = value; }
133 inline Webhook& WithBuildType(WebhookBuildType value) { SetBuildType(value); return *this;}
135
137
144 inline bool GetManualCreation() const { return m_manualCreation; }
145 inline bool ManualCreationHasBeenSet() const { return m_manualCreationHasBeenSet; }
146 inline void SetManualCreation(bool value) { m_manualCreationHasBeenSet = true; m_manualCreation = value; }
147 inline Webhook& WithManualCreation(bool value) { SetManualCreation(value); return *this;}
149
151
155 inline const Aws::Utils::DateTime& GetLastModifiedSecret() const { return m_lastModifiedSecret; }
156 inline bool LastModifiedSecretHasBeenSet() const { return m_lastModifiedSecretHasBeenSet; }
157 template<typename LastModifiedSecretT = Aws::Utils::DateTime>
158 void SetLastModifiedSecret(LastModifiedSecretT&& value) { m_lastModifiedSecretHasBeenSet = true; m_lastModifiedSecret = std::forward<LastModifiedSecretT>(value); }
159 template<typename LastModifiedSecretT = Aws::Utils::DateTime>
160 Webhook& WithLastModifiedSecret(LastModifiedSecretT&& value) { SetLastModifiedSecret(std::forward<LastModifiedSecretT>(value)); return *this;}
162
164
169 inline const ScopeConfiguration& GetScopeConfiguration() const { return m_scopeConfiguration; }
170 inline bool ScopeConfigurationHasBeenSet() const { return m_scopeConfigurationHasBeenSet; }
171 template<typename ScopeConfigurationT = ScopeConfiguration>
172 void SetScopeConfiguration(ScopeConfigurationT&& value) { m_scopeConfigurationHasBeenSet = true; m_scopeConfiguration = std::forward<ScopeConfigurationT>(value); }
173 template<typename ScopeConfigurationT = ScopeConfiguration>
174 Webhook& WithScopeConfiguration(ScopeConfigurationT&& value) { SetScopeConfiguration(std::forward<ScopeConfigurationT>(value)); return *this;}
176
178
185 inline WebhookStatus GetStatus() const { return m_status; }
186 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
187 inline void SetStatus(WebhookStatus value) { m_statusHasBeenSet = true; m_status = value; }
188 inline Webhook& WithStatus(WebhookStatus value) { SetStatus(value); return *this;}
190
192
195 inline const Aws::String& GetStatusMessage() const { return m_statusMessage; }
196 inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; }
197 template<typename StatusMessageT = Aws::String>
198 void SetStatusMessage(StatusMessageT&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::forward<StatusMessageT>(value); }
199 template<typename StatusMessageT = Aws::String>
200 Webhook& WithStatusMessage(StatusMessageT&& value) { SetStatusMessage(std::forward<StatusMessageT>(value)); return *this;}
202
204
205 inline const PullRequestBuildPolicy& GetPullRequestBuildPolicy() const { return m_pullRequestBuildPolicy; }
206 inline bool PullRequestBuildPolicyHasBeenSet() const { return m_pullRequestBuildPolicyHasBeenSet; }
207 template<typename PullRequestBuildPolicyT = PullRequestBuildPolicy>
208 void SetPullRequestBuildPolicy(PullRequestBuildPolicyT&& value) { m_pullRequestBuildPolicyHasBeenSet = true; m_pullRequestBuildPolicy = std::forward<PullRequestBuildPolicyT>(value); }
209 template<typename PullRequestBuildPolicyT = PullRequestBuildPolicy>
210 Webhook& WithPullRequestBuildPolicy(PullRequestBuildPolicyT&& value) { SetPullRequestBuildPolicy(std::forward<PullRequestBuildPolicyT>(value)); return *this;}
212 private:
213
214 Aws::String m_url;
215 bool m_urlHasBeenSet = false;
216
217 Aws::String m_payloadUrl;
218 bool m_payloadUrlHasBeenSet = false;
219
220 Aws::String m_secret;
221 bool m_secretHasBeenSet = false;
222
223 Aws::String m_branchFilter;
224 bool m_branchFilterHasBeenSet = false;
225
227 bool m_filterGroupsHasBeenSet = false;
228
230 bool m_buildTypeHasBeenSet = false;
231
232 bool m_manualCreation{false};
233 bool m_manualCreationHasBeenSet = false;
234
235 Aws::Utils::DateTime m_lastModifiedSecret{};
236 bool m_lastModifiedSecretHasBeenSet = false;
237
238 ScopeConfiguration m_scopeConfiguration;
239 bool m_scopeConfigurationHasBeenSet = false;
240
242 bool m_statusHasBeenSet = false;
243
244 Aws::String m_statusMessage;
245 bool m_statusMessageHasBeenSet = false;
246
247 PullRequestBuildPolicy m_pullRequestBuildPolicy;
248 bool m_pullRequestBuildPolicyHasBeenSet = false;
249 };
250
251} // namespace Model
252} // namespace CodeBuild
253} // namespace Aws
Webhook & WithPullRequestBuildPolicy(PullRequestBuildPolicyT &&value)
Definition Webhook.h:210
void SetSecret(SecretT &&value)
Definition Webhook.h:80
Webhook & WithManualCreation(bool value)
Definition Webhook.h:147
WebhookStatus GetStatus() const
Definition Webhook.h:185
Webhook & WithBranchFilter(BranchFilterT &&value)
Definition Webhook.h:98
bool PullRequestBuildPolicyHasBeenSet() const
Definition Webhook.h:206
void SetScopeConfiguration(ScopeConfigurationT &&value)
Definition Webhook.h:172
bool SecretHasBeenSet() const
Definition Webhook.h:78
const Aws::String & GetSecret() const
Definition Webhook.h:77
void SetStatus(WebhookStatus value)
Definition Webhook.h:187
Webhook & WithSecret(SecretT &&value)
Definition Webhook.h:82
bool FilterGroupsHasBeenSet() const
Definition Webhook.h:111
void SetPayloadUrl(PayloadUrlT &&value)
Definition Webhook.h:67
Webhook & WithFilterGroups(FilterGroupsT &&value)
Definition Webhook.h:115
void SetLastModifiedSecret(LastModifiedSecretT &&value)
Definition Webhook.h:158
WebhookBuildType GetBuildType() const
Definition Webhook.h:130
bool StatusMessageHasBeenSet() const
Definition Webhook.h:196
const Aws::String & GetBranchFilter() const
Definition Webhook.h:93
void SetPullRequestBuildPolicy(PullRequestBuildPolicyT &&value)
Definition Webhook.h:208
const Aws::String & GetStatusMessage() const
Definition Webhook.h:195
void SetUrl(UrlT &&value)
Definition Webhook.h:55
Webhook & WithPayloadUrl(PayloadUrlT &&value)
Definition Webhook.h:69
Webhook & WithScopeConfiguration(ScopeConfigurationT &&value)
Definition Webhook.h:174
Webhook & WithStatusMessage(StatusMessageT &&value)
Definition Webhook.h:200
bool PayloadUrlHasBeenSet() const
Definition Webhook.h:65
bool ScopeConfigurationHasBeenSet() const
Definition Webhook.h:170
AWS_CODEBUILD_API Webhook(Aws::Utils::Json::JsonView jsonValue)
void SetManualCreation(bool value)
Definition Webhook.h:146
bool ManualCreationHasBeenSet() const
Definition Webhook.h:145
Webhook & WithStatus(WebhookStatus value)
Definition Webhook.h:188
Webhook & WithUrl(UrlT &&value)
Definition Webhook.h:57
void SetBuildType(WebhookBuildType value)
Definition Webhook.h:132
const Aws::Vector< Aws::Vector< WebhookFilter > > & GetFilterGroups() const
Definition Webhook.h:110
const Aws::String & GetPayloadUrl() const
Definition Webhook.h:64
void SetBranchFilter(BranchFilterT &&value)
Definition Webhook.h:96
void SetStatusMessage(StatusMessageT &&value)
Definition Webhook.h:198
const PullRequestBuildPolicy & GetPullRequestBuildPolicy() const
Definition Webhook.h:205
const ScopeConfiguration & GetScopeConfiguration() const
Definition Webhook.h:169
Webhook & WithBuildType(WebhookBuildType value)
Definition Webhook.h:133
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:117
const Aws::Utils::DateTime & GetLastModifiedSecret() const
Definition Webhook.h:155
Webhook & WithLastModifiedSecret(LastModifiedSecretT &&value)
Definition Webhook.h:160
bool BranchFilterHasBeenSet() const
Definition Webhook.h:94
void SetFilterGroups(FilterGroupsT &&value)
Definition Webhook.h:113
bool LastModifiedSecretHasBeenSet() const
Definition Webhook.h:156
bool BuildTypeHasBeenSet() const
Definition Webhook.h:131
const Aws::String & GetUrl() const
Definition Webhook.h:52
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue