AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
BackupRule.h
1
6#pragma once
7#include <aws/backup/Backup_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/backup/model/Lifecycle.h>
10#include <aws/core/utils/memory/stl/AWSMap.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/backup/model/CopyAction.h>
13#include <aws/backup/model/IndexAction.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace Backup
27{
28namespace Model
29{
30
38 {
39 public:
40 AWS_BACKUP_API BackupRule() = default;
41 AWS_BACKUP_API BackupRule(Aws::Utils::Json::JsonView jsonValue);
43 AWS_BACKUP_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
51 inline const Aws::String& GetRuleName() const { return m_ruleName; }
52 inline bool RuleNameHasBeenSet() const { return m_ruleNameHasBeenSet; }
53 template<typename RuleNameT = Aws::String>
54 void SetRuleName(RuleNameT&& value) { m_ruleNameHasBeenSet = true; m_ruleName = std::forward<RuleNameT>(value); }
55 template<typename RuleNameT = Aws::String>
56 BackupRule& WithRuleName(RuleNameT&& value) { SetRuleName(std::forward<RuleNameT>(value)); return *this;}
58
60
65 inline const Aws::String& GetTargetBackupVaultName() const { return m_targetBackupVaultName; }
66 inline bool TargetBackupVaultNameHasBeenSet() const { return m_targetBackupVaultNameHasBeenSet; }
67 template<typename TargetBackupVaultNameT = Aws::String>
68 void SetTargetBackupVaultName(TargetBackupVaultNameT&& value) { m_targetBackupVaultNameHasBeenSet = true; m_targetBackupVaultName = std::forward<TargetBackupVaultNameT>(value); }
69 template<typename TargetBackupVaultNameT = Aws::String>
70 BackupRule& WithTargetBackupVaultName(TargetBackupVaultNameT&& value) { SetTargetBackupVaultName(std::forward<TargetBackupVaultNameT>(value)); return *this;}
72
74
86 inline const Aws::String& GetScheduleExpression() const { return m_scheduleExpression; }
87 inline bool ScheduleExpressionHasBeenSet() const { return m_scheduleExpressionHasBeenSet; }
88 template<typename ScheduleExpressionT = Aws::String>
89 void SetScheduleExpression(ScheduleExpressionT&& value) { m_scheduleExpressionHasBeenSet = true; m_scheduleExpression = std::forward<ScheduleExpressionT>(value); }
90 template<typename ScheduleExpressionT = Aws::String>
91 BackupRule& WithScheduleExpression(ScheduleExpressionT&& value) { SetScheduleExpression(std::forward<ScheduleExpressionT>(value)); return *this;}
93
95
107 inline long long GetStartWindowMinutes() const { return m_startWindowMinutes; }
108 inline bool StartWindowMinutesHasBeenSet() const { return m_startWindowMinutesHasBeenSet; }
109 inline void SetStartWindowMinutes(long long value) { m_startWindowMinutesHasBeenSet = true; m_startWindowMinutes = value; }
110 inline BackupRule& WithStartWindowMinutes(long long value) { SetStartWindowMinutes(value); return *this;}
112
114
118 inline long long GetCompletionWindowMinutes() const { return m_completionWindowMinutes; }
119 inline bool CompletionWindowMinutesHasBeenSet() const { return m_completionWindowMinutesHasBeenSet; }
120 inline void SetCompletionWindowMinutes(long long value) { m_completionWindowMinutesHasBeenSet = true; m_completionWindowMinutes = value; }
121 inline BackupRule& WithCompletionWindowMinutes(long long value) { SetCompletionWindowMinutes(value); return *this;}
123
125
138 inline const Lifecycle& GetLifecycle() const { return m_lifecycle; }
139 inline bool LifecycleHasBeenSet() const { return m_lifecycleHasBeenSet; }
140 template<typename LifecycleT = Lifecycle>
141 void SetLifecycle(LifecycleT&& value) { m_lifecycleHasBeenSet = true; m_lifecycle = std::forward<LifecycleT>(value); }
142 template<typename LifecycleT = Lifecycle>
143 BackupRule& WithLifecycle(LifecycleT&& value) { SetLifecycle(std::forward<LifecycleT>(value)); return *this;}
145
147
151 inline const Aws::Map<Aws::String, Aws::String>& GetRecoveryPointTags() const { return m_recoveryPointTags; }
152 inline bool RecoveryPointTagsHasBeenSet() const { return m_recoveryPointTagsHasBeenSet; }
153 template<typename RecoveryPointTagsT = Aws::Map<Aws::String, Aws::String>>
154 void SetRecoveryPointTags(RecoveryPointTagsT&& value) { m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags = std::forward<RecoveryPointTagsT>(value); }
155 template<typename RecoveryPointTagsT = Aws::Map<Aws::String, Aws::String>>
156 BackupRule& WithRecoveryPointTags(RecoveryPointTagsT&& value) { SetRecoveryPointTags(std::forward<RecoveryPointTagsT>(value)); return *this;}
157 template<typename RecoveryPointTagsKeyT = Aws::String, typename RecoveryPointTagsValueT = Aws::String>
158 BackupRule& AddRecoveryPointTags(RecoveryPointTagsKeyT&& key, RecoveryPointTagsValueT&& value) {
159 m_recoveryPointTagsHasBeenSet = true; m_recoveryPointTags.emplace(std::forward<RecoveryPointTagsKeyT>(key), std::forward<RecoveryPointTagsValueT>(value)); return *this;
160 }
162
164
168 inline const Aws::String& GetRuleId() const { return m_ruleId; }
169 inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; }
170 template<typename RuleIdT = Aws::String>
171 void SetRuleId(RuleIdT&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::forward<RuleIdT>(value); }
172 template<typename RuleIdT = Aws::String>
173 BackupRule& WithRuleId(RuleIdT&& value) { SetRuleId(std::forward<RuleIdT>(value)); return *this;}
175
177
181 inline const Aws::Vector<CopyAction>& GetCopyActions() const { return m_copyActions; }
182 inline bool CopyActionsHasBeenSet() const { return m_copyActionsHasBeenSet; }
183 template<typename CopyActionsT = Aws::Vector<CopyAction>>
184 void SetCopyActions(CopyActionsT&& value) { m_copyActionsHasBeenSet = true; m_copyActions = std::forward<CopyActionsT>(value); }
185 template<typename CopyActionsT = Aws::Vector<CopyAction>>
186 BackupRule& WithCopyActions(CopyActionsT&& value) { SetCopyActions(std::forward<CopyActionsT>(value)); return *this;}
187 template<typename CopyActionsT = CopyAction>
188 BackupRule& AddCopyActions(CopyActionsT&& value) { m_copyActionsHasBeenSet = true; m_copyActions.emplace_back(std::forward<CopyActionsT>(value)); return *this; }
190
192
197 inline bool GetEnableContinuousBackup() const { return m_enableContinuousBackup; }
198 inline bool EnableContinuousBackupHasBeenSet() const { return m_enableContinuousBackupHasBeenSet; }
199 inline void SetEnableContinuousBackup(bool value) { m_enableContinuousBackupHasBeenSet = true; m_enableContinuousBackup = value; }
200 inline BackupRule& WithEnableContinuousBackup(bool value) { SetEnableContinuousBackup(value); return *this;}
202
204
208 inline const Aws::String& GetScheduleExpressionTimezone() const { return m_scheduleExpressionTimezone; }
209 inline bool ScheduleExpressionTimezoneHasBeenSet() const { return m_scheduleExpressionTimezoneHasBeenSet; }
210 template<typename ScheduleExpressionTimezoneT = Aws::String>
211 void SetScheduleExpressionTimezone(ScheduleExpressionTimezoneT&& value) { m_scheduleExpressionTimezoneHasBeenSet = true; m_scheduleExpressionTimezone = std::forward<ScheduleExpressionTimezoneT>(value); }
212 template<typename ScheduleExpressionTimezoneT = Aws::String>
213 BackupRule& WithScheduleExpressionTimezone(ScheduleExpressionTimezoneT&& value) { SetScheduleExpressionTimezone(std::forward<ScheduleExpressionTimezoneT>(value)); return *this;}
215
217
223 inline const Aws::Vector<IndexAction>& GetIndexActions() const { return m_indexActions; }
224 inline bool IndexActionsHasBeenSet() const { return m_indexActionsHasBeenSet; }
225 template<typename IndexActionsT = Aws::Vector<IndexAction>>
226 void SetIndexActions(IndexActionsT&& value) { m_indexActionsHasBeenSet = true; m_indexActions = std::forward<IndexActionsT>(value); }
227 template<typename IndexActionsT = Aws::Vector<IndexAction>>
228 BackupRule& WithIndexActions(IndexActionsT&& value) { SetIndexActions(std::forward<IndexActionsT>(value)); return *this;}
229 template<typename IndexActionsT = IndexAction>
230 BackupRule& AddIndexActions(IndexActionsT&& value) { m_indexActionsHasBeenSet = true; m_indexActions.emplace_back(std::forward<IndexActionsT>(value)); return *this; }
232 private:
233
234 Aws::String m_ruleName;
235 bool m_ruleNameHasBeenSet = false;
236
237 Aws::String m_targetBackupVaultName;
238 bool m_targetBackupVaultNameHasBeenSet = false;
239
240 Aws::String m_scheduleExpression;
241 bool m_scheduleExpressionHasBeenSet = false;
242
243 long long m_startWindowMinutes{0};
244 bool m_startWindowMinutesHasBeenSet = false;
245
246 long long m_completionWindowMinutes{0};
247 bool m_completionWindowMinutesHasBeenSet = false;
248
249 Lifecycle m_lifecycle;
250 bool m_lifecycleHasBeenSet = false;
251
252 Aws::Map<Aws::String, Aws::String> m_recoveryPointTags;
253 bool m_recoveryPointTagsHasBeenSet = false;
254
255 Aws::String m_ruleId;
256 bool m_ruleIdHasBeenSet = false;
257
258 Aws::Vector<CopyAction> m_copyActions;
259 bool m_copyActionsHasBeenSet = false;
260
261 bool m_enableContinuousBackup{false};
262 bool m_enableContinuousBackupHasBeenSet = false;
263
264 Aws::String m_scheduleExpressionTimezone;
265 bool m_scheduleExpressionTimezoneHasBeenSet = false;
266
267 Aws::Vector<IndexAction> m_indexActions;
268 bool m_indexActionsHasBeenSet = false;
269 };
270
271} // namespace Model
272} // namespace Backup
273} // namespace Aws
BackupRule & WithRuleId(RuleIdT &&value)
Definition BackupRule.h:173
BackupRule & WithScheduleExpressionTimezone(ScheduleExpressionTimezoneT &&value)
Definition BackupRule.h:213
void SetScheduleExpression(ScheduleExpressionT &&value)
Definition BackupRule.h:89
BackupRule & WithEnableContinuousBackup(bool value)
Definition BackupRule.h:200
const Aws::String & GetScheduleExpression() const
Definition BackupRule.h:86
void SetStartWindowMinutes(long long value)
Definition BackupRule.h:109
void SetLifecycle(LifecycleT &&value)
Definition BackupRule.h:141
BackupRule & WithScheduleExpression(ScheduleExpressionT &&value)
Definition BackupRule.h:91
BackupRule & AddCopyActions(CopyActionsT &&value)
Definition BackupRule.h:188
bool CompletionWindowMinutesHasBeenSet() const
Definition BackupRule.h:119
BackupRule & WithRecoveryPointTags(RecoveryPointTagsT &&value)
Definition BackupRule.h:156
bool EnableContinuousBackupHasBeenSet() const
Definition BackupRule.h:198
void SetScheduleExpressionTimezone(ScheduleExpressionTimezoneT &&value)
Definition BackupRule.h:211
BackupRule & WithCopyActions(CopyActionsT &&value)
Definition BackupRule.h:186
void SetRuleId(RuleIdT &&value)
Definition BackupRule.h:171
BackupRule & WithTargetBackupVaultName(TargetBackupVaultNameT &&value)
Definition BackupRule.h:70
void SetCompletionWindowMinutes(long long value)
Definition BackupRule.h:120
const Lifecycle & GetLifecycle() const
Definition BackupRule.h:138
void SetTargetBackupVaultName(TargetBackupVaultNameT &&value)
Definition BackupRule.h:68
BackupRule & AddRecoveryPointTags(RecoveryPointTagsKeyT &&key, RecoveryPointTagsValueT &&value)
Definition BackupRule.h:158
BackupRule & WithRuleName(RuleNameT &&value)
Definition BackupRule.h:56
bool StartWindowMinutesHasBeenSet() const
Definition BackupRule.h:108
BackupRule & AddIndexActions(IndexActionsT &&value)
Definition BackupRule.h:230
bool GetEnableContinuousBackup() const
Definition BackupRule.h:197
void SetRuleName(RuleNameT &&value)
Definition BackupRule.h:54
const Aws::Map< Aws::String, Aws::String > & GetRecoveryPointTags() const
Definition BackupRule.h:151
bool RecoveryPointTagsHasBeenSet() const
Definition BackupRule.h:152
BackupRule & WithLifecycle(LifecycleT &&value)
Definition BackupRule.h:143
bool ScheduleExpressionTimezoneHasBeenSet() const
Definition BackupRule.h:209
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:228
bool ScheduleExpressionHasBeenSet() const
Definition BackupRule.h:87
long long GetStartWindowMinutes() const
Definition BackupRule.h:107
bool TargetBackupVaultNameHasBeenSet() const
Definition BackupRule.h:66
AWS_BACKUP_API BackupRule()=default
const Aws::String & GetRuleName() const
Definition BackupRule.h:51
BackupRule & WithStartWindowMinutes(long long value)
Definition BackupRule.h:110
const Aws::Vector< CopyAction > & GetCopyActions() const
Definition BackupRule.h:181
const Aws::Vector< IndexAction > & GetIndexActions() const
Definition BackupRule.h:223
void SetIndexActions(IndexActionsT &&value)
Definition BackupRule.h:226
void SetRecoveryPointTags(RecoveryPointTagsT &&value)
Definition BackupRule.h:154
long long GetCompletionWindowMinutes() const
Definition BackupRule.h:118
BackupRule & WithCompletionWindowMinutes(long long value)
Definition BackupRule.h:121
void SetEnableContinuousBackup(bool value)
Definition BackupRule.h:199
const Aws::String & GetRuleId() const
Definition BackupRule.h:168
void SetCopyActions(CopyActionsT &&value)
Definition BackupRule.h:184
AWS_BACKUP_API BackupRule & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetScheduleExpressionTimezone() const
Definition BackupRule.h:208
const Aws::String & GetTargetBackupVaultName() const
Definition BackupRule.h:65
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