AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Policy.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/fms/FMS_EXPORTS.h>
11#include <aws/fms/model/CustomerPolicyScopeIdType.h>
12#include <aws/fms/model/CustomerPolicyStatus.h>
13#include <aws/fms/model/ResourceTag.h>
14#include <aws/fms/model/ResourceTagLogicalOperator.h>
15#include <aws/fms/model/SecurityServicePolicyData.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace FMS {
27namespace Model {
28
34class Policy {
35 public:
36 AWS_FMS_API Policy() = default;
37 AWS_FMS_API Policy(Aws::Utils::Json::JsonView jsonValue);
40
42
45 inline const Aws::String& GetPolicyId() const { return m_policyId; }
46 inline bool PolicyIdHasBeenSet() const { return m_policyIdHasBeenSet; }
47 template <typename PolicyIdT = Aws::String>
48 void SetPolicyId(PolicyIdT&& value) {
49 m_policyIdHasBeenSet = true;
50 m_policyId = std::forward<PolicyIdT>(value);
51 }
52 template <typename PolicyIdT = Aws::String>
53 Policy& WithPolicyId(PolicyIdT&& value) {
54 SetPolicyId(std::forward<PolicyIdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetPolicyName() const { return m_policyName; }
64 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
65 template <typename PolicyNameT = Aws::String>
66 void SetPolicyName(PolicyNameT&& value) {
67 m_policyNameHasBeenSet = true;
68 m_policyName = std::forward<PolicyNameT>(value);
69 }
70 template <typename PolicyNameT = Aws::String>
71 Policy& WithPolicyName(PolicyNameT&& value) {
72 SetPolicyName(std::forward<PolicyNameT>(value));
73 return *this;
74 }
76
78
85 inline const Aws::String& GetPolicyUpdateToken() const { return m_policyUpdateToken; }
86 inline bool PolicyUpdateTokenHasBeenSet() const { return m_policyUpdateTokenHasBeenSet; }
87 template <typename PolicyUpdateTokenT = Aws::String>
88 void SetPolicyUpdateToken(PolicyUpdateTokenT&& value) {
89 m_policyUpdateTokenHasBeenSet = true;
90 m_policyUpdateToken = std::forward<PolicyUpdateTokenT>(value);
91 }
92 template <typename PolicyUpdateTokenT = Aws::String>
93 Policy& WithPolicyUpdateToken(PolicyUpdateTokenT&& value) {
94 SetPolicyUpdateToken(std::forward<PolicyUpdateTokenT>(value));
95 return *this;
96 }
98
100
104 inline const SecurityServicePolicyData& GetSecurityServicePolicyData() const { return m_securityServicePolicyData; }
105 inline bool SecurityServicePolicyDataHasBeenSet() const { return m_securityServicePolicyDataHasBeenSet; }
106 template <typename SecurityServicePolicyDataT = SecurityServicePolicyData>
107 void SetSecurityServicePolicyData(SecurityServicePolicyDataT&& value) {
108 m_securityServicePolicyDataHasBeenSet = true;
109 m_securityServicePolicyData = std::forward<SecurityServicePolicyDataT>(value);
110 }
111 template <typename SecurityServicePolicyDataT = SecurityServicePolicyData>
112 Policy& WithSecurityServicePolicyData(SecurityServicePolicyDataT&& value) {
113 SetSecurityServicePolicyData(std::forward<SecurityServicePolicyDataT>(value));
114 return *this;
115 }
117
119
143 inline const Aws::String& GetResourceType() const { return m_resourceType; }
144 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
145 template <typename ResourceTypeT = Aws::String>
146 void SetResourceType(ResourceTypeT&& value) {
147 m_resourceTypeHasBeenSet = true;
148 m_resourceType = std::forward<ResourceTypeT>(value);
149 }
150 template <typename ResourceTypeT = Aws::String>
151 Policy& WithResourceType(ResourceTypeT&& value) {
152 SetResourceType(std::forward<ResourceTypeT>(value));
153 return *this;
154 }
156
158
163 inline const Aws::Vector<Aws::String>& GetResourceTypeList() const { return m_resourceTypeList; }
164 inline bool ResourceTypeListHasBeenSet() const { return m_resourceTypeListHasBeenSet; }
165 template <typename ResourceTypeListT = Aws::Vector<Aws::String>>
166 void SetResourceTypeList(ResourceTypeListT&& value) {
167 m_resourceTypeListHasBeenSet = true;
168 m_resourceTypeList = std::forward<ResourceTypeListT>(value);
169 }
170 template <typename ResourceTypeListT = Aws::Vector<Aws::String>>
171 Policy& WithResourceTypeList(ResourceTypeListT&& value) {
172 SetResourceTypeList(std::forward<ResourceTypeListT>(value));
173 return *this;
174 }
175 template <typename ResourceTypeListT = Aws::String>
176 Policy& AddResourceTypeList(ResourceTypeListT&& value) {
177 m_resourceTypeListHasBeenSet = true;
178 m_resourceTypeList.emplace_back(std::forward<ResourceTypeListT>(value));
179 return *this;
180 }
182
184
187 inline const Aws::Vector<ResourceTag>& GetResourceTags() const { return m_resourceTags; }
188 inline bool ResourceTagsHasBeenSet() const { return m_resourceTagsHasBeenSet; }
189 template <typename ResourceTagsT = Aws::Vector<ResourceTag>>
190 void SetResourceTags(ResourceTagsT&& value) {
191 m_resourceTagsHasBeenSet = true;
192 m_resourceTags = std::forward<ResourceTagsT>(value);
193 }
194 template <typename ResourceTagsT = Aws::Vector<ResourceTag>>
195 Policy& WithResourceTags(ResourceTagsT&& value) {
196 SetResourceTags(std::forward<ResourceTagsT>(value));
197 return *this;
198 }
199 template <typename ResourceTagsT = ResourceTag>
200 Policy& AddResourceTags(ResourceTagsT&& value) {
201 m_resourceTagsHasBeenSet = true;
202 m_resourceTags.emplace_back(std::forward<ResourceTagsT>(value));
203 return *this;
204 }
206
208
214 inline bool GetExcludeResourceTags() const { return m_excludeResourceTags; }
215 inline bool ExcludeResourceTagsHasBeenSet() const { return m_excludeResourceTagsHasBeenSet; }
216 inline void SetExcludeResourceTags(bool value) {
217 m_excludeResourceTagsHasBeenSet = true;
218 m_excludeResourceTags = value;
219 }
220 inline Policy& WithExcludeResourceTags(bool value) {
222 return *this;
223 }
225
227
230 inline bool GetRemediationEnabled() const { return m_remediationEnabled; }
231 inline bool RemediationEnabledHasBeenSet() const { return m_remediationEnabledHasBeenSet; }
232 inline void SetRemediationEnabled(bool value) {
233 m_remediationEnabledHasBeenSet = true;
234 m_remediationEnabled = value;
235 }
236 inline Policy& WithRemediationEnabled(bool value) {
238 return *this;
239 }
241
243
253 inline bool GetDeleteUnusedFMManagedResources() const { return m_deleteUnusedFMManagedResources; }
254 inline bool DeleteUnusedFMManagedResourcesHasBeenSet() const { return m_deleteUnusedFMManagedResourcesHasBeenSet; }
255 inline void SetDeleteUnusedFMManagedResources(bool value) {
256 m_deleteUnusedFMManagedResourcesHasBeenSet = true;
257 m_deleteUnusedFMManagedResources = value;
258 }
261 return *this;
262 }
264
266
288 inline bool IncludeMapHasBeenSet() const { return m_includeMapHasBeenSet; }
289 template <typename IncludeMapT = Aws::Map<CustomerPolicyScopeIdType, Aws::Vector<Aws::String>>>
290 void SetIncludeMap(IncludeMapT&& value) {
291 m_includeMapHasBeenSet = true;
292 m_includeMap = std::forward<IncludeMapT>(value);
293 }
294 template <typename IncludeMapT = Aws::Map<CustomerPolicyScopeIdType, Aws::Vector<Aws::String>>>
295 Policy& WithIncludeMap(IncludeMapT&& value) {
296 SetIncludeMap(std::forward<IncludeMapT>(value));
297 return *this;
298 }
300 m_includeMapHasBeenSet = true;
301 m_includeMap.emplace(key, value);
302 return *this;
303 }
305
307
329 inline bool ExcludeMapHasBeenSet() const { return m_excludeMapHasBeenSet; }
330 template <typename ExcludeMapT = Aws::Map<CustomerPolicyScopeIdType, Aws::Vector<Aws::String>>>
331 void SetExcludeMap(ExcludeMapT&& value) {
332 m_excludeMapHasBeenSet = true;
333 m_excludeMap = std::forward<ExcludeMapT>(value);
334 }
335 template <typename ExcludeMapT = Aws::Map<CustomerPolicyScopeIdType, Aws::Vector<Aws::String>>>
336 Policy& WithExcludeMap(ExcludeMapT&& value) {
337 SetExcludeMap(std::forward<ExcludeMapT>(value));
338 return *this;
339 }
341 m_excludeMapHasBeenSet = true;
342 m_excludeMap.emplace(key, value);
343 return *this;
344 }
346
348
351 inline const Aws::Vector<Aws::String>& GetResourceSetIds() const { return m_resourceSetIds; }
352 inline bool ResourceSetIdsHasBeenSet() const { return m_resourceSetIdsHasBeenSet; }
353 template <typename ResourceSetIdsT = Aws::Vector<Aws::String>>
354 void SetResourceSetIds(ResourceSetIdsT&& value) {
355 m_resourceSetIdsHasBeenSet = true;
356 m_resourceSetIds = std::forward<ResourceSetIdsT>(value);
357 }
358 template <typename ResourceSetIdsT = Aws::Vector<Aws::String>>
359 Policy& WithResourceSetIds(ResourceSetIdsT&& value) {
360 SetResourceSetIds(std::forward<ResourceSetIdsT>(value));
361 return *this;
362 }
363 template <typename ResourceSetIdsT = Aws::String>
364 Policy& AddResourceSetIds(ResourceSetIdsT&& value) {
365 m_resourceSetIdsHasBeenSet = true;
366 m_resourceSetIds.emplace_back(std::forward<ResourceSetIdsT>(value));
367 return *this;
368 }
370
372
375 inline const Aws::String& GetPolicyDescription() const { return m_policyDescription; }
376 inline bool PolicyDescriptionHasBeenSet() const { return m_policyDescriptionHasBeenSet; }
377 template <typename PolicyDescriptionT = Aws::String>
378 void SetPolicyDescription(PolicyDescriptionT&& value) {
379 m_policyDescriptionHasBeenSet = true;
380 m_policyDescription = std::forward<PolicyDescriptionT>(value);
381 }
382 template <typename PolicyDescriptionT = Aws::String>
383 Policy& WithPolicyDescription(PolicyDescriptionT&& value) {
384 SetPolicyDescription(std::forward<PolicyDescriptionT>(value));
385 return *this;
386 }
388
390
398 inline CustomerPolicyStatus GetPolicyStatus() const { return m_policyStatus; }
399 inline bool PolicyStatusHasBeenSet() const { return m_policyStatusHasBeenSet; }
401 m_policyStatusHasBeenSet = true;
402 m_policyStatus = value;
403 }
405 SetPolicyStatus(value);
406 return *this;
407 }
409
411
416 inline ResourceTagLogicalOperator GetResourceTagLogicalOperator() const { return m_resourceTagLogicalOperator; }
417 inline bool ResourceTagLogicalOperatorHasBeenSet() const { return m_resourceTagLogicalOperatorHasBeenSet; }
419 m_resourceTagLogicalOperatorHasBeenSet = true;
420 m_resourceTagLogicalOperator = value;
421 }
424 return *this;
425 }
427 private:
428 Aws::String m_policyId;
429
430 Aws::String m_policyName;
431
432 Aws::String m_policyUpdateToken;
433
434 SecurityServicePolicyData m_securityServicePolicyData;
435
436 Aws::String m_resourceType;
437
438 Aws::Vector<Aws::String> m_resourceTypeList;
439
440 Aws::Vector<ResourceTag> m_resourceTags;
441
442 bool m_excludeResourceTags{false};
443
444 bool m_remediationEnabled{false};
445
446 bool m_deleteUnusedFMManagedResources{false};
447
449
451
452 Aws::Vector<Aws::String> m_resourceSetIds;
453
454 Aws::String m_policyDescription;
455
457
459 bool m_policyIdHasBeenSet = false;
460 bool m_policyNameHasBeenSet = false;
461 bool m_policyUpdateTokenHasBeenSet = false;
462 bool m_securityServicePolicyDataHasBeenSet = false;
463 bool m_resourceTypeHasBeenSet = false;
464 bool m_resourceTypeListHasBeenSet = false;
465 bool m_resourceTagsHasBeenSet = false;
466 bool m_excludeResourceTagsHasBeenSet = false;
467 bool m_remediationEnabledHasBeenSet = false;
468 bool m_deleteUnusedFMManagedResourcesHasBeenSet = false;
469 bool m_includeMapHasBeenSet = false;
470 bool m_excludeMapHasBeenSet = false;
471 bool m_resourceSetIdsHasBeenSet = false;
472 bool m_policyDescriptionHasBeenSet = false;
473 bool m_policyStatusHasBeenSet = false;
474 bool m_resourceTagLogicalOperatorHasBeenSet = false;
475};
476
477} // namespace Model
478} // namespace FMS
479} // namespace Aws
Policy & WithRemediationEnabled(bool value)
Definition Policy.h:236
bool ExcludeMapHasBeenSet() const
Definition Policy.h:329
bool GetDeleteUnusedFMManagedResources() const
Definition Policy.h:253
bool ResourceTypeListHasBeenSet() const
Definition Policy.h:164
void SetExcludeResourceTags(bool value)
Definition Policy.h:216
const Aws::Vector< Aws::String > & GetResourceSetIds() const
Definition Policy.h:351
const Aws::String & GetResourceType() const
Definition Policy.h:143
AWS_FMS_API Policy & operator=(Aws::Utils::Json::JsonView jsonValue)
bool ExcludeResourceTagsHasBeenSet() const
Definition Policy.h:215
bool ResourceTagLogicalOperatorHasBeenSet() const
Definition Policy.h:417
const Aws::String & GetPolicyDescription() const
Definition Policy.h:375
Policy & WithDeleteUnusedFMManagedResources(bool value)
Definition Policy.h:259
Policy & AddIncludeMap(CustomerPolicyScopeIdType key, Aws::Vector< Aws::String > value)
Definition Policy.h:299
const Aws::Vector< Aws::String > & GetResourceTypeList() const
Definition Policy.h:163
Policy & WithPolicyName(PolicyNameT &&value)
Definition Policy.h:71
bool ResourceTypeHasBeenSet() const
Definition Policy.h:144
const Aws::Map< CustomerPolicyScopeIdType, Aws::Vector< Aws::String > > & GetExcludeMap() const
Definition Policy.h:328
const Aws::String & GetPolicyName() const
Definition Policy.h:63
Policy & WithResourceTypeList(ResourceTypeListT &&value)
Definition Policy.h:171
bool PolicyStatusHasBeenSet() const
Definition Policy.h:399
Policy & WithResourceTagLogicalOperator(ResourceTagLogicalOperator value)
Definition Policy.h:422
void SetPolicyStatus(CustomerPolicyStatus value)
Definition Policy.h:400
void SetIncludeMap(IncludeMapT &&value)
Definition Policy.h:290
void SetExcludeMap(ExcludeMapT &&value)
Definition Policy.h:331
void SetPolicyUpdateToken(PolicyUpdateTokenT &&value)
Definition Policy.h:88
const Aws::Vector< ResourceTag > & GetResourceTags() const
Definition Policy.h:187
void SetResourceTags(ResourceTagsT &&value)
Definition Policy.h:190
Policy & WithResourceType(ResourceTypeT &&value)
Definition Policy.h:151
AWS_FMS_API Policy(Aws::Utils::Json::JsonView jsonValue)
Policy & WithPolicyId(PolicyIdT &&value)
Definition Policy.h:53
void SetPolicyName(PolicyNameT &&value)
Definition Policy.h:66
Policy & WithSecurityServicePolicyData(SecurityServicePolicyDataT &&value)
Definition Policy.h:112
Policy & WithExcludeMap(ExcludeMapT &&value)
Definition Policy.h:336
const Aws::String & GetPolicyId() const
Definition Policy.h:45
const Aws::Map< CustomerPolicyScopeIdType, Aws::Vector< Aws::String > > & GetIncludeMap() const
Definition Policy.h:287
void SetSecurityServicePolicyData(SecurityServicePolicyDataT &&value)
Definition Policy.h:107
void SetResourceTagLogicalOperator(ResourceTagLogicalOperator value)
Definition Policy.h:418
Policy & WithResourceSetIds(ResourceSetIdsT &&value)
Definition Policy.h:359
const Aws::String & GetPolicyUpdateToken() const
Definition Policy.h:85
bool SecurityServicePolicyDataHasBeenSet() const
Definition Policy.h:105
bool DeleteUnusedFMManagedResourcesHasBeenSet() const
Definition Policy.h:254
bool GetExcludeResourceTags() const
Definition Policy.h:214
CustomerPolicyStatus GetPolicyStatus() const
Definition Policy.h:398
void SetPolicyDescription(PolicyDescriptionT &&value)
Definition Policy.h:378
void SetRemediationEnabled(bool value)
Definition Policy.h:232
Policy & WithIncludeMap(IncludeMapT &&value)
Definition Policy.h:295
Policy & WithExcludeResourceTags(bool value)
Definition Policy.h:220
AWS_FMS_API Policy()=default
Policy & AddExcludeMap(CustomerPolicyScopeIdType key, Aws::Vector< Aws::String > value)
Definition Policy.h:340
bool GetRemediationEnabled() const
Definition Policy.h:230
const SecurityServicePolicyData & GetSecurityServicePolicyData() const
Definition Policy.h:104
Policy & AddResourceSetIds(ResourceSetIdsT &&value)
Definition Policy.h:364
bool ResourceTagsHasBeenSet() const
Definition Policy.h:188
Policy & AddResourceTypeList(ResourceTypeListT &&value)
Definition Policy.h:176
void SetDeleteUnusedFMManagedResources(bool value)
Definition Policy.h:255
Policy & AddResourceTags(ResourceTagsT &&value)
Definition Policy.h:200
Policy & WithPolicyDescription(PolicyDescriptionT &&value)
Definition Policy.h:383
Policy & WithResourceTags(ResourceTagsT &&value)
Definition Policy.h:195
void SetResourceTypeList(ResourceTypeListT &&value)
Definition Policy.h:166
bool PolicyIdHasBeenSet() const
Definition Policy.h:46
bool ResourceSetIdsHasBeenSet() const
Definition Policy.h:352
bool PolicyUpdateTokenHasBeenSet() const
Definition Policy.h:86
bool PolicyNameHasBeenSet() const
Definition Policy.h:64
void SetPolicyId(PolicyIdT &&value)
Definition Policy.h:48
bool PolicyDescriptionHasBeenSet() const
Definition Policy.h:376
void SetResourceType(ResourceTypeT &&value)
Definition Policy.h:146
AWS_FMS_API Aws::Utils::Json::JsonValue Jsonize() const
Policy & WithPolicyUpdateToken(PolicyUpdateTokenT &&value)
Definition Policy.h:93
bool IncludeMapHasBeenSet() const
Definition Policy.h:288
Policy & WithPolicyStatus(CustomerPolicyStatus value)
Definition Policy.h:404
void SetResourceSetIds(ResourceSetIdsT &&value)
Definition Policy.h:354
bool RemediationEnabledHasBeenSet() const
Definition Policy.h:231
ResourceTagLogicalOperator GetResourceTagLogicalOperator() const
Definition Policy.h:416
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