public class BucketReplicationConfiguration extends Object implements Serializable
Constructor and Description |
---|
BucketReplicationConfiguration() |
Modifier and Type | Method and Description |
---|---|
BucketReplicationConfiguration |
addRule(ReplicationRule rule)
Adds a new rule to the replication configuration associated with this QCloud bucket.
|
String |
getRoleName()
Returns the role name associated with this replication configuration.
|
List<ReplicationRule> |
getRules()
Returns the replication rules associated with this QCloud bucket.
|
BucketReplicationConfiguration |
removeRule(ReplicationRule rule)
Removes the replication rule with the given id from the replication configuration associated
with QCloud bucket.
|
void |
setRoleName(String roleName)
Sets the role name that will be used by QCloud while replication.
|
void |
setRules(List<ReplicationRule> rules)
Sets the replication rules for the QCloud bucket.
|
String |
toString() |
BucketReplicationConfiguration |
withRoleName(String roleName)
Sets the role name that will be used by QCloud while replication.
|
BucketReplicationConfiguration |
withRules(List<ReplicationRule> rules)
Sets the replication rules for the QCloud bucket.
|
public String getRoleName()
public void setRoleName(String roleName)
role
- The role name for this configuration.public BucketReplicationConfiguration withRoleName(String roleName)
roleName
- The role for this configuration.BucketReplicationConfiguration
object.public List<ReplicationRule> getRules()
public void setRules(List<ReplicationRule> rules)
rules
- the replication rules for the QCloud bucket.IllegalArgumentException
- if the rules are null.public BucketReplicationConfiguration withRules(List<ReplicationRule> rules)
rules
- the replication rules for the QCloud bucket.BucketReplicationConfiguration
object.IllegalArgumentException
- if the rules are null.public BucketReplicationConfiguration addRule(ReplicationRule rule)
id
- the id for the rule.rule
- the replication rule for the QCloud bucket.BucketReplicationConfiguration
object.IllegalArgumentException
- if the given id or rule is null.public BucketReplicationConfiguration removeRule(ReplicationRule rule)
id
- the id of the replication rule to be removed.BucketReplicationConfiguration
object.Copyright © 2023. All rights reserved.