AWS SDK for C++

AWS SDK for C++ Version 1.11.945

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/LocalBackupConfiguration.h>
12#include <aws/backup/model/ScanAction.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace Backup {
27namespace Model {
28
36 public:
37 AWS_BACKUP_API BackupRule() = default;
38 AWS_BACKUP_API BackupRule(Aws::Utils::Json::JsonView jsonValue);
40 AWS_BACKUP_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
47 inline const Aws::String& GetRuleName() const { return m_ruleName; }
48 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
49 template <typename RuleNameT = Aws::String>
50 void SetRuleName(RuleNameT&& value) {
51 m_ruleNameHasBeenSet = true;
52 m_ruleName = std::forward<RuleNameT>(value);
53 }
54 template <typename RuleNameT = Aws::String>
55 BackupRule& WithRuleName(RuleNameT&& value) {
56 SetRuleName(std::forward<RuleNameT>(value));
57 return *this;
58 }
60
62
67 inline const Aws::String& GetTargetBackupVaultName() const { return m_targetBackupVaultName; }
68 inline bool TargetBackupVaultNameHasBeenSet() const { return m_targetBackupVaultNameHasBeenSet; }
69 template <typename TargetBackupVaultNameT = Aws::String>
70 void SetTargetBackupVaultName(TargetBackupVaultNameT&& value) {
71 m_targetBackupVaultNameHasBeenSet = true;
72 m_targetBackupVaultName = std::forward<TargetBackupVaultNameT>(value);
73 }
74 template <typename TargetBackupVaultNameT = Aws::String>
75 BackupRule& WithTargetBackupVaultName(TargetBackupVaultNameT&& value) {
76 SetTargetBackupVaultName(std::forward<TargetBackupVaultNameT>(value));
77 return *this;
78 }
80
82
89 inline const Aws::String& GetTargetLogicallyAirGappedBackupVaultArn() const { return m_targetLogicallyAirGappedBackupVaultArn; }
90 inline bool TargetLogicallyAirGappedBackupVaultArnHasBeenSet() const { return m_targetLogicallyAirGappedBackupVaultArnHasBeenSet; }
91 template <typename TargetLogicallyAirGappedBackupVaultArnT = Aws::String>
92 void SetTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT&& value) {
93 m_targetLogicallyAirGappedBackupVaultArnHasBeenSet = true;
94 m_targetLogicallyAirGappedBackupVaultArn = std::forward<TargetLogicallyAirGappedBackupVaultArnT>(value);
95 }
96 template <typename TargetLogicallyAirGappedBackupVaultArnT = Aws::String>
97 BackupRule& WithTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT&& value) {
98 SetTargetLogicallyAirGappedBackupVaultArn(std::forward<TargetLogicallyAirGappedBackupVaultArnT>(value));
99 return *this;
100 }
102
104
116 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
117 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
118 template <typename ScheduleExpressionT = Aws::String>
119 void SetScheduleExpression(ScheduleExpressionT&& value) {
120 m_scheduleExpressionHasBeenSet = true;
121 m_scheduleExpression = std::forward<ScheduleExpressionT>(value);
122 }
123 template <typename ScheduleExpressionT = Aws::String>
124 BackupRule& WithScheduleExpression(ScheduleExpressionT&& value) {
125 SetScheduleExpression(std::forward<ScheduleExpressionT>(value));
126 return *this;
127 }
129
131
143 inline long long GetStartWindowMinutes() const { return m_startWindowMinutes; }
144 inline bool StartWindowMinutesHasBeenSet() const { return m_startWindowMinutesHasBeenSet; }
145 inline void SetStartWindowMinutes(long long value) {
146 m_startWindowMinutesHasBeenSet = true;
147 m_startWindowMinutes = value;
148 }
149 inline BackupRule& WithStartWindowMinutes(long long value) {
151 return *this;
152 }
154
156
160 inline long long GetCompletionWindowMinutes() const { return m_completionWindowMinutes; }
161 inline bool CompletionWindowMinutesHasBeenSet() const { return m_completionWindowMinutesHasBeenSet; }
162 inline void SetCompletionWindowMinutes(long long value) {
163 m_completionWindowMinutesHasBeenSet = true;
164 m_completionWindowMinutes = value;
165 }
166 inline BackupRule& WithCompletionWindowMinutes(long long value) {
168 return *this;
169 }
171
173
186 inline const Lifecycle& GetLifecycle() const { return m_lifecycle; }
187 inline bool LifecycleHasBeenSet() const { return m_lifecycleHasBeenSet; }
188 template <typename LifecycleT = Lifecycle>
189 void SetLifecycle(LifecycleT&& value) {
190 m_lifecycleHasBeenSet = true;
191 m_lifecycle = std::forward<LifecycleT>(value);
192 }
193 template <typename LifecycleT = Lifecycle>
194 BackupRule& WithLifecycle(LifecycleT&& value) {
195 SetLifecycle(std::forward<LifecycleT>(value));
196 return *this;
197 }
199
201
205 inline const Aws::Map<Aws::String, Aws::String>& GetRecoveryPointTags() const { return m_recoveryPointTags; }
206 inline bool RecoveryPointTagsHasBeenSet() const { return m_recoveryPointTagsHasBeenSet; }
207 template <typename RecoveryPointTagsT = Aws::Map<Aws::String, Aws::String>>
208 void SetRecoveryPointTags(RecoveryPointTagsT&& value) {
209 m_recoveryPointTagsHasBeenSet = true;
210 m_recoveryPointTags = std::forward<RecoveryPointTagsT>(value);
211 }
212 template <typename RecoveryPointTagsT = Aws::Map<Aws::String, Aws::String>>
213 BackupRule& WithRecoveryPointTags(RecoveryPointTagsT&& value) {
214 SetRecoveryPointTags(std::forward<RecoveryPointTagsT>(value));
215 return *this;
216 }
217 template <typename RecoveryPointTagsKeyT = Aws::String, typename RecoveryPointTagsValueT = Aws::String>
218 BackupRule& AddRecoveryPointTags(RecoveryPointTagsKeyT&& key, RecoveryPointTagsValueT&& value) {
219 m_recoveryPointTagsHasBeenSet = true;
220 m_recoveryPointTags.emplace(std::forward<RecoveryPointTagsKeyT>(key), std::forward<RecoveryPointTagsValueT>(value));
221 return *this;
222 }
224
226
230 inline const Aws::String& GetRuleId() const { return m_ruleId; }
231 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
232 template <typename RuleIdT = Aws::String>
233 void SetRuleId(RuleIdT&& value) {
234 m_ruleIdHasBeenSet = true;
235 m_ruleId = std::forward<RuleIdT>(value);
236 }
237 template <typename RuleIdT = Aws::String>
238 BackupRule& WithRuleId(RuleIdT&& value) {
239 SetRuleId(std::forward<RuleIdT>(value));
240 return *this;
241 }
243
245
249 inline const Aws::Vector<CopyAction>& GetCopyActions() const { return m_copyActions; }
250 inline bool CopyActionsHasBeenSet() const { return m_copyActionsHasBeenSet; }
251 template <typename CopyActionsT = Aws::Vector<CopyAction>>
252 void SetCopyActions(CopyActionsT&& value) {
253 m_copyActionsHasBeenSet = true;
254 m_copyActions = std::forward<CopyActionsT>(value);
255 }
256 template <typename CopyActionsT = Aws::Vector<CopyAction>>
257 BackupRule& WithCopyActions(CopyActionsT&& value) {
258 SetCopyActions(std::forward<CopyActionsT>(value));
259 return *this;
260 }
261 template <typename CopyActionsT = CopyAction>
262 BackupRule& AddCopyActions(CopyActionsT&& value) {
263 m_copyActionsHasBeenSet = true;
264 m_copyActions.emplace_back(std::forward<CopyActionsT>(value));
265 return *this;
266 }
268
270
275 inline bool GetEnableContinuousBackup() const { return m_enableContinuousBackup; }
276 inline bool EnableContinuousBackupHasBeenSet() const { return m_enableContinuousBackupHasBeenSet; }
277 inline void SetEnableContinuousBackup(bool value) {
278 m_enableContinuousBackupHasBeenSet = true;
279 m_enableContinuousBackup = value;
280 }
283 return *this;
284 }
286
288
292 inline const Aws::String& GetScheduleExpressionTimezone() const { return m_scheduleExpressionTimezone; }
293 inline bool ScheduleExpressionTimezoneHasBeenSet() const { return m_scheduleExpressionTimezoneHasBeenSet; }
294 template <typename ScheduleExpressionTimezoneT = Aws::String>
295 void SetScheduleExpressionTimezone(ScheduleExpressionTimezoneT&& value) {
296 m_scheduleExpressionTimezoneHasBeenSet = true;
297 m_scheduleExpressionTimezone = std::forward<ScheduleExpressionTimezoneT>(value);
298 }
299 template <typename ScheduleExpressionTimezoneT = Aws::String>
300 BackupRule& WithScheduleExpressionTimezone(ScheduleExpressionTimezoneT&& value) {
301 SetScheduleExpressionTimezone(std::forward<ScheduleExpressionTimezoneT>(value));
302 return *this;
303 }
305
307
313 inline const Aws::Vector<IndexAction>& GetIndexActions() const { return m_indexActions; }
314 inline bool IndexActionsHasBeenSet() const { return m_indexActionsHasBeenSet; }
315 template <typename IndexActionsT = Aws::Vector<IndexAction>>
316 void SetIndexActions(IndexActionsT&& value) {
317 m_indexActionsHasBeenSet = true;
318 m_indexActions = std::forward<IndexActionsT>(value);
319 }
320 template <typename IndexActionsT = Aws::Vector<IndexAction>>
321 BackupRule& WithIndexActions(IndexActionsT&& value) {
322 SetIndexActions(std::forward<IndexActionsT>(value));
323 return *this;
324 }
325 template <typename IndexActionsT = IndexAction>
326 BackupRule& AddIndexActions(IndexActionsT&& value) {
327 m_indexActionsHasBeenSet = true;
328 m_indexActions.emplace_back(std::forward<IndexActionsT>(value));
329 return *this;
330 }
332
334
338 inline const Aws::Vector<ScanAction>& GetScanActions() const { return m_scanActions; }
339 inline bool ScanActionsHasBeenSet() const { return m_scanActionsHasBeenSet; }
340 template <typename ScanActionsT = Aws::Vector<ScanAction>>
341 void SetScanActions(ScanActionsT&& value) {
342 m_scanActionsHasBeenSet = true;
343 m_scanActions = std::forward<ScanActionsT>(value);
344 }
345 template <typename ScanActionsT = Aws::Vector<ScanAction>>
346 BackupRule& WithScanActions(ScanActionsT&& value) {
347 SetScanActions(std::forward<ScanActionsT>(value));
348 return *this;
349 }
350 template <typename ScanActionsT = ScanAction>
351 BackupRule& AddScanActions(ScanActionsT&& value) {
352 m_scanActionsHasBeenSet = true;
353 m_scanActions.emplace_back(std::forward<ScanActionsT>(value));
354 return *this;
355 }
357
359
365 inline const LocalBackupConfiguration& GetLocalBackupConfiguration() const { return m_localBackupConfiguration; }
366 inline bool LocalBackupConfigurationHasBeenSet() const { return m_localBackupConfigurationHasBeenSet; }
367 template <typename LocalBackupConfigurationT = LocalBackupConfiguration>
368 void SetLocalBackupConfiguration(LocalBackupConfigurationT&& value) {
369 m_localBackupConfigurationHasBeenSet = true;
370 m_localBackupConfiguration = std::forward<LocalBackupConfigurationT>(value);
371 }
372 template <typename LocalBackupConfigurationT = LocalBackupConfiguration>
373 BackupRule& WithLocalBackupConfiguration(LocalBackupConfigurationT&& value) {
374 SetLocalBackupConfiguration(std::forward<LocalBackupConfigurationT>(value));
375 return *this;
376 }
378 private:
379 Aws::String m_ruleName;
380
381 Aws::String m_targetBackupVaultName;
382
383 Aws::String m_targetLogicallyAirGappedBackupVaultArn;
384
385 Aws::String m_scheduleExpression;
386
387 long long m_startWindowMinutes{0};
388
389 long long m_completionWindowMinutes{0};
390
391 Lifecycle m_lifecycle;
392
393 Aws::Map<Aws::String, Aws::String> m_recoveryPointTags;
394
395 Aws::String m_ruleId;
396
397 Aws::Vector<CopyAction> m_copyActions;
398
399 bool m_enableContinuousBackup{false};
400
401 Aws::String m_scheduleExpressionTimezone;
402
403 Aws::Vector<IndexAction> m_indexActions;
404
405 Aws::Vector<ScanAction> m_scanActions;
406
407 LocalBackupConfiguration m_localBackupConfiguration;
408 bool m_ruleNameHasBeenSet = false;
409 bool m_targetBackupVaultNameHasBeenSet = false;
410 bool m_targetLogicallyAirGappedBackupVaultArnHasBeenSet = false;
411 bool m_scheduleExpressionHasBeenSet = false;
412 bool m_startWindowMinutesHasBeenSet = false;
413 bool m_completionWindowMinutesHasBeenSet = false;
414 bool m_lifecycleHasBeenSet = false;
415 bool m_recoveryPointTagsHasBeenSet = false;
416 bool m_ruleIdHasBeenSet = false;
417 bool m_copyActionsHasBeenSet = false;
418 bool m_enableContinuousBackupHasBeenSet = false;
419 bool m_scheduleExpressionTimezoneHasBeenSet = false;
420 bool m_indexActionsHasBeenSet = false;
421 bool m_scanActionsHasBeenSet = false;
422 bool m_localBackupConfigurationHasBeenSet = false;
423};
424
425} // namespace Model
426} // namespace Backup
427} // namespace Aws
BackupRule & WithRuleId(RuleIdT &&value)
Definition BackupRule.h:238
void SetScanActions(ScanActionsT &&value)
Definition BackupRule.h:341
bool TargetLogicallyAirGappedBackupVaultArnHasBeenSet() const
Definition BackupRule.h:90
BackupRule & WithScheduleExpressionTimezone(ScheduleExpressionTimezoneT &&value)
Definition BackupRule.h:300
void SetLocalBackupConfiguration(LocalBackupConfigurationT &&value)
Definition BackupRule.h:368
void SetScheduleExpression(ScheduleExpressionT &&value)
Definition BackupRule.h:119
BackupRule & WithEnableContinuousBackup(bool value)
Definition BackupRule.h:281
const Aws::String & GetScheduleExpression() const
Definition BackupRule.h:116
void SetStartWindowMinutes(long long value)
Definition BackupRule.h:145
void SetLifecycle(LifecycleT &&value)
Definition BackupRule.h:189
const Aws::String & GetTargetLogicallyAirGappedBackupVaultArn() const
Definition BackupRule.h:89
BackupRule & WithScheduleExpression(ScheduleExpressionT &&value)
Definition BackupRule.h:124
BackupRule & AddCopyActions(CopyActionsT &&value)
Definition BackupRule.h:262
const LocalBackupConfiguration & GetLocalBackupConfiguration() const
Definition BackupRule.h:365
bool CompletionWindowMinutesHasBeenSet() const
Definition BackupRule.h:161
BackupRule & WithRecoveryPointTags(RecoveryPointTagsT &&value)
Definition BackupRule.h:213
bool EnableContinuousBackupHasBeenSet() const
Definition BackupRule.h:276
BackupRule & WithTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT &&value)
Definition BackupRule.h:97
void SetScheduleExpressionTimezone(ScheduleExpressionTimezoneT &&value)
Definition BackupRule.h:295
BackupRule & WithCopyActions(CopyActionsT &&value)
Definition BackupRule.h:257
void SetRuleId(RuleIdT &&value)
Definition BackupRule.h:233
BackupRule & WithTargetBackupVaultName(TargetBackupVaultNameT &&value)
Definition BackupRule.h:75
void SetCompletionWindowMinutes(long long value)
Definition BackupRule.h:162
const Lifecycle & GetLifecycle() const
Definition BackupRule.h:186
void SetTargetBackupVaultName(TargetBackupVaultNameT &&value)
Definition BackupRule.h:70
BackupRule & AddRecoveryPointTags(RecoveryPointTagsKeyT &&key, RecoveryPointTagsValueT &&value)
Definition BackupRule.h:218
BackupRule & WithRuleName(RuleNameT &&value)
Definition BackupRule.h:55
void SetTargetLogicallyAirGappedBackupVaultArn(TargetLogicallyAirGappedBackupVaultArnT &&value)
Definition BackupRule.h:92
bool StartWindowMinutesHasBeenSet() const
Definition BackupRule.h:144
BackupRule & AddIndexActions(IndexActionsT &&value)
Definition BackupRule.h:326
bool GetEnableContinuousBackup() const
Definition BackupRule.h:275
void SetRuleName(RuleNameT &&value)
Definition BackupRule.h:50
const Aws::Vector< ScanAction > & GetScanActions() const
Definition BackupRule.h:338
const Aws::Map< Aws::String, Aws::String > & GetRecoveryPointTags() const
Definition BackupRule.h:205
bool RecoveryPointTagsHasBeenSet() const
Definition BackupRule.h:206
BackupRule & WithScanActions(ScanActionsT &&value)
Definition BackupRule.h:346
BackupRule & WithLifecycle(LifecycleT &&value)
Definition BackupRule.h:194
bool ScheduleExpressionTimezoneHasBeenSet() const
Definition BackupRule.h:293
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:321
bool ScheduleExpressionHasBeenSet() const
Definition BackupRule.h:117
long long GetStartWindowMinutes() const
Definition BackupRule.h:143
bool TargetBackupVaultNameHasBeenSet() const
Definition BackupRule.h:68
BackupRule & WithLocalBackupConfiguration(LocalBackupConfigurationT &&value)
Definition BackupRule.h:373
AWS_BACKUP_API BackupRule()=default
const Aws::String & GetRuleName() const
Definition BackupRule.h:47
BackupRule & WithStartWindowMinutes(long long value)
Definition BackupRule.h:149
const Aws::Vector< CopyAction > & GetCopyActions() const
Definition BackupRule.h:249
const Aws::Vector< IndexAction > & GetIndexActions() const
Definition BackupRule.h:313
void SetIndexActions(IndexActionsT &&value)
Definition BackupRule.h:316
void SetRecoveryPointTags(RecoveryPointTagsT &&value)
Definition BackupRule.h:208
long long GetCompletionWindowMinutes() const
Definition BackupRule.h:160
BackupRule & WithCompletionWindowMinutes(long long value)
Definition BackupRule.h:166
void SetEnableContinuousBackup(bool value)
Definition BackupRule.h:277
const Aws::String & GetRuleId() const
Definition BackupRule.h:230
void SetCopyActions(CopyActionsT &&value)
Definition BackupRule.h:252
AWS_BACKUP_API BackupRule & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetScheduleExpressionTimezone() const
Definition BackupRule.h:292
bool LocalBackupConfigurationHasBeenSet() const
Definition BackupRule.h:366
const Aws::String & GetTargetBackupVaultName() const
Definition BackupRule.h:67
BackupRule & AddScanActions(ScanActionsT &&value)
Definition BackupRule.h:351
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