// SatisfiedBy returns a slice of PrincipalSets that each of them
// satisfies the policy.
493234
func (isp *inquireableSignaturePolicy) SatisfiedBy() []policies.PrincipalSet {
	rootId := fmt.Sprintf("%d", 0)
	root := graph.NewTreeVertex(rootId, isp.sigPol.Rule)
	computePolicyTree(root)
	var res []policies.PrincipalSet
	for _, perm := range root.ToTree().Permute() {
		principalSet := principalsOfTree(perm, isp.sigPol.Identities)
		if len(principalSet) == 0 {
			return nil
		}
		res = append(res, principalSet)
	}
	return res
}
443424
func (c *BooleanCondition) Fulfills(value interface{}, _ *Request) bool {
	val, ok := value.(bool)

	return ok && val == c.BooleanValue
}
233383
func (api *PrivateHostAPI) 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
}
900345
func (p *propertySet) SatisfiesDistinctProperties(option *structs.Node, tg string) (bool, string) {
	nValue, errorMsg, usedCount := p.UsedCount(option, tg)
	if errorMsg != "" {
		return false, errorMsg
	}
	// The property value has been used but within the number of allowed
	// allocations.
	if usedCount < p.allowedCount {
		return true, ""
	}

	return false, fmt.Sprintf("distinct_property: %s=%s used by %d allocs", p.targetAttribute, nValue, usedCount)
}
283678
func (api *IPv6NetAPI) FilterBy(key string, value interface{}) *IPv6NetAPI {
	api.filterBy(key, value, false)
	return api
}
950030
func (api *ProductLicenseAPI) FilterBy(key string, value interface{}) *ProductLicenseAPI {
	api.filterBy(key, value, false)
	return api
}
904580
func (c *UsersController) DeleteBy(id int64) interface{} {
	wasDel := c.Service.DeleteByID(id)
	if wasDel {
		// return the deleted user's ID
		return map[string]interface{}{"deleted": id}
	}
	// right here we can see that a method function
	// can return any of those two types(map or int),
	// we don't have to specify the return type to a specific type.
	return iris.StatusBadRequest // same as 400.
}
86658
func (e *expectations) Satisfied(namespace, ingressName, name string) {
	e.lock.Lock()
	defer e.lock.Unlock()
	key := queueKey{namespace: namespace, name: ingressName}
	set := e.expect[key]
	set.Delete(name)
	if set.Len() == 0 {
		delete(e.expect, key)
	}
}
765045
func (c *MovieController) DeleteBy(id int64) interface{} {
	wasDel := c.Service.DeleteByID(id)
	if wasDel {
		// return the deleted movie's ID
		return iris.Map{"deleted": id}
	}
	// right here we can see that a method function can return any of those two types(map or int),
	// we don't have to specify the return type to a specific type.
	return iris.StatusBadRequest
}
1253538
func (s *Service) FindBy(ctx context.Context, cluster, db, rp string) (*platform.DBRPMapping, error) {
	return s.loadDBRPMapping(ctx, cluster, db, rp)
}
783091
func (pc *PCCloud) GetZoneByProviderID(ctx context.Context, providerID string) (cloudprovider.Zone, error) {
	return cloudprovider.Zone{}, errors.New("GetZoneByProviderID not implemented")
}
874315
func (api *WebAccelAPI) FilterBy(key string, value interface{}) *WebAccelAPI {
	api.filterBy(key, value, false)
	return api
}
354750
func (version *CompleteVersion) Satisfies(dep *Dependency) bool {
	var cmpMax int8
	var cmpMin int8

	if dep.MaxVer != nil {
		cmpMax = version.cmp(dep.MaxVer)
		if cmpMax == 1 {
			return false
		}

		if cmpMax == 0 && dep.slt {
			return false
		}
	}

	if dep.MinVer != nil {
		if dep.MaxVer == dep.MinVer {
			cmpMin = cmpMax
		} else {
			cmpMin = version.cmp(dep.MinVer)
		}
		if cmpMin == -1 {
			return false
		}

		if cmpMin == 0 && dep.sgt {
			return false
		}
	}

	return true
}
174366
func (api *AutoBackupAPI) SetFilterBy(key string, value interface{}) {
	api.filterBy(key, value, false)
}
707029
func (api *NoteAPI) FilterBy(key string, value interface{}) *NoteAPI {
	api.filterBy(key, value, false)
	return api
}
237547
func (api *MobileGatewayAPI) FilterBy(key string, value interface{}) *MobileGatewayAPI {
	api.filterBy(key, value, false)
	return api
}