AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
CreateRuleRequest.h
1
6#pragma once
7#include <aws/core/utils/Document.h>
8#include <aws/core/utils/UUID.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/network-security-manager/NetworkSecurityManagerRequest.h>
12#include <aws/network-security-manager/NetworkSecurityManager_EXPORTS.h>
13#include <aws/network-security-manager/model/RuleFirewallType.h>
14#include <aws/network-security-manager/model/RuleType.h>
15
16#include <utility>
17
18namespace Aws {
19namespace NetworkSecurityManager {
20namespace Model {
21
25 public:
26 AWS_NETWORKSECURITYMANAGER_API CreateRuleRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; }
33
34 AWS_NETWORKSECURITYMANAGER_API Aws::String SerializePayload() const override;
35
37
43 inline const Aws::String& GetClientToken() const { return m_clientToken; }
44 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
45 template <typename ClientTokenT = Aws::String>
46 void SetClientToken(ClientTokenT&& value) {
47 m_clientTokenHasBeenSet = true;
48 m_clientToken = std::forward<ClientTokenT>(value);
49 }
50 template <typename ClientTokenT = Aws::String>
51 CreateRuleRequest& WithClientToken(ClientTokenT&& value) {
52 SetClientToken(std::forward<ClientTokenT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetRuleName() const { return m_ruleName; }
62 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
63 template <typename RuleNameT = Aws::String>
64 void SetRuleName(RuleNameT&& value) {
65 m_ruleNameHasBeenSet = true;
66 m_ruleName = std::forward<RuleNameT>(value);
67 }
68 template <typename RuleNameT = Aws::String>
69 CreateRuleRequest& WithRuleName(RuleNameT&& value) {
70 SetRuleName(std::forward<RuleNameT>(value));
71 return *this;
72 }
74
76
79 inline RuleFirewallType GetFirewallType() const { return m_firewallType; }
80 inline bool FirewallTypeHasBeenSet() const { return m_firewallTypeHasBeenSet; }
81 inline void SetFirewallType(RuleFirewallType value) {
82 m_firewallTypeHasBeenSet = true;
83 m_firewallType = value;
84 }
86 SetFirewallType(value);
87 return *this;
88 }
90
92
96 inline RuleType GetRuleType() const { return m_ruleType; }
97 inline bool RuleTypeHasBeenSet() const { return m_ruleTypeHasBeenSet; }
98 inline void SetRuleType(RuleType value) {
99 m_ruleTypeHasBeenSet = true;
100 m_ruleType = value;
101 }
103 SetRuleType(value);
104 return *this;
105 }
107
109
112 inline const Aws::String& GetRuleDescription() const { return m_ruleDescription; }
113 inline bool RuleDescriptionHasBeenSet() const { return m_ruleDescriptionHasBeenSet; }
114 template <typename RuleDescriptionT = Aws::String>
115 void SetRuleDescription(RuleDescriptionT&& value) {
116 m_ruleDescriptionHasBeenSet = true;
117 m_ruleDescription = std::forward<RuleDescriptionT>(value);
118 }
119 template <typename RuleDescriptionT = Aws::String>
120 CreateRuleRequest& WithRuleDescription(RuleDescriptionT&& value) {
121 SetRuleDescription(std::forward<RuleDescriptionT>(value));
122 return *this;
123 }
125
127
139 inline Aws::Utils::DocumentView GetConfiguration() const { return m_configuration; }
140 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }
141 template <typename ConfigurationT = Aws::Utils::Document>
142 void SetConfiguration(ConfigurationT&& value) {
143 m_configurationHasBeenSet = true;
144 m_configuration = std::forward<ConfigurationT>(value);
145 }
146 template <typename ConfigurationT = Aws::Utils::Document>
147 CreateRuleRequest& WithConfiguration(ConfigurationT&& value) {
148 SetConfiguration(std::forward<ConfigurationT>(value));
149 return *this;
150 }
152
154
160 inline bool GetIsPublished() const { return m_isPublished; }
161 inline bool IsPublishedHasBeenSet() const { return m_isPublishedHasBeenSet; }
162 inline void SetIsPublished(bool value) {
163 m_isPublishedHasBeenSet = true;
164 m_isPublished = value;
165 }
166 inline CreateRuleRequest& WithIsPublished(bool value) {
167 SetIsPublished(value);
168 return *this;
169 }
171
173
176 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
177 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
178 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
179 void SetTags(TagsT&& value) {
180 m_tagsHasBeenSet = true;
181 m_tags = std::forward<TagsT>(value);
182 }
183 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
184 CreateRuleRequest& WithTags(TagsT&& value) {
185 SetTags(std::forward<TagsT>(value));
186 return *this;
187 }
188 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
189 CreateRuleRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
190 m_tagsHasBeenSet = true;
191 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
192 return *this;
193 }
195 private:
197
198 Aws::String m_ruleName;
199
201
202 RuleType m_ruleType{RuleType::NOT_SET};
203
204 Aws::String m_ruleDescription;
205
206 Aws::Utils::Document m_configuration;
207
208 bool m_isPublished{false};
209
211 bool m_clientTokenHasBeenSet = true;
212 bool m_ruleNameHasBeenSet = false;
213 bool m_firewallTypeHasBeenSet = false;
214 bool m_ruleTypeHasBeenSet = false;
215 bool m_ruleDescriptionHasBeenSet = false;
216 bool m_configurationHasBeenSet = false;
217 bool m_isPublishedHasBeenSet = false;
218 bool m_tagsHasBeenSet = false;
219};
220
221} // namespace Model
222} // namespace NetworkSecurityManager
223} // namespace Aws
CreateRuleRequest & WithClientToken(ClientTokenT &&value)
CreateRuleRequest & WithRuleName(RuleNameT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateRuleRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
AWS_NETWORKSECURITYMANAGER_API CreateRuleRequest()=default
CreateRuleRequest & WithConfiguration(ConfigurationT &&value)
AWS_NETWORKSECURITYMANAGER_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
CreateRuleRequest & WithRuleDescription(RuleDescriptionT &&value)
CreateRuleRequest & WithFirewallType(RuleFirewallType value)
static Aws::Utils::UUID PseudoRandomUUID()
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