AWS SDK for C++

AWS SDK for C++ Version 1.11.758

Loading...
Searching...
No Matches
BackupRule.h
1
6#pragma once
7#include <aws/backup/Backup_EXPORTS.h>
8#include <aws/backup/model/CopyAction.h>
9#include <aws/backup/model/IndexAction.h>
10#include <aws/backup/model/Lifecycle.h>
11#include <aws/backup/model/ScanAction.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace Backup {
26namespace Model {
27
35 public:
36 AWS_BACKUP_API BackupRule() = default;
37 AWS_BACKUP_API BackupRule(Aws::Utils::Json::JsonView jsonValue);
39 AWS_BACKUP_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
46 inline const Aws::String& GetRuleName() const { return m_ruleName; }
47 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
48 template <typename RuleNameT = Aws::String>
49 void SetRuleName(RuleNameT&& value) {
50 m_ruleNameHasBeenSet = true;
51 m_ruleName = std::forward<RuleNameT>(value);
52 }
53 template <typename RuleNameT = Aws::String>
54 BackupRule& WithRuleName(RuleNameT&& value) {
55 SetRuleName(std::forward<RuleNameT>(value));
56 return *this;
57 }
59
61
66 inline const Aws::String& GetTargetBackupVaultName() const { return m_targetBackupVaultName; }
67 inline bool TargetBackupVaultNameHasBeenSet() const { return m_targetBackupVaultNameHasBeenSet; }
68 template <typename TargetBackupVaultNameT = Aws::String>
69 void SetTargetBackupVaultName(TargetBackupVaultNameT&& value) {
70 m_targetBackupVaultNameHasBeenSet = true;
71 m_targetBackupVaultName = std::forward<TargetBackupVaultNameT>(value);
72 }
73 template <typename TargetBackupVaultNameT = Aws::String>
74 BackupRule& WithTargetBackupVaultName(TargetBackupVaultNameT&& value) {
75 SetTargetBackupVaultName(std::forward<TargetBackupVaultNameT>(value));
76 return *this;
77 }
79
81
88 inline const Aws::String& GetTargetLogicallyAirGappedBackupVaultArn() const { return m_targetLogicallyAirGappedBackupVaultArn; }
89 inline bool TargetLogicallyAirGappedBackupVaultArnHasBeenSet() const { return m_targetLogicallyAirGappedBackupVaultArnHasBeenSet; }
90 template <typename TargetLogicallyAirGappedBackupVaultArnT = Aws::String>
91 void SetTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT&& value) {
92 m_targetLogicallyAirGappedBackupVaultArnHasBeenSet = true;
93 m_targetLogicallyAirGappedBackupVaultArn = std::forward<TargetLogicallyAirGappedBackupVaultArnT>(value);
94 }
95 template <typename TargetLogicallyAirGappedBackupVaultArnT = Aws::String>
96 BackupRule& WithTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT&& value) {
97 SetTargetLogicallyAirGappedBackupVaultArn(std::forward<TargetLogicallyAirGappedBackupVaultArnT>(value));
98 return *this;
99 }
101
103
115 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
116 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
117 template <typename ScheduleExpressionT = Aws::String>
118 void SetScheduleExpression(ScheduleExpressionT&& value) {
119 m_scheduleExpressionHasBeenSet = true;
120 m_scheduleExpression = std::forward<ScheduleExpressionT>(value);
121 }
122 template <typename ScheduleExpressionT = Aws::String>
123 BackupRule& WithScheduleExpression(ScheduleExpressionT&& value) {
124 SetScheduleExpression(std::forward<ScheduleExpressionT>(value));
125 return *this;
126 }
128
130
142 inline long long GetStartWindowMinutes() const { return m_startWindowMinutes; }
143 inline bool StartWindowMinutesHasBeenSet() const { return m_startWindowMinutesHasBeenSet; }
144 inline void SetStartWindowMinutes(long long value) {
145 m_startWindowMinutesHasBeenSet = true;
146 m_startWindowMinutes = value;
147 }
148 inline BackupRule& WithStartWindowMinutes(long long value) {
150 return *this;
151 }
153
155
159 inline long long GetCompletionWindowMinutes() const { return m_completionWindowMinutes; }
160 inline bool CompletionWindowMinutesHasBeenSet() const { return m_completionWindowMinutesHasBeenSet; }
161 inline void SetCompletionWindowMinutes(long long value) {
162 m_completionWindowMinutesHasBeenSet = true;
163 m_completionWindowMinutes = value;
164 }
165 inline BackupRule& WithCompletionWindowMinutes(long long value) {
167 return *this;
168 }
170
172
185 inline const Lifecycle& GetLifecycle() const { return m_lifecycle; }
186 inline bool LifecycleHasBeenSet() const { return m_lifecycleHasBeenSet; }
187 template <typename LifecycleT = Lifecycle>
188 void SetLifecycle(LifecycleT&& value) {
189 m_lifecycleHasBeenSet = true;
190 m_lifecycle = std::forward<LifecycleT>(value);
191 }
192 template <typename LifecycleT = Lifecycle>
193 BackupRule& WithLifecycle(LifecycleT&& value) {
194 SetLifecycle(std::forward<LifecycleT>(value));
195 return *this;
196 }
198
200
204 inline const Aws::Map<Aws::String, Aws::String>& GetRecoveryPointTags() const { return m_recoveryPointTags; }
205 inline bool RecoveryPointTagsHasBeenSet() const { return m_recoveryPointTagsHasBeenSet; }
206 template <typename RecoveryPointTagsT = Aws::Map<Aws::String, Aws::String>>
207 void SetRecoveryPointTags(RecoveryPointTagsT&& value) {
208 m_recoveryPointTagsHasBeenSet = true;
209 m_recoveryPointTags = std::forward<RecoveryPointTagsT>(value);
210 }
211 template <typename RecoveryPointTagsT = Aws::Map<Aws::String, Aws::String>>
212 BackupRule& WithRecoveryPointTags(RecoveryPointTagsT&& value) {
213 SetRecoveryPointTags(std::forward<RecoveryPointTagsT>(value));
214 return *this;
215 }
216 template <typename RecoveryPointTagsKeyT = Aws::String, typename RecoveryPointTagsValueT = Aws::String>
217 BackupRule& AddRecoveryPointTags(RecoveryPointTagsKeyT&& key, RecoveryPointTagsValueT&& value) {
218 m_recoveryPointTagsHasBeenSet = true;
219 m_recoveryPointTags.emplace(std::forward<RecoveryPointTagsKeyT>(key), std::forward<RecoveryPointTagsValueT>(value));
220 return *this;
221 }
223
225
229 inline const Aws::String& GetRuleId() const { return m_ruleId; }
230 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
231 template <typename RuleIdT = Aws::String>
232 void SetRuleId(RuleIdT&& value) {
233 m_ruleIdHasBeenSet = true;
234 m_ruleId = std::forward<RuleIdT>(value);
235 }
236 template <typename RuleIdT = Aws::String>
237 BackupRule& WithRuleId(RuleIdT&& value) {
238 SetRuleId(std::forward<RuleIdT>(value));
239 return *this;
240 }
242
244
248 inline const Aws::Vector<CopyAction>& GetCopyActions() const { return m_copyActions; }
249 inline bool CopyActionsHasBeenSet() const { return m_copyActionsHasBeenSet; }
250 template <typename CopyActionsT = Aws::Vector<CopyAction>>
251 void SetCopyActions(CopyActionsT&& value) {
252 m_copyActionsHasBeenSet = true;
253 m_copyActions = std::forward<CopyActionsT>(value);
254 }
255 template <typename CopyActionsT = Aws::Vector<CopyAction>>
256 BackupRule& WithCopyActions(CopyActionsT&& value) {
257 SetCopyActions(std::forward<CopyActionsT>(value));
258 return *this;
259 }
260 template <typename CopyActionsT = CopyAction>
261 BackupRule& AddCopyActions(CopyActionsT&& value) {
262 m_copyActionsHasBeenSet = true;
263 m_copyActions.emplace_back(std::forward<CopyActionsT>(value));
264 return *this;
265 }
267
269
274 inline bool GetEnableContinuousBackup() const { return m_enableContinuousBackup; }
275 inline bool EnableContinuousBackupHasBeenSet() const { return m_enableContinuousBackupHasBeenSet; }
276 inline void SetEnableContinuousBackup(bool value) {
277 m_enableContinuousBackupHasBeenSet = true;
278 m_enableContinuousBackup = value;
279 }
282 return *this;
283 }
285
287
291 inline const Aws::String& GetScheduleExpressionTimezone() const { return m_scheduleExpressionTimezone; }
292 inline bool ScheduleExpressionTimezoneHasBeenSet() const { return m_scheduleExpressionTimezoneHasBeenSet; }
293 template <typename ScheduleExpressionTimezoneT = Aws::String>
294 void SetScheduleExpressionTimezone(ScheduleExpressionTimezoneT&& value) {
295 m_scheduleExpressionTimezoneHasBeenSet = true;
296 m_scheduleExpressionTimezone = std::forward<ScheduleExpressionTimezoneT>(value);
297 }
298 template <typename ScheduleExpressionTimezoneT = Aws::String>
299 BackupRule& WithScheduleExpressionTimezone(ScheduleExpressionTimezoneT&& value) {
300 SetScheduleExpressionTimezone(std::forward<ScheduleExpressionTimezoneT>(value));
301 return *this;
302 }
304
306
312 inline const Aws::Vector<IndexAction>& GetIndexActions() const { return m_indexActions; }
313 inline bool IndexActionsHasBeenSet() const { return m_indexActionsHasBeenSet; }
314 template <typename IndexActionsT = Aws::Vector<IndexAction>>
315 void SetIndexActions(IndexActionsT&& value) {
316 m_indexActionsHasBeenSet = true;
317 m_indexActions = std::forward<IndexActionsT>(value);
318 }
319 template <typename IndexActionsT = Aws::Vector<IndexAction>>
320 BackupRule& WithIndexActions(IndexActionsT&& value) {
321 SetIndexActions(std::forward<IndexActionsT>(value));
322 return *this;
323 }
324 template <typename IndexActionsT = IndexAction>
325 BackupRule& AddIndexActions(IndexActionsT&& value) {
326 m_indexActionsHasBeenSet = true;
327 m_indexActions.emplace_back(std::forward<IndexActionsT>(value));
328 return *this;
329 }
331
333
337 inline const Aws::Vector<ScanAction>& GetScanActions() const { return m_scanActions; }
338 inline bool ScanActionsHasBeenSet() const { return m_scanActionsHasBeenSet; }
339 template <typename ScanActionsT = Aws::Vector<ScanAction>>
340 void SetScanActions(ScanActionsT&& value) {
341 m_scanActionsHasBeenSet = true;
342 m_scanActions = std::forward<ScanActionsT>(value);
343 }
344 template <typename ScanActionsT = Aws::Vector<ScanAction>>
345 BackupRule& WithScanActions(ScanActionsT&& value) {
346 SetScanActions(std::forward<ScanActionsT>(value));
347 return *this;
348 }
349 template <typename ScanActionsT = ScanAction>
350 BackupRule& AddScanActions(ScanActionsT&& value) {
351 m_scanActionsHasBeenSet = true;
352 m_scanActions.emplace_back(std::forward<ScanActionsT>(value));
353 return *this;
354 }
356 private:
357 Aws::String m_ruleName;
358
359 Aws::String m_targetBackupVaultName;
360
361 Aws::String m_targetLogicallyAirGappedBackupVaultArn;
362
363 Aws::String m_scheduleExpression;
364
365 long long m_startWindowMinutes{0};
366
367 long long m_completionWindowMinutes{0};
368
369 Lifecycle m_lifecycle;
370
371 Aws::Map<Aws::String, Aws::String> m_recoveryPointTags;
372
373 Aws::String m_ruleId;
374
375 Aws::Vector<CopyAction> m_copyActions;
376
377 bool m_enableContinuousBackup{false};
378
379 Aws::String m_scheduleExpressionTimezone;
380
381 Aws::Vector<IndexAction> m_indexActions;
382
383 Aws::Vector<ScanAction> m_scanActions;
384 bool m_ruleNameHasBeenSet = false;
385 bool m_targetBackupVaultNameHasBeenSet = false;
386 bool m_targetLogicallyAirGappedBackupVaultArnHasBeenSet = false;
387 bool m_scheduleExpressionHasBeenSet = false;
388 bool m_startWindowMinutesHasBeenSet = false;
389 bool m_completionWindowMinutesHasBeenSet = false;
390 bool m_lifecycleHasBeenSet = false;
391 bool m_recoveryPointTagsHasBeenSet = false;
392 bool m_ruleIdHasBeenSet = false;
393 bool m_copyActionsHasBeenSet = false;
394 bool m_enableContinuousBackupHasBeenSet = false;
395 bool m_scheduleExpressionTimezoneHasBeenSet = false;
396 bool m_indexActionsHasBeenSet = false;
397 bool m_scanActionsHasBeenSet = false;
398};
399
400} // namespace Model
401} // namespace Backup
402} // namespace Aws
BackupRule & WithRuleId(RuleIdT &&value)
Definition BackupRule.h:237
void SetScanActions(ScanActionsT &&value)
Definition BackupRule.h:340
bool TargetLogicallyAirGappedBackupVaultArnHasBeenSet() const
Definition BackupRule.h:89
BackupRule & WithScheduleExpressionTimezone(ScheduleExpressionTimezoneT &&value)
Definition BackupRule.h:299
void SetScheduleExpression(ScheduleExpressionT &&value)
Definition BackupRule.h:118
BackupRule & WithEnableContinuousBackup(bool value)
Definition BackupRule.h:280
const Aws::String & GetScheduleExpression() const
Definition BackupRule.h:115
void SetStartWindowMinutes(long long value)
Definition BackupRule.h:144
void SetLifecycle(LifecycleT &&value)
Definition BackupRule.h:188
const Aws::String & GetTargetLogicallyAirGappedBackupVaultArn() const
Definition BackupRule.h:88
BackupRule & WithScheduleExpression(ScheduleExpressionT &&value)
Definition BackupRule.h:123
BackupRule & AddCopyActions(CopyActionsT &&value)
Definition BackupRule.h:261
bool CompletionWindowMinutesHasBeenSet() const
Definition BackupRule.h:160
BackupRule & WithRecoveryPointTags(RecoveryPointTagsT &&value)
Definition BackupRule.h:212
bool EnableContinuousBackupHasBeenSet() const
Definition BackupRule.h:275
BackupRule & WithTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT &&value)
Definition BackupRule.h:96
void SetScheduleExpressionTimezone(ScheduleExpressionTimezoneT &&value)
Definition BackupRule.h:294
BackupRule & WithCopyActions(CopyActionsT &&value)
Definition BackupRule.h:256
void SetRuleId(RuleIdT &&value)
Definition BackupRule.h:232
BackupRule & WithTargetBackupVaultName(TargetBackupVaultNameT &&value)
Definition BackupRule.h:74
void SetCompletionWindowMinutes(long long value)
Definition BackupRule.h:161
const Lifecycle & GetLifecycle() const
Definition BackupRule.h:185
void SetTargetBackupVaultName(TargetBackupVaultNameT &&value)
Definition BackupRule.h:69
BackupRule & AddRecoveryPointTags(RecoveryPointTagsKeyT &&key, RecoveryPointTagsValueT &&value)
Definition BackupRule.h:217
BackupRule & WithRuleName(RuleNameT &&value)
Definition BackupRule.h:54
void SetTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT &&value)
Definition BackupRule.h:91
bool StartWindowMinutesHasBeenSet() const
Definition BackupRule.h:143
BackupRule & AddIndexActions(IndexActionsT &&value)
Definition BackupRule.h:325
bool GetEnableContinuousBackup() const
Definition BackupRule.h:274
void SetRuleName(RuleNameT &&value)
Definition BackupRule.h:49
const Aws::Vector< ScanAction > & GetScanActions() const
Definition BackupRule.h:337
const Aws::Map< Aws::String, Aws::String > & GetRecoveryPointTags() const
Definition BackupRule.h:204
bool RecoveryPointTagsHasBeenSet() const
Definition BackupRule.h:205
BackupRule & WithScanActions(ScanActionsT &&value)
Definition BackupRule.h:345
BackupRule & WithLifecycle(LifecycleT &&value)
Definition BackupRule.h:193
bool ScheduleExpressionTimezoneHasBeenSet() const
Definition BackupRule.h:292
AWS_BACKUP_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_BACKUP_API BackupRule(Aws::Utils::Json::JsonView jsonValue)
BackupRule & WithIndexActions(IndexActionsT &&value)
Definition BackupRule.h:320
bool ScheduleExpressionHasBeenSet() const
Definition BackupRule.h:116
long long GetStartWindowMinutes() const
Definition BackupRule.h:142
bool TargetBackupVaultNameHasBeenSet() const
Definition BackupRule.h:67
AWS_BACKUP_API BackupRule()=default
const Aws::String & GetRuleName() const
Definition BackupRule.h:46
BackupRule & WithStartWindowMinutes(long long value)
Definition BackupRule.h:148
const Aws::Vector< CopyAction > & GetCopyActions() const
Definition BackupRule.h:248
const Aws::Vector< IndexAction > & GetIndexActions() const
Definition BackupRule.h:312
void SetIndexActions(IndexActionsT &&value)
Definition BackupRule.h:315
void SetRecoveryPointTags(RecoveryPointTagsT &&value)
Definition BackupRule.h:207
long long GetCompletionWindowMinutes() const
Definition BackupRule.h:159
BackupRule & WithCompletionWindowMinutes(long long value)
Definition BackupRule.h:165
void SetEnableContinuousBackup(bool value)
Definition BackupRule.h:276
const Aws::String & GetRuleId() const
Definition BackupRule.h:229
void SetCopyActions(CopyActionsT &&value)
Definition BackupRule.h:251
AWS_BACKUP_API BackupRule & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetScheduleExpressionTimezone() const
Definition BackupRule.h:291
const Aws::String & GetTargetBackupVaultName() const
Definition BackupRule.h:66
BackupRule & AddScanActions(ScanActionsT &&value)
Definition BackupRule.h:350
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