1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
|
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/s3/S3_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/s3/model/ReplicationRuleFilter.h>
#include <aws/s3/model/ReplicationRuleStatus.h>
#include <aws/s3/model/SourceSelectionCriteria.h>
#include <aws/s3/model/ExistingObjectReplication.h>
#include <aws/s3/model/Destination.h>
#include <aws/s3/model/DeleteMarkerReplication.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Xml
{
class XmlNode;
} // namespace Xml
} // namespace Utils
namespace S3
{
namespace Model
{
/**
* <p>Specifies which Amazon S3 objects to replicate and where to store the
* replicas.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRule">AWS
* API Reference</a></p>
*/
class ReplicationRule
{
public:
AWS_S3_API ReplicationRule();
AWS_S3_API ReplicationRule(const Aws::Utils::Xml::XmlNode& xmlNode);
AWS_S3_API ReplicationRule& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
AWS_S3_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline const Aws::String& GetID() const{ return m_iD; }
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline bool IDHasBeenSet() const { return m_iDHasBeenSet; }
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline void SetID(const Aws::String& value) { m_iDHasBeenSet = true; m_iD = value; }
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline void SetID(Aws::String&& value) { m_iDHasBeenSet = true; m_iD = std::move(value); }
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline void SetID(const char* value) { m_iDHasBeenSet = true; m_iD.assign(value); }
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline ReplicationRule& WithID(const Aws::String& value) { SetID(value); return *this;}
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline ReplicationRule& WithID(Aws::String&& value) { SetID(std::move(value)); return *this;}
/**
* <p>A unique identifier for the rule. The maximum value is 255 characters.</p>
*/
inline ReplicationRule& WithID(const char* value) { SetID(value); return *this;}
/**
* <p>The priority indicates which rule has precedence whenever two or more
* replication rules conflict. Amazon S3 will attempt to replicate objects
* according to all replication rules. However, if there are two or more rules with
* the same destination bucket, then objects will be replicated according to the
* rule with the highest priority. The higher the number, the higher the priority.
* </p> <p>For more information, see <a
* href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a>
* in the <i>Amazon S3 User Guide</i>.</p>
*/
inline int GetPriority() const{ return m_priority; }
/**
* <p>The priority indicates which rule has precedence whenever two or more
* replication rules conflict. Amazon S3 will attempt to replicate objects
* according to all replication rules. However, if there are two or more rules with
* the same destination bucket, then objects will be replicated according to the
* rule with the highest priority. The higher the number, the higher the priority.
* </p> <p>For more information, see <a
* href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a>
* in the <i>Amazon S3 User Guide</i>.</p>
*/
inline bool PriorityHasBeenSet() const { return m_priorityHasBeenSet; }
/**
* <p>The priority indicates which rule has precedence whenever two or more
* replication rules conflict. Amazon S3 will attempt to replicate objects
* according to all replication rules. However, if there are two or more rules with
* the same destination bucket, then objects will be replicated according to the
* rule with the highest priority. The higher the number, the higher the priority.
* </p> <p>For more information, see <a
* href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a>
* in the <i>Amazon S3 User Guide</i>.</p>
*/
inline void SetPriority(int value) { m_priorityHasBeenSet = true; m_priority = value; }
/**
* <p>The priority indicates which rule has precedence whenever two or more
* replication rules conflict. Amazon S3 will attempt to replicate objects
* according to all replication rules. However, if there are two or more rules with
* the same destination bucket, then objects will be replicated according to the
* rule with the highest priority. The higher the number, the higher the priority.
* </p> <p>For more information, see <a
* href="https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html">Replication</a>
* in the <i>Amazon S3 User Guide</i>.</p>
*/
inline ReplicationRule& WithPriority(int value) { SetPriority(value); return *this;}
inline const ReplicationRuleFilter& GetFilter() const{ return m_filter; }
inline bool FilterHasBeenSet() const { return m_filterHasBeenSet; }
inline void SetFilter(const ReplicationRuleFilter& value) { m_filterHasBeenSet = true; m_filter = value; }
inline void SetFilter(ReplicationRuleFilter&& value) { m_filterHasBeenSet = true; m_filter = std::move(value); }
inline ReplicationRule& WithFilter(const ReplicationRuleFilter& value) { SetFilter(value); return *this;}
inline ReplicationRule& WithFilter(ReplicationRuleFilter&& value) { SetFilter(std::move(value)); return *this;}
/**
* <p>Specifies whether the rule is enabled.</p>
*/
inline const ReplicationRuleStatus& GetStatus() const{ return m_status; }
/**
* <p>Specifies whether the rule is enabled.</p>
*/
inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
/**
* <p>Specifies whether the rule is enabled.</p>
*/
inline void SetStatus(const ReplicationRuleStatus& value) { m_statusHasBeenSet = true; m_status = value; }
/**
* <p>Specifies whether the rule is enabled.</p>
*/
inline void SetStatus(ReplicationRuleStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); }
/**
* <p>Specifies whether the rule is enabled.</p>
*/
inline ReplicationRule& WithStatus(const ReplicationRuleStatus& value) { SetStatus(value); return *this;}
/**
* <p>Specifies whether the rule is enabled.</p>
*/
inline ReplicationRule& WithStatus(ReplicationRuleStatus&& value) { SetStatus(std::move(value)); return *this;}
/**
* <p>A container that describes additional filters for identifying the source
* objects that you want to replicate. You can choose to enable or disable the
* replication of these objects. Currently, Amazon S3 supports only the filter that
* you can specify for objects created with server-side encryption using a customer
* managed key stored in Amazon Web Services Key Management Service (SSE-KMS).</p>
*/
inline const SourceSelectionCriteria& GetSourceSelectionCriteria() const{ return m_sourceSelectionCriteria; }
/**
* <p>A container that describes additional filters for identifying the source
* objects that you want to replicate. You can choose to enable or disable the
* replication of these objects. Currently, Amazon S3 supports only the filter that
* you can specify for objects created with server-side encryption using a customer
* managed key stored in Amazon Web Services Key Management Service (SSE-KMS).</p>
*/
inline bool SourceSelectionCriteriaHasBeenSet() const { return m_sourceSelectionCriteriaHasBeenSet; }
/**
* <p>A container that describes additional filters for identifying the source
* objects that you want to replicate. You can choose to enable or disable the
* replication of these objects. Currently, Amazon S3 supports only the filter that
* you can specify for objects created with server-side encryption using a customer
* managed key stored in Amazon Web Services Key Management Service (SSE-KMS).</p>
*/
inline void SetSourceSelectionCriteria(const SourceSelectionCriteria& value) { m_sourceSelectionCriteriaHasBeenSet = true; m_sourceSelectionCriteria = value; }
/**
* <p>A container that describes additional filters for identifying the source
* objects that you want to replicate. You can choose to enable or disable the
* replication of these objects. Currently, Amazon S3 supports only the filter that
* you can specify for objects created with server-side encryption using a customer
* managed key stored in Amazon Web Services Key Management Service (SSE-KMS).</p>
*/
inline void SetSourceSelectionCriteria(SourceSelectionCriteria&& value) { m_sourceSelectionCriteriaHasBeenSet = true; m_sourceSelectionCriteria = std::move(value); }
/**
* <p>A container that describes additional filters for identifying the source
* objects that you want to replicate. You can choose to enable or disable the
* replication of these objects. Currently, Amazon S3 supports only the filter that
* you can specify for objects created with server-side encryption using a customer
* managed key stored in Amazon Web Services Key Management Service (SSE-KMS).</p>
*/
inline ReplicationRule& WithSourceSelectionCriteria(const SourceSelectionCriteria& value) { SetSourceSelectionCriteria(value); return *this;}
/**
* <p>A container that describes additional filters for identifying the source
* objects that you want to replicate. You can choose to enable or disable the
* replication of these objects. Currently, Amazon S3 supports only the filter that
* you can specify for objects created with server-side encryption using a customer
* managed key stored in Amazon Web Services Key Management Service (SSE-KMS).</p>
*/
inline ReplicationRule& WithSourceSelectionCriteria(SourceSelectionCriteria&& value) { SetSourceSelectionCriteria(std::move(value)); return *this;}
/**
* <p/>
*/
inline const ExistingObjectReplication& GetExistingObjectReplication() const{ return m_existingObjectReplication; }
/**
* <p/>
*/
inline bool ExistingObjectReplicationHasBeenSet() const { return m_existingObjectReplicationHasBeenSet; }
/**
* <p/>
*/
inline void SetExistingObjectReplication(const ExistingObjectReplication& value) { m_existingObjectReplicationHasBeenSet = true; m_existingObjectReplication = value; }
/**
* <p/>
*/
inline void SetExistingObjectReplication(ExistingObjectReplication&& value) { m_existingObjectReplicationHasBeenSet = true; m_existingObjectReplication = std::move(value); }
/**
* <p/>
*/
inline ReplicationRule& WithExistingObjectReplication(const ExistingObjectReplication& value) { SetExistingObjectReplication(value); return *this;}
/**
* <p/>
*/
inline ReplicationRule& WithExistingObjectReplication(ExistingObjectReplication&& value) { SetExistingObjectReplication(std::move(value)); return *this;}
/**
* <p>A container for information about the replication destination and its
* configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
*/
inline const Destination& GetDestination() const{ return m_destination; }
/**
* <p>A container for information about the replication destination and its
* configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
*/
inline bool DestinationHasBeenSet() const { return m_destinationHasBeenSet; }
/**
* <p>A container for information about the replication destination and its
* configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
*/
inline void SetDestination(const Destination& value) { m_destinationHasBeenSet = true; m_destination = value; }
/**
* <p>A container for information about the replication destination and its
* configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
*/
inline void SetDestination(Destination&& value) { m_destinationHasBeenSet = true; m_destination = std::move(value); }
/**
* <p>A container for information about the replication destination and its
* configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
*/
inline ReplicationRule& WithDestination(const Destination& value) { SetDestination(value); return *this;}
/**
* <p>A container for information about the replication destination and its
* configurations including enabling the S3 Replication Time Control (S3 RTC).</p>
*/
inline ReplicationRule& WithDestination(Destination&& value) { SetDestination(std::move(value)); return *this;}
inline const DeleteMarkerReplication& GetDeleteMarkerReplication() const{ return m_deleteMarkerReplication; }
inline bool DeleteMarkerReplicationHasBeenSet() const { return m_deleteMarkerReplicationHasBeenSet; }
inline void SetDeleteMarkerReplication(const DeleteMarkerReplication& value) { m_deleteMarkerReplicationHasBeenSet = true; m_deleteMarkerReplication = value; }
inline void SetDeleteMarkerReplication(DeleteMarkerReplication&& value) { m_deleteMarkerReplicationHasBeenSet = true; m_deleteMarkerReplication = std::move(value); }
inline ReplicationRule& WithDeleteMarkerReplication(const DeleteMarkerReplication& value) { SetDeleteMarkerReplication(value); return *this;}
inline ReplicationRule& WithDeleteMarkerReplication(DeleteMarkerReplication&& value) { SetDeleteMarkerReplication(std::move(value)); return *this;}
private:
Aws::String m_iD;
bool m_iDHasBeenSet = false;
int m_priority;
bool m_priorityHasBeenSet = false;
ReplicationRuleFilter m_filter;
bool m_filterHasBeenSet = false;
ReplicationRuleStatus m_status;
bool m_statusHasBeenSet = false;
SourceSelectionCriteria m_sourceSelectionCriteria;
bool m_sourceSelectionCriteriaHasBeenSet = false;
ExistingObjectReplication m_existingObjectReplication;
bool m_existingObjectReplicationHasBeenSet = false;
Destination m_destination;
bool m_destinationHasBeenSet = false;
DeleteMarkerReplication m_deleteMarkerReplication;
bool m_deleteMarkerReplicationHasBeenSet = false;
};
} // namespace Model
} // namespace S3
} // namespace Aws
|