AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
RuleDeclaration.h
1
6#pragma once
7#include <aws/codepipeline/CodePipeline_EXPORTS.h>
8#include <aws/codepipeline/model/InputArtifact.h>
9#include <aws/codepipeline/model/RuleTypeId.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSString.h>
12#include <aws/core/utils/memory/stl/AWSVector.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace CodePipeline {
24namespace Model {
25
41 public:
42 AWS_CODEPIPELINE_API RuleDeclaration() = default;
43 AWS_CODEPIPELINE_API RuleDeclaration(Aws::Utils::Json::JsonView jsonValue);
44 AWS_CODEPIPELINE_API RuleDeclaration& operator=(Aws::Utils::Json::JsonView jsonValue);
45 AWS_CODEPIPELINE_API Aws::Utils::Json::JsonValue Jsonize() const;
46
48
52 inline const Aws::String& GetName() const { return m_name; }
53 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
54 template <typename NameT = Aws::String>
55 void SetName(NameT&& value) {
56 m_nameHasBeenSet = true;
57 m_name = std::forward<NameT>(value);
58 }
59 template <typename NameT = Aws::String>
60 RuleDeclaration& WithName(NameT&& value) {
61 SetName(std::forward<NameT>(value));
62 return *this;
63 }
65
67
71 inline const RuleTypeId& GetRuleTypeId() const { return m_ruleTypeId; }
72 inline bool RuleTypeIdHasBeenSet() const { return m_ruleTypeIdHasBeenSet; }
73 template <typename RuleTypeIdT = RuleTypeId>
74 void SetRuleTypeId(RuleTypeIdT&& value) {
75 m_ruleTypeIdHasBeenSet = true;
76 m_ruleTypeId = std::forward<RuleTypeIdT>(value);
77 }
78 template <typename RuleTypeIdT = RuleTypeId>
79 RuleDeclaration& WithRuleTypeId(RuleTypeIdT&& value) {
80 SetRuleTypeId(std::forward<RuleTypeIdT>(value));
81 return *this;
82 }
84
86
89 inline const Aws::Map<Aws::String, Aws::String>& GetConfiguration() const { return m_configuration; }
90 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }
91 template <typename ConfigurationT = Aws::Map<Aws::String, Aws::String>>
92 void SetConfiguration(ConfigurationT&& value) {
93 m_configurationHasBeenSet = true;
94 m_configuration = std::forward<ConfigurationT>(value);
95 }
96 template <typename ConfigurationT = Aws::Map<Aws::String, Aws::String>>
97 RuleDeclaration& WithConfiguration(ConfigurationT&& value) {
98 SetConfiguration(std::forward<ConfigurationT>(value));
99 return *this;
100 }
101 template <typename ConfigurationKeyT = Aws::String, typename ConfigurationValueT = Aws::String>
102 RuleDeclaration& AddConfiguration(ConfigurationKeyT&& key, ConfigurationValueT&& value) {
103 m_configurationHasBeenSet = true;
104 m_configuration.emplace(std::forward<ConfigurationKeyT>(key), std::forward<ConfigurationValueT>(value));
105 return *this;
106 }
108
110
117 inline const Aws::Vector<Aws::String>& GetCommands() const { return m_commands; }
118 inline bool CommandsHasBeenSet() const { return m_commandsHasBeenSet; }
119 template <typename CommandsT = Aws::Vector<Aws::String>>
120 void SetCommands(CommandsT&& value) {
121 m_commandsHasBeenSet = true;
122 m_commands = std::forward<CommandsT>(value);
123 }
124 template <typename CommandsT = Aws::Vector<Aws::String>>
125 RuleDeclaration& WithCommands(CommandsT&& value) {
126 SetCommands(std::forward<CommandsT>(value));
127 return *this;
128 }
129 template <typename CommandsT = Aws::String>
130 RuleDeclaration& AddCommands(CommandsT&& value) {
131 m_commandsHasBeenSet = true;
132 m_commands.emplace_back(std::forward<CommandsT>(value));
133 return *this;
134 }
136
138
142 inline const Aws::Vector<InputArtifact>& GetInputArtifacts() const { return m_inputArtifacts; }
143 inline bool InputArtifactsHasBeenSet() const { return m_inputArtifactsHasBeenSet; }
144 template <typename InputArtifactsT = Aws::Vector<InputArtifact>>
145 void SetInputArtifacts(InputArtifactsT&& value) {
146 m_inputArtifactsHasBeenSet = true;
147 m_inputArtifacts = std::forward<InputArtifactsT>(value);
148 }
149 template <typename InputArtifactsT = Aws::Vector<InputArtifact>>
150 RuleDeclaration& WithInputArtifacts(InputArtifactsT&& value) {
151 SetInputArtifacts(std::forward<InputArtifactsT>(value));
152 return *this;
153 }
154 template <typename InputArtifactsT = InputArtifact>
155 RuleDeclaration& AddInputArtifacts(InputArtifactsT&& value) {
156 m_inputArtifactsHasBeenSet = true;
157 m_inputArtifacts.emplace_back(std::forward<InputArtifactsT>(value));
158 return *this;
159 }
161
163
166 inline const Aws::String& GetRoleArn() const { return m_roleArn; }
167 inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
168 template <typename RoleArnT = Aws::String>
169 void SetRoleArn(RoleArnT&& value) {
170 m_roleArnHasBeenSet = true;
171 m_roleArn = std::forward<RoleArnT>(value);
172 }
173 template <typename RoleArnT = Aws::String>
174 RuleDeclaration& WithRoleArn(RoleArnT&& value) {
175 SetRoleArn(std::forward<RoleArnT>(value));
176 return *this;
177 }
179
181
184 inline const Aws::String& GetRegion() const { return m_region; }
185 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
186 template <typename RegionT = Aws::String>
187 void SetRegion(RegionT&& value) {
188 m_regionHasBeenSet = true;
189 m_region = std::forward<RegionT>(value);
190 }
191 template <typename RegionT = Aws::String>
192 RuleDeclaration& WithRegion(RegionT&& value) {
193 SetRegion(std::forward<RegionT>(value));
194 return *this;
195 }
197
199
202 inline int GetTimeoutInMinutes() const { return m_timeoutInMinutes; }
203 inline bool TimeoutInMinutesHasBeenSet() const { return m_timeoutInMinutesHasBeenSet; }
204 inline void SetTimeoutInMinutes(int value) {
205 m_timeoutInMinutesHasBeenSet = true;
206 m_timeoutInMinutes = value;
207 }
209 SetTimeoutInMinutes(value);
210 return *this;
211 }
213 private:
214 Aws::String m_name;
215
216 RuleTypeId m_ruleTypeId;
217
219
220 Aws::Vector<Aws::String> m_commands;
221
222 Aws::Vector<InputArtifact> m_inputArtifacts;
223
224 Aws::String m_roleArn;
225
226 Aws::String m_region;
227
228 int m_timeoutInMinutes{0};
229 bool m_nameHasBeenSet = false;
230 bool m_ruleTypeIdHasBeenSet = false;
231 bool m_configurationHasBeenSet = false;
232 bool m_commandsHasBeenSet = false;
233 bool m_inputArtifactsHasBeenSet = false;
234 bool m_roleArnHasBeenSet = false;
235 bool m_regionHasBeenSet = false;
236 bool m_timeoutInMinutesHasBeenSet = false;
237};
238
239} // namespace Model
240} // namespace CodePipeline
241} // namespace Aws
const Aws::Vector< Aws::String > & GetCommands() const
const Aws::Map< Aws::String, Aws::String > & GetConfiguration() const
RuleDeclaration & WithTimeoutInMinutes(int value)
RuleDeclaration & AddCommands(CommandsT &&value)
RuleDeclaration & WithInputArtifacts(InputArtifactsT &&value)
const RuleTypeId & GetRuleTypeId() const
RuleDeclaration & AddConfiguration(ConfigurationKeyT &&key, ConfigurationValueT &&value)
RuleDeclaration & WithRuleTypeId(RuleTypeIdT &&value)
RuleDeclaration & WithRoleArn(RoleArnT &&value)
RuleDeclaration & AddInputArtifacts(InputArtifactsT &&value)
const Aws::Vector< InputArtifact > & GetInputArtifacts() const
RuleDeclaration & WithConfiguration(ConfigurationT &&value)
RuleDeclaration & WithRegion(RegionT &&value)
AWS_CODEPIPELINE_API RuleDeclaration()=default
AWS_CODEPIPELINE_API RuleDeclaration & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_CODEPIPELINE_API RuleDeclaration(Aws::Utils::Json::JsonView jsonValue)
RuleDeclaration & WithName(NameT &&value)
RuleDeclaration & WithCommands(CommandsT &&value)
void SetConfiguration(ConfigurationT &&value)
void SetInputArtifacts(InputArtifactsT &&value)
AWS_CODEPIPELINE_API Aws::Utils::Json::JsonValue Jsonize() const
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