code: public void setRules(Map<String, ReplicationRule> rules) {
          if (rules == null) {
              throw new IllegalArgumentException(
                      "Replication rules cannot be null");
          }
          this.rules = new HashMap<String, ReplicationRule>(rules);
      }
docs: Sets the replication rules for the Amazon S3 bucket.
  
  @param rules
  the replication rules for the Amazon S3 bucket.
  @throws IllegalArgumentException
  if the rules are null.