AWS SDK for C++

AWS SDK for C++ Version 1.11.612

Loading...
Searching...
No Matches
PolicyDetails.h
1
6#pragma once
7#include <aws/dlm/DLM_EXPORTS.h>
8#include <aws/dlm/model/PolicyTypeValues.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/dlm/model/Parameters.h>
11#include <aws/dlm/model/EventSource.h>
12#include <aws/dlm/model/PolicyLanguageValues.h>
13#include <aws/dlm/model/ResourceTypeValues.h>
14#include <aws/dlm/model/Exclusions.h>
15#include <aws/dlm/model/ResourceLocationValues.h>
16#include <aws/dlm/model/Tag.h>
17#include <aws/dlm/model/Schedule.h>
18#include <aws/dlm/model/Action.h>
19#include <aws/dlm/model/CrossRegionCopyTarget.h>
20#include <utility>
21
22namespace Aws
23{
24namespace Utils
25{
26namespace Json
27{
28 class JsonValue;
29 class JsonView;
30} // namespace Json
31} // namespace Utils
32namespace DLM
33{
34namespace Model
35{
36
44 {
45 public:
46 AWS_DLM_API PolicyDetails() = default;
50
51
53
62 inline PolicyTypeValues GetPolicyType() const { return m_policyType; }
63 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
64 inline void SetPolicyType(PolicyTypeValues value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
65 inline PolicyDetails& WithPolicyType(PolicyTypeValues value) { SetPolicyType(value); return *this;}
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) { m_resourceTypesHasBeenSet = true; m_resourceTypes = std::forward<ResourceTypesT>(value); }
79 template<typename ResourceTypesT = Aws::Vector<ResourceTypeValues>>
80 PolicyDetails& WithResourceTypes(ResourceTypesT&& value) { SetResourceTypes(std::forward<ResourceTypesT>(value)); return *this;}
81 inline PolicyDetails& AddResourceTypes(ResourceTypeValues value) { m_resourceTypesHasBeenSet = true; m_resourceTypes.push_back(value); return *this; }
83
85
99 inline const Aws::Vector<ResourceLocationValues>& GetResourceLocations() const { return m_resourceLocations; }
100 inline bool ResourceLocationsHasBeenSet() const { return m_resourceLocationsHasBeenSet; }
101 template<typename ResourceLocationsT = Aws::Vector<ResourceLocationValues>>
102 void SetResourceLocations(ResourceLocationsT&& value) { m_resourceLocationsHasBeenSet = true; m_resourceLocations = std::forward<ResourceLocationsT>(value); }
103 template<typename ResourceLocationsT = Aws::Vector<ResourceLocationValues>>
104 PolicyDetails& WithResourceLocations(ResourceLocationsT&& value) { SetResourceLocations(std::forward<ResourceLocationsT>(value)); return *this;}
105 inline PolicyDetails& AddResourceLocations(ResourceLocationValues value) { m_resourceLocationsHasBeenSet = true; m_resourceLocations.push_back(value); return *this; }
107
109
113 inline const Aws::Vector<Tag>& GetTargetTags() const { return m_targetTags; }
114 inline bool TargetTagsHasBeenSet() const { return m_targetTagsHasBeenSet; }
115 template<typename TargetTagsT = Aws::Vector<Tag>>
116 void SetTargetTags(TargetTagsT&& value) { m_targetTagsHasBeenSet = true; m_targetTags = std::forward<TargetTagsT>(value); }
117 template<typename TargetTagsT = Aws::Vector<Tag>>
118 PolicyDetails& WithTargetTags(TargetTagsT&& value) { SetTargetTags(std::forward<TargetTagsT>(value)); return *this;}
119 template<typename TargetTagsT = Tag>
120 PolicyDetails& AddTargetTags(TargetTagsT&& value) { m_targetTagsHasBeenSet = true; m_targetTags.emplace_back(std::forward<TargetTagsT>(value)); return *this; }
122
124
130 inline const Aws::Vector<Schedule>& GetSchedules() const { return m_schedules; }
131 inline bool SchedulesHasBeenSet() const { return m_schedulesHasBeenSet; }
132 template<typename SchedulesT = Aws::Vector<Schedule>>
133 void SetSchedules(SchedulesT&& value) { m_schedulesHasBeenSet = true; m_schedules = std::forward<SchedulesT>(value); }
134 template<typename SchedulesT = Aws::Vector<Schedule>>
135 PolicyDetails& WithSchedules(SchedulesT&& value) { SetSchedules(std::forward<SchedulesT>(value)); return *this;}
136 template<typename SchedulesT = Schedule>
137 PolicyDetails& AddSchedules(SchedulesT&& value) { m_schedulesHasBeenSet = true; m_schedules.emplace_back(std::forward<SchedulesT>(value)); return *this; }
139
141
149 inline const Parameters& GetParameters() const { return m_parameters; }
150 inline bool ParametersHasBeenSet() const { return m_parametersHasBeenSet; }
151 template<typename ParametersT = Parameters>
152 void SetParameters(ParametersT&& value) { m_parametersHasBeenSet = true; m_parameters = std::forward<ParametersT>(value); }
153 template<typename ParametersT = Parameters>
154 PolicyDetails& WithParameters(ParametersT&& value) { SetParameters(std::forward<ParametersT>(value)); return *this;}
156
158
162 inline const EventSource& GetEventSource() const { return m_eventSource; }
163 inline bool EventSourceHasBeenSet() const { return m_eventSourceHasBeenSet; }
164 template<typename EventSourceT = EventSource>
165 void SetEventSource(EventSourceT&& value) { m_eventSourceHasBeenSet = true; m_eventSource = std::forward<EventSourceT>(value); }
166 template<typename EventSourceT = EventSource>
167 PolicyDetails& WithEventSource(EventSourceT&& value) { SetEventSource(std::forward<EventSourceT>(value)); return *this;}
169
171
175 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
176 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
177 template<typename ActionsT = Aws::Vector<Action>>
178 void SetActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions = std::forward<ActionsT>(value); }
179 template<typename ActionsT = Aws::Vector<Action>>
180 PolicyDetails& WithActions(ActionsT&& value) { SetActions(std::forward<ActionsT>(value)); return *this;}
181 template<typename ActionsT = Action>
182 PolicyDetails& AddActions(ActionsT&& value) { m_actionsHasBeenSet = true; m_actions.emplace_back(std::forward<ActionsT>(value)); return *this; }
184
186
191 inline PolicyLanguageValues GetPolicyLanguage() const { return m_policyLanguage; }
192 inline bool PolicyLanguageHasBeenSet() const { return m_policyLanguageHasBeenSet; }
193 inline void SetPolicyLanguage(PolicyLanguageValues value) { m_policyLanguageHasBeenSet = true; m_policyLanguage = value; }
196
198
206 inline ResourceTypeValues GetResourceType() const { return m_resourceType; }
207 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
208 inline void SetResourceType(ResourceTypeValues value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; }
209 inline PolicyDetails& WithResourceType(ResourceTypeValues value) { SetResourceType(value); return *this;}
211
213
218 inline int GetCreateInterval() const { return m_createInterval; }
219 inline bool CreateIntervalHasBeenSet() const { return m_createIntervalHasBeenSet; }
220 inline void SetCreateInterval(int value) { m_createIntervalHasBeenSet = true; m_createInterval = value; }
221 inline PolicyDetails& WithCreateInterval(int value) { SetCreateInterval(value); return *this;}
223
225
232 inline int GetRetainInterval() const { return m_retainInterval; }
233 inline bool RetainIntervalHasBeenSet() const { return m_retainIntervalHasBeenSet; }
234 inline void SetRetainInterval(int value) { m_retainIntervalHasBeenSet = true; m_retainInterval = value; }
235 inline PolicyDetails& WithRetainInterval(int value) { SetRetainInterval(value); return *this;}
237
239
244 inline bool GetCopyTags() const { return m_copyTags; }
245 inline bool CopyTagsHasBeenSet() const { return m_copyTagsHasBeenSet; }
246 inline void SetCopyTags(bool value) { m_copyTagsHasBeenSet = true; m_copyTags = value; }
247 inline PolicyDetails& WithCopyTags(bool value) { SetCopyTags(value); return *this;}
249
251
256 inline const Aws::Vector<CrossRegionCopyTarget>& GetCrossRegionCopyTargets() const { return m_crossRegionCopyTargets; }
257 inline bool CrossRegionCopyTargetsHasBeenSet() const { return m_crossRegionCopyTargetsHasBeenSet; }
258 template<typename CrossRegionCopyTargetsT = Aws::Vector<CrossRegionCopyTarget>>
259 void SetCrossRegionCopyTargets(CrossRegionCopyTargetsT&& value) { m_crossRegionCopyTargetsHasBeenSet = true; m_crossRegionCopyTargets = std::forward<CrossRegionCopyTargetsT>(value); }
260 template<typename CrossRegionCopyTargetsT = Aws::Vector<CrossRegionCopyTarget>>
261 PolicyDetails& WithCrossRegionCopyTargets(CrossRegionCopyTargetsT&& value) { SetCrossRegionCopyTargets(std::forward<CrossRegionCopyTargetsT>(value)); return *this;}
262 template<typename CrossRegionCopyTargetsT = CrossRegionCopyTarget>
263 PolicyDetails& AddCrossRegionCopyTargets(CrossRegionCopyTargetsT&& value) { m_crossRegionCopyTargetsHasBeenSet = true; m_crossRegionCopyTargets.emplace_back(std::forward<CrossRegionCopyTargetsT>(value)); return *this; }
265
267
284 inline bool GetExtendDeletion() const { return m_extendDeletion; }
285 inline bool ExtendDeletionHasBeenSet() const { return m_extendDeletionHasBeenSet; }
286 inline void SetExtendDeletion(bool value) { m_extendDeletionHasBeenSet = true; m_extendDeletion = value; }
287 inline PolicyDetails& WithExtendDeletion(bool value) { SetExtendDeletion(value); return *this;}
289
291
297 inline const Exclusions& GetExclusions() const { return m_exclusions; }
298 inline bool ExclusionsHasBeenSet() const { return m_exclusionsHasBeenSet; }
299 template<typename ExclusionsT = Exclusions>
300 void SetExclusions(ExclusionsT&& value) { m_exclusionsHasBeenSet = true; m_exclusions = std::forward<ExclusionsT>(value); }
301 template<typename ExclusionsT = Exclusions>
302 PolicyDetails& WithExclusions(ExclusionsT&& value) { SetExclusions(std::forward<ExclusionsT>(value)); return *this;}
304 private:
305
307 bool m_policyTypeHasBeenSet = false;
308
309 Aws::Vector<ResourceTypeValues> m_resourceTypes;
310 bool m_resourceTypesHasBeenSet = false;
311
312 Aws::Vector<ResourceLocationValues> m_resourceLocations;
313 bool m_resourceLocationsHasBeenSet = false;
314
315 Aws::Vector<Tag> m_targetTags;
316 bool m_targetTagsHasBeenSet = false;
317
318 Aws::Vector<Schedule> m_schedules;
319 bool m_schedulesHasBeenSet = false;
320
321 Parameters m_parameters;
322 bool m_parametersHasBeenSet = false;
323
324 EventSource m_eventSource;
325 bool m_eventSourceHasBeenSet = false;
326
327 Aws::Vector<Action> m_actions;
328 bool m_actionsHasBeenSet = false;
329
331 bool m_policyLanguageHasBeenSet = false;
332
334 bool m_resourceTypeHasBeenSet = false;
335
336 int m_createInterval{0};
337 bool m_createIntervalHasBeenSet = false;
338
339 int m_retainInterval{0};
340 bool m_retainIntervalHasBeenSet = false;
341
342 bool m_copyTags{false};
343 bool m_copyTagsHasBeenSet = false;
344
345 Aws::Vector<CrossRegionCopyTarget> m_crossRegionCopyTargets;
346 bool m_crossRegionCopyTargetsHasBeenSet = false;
347
348 bool m_extendDeletion{false};
349 bool m_extendDeletionHasBeenSet = false;
350
351 Exclusions m_exclusions;
352 bool m_exclusionsHasBeenSet = false;
353 };
354
355} // namespace Model
356} // namespace DLM
357} // 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