// FilterByPlan creates a new Rules by prefiltering on all query rules that are contained in internal
// Rules structures, in other words, query rules from all predefined sources will be applied.
770623
func (qri *Map) FilterByPlan(query string, planid planbuilder.PlanType, tableName string) (newqrs *Rules) {
	qri.mu.Lock()
	defer qri.mu.Unlock()
	newqrs = New()
	for _, rules := range qri.queryRulesMap {
		newqrs.Append(rules.FilterByPlan(query, planid, tableName))
	}
	return newqrs
}
117723
func (api *SubnetAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
1150074
func (api *RegionAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
266522
func (api *PacketFilterAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
898754
func (api *ProductDiskAPI) FilterBy(key string, value interface{}) *ProductDiskAPI {
	api.filterBy(key, value, false)
	return api
}
344941
func FilterByProjects(apps []argoappv1.Application, projects []string) []argoappv1.Application {
	if len(projects) == 0 {
		return apps
	}
	projectsMap := make(map[string]bool)
	for i := range projects {
		projectsMap[projects[i]] = true
	}
	items := make([]argoappv1.Application, 0)
	for i := 0; i < len(apps); i++ {
		a := apps[i]
		if _, ok := projectsMap[a.Spec.GetProject()]; ok {
			items = append(items, a)
		}
	}
	return items

}
334090
func (api *DNSAPI) FilterBy(key string, value interface{}) *DNSAPI {
	api.filterBy(key, value, false)
	return api
}
843997
func (api *DatabaseAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
1088541
func (l Links) FilterByRel(r string) Links {
	links := make(Links, 0)
	for _, link := range l {
		if link.Rel == r {
			links = append(links, link)
		}
	}
	return links
}
174366
func (api *AutoBackupAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
471988
func (api *ProductPrivateHostAPI) FilterBy(key string, value interface{}) *ProductPrivateHostAPI {
	api.filterBy(key, value, false)
	return api
}
193620
func ByType(t Type) Filter {
	return func(a Artifact) bool {
		return a.Type == t
	}
}
314774
func (api *InterfaceAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
1118549
func Filters(filters []Filter) QueryOpt {
	return QueryOpt{func(o *QueryOptions) {
		o.Filters = filters
	}}
}
821784
func (api *CDROMAPI) FilterBy(key string, value interface{}) *CDROMAPI {
	api.filterBy(key, value, false)
	return api
}
796250
func ListByFilters(skip int, filters ...Filter) (callinfos []CallInfo) {
	filters = append(FilterCommons, filters...)
	for {
		var callinfo CallInfo
		var ok bool
		skip++

		if callinfo, ok = retrieveCallInfo(skip); !ok {
			return
		}

		valid, stop := filterAll(callinfo, filters...)
		if valid {
			callinfos = append(callinfos, callinfo)
		}
		if stop {
			return
		}
	}
}
822699
func (api *IPAddressAPI) FilterBy(key string, value interface{}) *IPAddressAPI {
	api.filterBy(key, value, false)
	return api
}