// ExtractFacetFilters returns the first found FacetFiltersOption from the
// given variadic arguments or nil otherwise.
962698
func ExtractFacetFilters(opts ...interface{}) *opt.FacetFiltersOption {
	for _, o := range opts {
		if v, ok := o.(*opt.FacetFiltersOption); ok {
			return v
		}
	}
	return nil
}
215974
func (s Style) GetFillOptions() Style {
	return Style{
		ClassName: s.ClassName,
		FillColor: s.FillColor,
	}
}
823537
func ExtractList(obj runtime.Object) ([]runtime.Object, error) {
	itemsPtr, err := GetItemsPtr(obj)
	if err != nil {
		return nil, err
	}
	items, err := conversion.EnforcePtr(itemsPtr)
	if err != nil {
		return nil, err
	}
	list := make([]runtime.Object, items.Len())
	for i := range list {
		raw := items.Index(i)
		switch item := raw.Interface().(type) {
		case runtime.Object:
			list[i] = item
		case runtime.RawExtension:
			list[i] = &runtime.Unknown{
				RawJSON: item.RawJSON,
			}
		default:
			var found bool
			if list[i], found = raw.Addr().Interface().(runtime.Object); !found {
				return nil, fmt.Errorf("%v: item[%v]: Expected object, got %#v(%s)", obj, i, raw.Interface(), raw.Kind())
			}
		}
	}
	return list, nil
}
1201104
func GetInterfaces() (Interfaces, error) {
	interfaces, err := net.Interfaces()
	if err != nil {
		Logln("Can't get interfaces.", err)
		return nil, err
	}
	var ifaces Interfaces
	for _, iface := range interfaces {
		ifaces = append(ifaces, Interface(iface))
	}
	return ifaces, nil
}
921787
func (a *saOAuthClientAdapter) extractRedirectURIs(modelsMap map[string]model, namespace string) (redirectURIList, []error) {
	var data redirectURIList
	routeErrors := []error{}
	groupKindModelListMapper := map[schema.GroupKind]modelList{} // map of GroupKind to all models belonging to it
	groupKindModelToURI := map[schema.GroupKind]namesToObjMapperFunc{
		routeGroupKind: a.redirectURIsFromRoutes,
		// TODO add support for ingresses by creating the appropriate GroupKind and namesToObjMapperFunc
		// ingressGroupKind: a.redirectURIsFromIngresses,
	}

	for _, m := range modelsMap {
		gk := m.getGroupKind()
		if gk == legacyRouteGroupKind {
			gk = routeGroupKind // support legacy route group without doing extra API calls
		}
		if len(m.name) == 0 && gk == emptyGroupKind { // Is this a static redirect URI?
			uri := redirectURI{} // No defaults wanted
			uri.merge(&m)
			data = append(data, uri)
		} else if _, ok := groupKindModelToURI[gk]; ok { // a GroupKind is valid if we have a namesToObjMapperFunc to handle it
			groupKindModelListMapper[gk] = append(groupKindModelListMapper[gk], m)
		}
	}

	for gk, models := range groupKindModelListMapper {
		if names := models.getNames(); names.Len() > 0 {
			objMapper, errs := groupKindModelToURI[gk](namespace, names)
			if len(objMapper) > 0 {
				data = append(data, models.getRedirectURIs(objMapper)...)
			}
			if len(errs) > 0 {
				routeErrors = append(routeErrors, errs...)
			}
		}
	}

	return data, routeErrors
}
1055376
func ExtractSumOrFiltersScores(opts ...interface{}) *opt.SumOrFiltersScoresOption {
	for _, o := range opts {
		if v, ok := o.(*opt.SumOrFiltersScoresOption); ok {
			return v
		}
	}
	return nil
}
283851
func (f *RegexFilter) GetFilters() map[string]*regexp.Regexp {
	f.mu.RLock()
	ret := f.currentFilters
	f.mu.RUnlock()
	return ret
}
295093
func ExtractAnalytics(opts ...interface{}) *opt.AnalyticsOption {
	for _, o := range opts {
		if v, ok := o.(*opt.AnalyticsOption); ok {
			return v
		}
	}
	return nil
}
1141901
func (s *BatchListObjectAttributes) SetFacetFilter(v *SchemaFacet) *BatchListObjectAttributes {
	s.FacetFilter = v
	return s
}
1172784
func ExtractQuery(opts ...interface{}) *opt.QueryOption {
	for _, o := range opts {
		if v, ok := o.(*opt.QueryOption); ok {
			return v
		}
	}
	return nil
}
1196730
func extractMetadataFromMap(ctx context.Context, v map[string][]string, m map[string]string) error {
	if v == nil {
		logger.LogIf(ctx, errInvalidArgument)
		return errInvalidArgument
	}
	// Save all supported headers.
	for _, supportedHeader := range supportedHeaders {
		if value, ok := v[http.CanonicalHeaderKey(supportedHeader)]; ok {
			m[supportedHeader] = value[0]
		} else if value, ok := v[supportedHeader]; ok {
			m[supportedHeader] = value[0]
		}
	}
	for key := range v {
		for _, prefix := range userMetadataKeyPrefixes {
			if !strings.HasPrefix(strings.ToLower(key), strings.ToLower(prefix)) {
				continue
			}
			value, ok := v[key]
			if ok {
				m[key] = strings.Join(value, ",")
				break
			}
		}
	}
	return nil
}
1135877
func ExtractQueryType(opts ...interface{}) *opt.QueryTypeOption {
	for _, o := range opts {
		if v, ok := o.(*opt.QueryTypeOption); ok {
			return v
		}
	}
	return nil
}
546072
func (r RouterJSR311) ExtractParameters(route *Route, webService *WebService, urlPath string) map[string]string {
	webServiceExpr := webService.pathExpr
	webServiceMatches := webServiceExpr.Matcher.FindStringSubmatch(urlPath)
	pathParameters := r.extractParams(webServiceExpr, webServiceMatches)
	routeExpr := route.pathExpr
	routeMatches := routeExpr.Matcher.FindStringSubmatch(webServiceMatches[len(webServiceMatches)-1])
	routeParams := r.extractParams(routeExpr, routeMatches)
	for key, value := range routeParams {
		pathParameters[key] = value
	}
	return pathParameters
}
429684
func extractRespElements(w http.ResponseWriter) map[string]string {

	return map[string]string{
		"requestId":      w.Header().Get(responseRequestIDKey),
		"content-length": w.Header().Get("Content-Length"),
		// Add more fields here.
	}
}
381644
func ExtractAttributesToRetrieve(opts ...interface{}) *opt.AttributesToRetrieveOption {
	for _, o := range opts {
		if v, ok := o.(*opt.AttributesToRetrieveOption); ok {
			return v
		}
	}
	return nil
}
479140
func ExtractMaxValuesPerFacet(opts ...interface{}) *opt.MaxValuesPerFacetOption {
	for _, o := range opts {
		if v, ok := o.(*opt.MaxValuesPerFacetOption); ok {
			return v
		}
	}
	return nil
}
916381
func (o *Subnet) ProxyARPFilters(info *bambou.FetchingInfo) (ProxyARPFiltersList, *bambou.Error) {

	var list ProxyARPFiltersList
	err := bambou.CurrentSession().FetchChildren(o, ProxyARPFilterIdentity, &list, info)
	return list, err
}