// SetRuleArns sets the RuleArns field's value.
170833
func (s *DescribeRulesInput) SetRuleArns(v []*string) *DescribeRulesInput {
	s.RuleArns = v
	return s
}
1301555
func (dr *dnsRedirect) setRules(wg *completion.WaitGroup, newRules policy.L7DataMap) error {
	var toRemove, toAdd []string

	for _, rule := range dr.currentRules {
		for _, dnsRule := range rule.DNS {
			if len(dnsRule.MatchName) > 0 {
				dnsName := strings.ToLower(dns.Fqdn(dnsRule.MatchName))
				dnsNameAsRE := matchpattern.ToRegexp(dnsName)
				toRemove = append(toRemove, dnsNameAsRE)
			}
			if len(dnsRule.MatchPattern) > 0 {
				dnsPattern := matchpattern.Sanitize(dnsRule.MatchPattern)
				dnsPatternAsRE := matchpattern.ToRegexp(dnsPattern)
				toRemove = append(toRemove, dnsPatternAsRE)
			}
		}
	}

	for _, rule := range dr.redirect.rules {
		for _, dnsRule := range rule.DNS {
			if len(dnsRule.MatchName) > 0 {
				dnsName := strings.ToLower(dns.Fqdn(dnsRule.MatchName))
				dnsNameAsRE := matchpattern.ToRegexp(dnsName)
				toAdd = append(toAdd, dnsNameAsRE)
			}
			if len(dnsRule.MatchPattern) > 0 {
				dnsPattern := matchpattern.Sanitize(dnsRule.MatchPattern)
				dnsPatternAsRE := matchpattern.ToRegexp(dnsPattern)
				toAdd = append(toAdd, dnsPatternAsRE)
			}
		}
	}

	log.WithFields(logrus.Fields{
		"add":                toAdd,
		"remove":             toRemove,
		logfields.EndpointID: dr.redirect.endpointID,
	}).Debug("DNS Proxy updating matchNames in allowed list during UpdateRules")
	DefaultDNSProxy.UpdateAllowed(toAdd, toRemove, fmt.Sprintf("%d", dr.redirect.endpointID))
	dr.currentRules = copyRules(dr.redirect.rules)

	return nil
}
1343375
func (s *UpdateRulesOfIpGroupInput) SetUserRules(v []*IpRuleItem) *UpdateRulesOfIpGroupInput {
	s.UserRules = v
	return s
}
50748
func (s *CreateRuleOutput) SetRules(v []*Rule) *CreateRuleOutput {
	s.Rules = v
	return s
}
971903
func (s *UpdateAppInput) SetCustomRules(v []*CustomRule) *UpdateAppInput {
	s.CustomRules = v
	return s
}
965624
func (qri *Map) SetRules(ruleSource string, newRules *Rules) error {
	if newRules == nil {
		newRules = New()
	}
	qri.mu.Lock()
	defer qri.mu.Unlock()
	if _, ok := qri.queryRulesMap[ruleSource]; ok {
		qri.queryRulesMap[ruleSource] = newRules.Copy()
		return nil
	}
	return errors.New("Rule source identifier " + ruleSource + " is not valid")
}
544746
func (s *Authorizer) SetProviderARNs(v []*string) *Authorizer {
	s.ProviderARNs = v
	return s
}
679852
public void setRuleArns(java.util.Collection<String> ruleArns) {
        if (ruleArns == null) {
            this.ruleArns = null;
            return;
        }

        this.ruleArns = new java.util.ArrayList<String>(ruleArns);
    }
712667
func (s *App) SetCustomRules(v []*CustomRule) *App {
	s.CustomRules = v
	return s
}
49417
func (s *CreateAssessmentTemplateInput) SetRulesPackageArns(v []*string) *CreateAssessmentTemplateInput {
	s.RulesPackageArns = v
	return s
}
346624
func (s *ListRuleNamesByTargetOutput) SetRuleNames(v []*string) *ListRuleNamesByTargetOutput {
	s.RuleNames = v
	return s
}
819895
func (s *DescribeRulesOutput) SetRules(v []*Rule) *DescribeRulesOutput {
	s.Rules = v
	return s
}
1230819
func (s *UnprocessedStatistics) SetRuleName(v string) *UnprocessedStatistics {
	s.RuleName = &v
	return s
}
510444
func (s *AssessmentRunFilter) SetRulesPackageArns(v []*string) *AssessmentRunFilter {
	s.RulesPackageArns = v
	return s
}
262691
func (s *ListRuleGroupsOutput) SetRuleGroups(v []*RuleGroupSummary) *ListRuleGroupsOutput {
	s.RuleGroups = v
	return s
}
751538
func (s *RoleMapping) SetRulesConfiguration(v *RulesConfigurationType) *RoleMapping {
	s.RulesConfiguration = v
	return s
}
145410
func (s *ListReceiptRuleSetsOutput) SetRuleSets(v []*ReceiptRuleSetMetadata) *ListReceiptRuleSetsOutput {
	s.RuleSets = v
	return s
}