public BackupPlan withRules(java.util.Collection<BackupRule> rules) {
        setRules(rules);
        return this;
    }
<p>
An array of <code>BackupRule</code> objects, each of which specifies a scheduled task that is used to back up a
selection of resources.
</p>

@param rules
       An array of <code>BackupRule</code> objects, each of which specifies a scheduled task that is used to back
       up a selection of resources.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-backup/src/main/java/com/amazonaws/services/backup/model/BackupPlan.java