AWS SDK for C++

AWS SDK for C++ Version 1.11.636

Loading...
Searching...
No Matches
CreateWebhookRequest.h
1
6#pragma once
7#include <aws/codebuild/CodeBuild_EXPORTS.h>
8#include <aws/codebuild/CodeBuildRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/codebuild/model/WebhookBuildType.h>
12#include <aws/codebuild/model/ScopeConfiguration.h>
13#include <aws/codebuild/model/PullRequestBuildPolicy.h>
14#include <aws/codebuild/model/WebhookFilter.h>
15#include <utility>
16
17namespace Aws
18{
19namespace CodeBuild
20{
21namespace Model
22{
23
27 {
28 public:
29 AWS_CODEBUILD_API CreateWebhookRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateWebhook"; }
36
37 AWS_CODEBUILD_API Aws::String SerializePayload() const override;
38
40
41
43
46 inline const Aws::String& GetProjectName() const { return m_projectName; }
47 inline bool ProjectNameHasBeenSet() const { return m_projectNameHasBeenSet; }
48 template<typename ProjectNameT = Aws::String>
49 void SetProjectName(ProjectNameT&& value) { m_projectNameHasBeenSet = true; m_projectName = std::forward<ProjectNameT>(value); }
50 template<typename ProjectNameT = Aws::String>
51 CreateWebhookRequest& WithProjectName(ProjectNameT&& value) { SetProjectName(std::forward<ProjectNameT>(value)); return *this;}
53
55
62 inline const Aws::String& GetBranchFilter() const { return m_branchFilter; }
63 inline bool BranchFilterHasBeenSet() const { return m_branchFilterHasBeenSet; }
64 template<typename BranchFilterT = Aws::String>
65 void SetBranchFilter(BranchFilterT&& value) { m_branchFilterHasBeenSet = true; m_branchFilter = std::forward<BranchFilterT>(value); }
66 template<typename BranchFilterT = Aws::String>
67 CreateWebhookRequest& WithBranchFilter(BranchFilterT&& value) { SetBranchFilter(std::forward<BranchFilterT>(value)); return *this;}
69
71
79 inline const Aws::Vector<Aws::Vector<WebhookFilter>>& GetFilterGroups() const { return m_filterGroups; }
80 inline bool FilterGroupsHasBeenSet() const { return m_filterGroupsHasBeenSet; }
81 template<typename FilterGroupsT = Aws::Vector<Aws::Vector<WebhookFilter>>>
82 void SetFilterGroups(FilterGroupsT&& value) { m_filterGroupsHasBeenSet = true; m_filterGroups = std::forward<FilterGroupsT>(value); }
83 template<typename FilterGroupsT = Aws::Vector<Aws::Vector<WebhookFilter>>>
84 CreateWebhookRequest& WithFilterGroups(FilterGroupsT&& value) { SetFilterGroups(std::forward<FilterGroupsT>(value)); return *this;}
85 template<typename FilterGroupsT = Aws::Vector<WebhookFilter>>
86 CreateWebhookRequest& AddFilterGroups(FilterGroupsT&& value) { m_filterGroupsHasBeenSet = true; m_filterGroups.emplace_back(std::forward<FilterGroupsT>(value)); return *this; }
88
90
99 inline WebhookBuildType GetBuildType() const { return m_buildType; }
100 inline bool BuildTypeHasBeenSet() const { return m_buildTypeHasBeenSet; }
101 inline void SetBuildType(WebhookBuildType value) { m_buildTypeHasBeenSet = true; m_buildType = value; }
102 inline CreateWebhookRequest& WithBuildType(WebhookBuildType value) { SetBuildType(value); return *this;}
104
106
113 inline bool GetManualCreation() const { return m_manualCreation; }
114 inline bool ManualCreationHasBeenSet() const { return m_manualCreationHasBeenSet; }
115 inline void SetManualCreation(bool value) { m_manualCreationHasBeenSet = true; m_manualCreation = value; }
116 inline CreateWebhookRequest& WithManualCreation(bool value) { SetManualCreation(value); return *this;}
118
120
125 inline const ScopeConfiguration& GetScopeConfiguration() const { return m_scopeConfiguration; }
126 inline bool ScopeConfigurationHasBeenSet() const { return m_scopeConfigurationHasBeenSet; }
127 template<typename ScopeConfigurationT = ScopeConfiguration>
128 void SetScopeConfiguration(ScopeConfigurationT&& value) { m_scopeConfigurationHasBeenSet = true; m_scopeConfiguration = std::forward<ScopeConfigurationT>(value); }
129 template<typename ScopeConfigurationT = ScopeConfiguration>
130 CreateWebhookRequest& WithScopeConfiguration(ScopeConfigurationT&& value) { SetScopeConfiguration(std::forward<ScopeConfigurationT>(value)); return *this;}
132
134
140 inline const PullRequestBuildPolicy& GetPullRequestBuildPolicy() const { return m_pullRequestBuildPolicy; }
141 inline bool PullRequestBuildPolicyHasBeenSet() const { return m_pullRequestBuildPolicyHasBeenSet; }
142 template<typename PullRequestBuildPolicyT = PullRequestBuildPolicy>
143 void SetPullRequestBuildPolicy(PullRequestBuildPolicyT&& value) { m_pullRequestBuildPolicyHasBeenSet = true; m_pullRequestBuildPolicy = std::forward<PullRequestBuildPolicyT>(value); }
144 template<typename PullRequestBuildPolicyT = PullRequestBuildPolicy>
145 CreateWebhookRequest& WithPullRequestBuildPolicy(PullRequestBuildPolicyT&& value) { SetPullRequestBuildPolicy(std::forward<PullRequestBuildPolicyT>(value)); return *this;}
147 private:
148
149 Aws::String m_projectName;
150 bool m_projectNameHasBeenSet = false;
151
152 Aws::String m_branchFilter;
153 bool m_branchFilterHasBeenSet = false;
154
156 bool m_filterGroupsHasBeenSet = false;
157
159 bool m_buildTypeHasBeenSet = false;
160
161 bool m_manualCreation{false};
162 bool m_manualCreationHasBeenSet = false;
163
164 ScopeConfiguration m_scopeConfiguration;
165 bool m_scopeConfigurationHasBeenSet = false;
166
167 PullRequestBuildPolicy m_pullRequestBuildPolicy;
168 bool m_pullRequestBuildPolicyHasBeenSet = false;
169 };
170
171} // namespace Model
172} // namespace CodeBuild
173} // namespace Aws
CreateWebhookRequest & WithPullRequestBuildPolicy(PullRequestBuildPolicyT &&value)
void SetScopeConfiguration(ScopeConfigurationT &&value)
CreateWebhookRequest & WithManualCreation(bool value)
CreateWebhookRequest & WithBuildType(WebhookBuildType value)
CreateWebhookRequest & WithProjectName(ProjectNameT &&value)
CreateWebhookRequest & WithBranchFilter(BranchFilterT &&value)
AWS_CODEBUILD_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
const ScopeConfiguration & GetScopeConfiguration() const
void SetPullRequestBuildPolicy(PullRequestBuildPolicyT &&value)
const PullRequestBuildPolicy & GetPullRequestBuildPolicy() const
const Aws::Vector< Aws::Vector< WebhookFilter > > & GetFilterGroups() const
AWS_CODEBUILD_API CreateWebhookRequest()=default
AWS_CODEBUILD_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateWebhookRequest & AddFilterGroups(FilterGroupsT &&value)
CreateWebhookRequest & WithScopeConfiguration(ScopeConfigurationT &&value)
CreateWebhookRequest & WithFilterGroups(FilterGroupsT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector