// tagsFromMapELBv2 returns the tags for the given map of data.
354633
func tagsFromMapELBv2(m map[string]interface{}) []*elbv2.Tag {
	var result []*elbv2.Tag
	for k, v := range m {
		t := &elbv2.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredELBv2(t) {
			result = append(result, t)
		}
	}

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

	return tags
}
1030145
func (o *ListTasksParams) bindTags(rawData []string, hasKey bool, formats strfmt.Registry) error {

	var qvTags string
	if len(rawData) > 0 {
		qvTags = rawData[len(rawData)-1]
	}

	// CollectionFormat:
	tagsIC := swag.SplitByFormat(qvTags, "")
	if len(tagsIC) == 0 {
		return nil
	}

	var tagsIR []string
	for _, tagsIV := range tagsIC {
		tagsI := tagsIV

		tagsIR = append(tagsIR, tagsI)
	}

	o.Tags = tagsIR
	if err := o.validateTags(formats); err != nil {
		return err
	}

	return nil
}
762556
func buildTagSet(name string) map[string]string {
	labelMap := map[string]string{}
	tags := strings.Split(name, ";")
	labelMap["__name__"] = tags[0]
	for _, lbl := range tags[1:] {
		kv := strings.Split(lbl, "=")
		labelMap[kv[0]] = kv[1]
	}
	return labelMap
}
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
}
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),
		},
	}
}
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
}
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
}
82339
func tagsToMapECS(tags []*ecs.Tag) map[string]string {
	tagMap := make(map[string]string)
	for _, tag := range tags {
		if !tagIgnoredECS(tag) {
			tagMap[aws.StringValue(tag.Key)] = aws.StringValue(tag.Value)
		}
	}

	return tagMap
}
449727
func NewTags(m map[string]string) Tags {
	if len(m) == 0 {
		return nil
	}
	a := make(Tags, 0, len(m))
	for k, v := range m {
		a = append(a, NewTag([]byte(k), []byte(v)))
	}
	sort.Sort(a)
	return a
}
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
}
1340993
func tagsToMapDax(ts []*dax.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredDax(t) {
			result[*t.Key] = *t.Value
		}
	}

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

	return result
}
177542
func ec2TagFiltersToMap(list []*codedeploy.EC2TagFilter) []map[string]interface{} {
	result := make([]map[string]interface{}, 0, len(list))
	for _, tf := range list {
		l := make(map[string]interface{})
		if tf.Key != nil && *tf.Key != "" {
			l["key"] = *tf.Key
		}
		if tf.Value != nil && *tf.Value != "" {
			l["value"] = *tf.Value
		}
		if tf.Type != nil && *tf.Type != "" {
			l["type"] = *tf.Type
		}
		result = append(result, l)
	}
	return result
}
509218
func tagsToMap(ts []*ec2.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnored(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
38715
func tagsMapToHash(tags map[string]interface{}) int {
	total := 0
	for k, v := range tags {
		total = total ^ hashcode.String(fmt.Sprintf("%s-%s", k, v))
	}
	return total
}
639468
func tagsFromMapECR(m map[string]interface{}) []*ecr.Tag {
	result := make([]*ecr.Tag, 0, len(m))
	for k, v := range m {
		t := &ecr.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredECR(t) {
			result = append(result, t)
		}
	}

	return result
}