// tagsFromMap returns the tags for the given map of data.
340982
func tagsFromMapDX(m map[string]interface{}) []*directconnect.Tag {
	result := make([]*directconnect.Tag, 0, len(m))
	for k, v := range m {
		t := &directconnect.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredDX(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
}
646686
func TagsDeep(obj interface{}, key string) (map[string]string, error) {
	return tags(obj, key, true)
}
1358707
func tagsFromMapTransfer(m map[string]interface{}) []*transfer.Tag {
	result := make([]*transfer.Tag, 0, len(m))
	for k, v := range m {
		t := &transfer.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredTransfer(t) {
			result = append(result, t)
		}
	}

	return result
}
1228391
func tagsFromMapDynamoDb(m map[string]interface{}) []*dynamodb.Tag {
	result := make([]*dynamodb.Tag, 0, len(m))
	for k, v := range m {
		t := &dynamodb.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		result = append(result, t)
	}
	return result
}
456025
func ec2TagSpecificationsFromMap(m map[string]interface{}, t string) []*ec2.TagSpecification {
	if len(m) == 0 {
		return nil
	}

	return []*ec2.TagSpecification{
		{
			ResourceType: aws.String(t),
			Tags:         tagsFromMap(m),
		},
	}
}
1255179
func ParseTagSliceToMap(tags []string) map[string]string {
	mappedTags := make(map[string]string)
	for _, tag := range tags {
		splt := strings.SplitN(tag, ":", 2)
		if len(splt) < 2 {
			mappedTags[splt[0]] = ""
		} else {
			mappedTags[splt[0]] = splt[1]
		}
	}
	return mappedTags
}
1168739
func (t *awsTagging) initFromTags(tags []*ec2.Tag) error {
	legacyClusterID, newClusterID, err := findClusterIDs(tags)
	if err != nil {
		return err
	}

	if legacyClusterID == "" && newClusterID == "" {
		glog.Errorf("Tag %q nor %q not found; Kubernetes may behave unexpectedly.", TagNameKubernetesClusterLegacy, TagNameKubernetesClusterPrefix+"...")
	}

	return t.init(legacyClusterID, newClusterID)
}
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,
	}
}
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
}
1003996
func tagsFromMapEC(m map[string]interface{}) []*elasticache.Tag {
	result := make([]*elasticache.Tag, 0, len(m))
	for k, v := range m {
		t := &elasticache.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredEC(t) {
			result = append(result, t)
		}
	}

	return result
}
536119
func tagsToMapCloudWatch(ts []*cloudwatch.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredCloudWatch(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
734236
func tagsFromMapRoute53Resolver(m map[string]interface{}) []*route53resolver.Tag {
	result := make([]*route53resolver.Tag, 0, len(m))
	for k, v := range m {
		t := &route53resolver.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredRoute53Resolver(t) {
			result = append(result, t)
		}
	}

	return result
}
669203
func tagsFromMapSSM(m map[string]interface{}) []*ssm.Tag {
	result := make([]*ssm.Tag, 0, len(m))
	for k, v := range m {
		t := &ssm.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredSSM(t) {
			result = append(result, t)
		}
	}

	return result
}
382160
func tagsToMapSfn(tags []*sfn.Tag) map[string]string {
	tagMap := make(map[string]string)
	for _, tag := range tags {
		if !tagIgnoredSfn(tag) {
			tagMap[aws.StringValue(tag.Key)] = aws.StringValue(tag.Value)
		}
	}

	return tagMap
}
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
}
593097
func tagsFromMapDocDB(m map[string]interface{}) []*docdb.Tag {
	result := make([]*docdb.Tag, 0, len(m))
	for k, v := range m {
		t := &docdb.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredDocDB(t) {
			result = append(result, t)
		}
	}

	return result
}