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.
351863
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);
    }
206932
@NonNull
    public ReplicatorConfiguration setPullFilter(ReplicationFilter pullFilter) {
        if (readonly) { throw new IllegalStateException("ReplicatorConfiguration is readonly mode."); }
        this.pullFilter = pullFilter;
        return getReplicatorConfiguration();
    }
16366
protected function setEntityRules($rules = [])
    {
        $this->entityLocalRules = $rules;
        $cache = $this->getCache();
        if ($cache) {
            $tagDependency = new TagDependency(
                ['tags' => [$this->getEntityRulesCacheTag()]]
            );
            $cache->set($this->getEntityRulesCacheKey(), $rules, 0, $tagDependency);
        }
    }
981917
public function setRules(array $rules)
    {
        $this->rules = [];
        foreach ($rules as $key => $value) {
            if (is_int($key)) {
                $routeRegex  = $value;
                $permissions = [];
            } else {
                $routeRegex  = $key;
                $permissions = (array) $value;
            }
            $this->rules[$routeRegex] = $permissions;
        }
    }
687371
public void setRuleNames(java.util.Collection<String> ruleNames) {
        if (ruleNames == null) {
            this.ruleNames = null;
            return;
        }

        this.ruleNames = new com.amazonaws.internal.SdkInternalList<String>(ruleNames);
    }
527056
public void setReplicasToRemove(java.util.Collection<String> replicasToRemove) {
        if (replicasToRemove == null) {
            this.replicasToRemove = null;
            return;
        }

        this.replicasToRemove = new com.amazonaws.internal.SdkInternalList<String>(replicasToRemove);
    }
388721
public void setS3Resources(java.util.Collection<S3Resource> s3Resources) {
        if (s3Resources == null) {
            this.s3Resources = null;
            return;
        }

        this.s3Resources = new java.util.ArrayList<S3Resource>(s3Resources);
    }
261819
public void copyFrom(Rule rule) {
        setPolicy(rule.getPolicy());
        setCaptureStart(rule.getCaptureStart());
        setCaptureEnd(rule.getCaptureEnd());
        setPrivateComment(rule.getPrivateComment());
        setPublicComment(rule.getPublicComment());
        setRetrievalStart(rule.getRetrievalStart());
        setRetrievalEnd(rule.getRetrievalEnd());
        setSecondsSinceCapture(rule.getSecondsSinceCapture());
        setSurt(rule.getSurt());
        setWho(rule.getWho());
        setEnabled(rule.getEnabled());
        setExactMatch(rule.isExactMatch());
    }
386301
public void setArgs(java.util.Collection<String> args) {
        if (args == null) {
            this.args = null;
            return;
        }

        this.args = new com.amazonaws.internal.SdkInternalList<String>(args);
    }
920447
public void setVpnGateways(java.util.Collection<VpnGateway> vpnGateways) {
        if (vpnGateways == null) {
            this.vpnGateways = null;
            return;
        }

        this.vpnGateways = new com.amazonaws.internal.SdkInternalList<VpnGateway>(vpnGateways);
    }
67008
public void setRules(java.lang.String rules) {
        getStateHelper().put(PropertyKeys.rules, rules);
        handleAttribute("rules", rules);
    }
308832
public void setInvalidParameters(java.util.Collection<String> invalidParameters) {
        if (invalidParameters == null) {
            this.invalidParameters = null;
            return;
        }

        this.invalidParameters = new com.amazonaws.internal.SdkInternalList<String>(invalidParameters);
    }
1089554
public void setReplicationGroup(java.util.Collection<Replica> replicationGroup) {
        if (replicationGroup == null) {
            this.replicationGroup = null;
            return;
        }

        this.replicationGroup = new java.util.ArrayList<Replica>(replicationGroup);
    }
1000045
public void add(Rule rule) {
		List<Token> tokens = rule.getTokens();
		for (Token token : tokens) {
			for (String str : token.getTerms()) {
				if (str.charAt(0) != ':') {
					Library.insertWord(forest, new Value(str, "rule", "10000"));
				}
			}
		}


		for (String str : tokens.get(0).getTerms()) {
			Set<Rule> rules = ruleIndex.get(str);
			if(rules==null){
				rules = new HashSet<>() ;
				ruleIndex.put(str,rules) ;
			}
			rules.add(rule) ;
		}
	}
1205220
public void setBuckets(java.util.Collection<Bucket> buckets) {
        if (buckets == null) {
            this.buckets = null;
            return;
        }

        this.buckets = new com.amazonaws.internal.SdkInternalList<Bucket>(buckets);
    }
296691
public void setRuleSets(java.util.Collection<MatchmakingRuleSet> ruleSets) {
        if (ruleSets == null) {
            this.ruleSets = null;
            return;
        }

        this.ruleSets = new java.util.ArrayList<MatchmakingRuleSet>(ruleSets);
    }
70607
public void setParameters(java.util.Collection<ParameterMetadata> parameters) {
        if (parameters == null) {
            this.parameters = null;
            return;
        }

        this.parameters = new com.amazonaws.internal.SdkInternalList<ParameterMetadata>(parameters);
    }