AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
PolicyDetails.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/dlm/DLM_EXPORTS.h>
9#include <aws/dlm/model/Action.h>
10#include <aws/dlm/model/CrossRegionCopyTarget.h>
11#include <aws/dlm/model/EventSource.h>
12#include <aws/dlm/model/Exclusions.h>
13#include <aws/dlm/model/Parameters.h>
14#include <aws/dlm/model/PolicyLanguageValues.h>
15#include <aws/dlm/model/PolicyTypeValues.h>
16#include <aws/dlm/model/ResourceLocationValues.h>
17#include <aws/dlm/model/ResourceTypeValues.h>
18#include <aws/dlm/model/Schedule.h>
19#include <aws/dlm/model/Tag.h>
20
21#include <utility>
22
23namespace Aws {
24namespace Utils {
25namespace Json {
26class JsonValue;
27class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace DLM {
31namespace Model {
32
40 public:
41 AWS_DLM_API PolicyDetails() = default;
45
47
56 inline PolicyTypeValues GetPolicyType() const { return m_policyType; }
57 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
58 inline void SetPolicyType(PolicyTypeValues value) {
59 m_policyTypeHasBeenSet = true;
60 m_policyType = value;
61 }
63 SetPolicyType(value);
64 return *this;
65 }
67
69
75 inline const Aws::Vector<ResourceTypeValues>& GetResourceTypes() const { return m_resourceTypes; }
76 inline bool ResourceTypesHasBeenSet() const { return m_resourceTypesHasBeenSet; }
77 template <typename ResourceTypesT = Aws::Vector<ResourceTypeValues>>
78 void SetResourceTypes(ResourceTypesT&& value) {
79 m_resourceTypesHasBeenSet = true;
80 m_resourceTypes = std::forward<ResourceTypesT>(value);
81 }
82 template <typename ResourceTypesT = Aws::Vector<ResourceTypeValues>>
83 PolicyDetails& WithResourceTypes(ResourceTypesT&& value) {
84 SetResourceTypes(std::forward<ResourceTypesT>(value));
85 return *this;
86 }
88 m_resourceTypesHasBeenSet = true;
89 m_resourceTypes.push_back(value);
90 return *this;
91 }
93
95
109 inline const Aws::Vector<ResourceLocationValues>& GetResourceLocations() const { return m_resourceLocations; }
110 inline bool ResourceLocationsHasBeenSet() const { return m_resourceLocationsHasBeenSet; }
111 template <typename ResourceLocationsT = Aws::Vector<ResourceLocationValues>>
112 void SetResourceLocations(ResourceLocationsT&& value) {
113 m_resourceLocationsHasBeenSet = true;
114 m_resourceLocations = std::forward<ResourceLocationsT>(value);
115 }
116 template <typename ResourceLocationsT = Aws::Vector<ResourceLocationValues>>
117 PolicyDetails& WithResourceLocations(ResourceLocationsT&& value) {
118 SetResourceLocations(std::forward<ResourceLocationsT>(value));
119 return *this;
120 }
122 m_resourceLocationsHasBeenSet = true;
123 m_resourceLocations.push_back(value);
124 return *this;
125 }
127
129
133 inline const Aws::Vector<Tag>& GetTargetTags() const { return m_targetTags; }
134 inline bool TargetTagsHasBeenSet() const { return m_targetTagsHasBeenSet; }
135 template <typename TargetTagsT = Aws::Vector<Tag>>
136 void SetTargetTags(TargetTagsT&& value) {
137 m_targetTagsHasBeenSet = true;
138 m_targetTags = std::forward<TargetTagsT>(value);
139 }
140 template <typename TargetTagsT = Aws::Vector<Tag>>
141 PolicyDetails& WithTargetTags(TargetTagsT&& value) {
142 SetTargetTags(std::forward<TargetTagsT>(value));
143 return *this;
144 }
145 template <typename TargetTagsT = Tag>
146 PolicyDetails& AddTargetTags(TargetTagsT&& value) {
147 m_targetTagsHasBeenSet = true;
148 m_targetTags.emplace_back(std::forward<TargetTagsT>(value));
149 return *this;
150 }
152
154
160 inline const Aws::Vector<Schedule>& GetSchedules() const { return m_schedules; }
161 inline bool SchedulesHasBeenSet() const { return m_schedulesHasBeenSet; }
162 template <typename SchedulesT = Aws::Vector<Schedule>>
163 void SetSchedules(SchedulesT&& value) {
164 m_schedulesHasBeenSet = true;
165 m_schedules = std::forward<SchedulesT>(value);
166 }
167 template <typename SchedulesT = Aws::Vector<Schedule>>
168 PolicyDetails& WithSchedules(SchedulesT&& value) {
169 SetSchedules(std::forward<SchedulesT>(value));
170 return *this;
171 }
172 template <typename SchedulesT = Schedule>
173 PolicyDetails& AddSchedules(SchedulesT&& value) {
174 m_schedulesHasBeenSet = true;
175 m_schedules.emplace_back(std::forward<SchedulesT>(value));
176 return *this;
177 }
179
181
189 inline const Parameters& GetParameters() const { return m_parameters; }
190 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
191 template <typename ParametersT = Parameters>
192 void SetParameters(ParametersT&& value) {
193 m_parametersHasBeenSet = true;
194 m_parameters = std::forward<ParametersT>(value);
195 }
196 template <typename ParametersT = Parameters>
197 PolicyDetails& WithParameters(ParametersT&& value) {
198 SetParameters(std::forward<ParametersT>(value));
199 return *this;
200 }
202
204
208 inline const EventSource& GetEventSource() const { return m_eventSource; }
209 inline bool EventSourceHasBeenSet() const { return m_eventSourceHasBeenSet; }
210 template <typename EventSourceT = EventSource>
211 void SetEventSource(EventSourceT&& value) {
212 m_eventSourceHasBeenSet = true;
213 m_eventSource = std::forward<EventSourceT>(value);
214 }
215 template <typename EventSourceT = EventSource>
216 PolicyDetails& WithEventSource(EventSourceT&& value) {
217 SetEventSource(std::forward<EventSourceT>(value));
218 return *this;
219 }
221
223
227 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
228 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
229 template <typename ActionsT = Aws::Vector<Action>>
230 void SetActions(ActionsT&& value) {
231 m_actionsHasBeenSet = true;
232 m_actions = std::forward<ActionsT>(value);
233 }
234 template <typename ActionsT = Aws::Vector<Action>>
235 PolicyDetails& WithActions(ActionsT&& value) {
236 SetActions(std::forward<ActionsT>(value));
237 return *this;
238 }
239 template <typename ActionsT = Action>
240 PolicyDetails& AddActions(ActionsT&& value) {
241 m_actionsHasBeenSet = true;
242 m_actions.emplace_back(std::forward<ActionsT>(value));
243 return *this;
244 }
246
248
253 inline PolicyLanguageValues GetPolicyLanguage() const { return m_policyLanguage; }
254 inline bool PolicyLanguageHasBeenSet() const { return m_policyLanguageHasBeenSet; }
256 m_policyLanguageHasBeenSet = true;
257 m_policyLanguage = value;
258 }
260 SetPolicyLanguage(value);
261 return *this;
262 }
264
266
274 inline ResourceTypeValues GetResourceType() const { return m_resourceType; }
275 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
277 m_resourceTypeHasBeenSet = true;
278 m_resourceType = value;
279 }
281 SetResourceType(value);
282 return *this;
283 }
285
287
292 inline int GetCreateInterval() const { return m_createInterval; }
293 inline bool CreateIntervalHasBeenSet() const { return m_createIntervalHasBeenSet; }
294 inline void SetCreateInterval(int value) {
295 m_createIntervalHasBeenSet = true;
296 m_createInterval = value;
297 }
299 SetCreateInterval(value);
300 return *this;
301 }
303
305
312 inline int GetRetainInterval() const { return m_retainInterval; }
313 inline bool RetainIntervalHasBeenSet() const { return m_retainIntervalHasBeenSet; }
314 inline void SetRetainInterval(int value) {
315 m_retainIntervalHasBeenSet = true;
316 m_retainInterval = value;
317 }
319 SetRetainInterval(value);
320 return *this;
321 }
323
325
330 inline bool GetCopyTags() const { return m_copyTags; }
331 inline bool CopyTagsHasBeenSet() const { return m_copyTagsHasBeenSet; }
332 inline void SetCopyTags(bool value) {
333 m_copyTagsHasBeenSet = true;
334 m_copyTags = value;
335 }
336 inline PolicyDetails& WithCopyTags(bool value) {
337 SetCopyTags(value);
338 return *this;
339 }
341
343
348 inline const Aws::Vector<CrossRegionCopyTarget>& GetCrossRegionCopyTargets() const { return m_crossRegionCopyTargets; }
349 inline bool CrossRegionCopyTargetsHasBeenSet() const { return m_crossRegionCopyTargetsHasBeenSet; }
350 template <typename CrossRegionCopyTargetsT = Aws::Vector<CrossRegionCopyTarget>>
351 void SetCrossRegionCopyTargets(CrossRegionCopyTargetsT&& value) {
352 m_crossRegionCopyTargetsHasBeenSet = true;
353 m_crossRegionCopyTargets = std::forward<CrossRegionCopyTargetsT>(value);
354 }
355 template <typename CrossRegionCopyTargetsT = Aws::Vector<CrossRegionCopyTarget>>
356 PolicyDetails& WithCrossRegionCopyTargets(CrossRegionCopyTargetsT&& value) {
357 SetCrossRegionCopyTargets(std::forward<CrossRegionCopyTargetsT>(value));
358 return *this;
359 }
360 template <typename CrossRegionCopyTargetsT = CrossRegionCopyTarget>
361 PolicyDetails& AddCrossRegionCopyTargets(CrossRegionCopyTargetsT&& value) {
362 m_crossRegionCopyTargetsHasBeenSet = true;
363 m_crossRegionCopyTargets.emplace_back(std::forward<CrossRegionCopyTargetsT>(value));
364 return *this;
365 }
367
369
386 inline bool GetExtendDeletion() const { return m_extendDeletion; }
387 inline bool ExtendDeletionHasBeenSet() const { return m_extendDeletionHasBeenSet; }
388 inline void SetExtendDeletion(bool value) {
389 m_extendDeletionHasBeenSet = true;
390 m_extendDeletion = value;
391 }
392 inline PolicyDetails& WithExtendDeletion(bool value) {
393 SetExtendDeletion(value);
394 return *this;
395 }
397
399
405 inline const Exclusions& GetExclusions() const { return m_exclusions; }
406 inline bool ExclusionsHasBeenSet() const { return m_exclusionsHasBeenSet; }
407 template <typename ExclusionsT = Exclusions>
408 void SetExclusions(ExclusionsT&& value) {
409 m_exclusionsHasBeenSet = true;
410 m_exclusions = std::forward<ExclusionsT>(value);
411 }
412 template <typename ExclusionsT = Exclusions>
413 PolicyDetails& WithExclusions(ExclusionsT&& value) {
414 SetExclusions(std::forward<ExclusionsT>(value));
415 return *this;
416 }
418 private:
420
421 Aws::Vector<ResourceTypeValues> m_resourceTypes;
422
423 Aws::Vector<ResourceLocationValues> m_resourceLocations;
424
425 Aws::Vector<Tag> m_targetTags;
426
427 Aws::Vector<Schedule> m_schedules;
428
429 Parameters m_parameters;
430
431 EventSource m_eventSource;
432
433 Aws::Vector<Action> m_actions;
434
436
438
439 int m_createInterval{0};
440
441 int m_retainInterval{0};
442
443 bool m_copyTags{false};
444
445 Aws::Vector<CrossRegionCopyTarget> m_crossRegionCopyTargets;
446
447 bool m_extendDeletion{false};
448
449 Exclusions m_exclusions;
450 bool m_policyTypeHasBeenSet = false;
451 bool m_resourceTypesHasBeenSet = false;
452 bool m_resourceLocationsHasBeenSet = false;
453 bool m_targetTagsHasBeenSet = false;
454 bool m_schedulesHasBeenSet = false;
455 bool m_parametersHasBeenSet = false;
456 bool m_eventSourceHasBeenSet = false;
457 bool m_actionsHasBeenSet = false;
458 bool m_policyLanguageHasBeenSet = false;
459 bool m_resourceTypeHasBeenSet = false;
460 bool m_createIntervalHasBeenSet = false;
461 bool m_retainIntervalHasBeenSet = false;
462 bool m_copyTagsHasBeenSet = false;
463 bool m_crossRegionCopyTargetsHasBeenSet = false;
464 bool m_extendDeletionHasBeenSet = false;
465 bool m_exclusionsHasBeenSet = false;
466};
467
468} // namespace Model
469} // namespace DLM
470} // namespace Aws
PolicyDetails & AddResourceTypes(ResourceTypeValues value)
const Aws::Vector< ResourceTypeValues > & GetResourceTypes() const
const Aws::Vector< Schedule > & GetSchedules() const
void SetPolicyType(PolicyTypeValues value)
PolicyDetails & AddSchedules(SchedulesT &&value)
void SetResourceTypes(ResourceTypesT &&value)
PolicyDetails & WithResourceLocations(ResourceLocationsT &&value)
PolicyDetails & WithExclusions(ExclusionsT &&value)
void SetTargetTags(TargetTagsT &&value)
const Exclusions & GetExclusions() const
PolicyTypeValues GetPolicyType() const
const EventSource & GetEventSource() const
AWS_DLM_API PolicyDetails & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_DLM_API PolicyDetails(Aws::Utils::Json::JsonView jsonValue)
PolicyDetails & WithParameters(ParametersT &&value)
void SetSchedules(SchedulesT &&value)
PolicyLanguageValues GetPolicyLanguage() const
void SetParameters(ParametersT &&value)
PolicyDetails & WithEventSource(EventSourceT &&value)
AWS_DLM_API PolicyDetails()=default
void SetPolicyLanguage(PolicyLanguageValues value)
PolicyDetails & WithPolicyLanguage(PolicyLanguageValues value)
PolicyDetails & WithActions(ActionsT &&value)
const Aws::Vector< CrossRegionCopyTarget > & GetCrossRegionCopyTargets() const
PolicyDetails & WithCopyTags(bool value)
void SetExclusions(ExclusionsT &&value)
void SetCrossRegionCopyTargets(CrossRegionCopyTargetsT &&value)
void SetResourceLocations(ResourceLocationsT &&value)
ResourceTypeValues GetResourceType() const
PolicyDetails & WithTargetTags(TargetTagsT &&value)
const Aws::Vector< Tag > & GetTargetTags() const
PolicyDetails & AddTargetTags(TargetTagsT &&value)
bool CrossRegionCopyTargetsHasBeenSet() const
void SetActions(ActionsT &&value)
PolicyDetails & WithPolicyType(PolicyTypeValues value)
PolicyDetails & AddActions(ActionsT &&value)
PolicyDetails & WithRetainInterval(int value)
const Aws::Vector< Action > & GetActions() const
const Parameters & GetParameters() const
PolicyDetails & WithSchedules(SchedulesT &&value)
PolicyDetails & WithCreateInterval(int value)
PolicyDetails & AddCrossRegionCopyTargets(CrossRegionCopyTargetsT &&value)
PolicyDetails & WithResourceTypes(ResourceTypesT &&value)
void SetEventSource(EventSourceT &&value)
void SetResourceType(ResourceTypeValues value)
PolicyDetails & WithResourceType(ResourceTypeValues value)
AWS_DLM_API Aws::Utils::Json::JsonValue Jsonize() const
PolicyDetails & WithCrossRegionCopyTargets(CrossRegionCopyTargetsT &&value)
PolicyDetails & WithExtendDeletion(bool value)
const Aws::Vector< ResourceLocationValues > & GetResourceLocations() const
PolicyDetails & AddResourceLocations(ResourceLocationValues value)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue