// typeName returns the type name of a shape.
501635
func (f paramFiller) typeName(shape *Shape) string {
	if f.prefixPackageName && shape.Type == "structure" {
		return "*" + shape.API.PackageName() + "." + shape.GoTypeElem()
	}
	return shape.GoType()
}
1275954
func (s *CreateResolverInput) SetTypeName(v string) *CreateResolverInput {
	s.TypeName = &v
	return s
}
211140
func (g *Generator) TypeNameWithPackage(obj Object) string {
	return obj.PackageName() + CamelCaseSlice(obj.TypeName())
}
605672
func (s *ThingAttribute) SetThingTypeName(v string) *ThingAttribute {
	s.ThingTypeName = &v
	return s
}
757222
func typeName(typeExpr ast.Expr) (string, error) {
	switch typeExpr := typeExpr.(type) {
	case *ast.StarExpr:
		return typeName(typeExpr.X)
	case *ast.Ident:
		return typeExpr.Name, nil
	default:
		return "", fmt.Errorf("expr %+v is not a type expression", typeExpr)
	}
}
805934
func (s *ListResolversInput) SetTypeName(v string) *ListResolversInput {
	s.TypeName = &v
	return s
}
1355684
func (s *Shape) ErrorName() string {
	name := s.ErrorInfo.Type
	switch s.API.Metadata.Protocol {
	case "query", "ec2query", "rest-xml":
		if len(s.ErrorInfo.Code) > 0 {
			name = s.ErrorInfo.Code
		}
	}

	if len(name) == 0 {
		name = s.OrigShapeName
	}
	if len(name) == 0 {
		name = s.ShapeName
	}

	return name
}
227272
func (g *Generator) Type(typeName string) *toolbox.TypeInfo {
	return g.fileInfo.Type(typeName)
}
1321051
func InvalidTypeName(typeName string) *Validation {
	return &Validation{
		code:    InvalidTypeCode,
		Value:   typeName,
		message: fmt.Sprintf(invalidType, typeName),
	}
}
45134
func (s *DescribeThingTypeOutput) SetThingTypeName(v string) *DescribeThingTypeOutput {
	s.ThingTypeName = &v
	return s
}
601387
func typeName(att *design.AttributeDefinition) (name string) {
	if ut, ok := att.Type.(*design.UserTypeDefinition); ok {
		name = Goify(ut.TypeName, true)
	} else if mt, ok := att.Type.(*design.MediaTypeDefinition); ok {
		name = Goify(mt.TypeName, true)
	}
	return
}
468650
func (r *pluralNamer) Name(t *types.Type) string {
	singular := t.Name.Name
	var plural string
	var ok bool
	if plural, ok = r.exceptions[singular]; ok {
		return r.finalize(plural)
	}
	if len(singular) < 2 {
		return r.finalize(singular)
	}

	switch rune(singular[len(singular)-1]) {
	case 's', 'x', 'z':
		plural = esPlural(singular)
	case 'y':
		sl := rune(singular[len(singular)-2])
		if isConsonant(sl) {
			plural = iesPlural(singular)
		} else {
			plural = sPlural(singular)
		}
	case 'h':
		sl := rune(singular[len(singular)-2])
		if sl == 'c' || sl == 's' {
			plural = esPlural(singular)
		} else {
			plural = sPlural(singular)
		}
	case 'e':
		sl := rune(singular[len(singular)-2])
		if sl == 'f' {
			plural = vesPlural(singular[:len(singular)-1])
		} else {
			plural = sPlural(singular)
		}
	case 'f':
		plural = vesPlural(singular)
	default:
		plural = sPlural(singular)
	}
	return r.finalize(plural)
}
824517
func InsertName(tname string, i interface{}) {
	t := reflect.ValueOf(i).Type()
	if _, found := typemap[tname]; !found {
		typemap[tname] = t
	}
}
360709
func (w *WebService) TypeNameHandler(handler TypeNameHandleFunction) *WebService {
	w.typeNameHandleFunc = handler
	return w
}
58579
func (tl TypeLoader) SchemaName(args *ArgType) (string, error) {
	if tl.Schema != nil {
		return tl.Schema(args)
	}

	return "", nil
}
425152
func TypeString(str string) {
	cstr := C.CString(str)
	C.type_string(cstr)

	C.free(unsafe.Pointer(cstr))
}
317627
func TypeByFilename(fullFilename string) string {
	ext := filepath.Ext(fullFilename)
	return TypeByExtension(ext)
}