AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
CreatePolicyRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.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/PolicyConfiguration.h>
14#include <aws/network-security-manager/model/PolicyFirewallType.h>
15#include <aws/network-security-manager/model/TemplateOrRuleReference.h>
16
17#include <utility>
18
19namespace Aws {
20namespace NetworkSecurityManager {
21namespace Model {
22
26 public:
27 AWS_NETWORKSECURITYMANAGER_API CreatePolicyRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreatePolicy"; }
34
35 AWS_NETWORKSECURITYMANAGER_API Aws::String SerializePayload() const override;
36
38
44 inline const Aws::String& GetClientToken() const { return m_clientToken; }
45 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
46 template <typename ClientTokenT = Aws::String>
47 void SetClientToken(ClientTokenT&& value) {
48 m_clientTokenHasBeenSet = true;
49 m_clientToken = std::forward<ClientTokenT>(value);
50 }
51 template <typename ClientTokenT = Aws::String>
52 CreatePolicyRequest& WithClientToken(ClientTokenT&& value) {
53 SetClientToken(std::forward<ClientTokenT>(value));
54 return *this;
55 }
57
59
62 inline const Aws::String& GetPolicyName() const { return m_policyName; }
63 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
64 template <typename PolicyNameT = Aws::String>
65 void SetPolicyName(PolicyNameT&& value) {
66 m_policyNameHasBeenSet = true;
67 m_policyName = std::forward<PolicyNameT>(value);
68 }
69 template <typename PolicyNameT = Aws::String>
70 CreatePolicyRequest& WithPolicyName(PolicyNameT&& value) {
71 SetPolicyName(std::forward<PolicyNameT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::String& GetPolicyDescription() const { return m_policyDescription; }
81 inline bool PolicyDescriptionHasBeenSet() const { return m_policyDescriptionHasBeenSet; }
82 template <typename PolicyDescriptionT = Aws::String>
83 void SetPolicyDescription(PolicyDescriptionT&& value) {
84 m_policyDescriptionHasBeenSet = true;
85 m_policyDescription = std::forward<PolicyDescriptionT>(value);
86 }
87 template <typename PolicyDescriptionT = Aws::String>
88 CreatePolicyRequest& WithPolicyDescription(PolicyDescriptionT&& value) {
89 SetPolicyDescription(std::forward<PolicyDescriptionT>(value));
90 return *this;
91 }
93
95
98 inline int GetPriority() const { return m_priority; }
99 inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
100 inline void SetPriority(int value) {
101 m_priorityHasBeenSet = true;
102 m_priority = value;
103 }
105 SetPriority(value);
106 return *this;
107 }
109
111
116 inline const Aws::Vector<TemplateOrRuleReference>& GetAssociatedTemplateAndRuleList() const { return m_associatedTemplateAndRuleList; }
117 inline bool AssociatedTemplateAndRuleListHasBeenSet() const { return m_associatedTemplateAndRuleListHasBeenSet; }
118 template <typename AssociatedTemplateAndRuleListT = Aws::Vector<TemplateOrRuleReference>>
119 void SetAssociatedTemplateAndRuleList(AssociatedTemplateAndRuleListT&& value) {
120 m_associatedTemplateAndRuleListHasBeenSet = true;
121 m_associatedTemplateAndRuleList = std::forward<AssociatedTemplateAndRuleListT>(value);
122 }
123 template <typename AssociatedTemplateAndRuleListT = Aws::Vector<TemplateOrRuleReference>>
124 CreatePolicyRequest& WithAssociatedTemplateAndRuleList(AssociatedTemplateAndRuleListT&& value) {
125 SetAssociatedTemplateAndRuleList(std::forward<AssociatedTemplateAndRuleListT>(value));
126 return *this;
127 }
128 template <typename AssociatedTemplateAndRuleListT = TemplateOrRuleReference>
129 CreatePolicyRequest& AddAssociatedTemplateAndRuleList(AssociatedTemplateAndRuleListT&& value) {
130 m_associatedTemplateAndRuleListHasBeenSet = true;
131 m_associatedTemplateAndRuleList.emplace_back(std::forward<AssociatedTemplateAndRuleListT>(value));
132 return *this;
133 }
135
137
140 inline PolicyFirewallType GetFirewallType() const { return m_firewallType; }
141 inline bool FirewallTypeHasBeenSet() const { return m_firewallTypeHasBeenSet; }
143 m_firewallTypeHasBeenSet = true;
144 m_firewallType = value;
145 }
147 SetFirewallType(value);
148 return *this;
149 }
151
153
157 inline const PolicyConfiguration& GetPolicyConfiguration() const { return m_policyConfiguration; }
158 inline bool PolicyConfigurationHasBeenSet() const { return m_policyConfigurationHasBeenSet; }
159 template <typename PolicyConfigurationT = PolicyConfiguration>
160 void SetPolicyConfiguration(PolicyConfigurationT&& value) {
161 m_policyConfigurationHasBeenSet = true;
162 m_policyConfiguration = std::forward<PolicyConfigurationT>(value);
163 }
164 template <typename PolicyConfigurationT = PolicyConfiguration>
165 CreatePolicyRequest& WithPolicyConfiguration(PolicyConfigurationT&& value) {
166 SetPolicyConfiguration(std::forward<PolicyConfigurationT>(value));
167 return *this;
168 }
170
172
178 inline bool GetIsPublished() const { return m_isPublished; }
179 inline bool IsPublishedHasBeenSet() const { return m_isPublishedHasBeenSet; }
180 inline void SetIsPublished(bool value) {
181 m_isPublishedHasBeenSet = true;
182 m_isPublished = value;
183 }
185 SetIsPublished(value);
186 return *this;
187 }
189
191
194 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
195 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
196 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
197 void SetTags(TagsT&& value) {
198 m_tagsHasBeenSet = true;
199 m_tags = std::forward<TagsT>(value);
200 }
201 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
203 SetTags(std::forward<TagsT>(value));
204 return *this;
205 }
206 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
207 CreatePolicyRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
208 m_tagsHasBeenSet = true;
209 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
210 return *this;
211 }
213 private:
215
216 Aws::String m_policyName;
217
218 Aws::String m_policyDescription;
219
220 int m_priority{0};
221
222 Aws::Vector<TemplateOrRuleReference> m_associatedTemplateAndRuleList;
223
225
226 PolicyConfiguration m_policyConfiguration;
227
228 bool m_isPublished{false};
229
231 bool m_clientTokenHasBeenSet = true;
232 bool m_policyNameHasBeenSet = false;
233 bool m_policyDescriptionHasBeenSet = false;
234 bool m_priorityHasBeenSet = false;
235 bool m_associatedTemplateAndRuleListHasBeenSet = false;
236 bool m_firewallTypeHasBeenSet = false;
237 bool m_policyConfigurationHasBeenSet = false;
238 bool m_isPublishedHasBeenSet = false;
239 bool m_tagsHasBeenSet = false;
240};
241
242} // namespace Model
243} // namespace NetworkSecurityManager
244} // namespace Aws
AWS_NETWORKSECURITYMANAGER_API Aws::String SerializePayload() const override
virtual const char * GetServiceRequestName() const override
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreatePolicyRequest & WithFirewallType(PolicyFirewallType value)
const Aws::Vector< TemplateOrRuleReference > & GetAssociatedTemplateAndRuleList() const
void SetAssociatedTemplateAndRuleList(AssociatedTemplateAndRuleListT &&value)
CreatePolicyRequest & AddAssociatedTemplateAndRuleList(AssociatedTemplateAndRuleListT &&value)
CreatePolicyRequest & WithAssociatedTemplateAndRuleList(AssociatedTemplateAndRuleListT &&value)
AWS_NETWORKSECURITYMANAGER_API CreatePolicyRequest()=default
CreatePolicyRequest & WithPolicyDescription(PolicyDescriptionT &&value)
CreatePolicyRequest & WithClientToken(ClientTokenT &&value)
CreatePolicyRequest & WithPolicyName(PolicyNameT &&value)
CreatePolicyRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreatePolicyRequest & WithPolicyConfiguration(PolicyConfigurationT &&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
std::vector< T, Aws::Allocator< T > > Vector