// FilterByCap query the plugin for a given capability.
502942
func (p *Plugin) FilterByCap(capability string) (*Plugin, error) {
	capability = strings.ToLower(capability)
	for _, typ := range p.PluginObj.Config.Interface.Types {
		if typ.Capability == capability && typ.Prefix == "docker" {
			return p, nil
		}
	}
	return nil, ErrInadequateCapability{capability}
}
837339
func (api *ZoneAPI) FilterBy(key string, value interface{}) *ZoneAPI {
	api.filterBy(key, value, false)
	return api
}
1062757
func (api *ArchiveAPI) FilterBy(key string, value interface{}) *ArchiveAPI {
	api.filterBy(key, value, false)
	return api
}
34816
func (sas SockAddrs) FilterByType(type_ SockAddrType) (matched, excluded SockAddrs) {
	matched = make(SockAddrs, 0, len(sas))
	excluded = make(SockAddrs, 0, len(sas))

	for _, sa := range sas {
		if sa.Type()&type_ != 0 {
			matched = append(matched, sa)
		} else {
			excluded = append(excluded, sa)
		}
	}
	return matched, excluded
}
707029
func (api *NoteAPI) FilterBy(key string, value interface{}) *NoteAPI {
	api.filterBy(key, value, false)
	return api
}
806054
func (c *Container) Filter(filter FilterFunction) {
	c.containerFilters = append(c.containerFilters, filter)
}
597039
func (api *SIMAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
1222357
func (p *aeDatastoreAdminOperationQueryProperty) Filter(op string, value interface{}) *aeDatastoreAdminOperationQueryBuilder {
	switch op {
	case "<=":
		p.LessThanOrEqual(value)
	case ">=":
		p.GreaterThanOrEqual(value)
	case "<":
		p.LessThan(value)
	case ">":
		p.GreaterThan(value)
	case "=":
		p.Equal(value)
	default:
		p.bldr.q = p.bldr.q.Filter(p.name+" "+op, value) // error raised by native query
	}
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, op, value)
	}
	return p.bldr
}
877404
func (api *ProxyLBAPI) FilterBy(key string, value interface{}) *ProxyLBAPI {
	api.filterBy(key, value, false)
	return api
}
767767
func (p *SampleQueryProperty) Filter(op string, value interface{}) *SampleQueryBuilder {
	switch op {
	case "<=":
		p.LessThanOrEqual(value)
	case ">=":
		p.GreaterThanOrEqual(value)
	case "<":
		p.LessThan(value)
	case ">":
		p.GreaterThan(value)
	case "=":
		p.Equal(value)
	default:
		p.bldr.q = p.bldr.q.Filter(p.name+" "+op, value) // error raised by native query
	}
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, op, value)
	}
	return p.bldr
}
433483
func (api *PrivateHostAPI) FilterBy(key string, value interface{}) *PrivateHostAPI {
	api.filterBy(key, value, false)
	return api
}
1196190
func (api *SubnetAPI) FilterBy(key string, value interface{}) *SubnetAPI {
	api.filterBy(key, value, false)
	return api
}
1091720
func (api *SSHKeyAPI) FilterBy(key string, value interface{}) *SSHKeyAPI {
	api.filterBy(key, value, false)
	return api
}
322695
func (api *IconAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
334090
func (api *DNSAPI) FilterBy(key string, value interface{}) *DNSAPI {
	api.filterBy(key, value, false)
	return api
}
1271664
func (api *LicenseAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
76179
func (p *fooBarQueryProperty) Filter(op string, value interface{}) *fooBarQueryBuilder {
	switch op {
	case "<=":
		p.LessThanOrEqual(value)
	case ">=":
		p.GreaterThanOrEqual(value)
	case "<":
		p.LessThan(value)
	case ">":
		p.GreaterThan(value)
	case "=":
		p.Equal(value)
	default:
		p.bldr.q = p.bldr.q.Filter(p.name+" "+op, value) // error raised by native query
	}
	if p.bldr.plugin != nil {
		p.bldr.plugin.Filter(p.name, op, value)
	}
	return p.bldr
}