// ActivateFileCustomRules activates this static file based custom rule mechanism
971478
func ActivateFileCustomRules(qsc tabletserver.Controller) {
	if *fileRulePath != "" {
		qsc.RegisterQueryRuleSource(FileCustomRuleSource)
		fileCustomRule.Open(qsc, *fileRulePath)
	}
}
146610
func CompactRules(rules []rbacv1.PolicyRule) ([]rbacv1.PolicyRule, error) {
	compacted := make([]rbacv1.PolicyRule, 0, len(rules))

	simpleRules := map[simpleResource]*rbacv1.PolicyRule{}
	for _, rule := range rules {
		if resource, isSimple := isSimpleResourceRule(&rule); isSimple {
			if existingRule, ok := simpleRules[resource]; ok {
				// Add the new verbs to the existing simple resource rule
				if existingRule.Verbs == nil {
					existingRule.Verbs = []string{}
				}
				existingRule.Verbs = append(existingRule.Verbs, rule.Verbs...)
			} else {
				// Copy the rule to accumulate matching simple resource rules into
				simpleRules[resource] = rule.DeepCopy()
			}
		} else {
			compacted = append(compacted, rule)
		}
	}

	// Once we've consolidated the simple resource rules, add them to the compacted list
	for _, simpleRule := range simpleRules {
		compacted = append(compacted, *simpleRule)
	}

	return compacted, nil
}
1100597
func (s *GetBucketLifecycleConfigurationOutput) SetRules(v []*LifecycleRule) *GetBucketLifecycleConfigurationOutput {
	s.Rules = v
	return s
}
32151
func (dua *dua_CM) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleUnknown
}
580641
func (ksf *ksf_CM) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
	return locales.PluralRuleUnknown
}
406474
func (gosec *Analyzer) LoadRules(ruleDefinitions map[string]RuleBuilder) {
	for id, def := range ruleDefinitions {
		r, nodes := def(id, gosec.config)
		gosec.ruleset.Register(r, nodes...)
	}
}
323933
func DefaultRules() Rules {
	rules := Rules{}

	addPluralRules(rules, []string{"bm", "bo", "dz", "id", "ig", "ii", "in", "ja", "jbo", "jv", "jw", "kde", "kea", "km", "ko", "lkt", "lo", "ms", "my", "nqo", "root", "sah", "ses", "sg", "th", "to", "vi", "wo", "yo", "yue", "zh"}, &Rule{
		PluralForms: newPluralFormSet(Other),
		PluralFormFunc: func(ops *Operands) Form {
			return Other
		},
	})
	addPluralRules(rules, []string{"am", "as", "bn", "fa", "gu", "hi", "kn", "mr", "zu"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 0 or n = 1
			if intEqualsAny(ops.I, 0) ||
				ops.NEqualsAny(1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"ff", "fr", "hy", "kab"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 0,1
			if intEqualsAny(ops.I, 0, 1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"pt"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 0..1
			if intInRange(ops.I, 0, 1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"ast", "ca", "de", "en", "et", "fi", "fy", "gl", "ia", "io", "it", "ji", "nl", "pt_PT", "sc", "scn", "sv", "sw", "ur", "yi"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"si"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 0,1 or i = 0 and f = 1
			if ops.NEqualsAny(0, 1) ||
				intEqualsAny(ops.I, 0) && intEqualsAny(ops.F, 1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"ak", "bh", "guw", "ln", "mg", "nso", "pa", "ti", "wa"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 0..1
			if ops.NInRange(0, 1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"tzm"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 0..1 or n = 11..99
			if ops.NInRange(0, 1) ||
				ops.NInRange(11, 99) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"af", "asa", "az", "bem", "bez", "bg", "brx", "ce", "cgg", "chr", "ckb", "dv", "ee", "el", "eo", "es", "eu", "fo", "fur", "gsw", "ha", "haw", "hu", "jgo", "jmc", "ka", "kaj", "kcg", "kk", "kkj", "kl", "ks", "ksb", "ku", "ky", "lb", "lg", "mas", "mgo", "ml", "mn", "nah", "nb", "nd", "ne", "nn", "nnh", "no", "nr", "ny", "nyn", "om", "or", "os", "pap", "ps", "rm", "rof", "rwk", "saq", "sd", "sdh", "seh", "sn", "so", "sq", "ss", "ssy", "st", "syr", "ta", "te", "teo", "tig", "tk", "tn", "tr", "ts", "ug", "uz", "ve", "vo", "vun", "wae", "xh", "xog"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 1
			if ops.NEqualsAny(1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"da"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 1 or t != 0 and i = 0,1
			if ops.NEqualsAny(1) ||
				!intEqualsAny(ops.T, 0) && intEqualsAny(ops.I, 0, 1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"is"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// t = 0 and i % 10 = 1 and i % 100 != 11 or t != 0
			if intEqualsAny(ops.T, 0) && intEqualsAny(ops.I%10, 1) && !intEqualsAny(ops.I%100, 11) ||
				!intEqualsAny(ops.T, 0) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"mk"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) && !intEqualsAny(ops.I%100, 11) ||
				intEqualsAny(ops.F%10, 1) && !intEqualsAny(ops.F%100, 11) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"fil", "tl"}, &Rule{
		PluralForms: newPluralFormSet(One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// v = 0 and i = 1,2,3 or v = 0 and i % 10 != 4,6,9 or v != 0 and f % 10 != 4,6,9
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I, 1, 2, 3) ||
				intEqualsAny(ops.V, 0) && !intEqualsAny(ops.I%10, 4, 6, 9) ||
				!intEqualsAny(ops.V, 0) && !intEqualsAny(ops.F%10, 4, 6, 9) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"lv", "prg"}, &Rule{
		PluralForms: newPluralFormSet(Zero, One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n % 10 = 0 or n % 100 = 11..19 or v = 2 and f % 100 = 11..19
			if ops.NModEqualsAny(10, 0) ||
				ops.NModInRange(100, 11, 19) ||
				intEqualsAny(ops.V, 2) && intInRange(ops.F%100, 11, 19) {
				return Zero
			}
			// n % 10 = 1 and n % 100 != 11 or v = 2 and f % 10 = 1 and f % 100 != 11 or v != 2 and f % 10 = 1
			if ops.NModEqualsAny(10, 1) && !ops.NModEqualsAny(100, 11) ||
				intEqualsAny(ops.V, 2) && intEqualsAny(ops.F%10, 1) && !intEqualsAny(ops.F%100, 11) ||
				!intEqualsAny(ops.V, 2) && intEqualsAny(ops.F%10, 1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"lag"}, &Rule{
		PluralForms: newPluralFormSet(Zero, One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 0
			if ops.NEqualsAny(0) {
				return Zero
			}
			// i = 0,1 and n != 0
			if intEqualsAny(ops.I, 0, 1) && !ops.NEqualsAny(0) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"ksh"}, &Rule{
		PluralForms: newPluralFormSet(Zero, One, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 0
			if ops.NEqualsAny(0) {
				return Zero
			}
			// n = 1
			if ops.NEqualsAny(1) {
				return One
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"iu", "kw", "naq", "se", "sma", "smi", "smj", "smn", "sms"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 1
			if ops.NEqualsAny(1) {
				return One
			}
			// n = 2
			if ops.NEqualsAny(2) {
				return Two
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"shi"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 0 or n = 1
			if intEqualsAny(ops.I, 0) ||
				ops.NEqualsAny(1) {
				return One
			}
			// n = 2..10
			if ops.NInRange(2, 10) {
				return Few
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"mo", "ro"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// v != 0 or n = 0 or n != 1 and n % 100 = 1..19
			if !intEqualsAny(ops.V, 0) ||
				ops.NEqualsAny(0) ||
				!ops.NEqualsAny(1) && ops.NModInRange(100, 1, 19) {
				return Few
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"bs", "hr", "sh", "sr"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// v = 0 and i % 10 = 1 and i % 100 != 11 or f % 10 = 1 and f % 100 != 11
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) && !intEqualsAny(ops.I%100, 11) ||
				intEqualsAny(ops.F%10, 1) && !intEqualsAny(ops.F%100, 11) {
				return One
			}
			// v = 0 and i % 10 = 2..4 and i % 100 != 12..14 or f % 10 = 2..4 and f % 100 != 12..14
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 2, 4) && !intInRange(ops.I%100, 12, 14) ||
				intInRange(ops.F%10, 2, 4) && !intInRange(ops.F%100, 12, 14) {
				return Few
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"gd"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Few, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 1,11
			if ops.NEqualsAny(1, 11) {
				return One
			}
			// n = 2,12
			if ops.NEqualsAny(2, 12) {
				return Two
			}
			// n = 3..10,13..19
			if ops.NInRange(3, 10) || ops.NInRange(13, 19) {
				return Few
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"sl"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Few, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// v = 0 and i % 100 = 1
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 1) {
				return One
			}
			// v = 0 and i % 100 = 2
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 2) {
				return Two
			}
			// v = 0 and i % 100 = 3..4 or v != 0
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 3, 4) ||
				!intEqualsAny(ops.V, 0) {
				return Few
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"dsb", "hsb"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Few, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// v = 0 and i % 100 = 1 or f % 100 = 1
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 1) ||
				intEqualsAny(ops.F%100, 1) {
				return One
			}
			// v = 0 and i % 100 = 2 or f % 100 = 2
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 2) ||
				intEqualsAny(ops.F%100, 2) {
				return Two
			}
			// v = 0 and i % 100 = 3..4 or f % 100 = 3..4
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 3, 4) ||
				intInRange(ops.F%100, 3, 4) {
				return Few
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"he", "iw"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// i = 2 and v = 0
			if intEqualsAny(ops.I, 2) && intEqualsAny(ops.V, 0) {
				return Two
			}
			// v = 0 and n != 0..10 and n % 10 = 0
			if intEqualsAny(ops.V, 0) && !ops.NInRange(0, 10) && ops.NModEqualsAny(10, 0) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"cs", "sk"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// i = 2..4 and v = 0
			if intInRange(ops.I, 2, 4) && intEqualsAny(ops.V, 0) {
				return Few
			}
			// v != 0
			if !intEqualsAny(ops.V, 0) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"pl"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// i = 1 and v = 0
			if intEqualsAny(ops.I, 1) && intEqualsAny(ops.V, 0) {
				return One
			}
			// v = 0 and i % 10 = 2..4 and i % 100 != 12..14
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 2, 4) && !intInRange(ops.I%100, 12, 14) {
				return Few
			}
			// v = 0 and i != 1 and i % 10 = 0..1 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 12..14
			if intEqualsAny(ops.V, 0) && !intEqualsAny(ops.I, 1) && intInRange(ops.I%10, 0, 1) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 5, 9) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 12, 14) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"be"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n % 10 = 1 and n % 100 != 11
			if ops.NModEqualsAny(10, 1) && !ops.NModEqualsAny(100, 11) {
				return One
			}
			// n % 10 = 2..4 and n % 100 != 12..14
			if ops.NModInRange(10, 2, 4) && !ops.NModInRange(100, 12, 14) {
				return Few
			}
			// n % 10 = 0 or n % 10 = 5..9 or n % 100 = 11..14
			if ops.NModEqualsAny(10, 0) ||
				ops.NModInRange(10, 5, 9) ||
				ops.NModInRange(100, 11, 14) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"lt"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n % 10 = 1 and n % 100 != 11..19
			if ops.NModEqualsAny(10, 1) && !ops.NModInRange(100, 11, 19) {
				return One
			}
			// n % 10 = 2..9 and n % 100 != 11..19
			if ops.NModInRange(10, 2, 9) && !ops.NModInRange(100, 11, 19) {
				return Few
			}
			// f != 0
			if !intEqualsAny(ops.F, 0) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"mt"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 1
			if ops.NEqualsAny(1) {
				return One
			}
			// n = 0 or n % 100 = 2..10
			if ops.NEqualsAny(0) ||
				ops.NModInRange(100, 2, 10) {
				return Few
			}
			// n % 100 = 11..19
			if ops.NModInRange(100, 11, 19) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"ru", "uk"}, &Rule{
		PluralForms: newPluralFormSet(One, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// v = 0 and i % 10 = 1 and i % 100 != 11
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) && !intEqualsAny(ops.I%100, 11) {
				return One
			}
			// v = 0 and i % 10 = 2..4 and i % 100 != 12..14
			if intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 2, 4) && !intInRange(ops.I%100, 12, 14) {
				return Few
			}
			// v = 0 and i % 10 = 0 or v = 0 and i % 10 = 5..9 or v = 0 and i % 100 = 11..14
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 0) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%10, 5, 9) ||
				intEqualsAny(ops.V, 0) && intInRange(ops.I%100, 11, 14) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"br"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n % 10 = 1 and n % 100 != 11,71,91
			if ops.NModEqualsAny(10, 1) && !ops.NModEqualsAny(100, 11, 71, 91) {
				return One
			}
			// n % 10 = 2 and n % 100 != 12,72,92
			if ops.NModEqualsAny(10, 2) && !ops.NModEqualsAny(100, 12, 72, 92) {
				return Two
			}
			// n % 10 = 3..4,9 and n % 100 != 10..19,70..79,90..99
			if (ops.NModInRange(10, 3, 4) || ops.NModEqualsAny(10, 9)) && !(ops.NModInRange(100, 10, 19) || ops.NModInRange(100, 70, 79) || ops.NModInRange(100, 90, 99)) {
				return Few
			}
			// n != 0 and n % 1000000 = 0
			if !ops.NEqualsAny(0) && ops.NModEqualsAny(1000000, 0) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"ga"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 1
			if ops.NEqualsAny(1) {
				return One
			}
			// n = 2
			if ops.NEqualsAny(2) {
				return Two
			}
			// n = 3..6
			if ops.NInRange(3, 6) {
				return Few
			}
			// n = 7..10
			if ops.NInRange(7, 10) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"gv"}, &Rule{
		PluralForms: newPluralFormSet(One, Two, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// v = 0 and i % 10 = 1
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 1) {
				return One
			}
			// v = 0 and i % 10 = 2
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%10, 2) {
				return Two
			}
			// v = 0 and i % 100 = 0,20,40,60,80
			if intEqualsAny(ops.V, 0) && intEqualsAny(ops.I%100, 0, 20, 40, 60, 80) {
				return Few
			}
			// v != 0
			if !intEqualsAny(ops.V, 0) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"ar", "ars"}, &Rule{
		PluralForms: newPluralFormSet(Zero, One, Two, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 0
			if ops.NEqualsAny(0) {
				return Zero
			}
			// n = 1
			if ops.NEqualsAny(1) {
				return One
			}
			// n = 2
			if ops.NEqualsAny(2) {
				return Two
			}
			// n % 100 = 3..10
			if ops.NModInRange(100, 3, 10) {
				return Few
			}
			// n % 100 = 11..99
			if ops.NModInRange(100, 11, 99) {
				return Many
			}
			return Other
		},
	})
	addPluralRules(rules, []string{"cy"}, &Rule{
		PluralForms: newPluralFormSet(Zero, One, Two, Few, Many, Other),
		PluralFormFunc: func(ops *Operands) Form {
			// n = 0
			if ops.NEqualsAny(0) {
				return Zero
			}
			// n = 1
			if ops.NEqualsAny(1) {
				return One
			}
			// n = 2
			if ops.NEqualsAny(2) {
				return Two
			}
			// n = 3
			if ops.NEqualsAny(3) {
				return Few
			}
			// n = 6
			if ops.NEqualsAny(6) {
				return Many
			}
			return Other
		},
	})

	return rules
}
332142
func (s *RuleGroupUpdate) SetActivatedRule(v *ActivatedRule) *RuleGroupUpdate {
	s.ActivatedRule = v
	return s
}
703905
func (s *BucketLifecycleConfiguration) SetRules(v []*LifecycleRule) *BucketLifecycleConfiguration {
	s.Rules = v
	return s
}
295659
func (c *Client) ActivateVCL(i *ActivateVCLInput) (*VCL, error) {
	if i.Service == "" {
		return nil, ErrMissingService
	}

	if i.Version == 0 {
		return nil, ErrMissingVersion
	}

	if i.Name == "" {
		return nil, ErrMissingName
	}

	path := fmt.Sprintf("/service/%s/version/%d/vcl/%s/main", i.Service, i.Version, i.Name)
	resp, err := c.Put(path, nil)
	if err != nil {
		return nil, err
	}

	var vcl *VCL
	if err := decodeJSON(&vcl, resp.Body); err != nil {
		return nil, err
	}
	return vcl, nil
}
712667
func (s *App) SetCustomRules(v []*CustomRule) *App {
	s.CustomRules = v
	return s
}
734186
func (s *ServerSideEncryptionConfiguration) SetRules(v []*ServerSideEncryptionRule) *ServerSideEncryptionConfiguration {
	s.Rules = v
	return s
}
876077
func (ruleFormats *RuleFormats) GetRuleFormats() error {
	req, err := client.NewRequest(
		Config,
		"GET",
		"/papi/v1/rule-formats",
		nil,
	)
	if err != nil {
		return err
	}

	res, err := client.Do(Config, req)
	if err != nil {
		return err
	}

	if client.IsError(res) {
		return client.NewAPIError(res)
	}

	if err := client.BodyJSON(res, ruleFormats); err != nil {
		return err
	}

	sort.Strings(ruleFormats.RuleFormats.Items)

	return nil
}
796804
func (s *KeyFilter) SetFilterRules(v []*FilterRule) *KeyFilter {
	s.FilterRules = v
	return s
}
754370
func (v ValidateExtension) Rules() []ValidateRule {
	if v.FieldRules == nil {
		return nil
	}
	if v.rules == nil {
		v.rules = flattenRules("", reflect.ValueOf(v.FieldRules))
	}
	return v.rules
}
353760
func (s *SetRulePrioritiesOutput) SetRules(v []*Rule) *SetRulePrioritiesOutput {
	s.Rules = v
	return s
}
165223
func (f *ScmpFilter) addRuleWrapper(call ScmpSyscall, action ScmpAction, exact bool, length C.uint, cond C.scmp_cast_t) error {
	if length != 0 && cond == nil {
		return fmt.Errorf("null conditions list, but length is nonzero")
	}

	var retCode C.int
	if exact {
		retCode = C.seccomp_rule_add_exact_array(f.filterCtx, action.toNative(), C.int(call), length, cond)
	} else {
		retCode = C.seccomp_rule_add_array(f.filterCtx, action.toNative(), C.int(call), length, cond)
	}

	if syscall.Errno(-1*retCode) == syscall.EFAULT {
		return fmt.Errorf("unrecognized syscall %#x", int32(call))
	} else if syscall.Errno(-1*retCode) == syscall.EPERM {
		return fmt.Errorf("requested action matches default action of filter")
	} else if syscall.Errno(-1*retCode) == syscall.EINVAL {
		return fmt.Errorf("two checks on same syscall argument")
	} else if retCode != 0 {
		return syscall.Errno(-1 * retCode)
	}

	return nil
}