// tagsFromMap returns the tags for the given map of data.
177141
func tagsFromMapS3(m map[string]interface{}) []*s3.Tag {
	result := make([]*s3.Tag, 0, len(m))
	for k, v := range m {
		t := &s3.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredS3(t) {
			result = append(result, t)
		}
	}

	return result
}
109661
func M(m map[string]string) []Tag {
	tags := make([]Tag, 0, len(m))
	for k, v := range m {
		tags = append(tags, T(k, v))
	}
	return tags
}
1220034
func GetTagMappings(cfg interface{}) (Mappings, error) {
	return getTagMappingsRecursive("", reflect.Indirect(reflect.ValueOf(cfg)))
}
251865
func tagsFromMapEFS(m map[string]interface{}) []*efs.Tag {
	var result []*efs.Tag
	for k, v := range m {
		t := &efs.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredEFS(t) {
			result = append(result, t)
		}
	}

	return result
}
655285
func TagsFilter(t map[string]string) Filter {
	j := tagsEncoder(t, false)
	return Param("tags", j)
}
682127
func tagsFromMapKMS(m map[string]interface{}) []*kms.Tag {
	result := make([]*kms.Tag, 0, len(m))
	for k, v := range m {
		t := &kms.Tag{
			TagKey:   aws.String(k),
			TagValue: aws.String(v.(string)),
		}
		if !tagIgnoredKMS(t) {
			result = append(result, t)
		}
	}

	return result
}
232976
func tagsFromMapSfn(tagMap map[string]interface{}) []*sfn.Tag {
	tags := make([]*sfn.Tag, 0, len(tagMap))
	for tagKey, tagValueRaw := range tagMap {
		tag := &sfn.Tag{
			Key:   aws.String(tagKey),
			Value: aws.String(tagValueRaw.(string)),
		}
		if !tagIgnoredSfn(tag) {
			tags = append(tags, tag)
		}
	}

	return tags
}
646735
func tagsFromMapRAM(m map[string]interface{}) []*ram.Tag {
	result := make([]*ram.Tag, 0, len(m))
	for k, v := range m {
		t := &ram.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredRAM(t) {
			result = append(result, t)
		}
	}

	return result
}
591773
func tagsToMapDX(ts []*directconnect.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredDX(t) {
			result[aws.StringValue(t.Key)] = aws.StringValue(t.Value)
		}
	}

	return result
}
1330631
func (a Tags) Map() map[string]string {
	m := make(map[string]string, len(a))
	for _, t := range a {
		m[string(t.Key)] = string(t.Value)
	}
	return m
}
890961
func TagsFor(field reflect.StructField) Tags {
	pTags := Tags{}
	for _, tag := range strings.Fields(tags) {
		if valTag := field.Tag.Get(tag); valTag != "" {
			pTags = append(pTags, Tag{valTag, tag})
		}
	}

	if len(pTags) == 0 {
		pTags = append(pTags, Tag{field.Name, "db"})
	}
	return pTags
}
902094
func tagsToMapEFS(ts []*efs.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredEFS(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
754752
func tagsFromMapElasticsearchService(m map[string]interface{}) []*elasticsearch.Tag {
	var result []*elasticsearch.Tag
	for k, v := range m {
		t := &elasticsearch.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredElasticsearchService(t) {
			result = append(result, t)
		}
	}

	return result
}
1072658
func NewTagStoreFromMap(tags map[string]string) *TagStore {
	t := &TagStore{make([]string, len(tags))}
	i := 0
	for k, v := range tags {
		t.Tags[i] = k + "=" + v
		i++
	}
	return t
}
884879
func tags(x interface{}) map[string]int {
	t := reflect.TypeOf(x)
	if t.Kind() == reflect.Ptr {
		t = t.Elem()
	}
	if t.Kind() != reflect.Struct {
		panic(errors.Errorf("expected struct, not %s", t))
	}

	if tagm := tagsForType[t]; tagm != nil {
		return tagm
	}
	panic(errors.Errorf("%s not found in type table", t))
}
131165
func newTaggedMetricMap(data map[string]interface{}) taggedMetricMap {
	tmm := make(taggedMetricMap)
	for tag, datapoints := range data {
		mm := make(metricMap)
		for _, m := range flatten(datapoints) {
			mm[m.name()] = m.value
		}
		tmm[tag] = mm
	}
	return tmm
}
1273894
func NewMapperTagFunc(tagName string, mapFunc, tagMapFunc func(string) string) *Mapper {
	return &Mapper{
		cache:      make(map[reflect.Type]*StructMap),
		tagName:    tagName,
		mapFunc:    mapFunc,
		tagMapFunc: tagMapFunc,
	}
}