// Code generated by smithy-go-codegen DO NOT EDIT.

package types

import (
	"github.com/aws/aws-sdk-go-v2/internal/protocoltest/restxml/schemas"
	smithy "github.com/aws/smithy-go"
	"time"
)

func serializeUnionPayload(s smithy.ShapeSerializer, schema *smithy.Schema, v UnionPayload) {
	switch vv := v.(type) {
	case *UnionPayloadMemberGreeting:
		s.WriteUnion(schema, schemas.UnionPayload_greeting)
		s.WriteString(schemas.UnionPayload_greeting, vv.Value)
		s.CloseUnion()
	}
}

func serializeXmlUnionShape(s smithy.ShapeSerializer, schema *smithy.Schema, v XmlUnionShape) {
	switch vv := v.(type) {
	case *XmlUnionShapeMemberBooleanValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_booleanValue)
		s.WriteBool(schemas.XmlUnionShape_booleanValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberByteValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_byteValue)
		s.WriteInt8(schemas.XmlUnionShape_byteValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberDoubleValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_doubleValue)
		s.WriteFloat64(schemas.XmlUnionShape_doubleValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberFloatValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_floatValue)
		s.WriteFloat32(schemas.XmlUnionShape_floatValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberIntegerValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_integerValue)
		s.WriteInt32(schemas.XmlUnionShape_integerValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberLongValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_longValue)
		s.WriteInt64(schemas.XmlUnionShape_longValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberShortValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_shortValue)
		s.WriteInt16(schemas.XmlUnionShape_shortValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberStringValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_stringValue)
		s.WriteString(schemas.XmlUnionShape_stringValue, vv.Value)
		s.CloseUnion()
	case *XmlUnionShapeMemberStructValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_structValue)
		s.WriteStruct(schemas.XmlUnionShape_structValue)
		vv.Value.SerializeMembers(s)
		s.CloseStruct()
		s.CloseUnion()
	case *XmlUnionShapeMemberUnionValue:
		s.WriteUnion(schema, schemas.XmlUnionShape_unionValue)
		serializeXmlUnionShape(s, schemas.XmlUnionShape_unionValue, vv.Value)
		s.CloseUnion()
	}
}

func deserializeUnionPayload(d smithy.ShapeDeserializer, s *smithy.Schema, v *UnionPayload) error {
	return smithy.ReadUnion(d, s, func(ms *smithy.Schema) error {
		switch ms {
		case schemas.UnionPayload_greeting:
			vv := &UnionPayloadMemberGreeting{}
			*v = vv
			return vv.Deserialize(d)
		}
		return nil
	})
}

func deserializeXmlUnionShape(d smithy.ShapeDeserializer, s *smithy.Schema, v *XmlUnionShape) error {
	return smithy.ReadUnion(d, s, func(ms *smithy.Schema) error {
		switch ms {
		case schemas.XmlUnionShape_booleanValue:
			vv := &XmlUnionShapeMemberBooleanValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_byteValue:
			vv := &XmlUnionShapeMemberByteValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_doubleValue:
			vv := &XmlUnionShapeMemberDoubleValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_floatValue:
			vv := &XmlUnionShapeMemberFloatValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_integerValue:
			vv := &XmlUnionShapeMemberIntegerValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_longValue:
			vv := &XmlUnionShapeMemberLongValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_shortValue:
			vv := &XmlUnionShapeMemberShortValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_stringValue:
			vv := &XmlUnionShapeMemberStringValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_structValue:
			vv := &XmlUnionShapeMemberStructValue{}
			*v = vv
			return vv.Deserialize(d)
		case schemas.XmlUnionShape_unionValue:
			vv := &XmlUnionShapeMemberUnionValue{}
			*v = vv
			return vv.Deserialize(d)
		}
		return nil
	})
}

func serializeListWithMemberNamespace(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeListWithNamespace(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeRenamedListMembers(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeStructureList(s smithy.ShapeSerializer, schema *smithy.Schema, v []StructureListMember) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteStruct(schema.ListMember())
		vv.SerializeMembers(s)
		s.CloseStruct()
	}
	s.CloseList()
}

func serializeXmlNamespacedList(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeBooleanList(s smithy.ShapeSerializer, schema *smithy.Schema, v []bool) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteBool(schema.ListMember(), vv)
	}
	s.CloseList()
}

func serializeDoubleList(s smithy.ShapeSerializer, schema *smithy.Schema, v []float64) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteFloat64(schema.ListMember(), vv)
	}
	s.CloseList()
}

func serializeFooEnumList(s smithy.ShapeSerializer, schema *smithy.Schema, v []FooEnum) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeFooEnumSet(s smithy.ShapeSerializer, schema *smithy.Schema, v []FooEnum) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeIntegerEnumList(s smithy.ShapeSerializer, schema *smithy.Schema, v []IntegerEnum) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteInt32(schema.ListMember(), int32(vv))
	}
	s.CloseList()
}

func serializeIntegerEnumSet(s smithy.ShapeSerializer, schema *smithy.Schema, v []IntegerEnum) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteInt32(schema.ListMember(), int32(vv))
	}
	s.CloseList()
}

func serializeIntegerList(s smithy.ShapeSerializer, schema *smithy.Schema, v []int32) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteInt32(schema.ListMember(), int32(vv))
	}
	s.CloseList()
}

func serializeIntegerSet(s smithy.ShapeSerializer, schema *smithy.Schema, v []int32) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteInt32(schema.ListMember(), int32(vv))
	}
	s.CloseList()
}

func serializeNestedStringList(s smithy.ShapeSerializer, schema *smithy.Schema, v [][]string) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		serializeStringList(s, schema.ListMember(), vv)
	}
	s.CloseList()
}

func serializeStringList(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeStringSet(s smithy.ShapeSerializer, schema *smithy.Schema, v []string) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteString(schema.ListMember(), string(vv))
	}
	s.CloseList()
}

func serializeTimestampList(s smithy.ShapeSerializer, schema *smithy.Schema, v []time.Time) {
	if v == nil {
		return
	}
	s.WriteList(schema)
	for _, vv := range v {
		s.WriteTime(schema.ListMember(), vv)
	}
	s.CloseList()
}

func deserializeListWithMemberNamespace(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeListWithNamespace(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeRenamedListMembers(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeStructureList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]StructureListMember) error {
	var vv StructureListMember
	return smithy.ReadList(d, s, func() error {
		vv = StructureListMember{}
		if err := vv.Deserialize(d); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeXmlNamespacedList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeBooleanList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]bool) error {
	var vv bool
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadBool(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeDoubleList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]float64) error {
	var vv float64
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadFloat64(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeFooEnumList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]FooEnum) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, FooEnum(vv))
		return nil
	})
}

func deserializeFooEnumSet(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]FooEnum) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, FooEnum(vv))
		return nil
	})
}

func deserializeIntegerEnumList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]IntegerEnum) error {
	var vv int32
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadInt32(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeIntegerEnumSet(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]IntegerEnum) error {
	var vv int32
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadInt32(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeIntegerList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]int32) error {
	var vv int32
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadInt32(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeIntegerSet(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]int32) error {
	var vv int32
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadInt32(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeNestedStringList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[][]string) error {
	var vv []string
	return smithy.ReadList(d, s, func() error {
		vv = nil
		if err := deserializeStringList(d, s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeStringList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeStringSet(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]string) error {
	var vv string
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadString(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func deserializeTimestampList(d smithy.ShapeDeserializer, s *smithy.Schema, v *[]time.Time) error {
	var vv time.Time
	return smithy.ReadList(d, s, func() error {

		if err := d.ReadTime(s.ListMember(), &vv); err != nil {
			return err
		}

		*v = append(*v, vv)
		return nil
	})
}

func serializeFlattenedXmlMapWithXmlNameInputOutputMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteString(schema.MapValue(), string(vv))
	}
	s.CloseMap()
}

func serializeFlattenedXmlMapWithXmlNamespaceOutputMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteString(schema.MapValue(), string(vv))
	}
	s.CloseMap()
}

func serializeFooPrefixHeaders(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteString(schema.MapValue(), string(vv))
	}
	s.CloseMap()
}

func serializeNestedMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]map[string]FooEnum) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		serializeFooEnumMap(s, schema.MapValue(), vv)
	}
	s.CloseMap()
}

func serializeNestedXmlMapWithXmlNameInnerMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteString(schema.MapValue(), string(vv))
	}
	s.CloseMap()
}

func serializeNestedXmlMapWithXmlNameMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]map[string]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		serializeNestedXmlMapWithXmlNameInnerMap(s, schema.MapValue(), vv)
	}
	s.CloseMap()
}

func serializeXmlMapsInputOutputMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]GreetingStruct) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteStruct(schema.MapValue())
		vv.SerializeMembers(s)
		s.CloseStruct()
	}
	s.CloseMap()
}

func serializeXmlMapsXmlNameInputOutputMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]GreetingStruct) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteStruct(schema.MapValue())
		vv.SerializeMembers(s)
		s.CloseStruct()
	}
	s.CloseMap()
}

func serializeXmlMapWithXmlNamespaceInputOutputMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteString(schema.MapValue(), string(vv))
	}
	s.CloseMap()
}

func serializeFooEnumMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]FooEnum) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteString(schema.MapValue(), string(vv))
	}
	s.CloseMap()
}

func serializeIntegerEnumMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]IntegerEnum) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteInt32(schema.MapValue(), int32(vv))
	}
	s.CloseMap()
}

func serializeStringListMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string][]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		serializeStringList(s, schema.MapValue(), vv)
	}
	s.CloseMap()
}

func serializeStringMap(s smithy.ShapeSerializer, schema *smithy.Schema, v map[string]string) {
	if v == nil {
		return
	}
	s.WriteMap(schema)
	for k, vv := range v {
		s.WriteKey(schema.MapKey(), k)
		s.WriteString(schema.MapValue(), string(vv))
	}
	s.CloseMap()
}

func deserializeFlattenedXmlMapWithXmlNameInputOutputMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error {
	*v = make(map[string]string)
	var vv string
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadString(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeFlattenedXmlMapWithXmlNamespaceOutputMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error {
	*v = make(map[string]string)
	var vv string
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadString(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeFooPrefixHeaders(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error {
	*v = make(map[string]string)
	var vv string
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadString(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeNestedMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]map[string]FooEnum) error {
	*v = make(map[string]map[string]FooEnum)
	var vv map[string]FooEnum
	return smithy.ReadMap(d, s, func(k string) error {
		vv = nil
		if err := deserializeFooEnumMap(d, s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeNestedXmlMapWithXmlNameInnerMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error {
	*v = make(map[string]string)
	var vv string
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadString(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeNestedXmlMapWithXmlNameMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]map[string]string) error {
	*v = make(map[string]map[string]string)
	var vv map[string]string
	return smithy.ReadMap(d, s, func(k string) error {
		vv = nil
		if err := deserializeNestedXmlMapWithXmlNameInnerMap(d, s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeXmlMapsInputOutputMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]GreetingStruct) error {
	*v = make(map[string]GreetingStruct)
	var vv GreetingStruct
	return smithy.ReadMap(d, s, func(k string) error {
		vv = GreetingStruct{}
		if err := vv.Deserialize(d); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeXmlMapsXmlNameInputOutputMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]GreetingStruct) error {
	*v = make(map[string]GreetingStruct)
	var vv GreetingStruct
	return smithy.ReadMap(d, s, func(k string) error {
		vv = GreetingStruct{}
		if err := vv.Deserialize(d); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeXmlMapWithXmlNamespaceInputOutputMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error {
	*v = make(map[string]string)
	var vv string
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadString(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeFooEnumMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]FooEnum) error {
	*v = make(map[string]FooEnum)
	var vv string
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadString(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = FooEnum(vv)
		return nil
	})
}

func deserializeIntegerEnumMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]IntegerEnum) error {
	*v = make(map[string]IntegerEnum)
	var vv int32
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadInt32(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeStringListMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string][]string) error {
	*v = make(map[string][]string)
	var vv []string
	return smithy.ReadMap(d, s, func(k string) error {
		vv = nil
		if err := deserializeStringList(d, s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}

func deserializeStringMap(d smithy.ShapeDeserializer, s *smithy.Schema, v *map[string]string) error {
	*v = make(map[string]string)
	var vv string
	return smithy.ReadMap(d, s, func(k string) error {

		if err := d.ReadString(s.MapValue(), &vv); err != nil {
			return err
		}

		(*v)[k] = vv
		return nil
	})
}
