// ExtractFilters returns the first found FiltersOption from the
// given variadic arguments or nil otherwise.
346132
func ExtractFilters(opts ...interface{}) *opt.FiltersOption {
	for _, o := range opts {
		if v, ok := o.(*opt.FiltersOption); ok {
			return v
		}
	}
	return nil
}
291179
func ExtractEnableRules(opts ...interface{}) *opt.EnableRulesOption {
	for _, o := range opts {
		if v, ok := o.(*opt.EnableRulesOption); ok {
			return v
		}
	}
	return nil
}
777685
func (s *DescribeAssociationExecutionsInput) SetFilters(v []*AssociationExecutionFilter) *DescribeAssociationExecutionsInput {
	s.Filters = v
	return s
}
1018290
func ExtractScopes(opts ...interface{}) *opt.ScopesOption {
	for _, o := range opts {
		if v, ok := o.(*opt.ScopesOption); ok {
			return v
		}
	}
	return nil
}
455700
func (f *FilterWrap) addFilters(fl []interface{}) {
	if len(fl) > 1 {
		fc := fl[0]
		switch fc.(type) {
		case BoolClause, string:
			f.boolClause = fc.(string)
			fl = fl[1:]
		}
	}
	f.filters = append(f.filters, fl...)
}
875905
func Filtered(paths []string, filter Filter) (*Result, error) {
	return all(paths, filter, func(curr *Result, path string, depth int) error {

		bs, err := ioutil.ReadFile(path)
		if err != nil {
			return err
		}

		result, err := loadKnownTypes(path, bs)
		if err != nil {
			if !isUnrecognizedFile(err) {
				return err
			}
			if depth > 0 {
				return nil
			}
			result, err = loadFileForAnyType(path, bs)
			if err != nil {
				return err
			}
		}

		return curr.merge(path, result)
	})
}
43339
func ExtractRestrictSearchableAttributes(opts ...interface{}) *opt.RestrictSearchableAttributesOption {
	for _, o := range opts {
		if v, ok := o.(*opt.RestrictSearchableAttributesOption); ok {
			return v
		}
	}
	return nil
}
539039
func ExtractAdvancedSyntaxFeatures(opts ...interface{}) *opt.AdvancedSyntaxFeaturesOption {
	for _, o := range opts {
		if v, ok := o.(*opt.AdvancedSyntaxFeaturesOption); ok {
			return v
		}
	}
	return nil
}
1345495
func Filters(f filter.Filter) func(Call) error {
	return func(hc Call) error {
		if c, ok := hc.(hasQueryOptions); ok {
			pbF, err := f.ConstructPBFilter()
			if err != nil {
				return err
			}
			c.setFilter(pbF)
			return nil
		}
		return errors.New("'Filters' option can only be used with Get or Scan request")
	}
}
497321
func ExtractRootPaths(paths []string) []string {
	r := make([]string, len(paths))
	for i, p := range paths {
		root := filepath.ToSlash(p)
		sections := strings.Split(root, "/")
		for _, section := range sections {
			if section != "" {
				root = section
				break
			}
		}
		r[i] = root
	}
	return r

}
737723
func (s *SearchProductsAsAdminInput) SetFilters(v map[string][]*string) *SearchProductsAsAdminInput {
	s.Filters = v
	return s
}
319715
func filterParams(pattern *regexp.Regexp, values map[string][]string) map[string][]string {
	for key := range values {
		if pattern.Match([]byte(key)) {
			values[key] = []string{FILTERED}
		}
	}

	return values
}
949099
func (s *Selection) RemoveFiltered(selector string) *Selection {
	return s.RemoveMatcher(compileMatcher(selector))
}
181942
func ExtractLimit(opts ...interface{}) *opt.LimitOption {
	for _, o := range opts {
		if v, ok := o.(*opt.LimitOption); ok {
			return v
		}
	}
	return nil
}
1156479
func (a *FiltersAggregation) Filters(filters ...Query) *FiltersAggregation {
	if len(filters) > 0 {
		a.unnamedFilters = append(a.unnamedFilters, filters...)
	}
	return a
}
1117839
func ValidateFilters(filter filters.Args) error {
	return errdefs.InvalidParameter(filter.Validate(acceptedFilters))
}
741490
func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) {
	var (
		all     model.Vector
		lastErr error
	)
	for _, f := range fams {
		some, err := extractSamples(f, o)
		if err != nil {
			lastErr = err
			continue
		}
		all = append(all, some...)
	}
	return all, lastErr
}