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

	return result
}
1279769
func HeadersFromMap(m map[string]string) Headers {
	if len(m) == 0 {
		return Headers{}
	}
	headers := NewHeadersWithCapacity(len(m))
	for k, v := range m {
		headers = headers.With(k, v)
	}
	return headers
}
665931
func tagsFromMapKinesisFirehose(m map[string]interface{}) []*firehose.Tag {
	result := make([]*firehose.Tag, 0, len(m))
	for k, v := range m {
		t := &firehose.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredKinesisFirehose(t) {
			result = append(result, t)
		}
	}

	return result
}
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
}
527268
func (o *FindParams) bindTags(rawData []string, hasKey bool, formats strfmt.Registry) error {
	if !hasKey {
		return errors.Required("tags", "formData")
	}

	// CollectionFormat: multi
	tagsIC := rawData

	if len(tagsIC) == 0 {
		return nil
	}

	var tagsIR []int32
	for i, tagsIV := range tagsIC {
		// items.Format: "int32"
		tagsI, err := swag.ConvertInt32(tagsIV)
		if err != nil {
			return errors.InvalidType(fmt.Sprintf("%s.%v", "tags", i), "formData", "int32", tagsI)
		}

		tagsIR = append(tagsIR, tagsI)
	}

	o.Tags = tagsIR

	return nil
}
139789
func (r *Reference) Tags(fn func(t Tag, value string)) {
	if fn == nil {
		return
	}
	fn(refNameTag, r.Name())
	fn(refLengthTag, fmt.Sprint(r.lRef))
	if r.assemID != "" {
		fn(assemblyIDTag, r.assemID)
	}
	if r.md5 != "" {
		fn(md5Tag, fmt.Sprintf("%x", []byte(r.md5)))
	}
	if r.species != "" {
		fn(speciesTag, r.species)
	}
	if r.uri != nil {
		fn(uriTag, r.uri.String())
	}
	for _, tp := range r.otherTags {
		fn(tp.tag, tp.value)
	}
}
593461
func autoscalingTagsFromMap(m map[string]interface{}, resourceID string) ([]*autoscaling.Tag, error) {
	result := make([]*autoscaling.Tag, 0, len(m))
	for _, v := range m {
		attr, ok := v.(map[string]interface{})
		if !ok {
			continue
		}

		t, err := autoscalingTagFromMap(attr, resourceID)
		if err != nil {
			return nil, err
		}

		if t != nil {
			result = append(result, t)
		}
	}

	return result, nil
}
1220034
func GetTagMappings(cfg interface{}) (Mappings, error) {
	return getTagMappingsRecursive("", reflect.Indirect(reflect.ValueOf(cfg)))
}
379400
func tagsToMapS3(ts []*s3.Tag) map[string]string {
	result := make(map[string]string)
	for _, t := range ts {
		if !tagIgnoredS3(t) {
			result[*t.Key] = *t.Value
		}
	}

	return result
}
310526
func Tags(tags map[string]string) SpanOption {
	return func(t *Tracer, s *spanImpl) {
		for k, v := range tags {
			s.Tags[k] = v
		}
	}
}
703266
func tagsFromMapKinesis(m map[string]interface{}) []*kinesis.Tag {
	var result []*kinesis.Tag
	for k, v := range m {
		t := &kinesis.Tag{
			Key:   aws.String(k),
			Value: aws.String(v.(string)),
		}
		if !tagIgnoredKinesis(t) {
			result = append(result, t)
		}
	}

	return result
}
43196
func structFromMap(m map[string]string) *structpb.Struct {
	out := &structpb.Struct{
		Fields: make(map[string]*structpb.Value, len(m)),
	}
	for k, v := range m {
		out.Fields[k] = &structpb.Value{
			Kind: &structpb.Value_StringValue{StringValue: v},
		}
	}
	return out
}
607228
func (r *RepositoryService) ListTags(repo string, auth Authenticator) (TagMap, error) {
	path := fmt.Sprintf("repositories/%s/tags", repo)
	req, err := r.client.newRequest("GET", path, auth, nil)
	if err != nil {
		return nil, err
	}

	tags := TagMap{}
	_, err = r.client.do(req, &tags)
	if err != nil {
		return nil, err
	}

	return tags, nil
}
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
}
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
}
1104430
func tagMapFromProperties(props ds.PropertySlice) (TagMap, error) {
	tm := TagMap{}
	lme := errors.NewLazyMultiError(len(props))
	for idx, prop := range props {
		v, ok := prop.Value().(string)
		if !ok {
			lme.Assign(idx, fmt.Errorf("property is not a string (%T)", prop.Value()))
			continue
		}
		e, err := decodeKey(v)
		if err != nil {
			lme.Assign(idx, fmt.Errorf("failed to decode property (%q): %s", v, err))
			continue
		}

		parts := strings.SplitN(e, "=", 2)
		if len(parts) != 2 {
			// This is a presence entry. Ignore.
			continue
		}
		k, v := parts[0], parts[1]

		if err := types.ValidateTag(k, v); err != nil {
			lme.Assign(idx, fmt.Errorf("invalid tag %q: %s", parts[0], err))
			continue
		}
		tm[k] = v
	}

	if len(tm) == 0 {
		tm = nil
	}
	return tm, lme.Get()
}
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
}