Sets the list of SSE configuration rules.

@param rules New rules.
@return This object for method chaining.
508446
public ServerSideEncryptionConfiguration withRules(ServerSideEncryptionRule... rules) {
        if (this.rules == null) {
            setRules(new ArrayList<ServerSideEncryptionRule>(rules.length));
        }
        for (ServerSideEncryptionRule ele : rules) {
            this.rules.add(ele);
        }
        return this;
    }
532929
public void setRules(java.util.Collection<TopicRuleListItem> rules) {
        if (rules == null) {
            this.rules = null;
            return;
        }

        this.rules = new java.util.ArrayList<TopicRuleListItem>(rules);
    }
387273
public function setRules(array $rules): self
    {
        assert(empty($rules) === false);

        $this->rules = $rules;

        return $this;
    }
219295
List<Object> getSortedRules() {
        List<Object> result = new ArrayList<Object>();
        for (RuleEntry entry : getSortedEntries()) {
            result.add(entry.rule);
        }
        return result;
    }
428268
public CompositeExceptionHandler buildHandlersFor(XmlRules rules) {
    ImmutableList.Builder<RuleExceptionHandler> builder = ImmutableList.builder();
    for (XmlRules.ExceptionRule rule : rules.getExceptionRules()) {
      builder.add(buildHandlerFor(rule));
    }
    return new CompositeExceptionHandler(builder.build());
  }
861536
public void setUserRules(java.util.Collection<String> userRules) {
        if (userRules == null) {
            this.userRules = null;
            return;
        }

        this.userRules = new com.amazonaws.internal.SdkInternalList<String>(userRules);
    }
1329708
public void addRule(final TreeRule rule) {
    if (rule == null) {
      throw new IllegalArgumentException("Null rules are not accepted");
    }
    if (rules == null) {
      rules = new TreeMap<Integer, TreeMap<Integer, TreeRule>>();
    }
    
    TreeMap<Integer, TreeRule> level = rules.get(rule.getLevel());
    if (level == null) {
      level = new TreeMap<Integer, TreeRule>();
      level.put(rule.getOrder(), rule);
      rules.put(rule.getLevel(), level);
    } else {
      level.put(rule.getOrder(), rule);
    }
    
    changed.put("rules", true);
  }
892149
public function setRules(array $rules)
    {
        $this->validators = [];
        foreach ($rules as $rule) {
            if (is_array($rule[0]) && is_string($rule[1])) {
                continue;
            }
            throw new InvalidArgumentException('Bad validation rule');
        }
        $this->rules = $rules;

        return $this;
    }
560347
public void setRules(RuleProvider provider, List<Rule> rules)
    {
        providersToRules.put(provider, rules);
    }
72973
public void setRules(java.util.Collection<Rule> rules) {
        if (rules == null) {
            this.rules = null;
            return;
        }

        this.rules = new java.util.ArrayList<Rule>(rules);
    }
283592
public synchronized ValidationRuleStore addRule(ValidationRule rule) {
        rule.setOrderIdx(this.rules.size());
        this.rules.add(rule);
        this.checkHashMap.put(rule.getRuleName(), rule.getValidationCheck());
        return this;
    }
401365
public Collection<BeanRule> getBeanRules() {
        Collection<BeanRule> idBasedBeanRules = beanRuleRegistry.getIdBasedBeanRules();
        Collection<Set<BeanRule>> typeBasedBeanRules = beanRuleRegistry.getTypeBasedBeanRules();
        Collection<BeanRule> configurableBeanRules = beanRuleRegistry.getConfigurableBeanRules();

        int capacity = idBasedBeanRules.size();
        for (Set<BeanRule> brs : typeBasedBeanRules) {
            capacity += brs.size();
        }
        capacity += configurableBeanRules.size();
        capacity = (int)(capacity / 0.9f) + 1;

        Set<BeanRule> beanRuleSet = new HashSet<>(capacity, 0.9f);
        beanRuleSet.addAll(idBasedBeanRules);
        for (Set<BeanRule> brs : typeBasedBeanRules) {
            beanRuleSet.addAll(brs);
        }
        beanRuleSet.addAll(configurableBeanRules);
        return beanRuleSet;
    }
996036
public function setRules(array $rules)
    {
        foreach ($rules as $key => $values) {

            if ((is_array($values) === true && empty($values) === false) || is_callable($values)) {
                $this->rules[$key] = $values;
            } else {
                $this->rules[$key] = trim($values);
            }
        }

        return $this;
    }
1087006
public void setCustomRules(java.util.Collection<CustomRule> customRules) {
        if (customRules == null) {
            this.customRules = null;
            return;
        }

        this.customRules = new java.util.ArrayList<CustomRule>(customRules);
    }
746189
public java.util.List<ScalingRule> getRules() {
        if (rules == null) {
            rules = new com.amazonaws.internal.SdkInternalList<ScalingRule>();
        }
        return rules;
    }
927031
public function setPasswordStrengthRules($rules)
    {
        $this->_passwordStrengthRules = [];
        if (!is_array($rules)) {
            return;
        }
        foreach ($rules as $rule) {
            $this->_passwordStrengthRules[] = array_merge(['newPassword'], $rule);
        }
    }
742415
public LambdaDslJsonArray and(Object value, MatchingRule... rules) {
        pactArray.and(value, rules);
        return this;
    }