// PATMappers retrieves the list of child PATMappers of the Me
961312
func (o *Me) PATMappers(info *bambou.FetchingInfo) (PATMappersList, *bambou.Error) {

	var list PATMappersList
	err := bambou.CurrentSession().FetchChildren(o, PATMapperIdentity, &list, info)
	return list, err
}
700106
func (o *COSRemarkingPolicyTable) COSRemarkingPolicies(info *bambou.FetchingInfo) (COSRemarkingPoliciesList, *bambou.Error) {

	var list COSRemarkingPoliciesList
	err := bambou.CurrentSession().FetchChildren(o, COSRemarkingPolicyIdentity, &list, info)
	return list, err
}
776016
func (h *healthcheckManager) buildMaps() {
	allChecks := make(map[checkKey]*check)
	for _, vchecks := range h.vserverChecks {
		for k, c := range vchecks {
			if allChecks[k] == nil {
				allChecks[k] = c
			} else {
				log.Warningf("Duplicate key: %v", k)
			}
		}
	}

	h.lock.RLock()
	ids := h.ids
	cfgs := h.cfgs
	checks := h.checks
	h.lock.RUnlock()
	newIDs := make(map[checkKey]healthcheck.Id)
	newCfgs := make(map[healthcheck.Id]*healthcheck.Config)
	newChecks := make(map[healthcheck.Id]*check)

	for key, c := range allChecks {
		id, ok := ids[key]
		if !ok {
			id = h.next
			h.next++
		}

		// Create a new healthcheck configuration if one did not
		// previously exist, or if the check configuration changed.
		cfg, ok := cfgs[id]
		if !ok || *checks[id].healthcheck != *c.healthcheck {
			newCfg, err := h.newConfig(id, key, c.healthcheck)
			if err != nil {
				log.Error(err)
				continue
			}
			cfg = newCfg
		}

		newIDs[key] = id
		newCfgs[id] = cfg
		newChecks[id] = c
	}

	h.lock.Lock()
	h.ids = newIDs
	h.cfgs = newCfgs
	h.checks = newChecks
	h.lock.Unlock()

	h.pruneMarks()
}
974118
func (o *PSNATPool) PTranslationMaps(info *bambou.FetchingInfo) (PTranslationMapsList, *bambou.Error) {

	var list PTranslationMapsList
	err := bambou.CurrentSession().FetchChildren(o, PTranslationMapIdentity, &list, info)
	return list, err
}
403856
func (m MultiRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*RESTMapping, error) {
	var allMappings []*RESTMapping
	var errors []error

	for _, t := range m {
		currMappings, err := t.RESTMappings(gk, versions...)
		// ignore "no match" errors, but any other error percolates back up
		if IsNoMatchError(err) {
			continue
		}
		if err != nil {
			errors = append(errors, err)
			continue
		}
		allMappings = append(allMappings, currMappings...)
	}
	if len(errors) > 0 {
		return nil, utilerrors.NewAggregate(errors)
	}
	if len(allMappings) == 0 {
		return nil, &NoKindMatchError{GroupKind: gk, SearchedVersions: versions}
	}
	return allMappings, nil
}
673963
func mapKeys(f func(string) string, input map[string]interface{}) map[string]interface{} {
	result := make(map[string]interface{})
	for key, value := range input {
		if submap, ok := value.(map[string]interface{}); ok {
			value = mapKeys(f, submap)
		}
		result[f(key)] = value
	}
	return result
}
243803
func SortedKeys(m map[string]interface{}) []string {
	i, sorted := 0, make([]string, len(m))
	for k := range m {
		sorted[i] = k
		i++
	}
	sort.Strings(sorted)
	return sorted
}
1120412
func (s *SetSubnetsInput) SetSubnetMappings(v []*SubnetMapping) *SetSubnetsInput {
	s.SubnetMappings = v
	return s
}
1107638
func (h *Hash) MakeMap(m map[interface{}]interface{}) interface{} {
	hash := reflect.MakeMap(toReflectType(h))
	for key, value := range m {
		hash.SetMapIndex(reflect.ValueOf(key), reflect.ValueOf(value))
	}
	return hash.Interface()
}
1079244
func parseUserAnnotations(flagUserAnnotations *kvMap) types.UserAnnotations {
	if flagUserAnnotations.IsEmpty() {
		return nil
	}
	userAnnotations := make(types.UserAnnotations)
	for k, v := range flagUserAnnotations.mapping {
		userAnnotations[k] = v
	}
	return userAnnotations
}
1058754
func (mi *MemoryIndex) Hashes() []plumbing.Hash {
	hashes := make([]plumbing.Hash, 0, len(mi.indexMap))
	for k := range mi.indexMap {
		hashes = append(hashes, k)
	}
	return hashes
}
503855
func (m *Meta) Pointers(i interface{}, cols ...string) []interface{} {
	ptr := reflects.Ptr(i)
	values := make([]interface{}, len(cols))
	for i, f := range cols {
		if fi := m.fieldMap[f]; fi != nil {
			values[i] = fi.GetPointer(ptr)
		} else {
			var val interface{}
			values[i] = &val
		}
	}
	return values
}
751444
func getMapKeys(m map[string]bool) []string {
	keys := make([]string, 0, len(m))
	for k := range m {
		keys = append(keys, k)
	}
	return keys
}
794737
func StrictMapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error {
	cfg, err := Load(source, others...)
	if err != nil {
		return err
	}
	cfg.NameMapper = mapper
	return cfg.StrictMapTo(v)
}
707960
func stringKeysFromMap(m interface{}) (keys []string) {
	for _, k := range reflect.ValueOf(m).MapKeys() {
		keys = append(keys, k.String())
	}
	return
}
981417
func (um *UserMap) All() []User {
	um.Lock()

	users := make([]User, len(um.Map))
	for _, user := range um.Map {
		users = append(users, user)
	}

	um.Unlock()
	return users
}
536523
func (r *RedisStore) GetMaps(keys []string) (map[string]map[string]interface{}, error) {
	commands, err := r.Pipeline(func(r *RedisStore) error {
		for _, key := range keys {
			r.client.HGetAll(key)
		}
		return nil

	})
	if err != nil {
		return nil, err
	}

	newValues := make(map[string]map[string]interface{}, len(keys))

	for i, key := range keys {
		cmd := commands[i]
		values, _ := cmd.(*redis.StringStringMapCmd).Result()
		if values != nil {
			valueMap := make(map[string]interface{}, len(values))
			for k, v := range values {
				valueMap[k] = v
			}

			newValues[key] = valueMap
		} else {
			newValues[key] = nil
		}
	}

	return newValues, nil
}