// SetRules sets the Rules field's value.
496490
func (s *UpdateDevicePoolInput) SetRules(v []*Rule) *UpdateDevicePoolInput {
	s.Rules = v
	return s
}
415073
func (s *CreateRuleOutput) SetRule(v *Rule) *CreateRuleOutput {
	s.Rule = v
	return s
}
883935
func (s *DescribeRulesPackagesInput) SetRulesPackageArns(v []*string) *DescribeRulesPackagesInput {
	s.RulesPackageArns = 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
}
1061863
func (s *ListActivatedRulesInRuleGroupOutput) SetActivatedRules(v []*ActivatedRule) *ListActivatedRulesInRuleGroupOutput {
	s.ActivatedRules = 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
}
960579
func (s *Plan) SetRules(v []*Rule) *Plan {
	s.Rules = v
	return s
}
1082065
func (s *TypedLinkAttributeDefinition) SetRules(v map[string]*Rule) *TypedLinkAttributeDefinition {
	s.Rules = v
	return s
}
50748
func (s *CreateRuleOutput) SetRules(v []*Rule) *CreateRuleOutput {
	s.Rules = v
	return s
}
751538
func (s *RoleMapping) SetRulesConfiguration(v *RulesConfigurationType) *RoleMapping {
	s.RulesConfiguration = v
	return s
}
106577
func (s *CreateRuleInput) SetConditions(v []*RuleCondition) *CreateRuleInput {
	s.Conditions = v
	return s
}
294450
func (client *Client) CreateRules(args *CreateRulesArgs) error {
	response := CreateRulesResponse{}
	err := client.Invoke("CreateRules", args, &response)
	if err != nil {
		return err
	}
	return err
}
1343375
func (s *UpdateRulesOfIpGroupInput) SetUserRules(v []*IpRuleItem) *UpdateRulesOfIpGroupInput {
	s.UserRules = v
	return s
}
429352
func (s *CreateLicenseConfigurationInput) SetLicenseRules(v []*string) *CreateLicenseConfigurationInput {
	s.LicenseRules = v
	return s
}
882790
func (s *GetRuleOutput) SetRule(v *Rule) *GetRuleOutput {
	s.Rule = v
	return s
}
675074
func (s *AutoScalingPolicy) SetRules(v []*ScalingRule) *AutoScalingPolicy {
	s.Rules = v
	return s
}