func (b Basic) TypeString() string {
	return b.String()
}
TypeString returns a string representation for the type casting
package scanner
import (
	"fmt"
	"go/ast"
	"strings"
)
type Package struct {
	Resolved bool
	Path     string
	Name     string
	Structs  []*Struct
	Enums    []*Enum
	Funcs    []*Func
	Aliases  map[string]Type
}
func (p *Package) collectEnums(ctx *context) {
	for k := range p.Aliases {
		if vals, ok := ctx.enumValues[k]; ok {
			idx := strings.LastIndex(k, ".")
			name := k[idx+1:]
			if !ctx.shouldGenerateType(name) {
				continue
			}
			hasStringMethod := containsString(ctx.enumWithString, k)
			p.Enums = append(p.Enums, newEnum(ctx, name, vals, hasStringMethod))
			delete(p.Aliases, k)
		}
	}
}
func containsString(arr []string, s string) bool {
	for _, str := range arr {
		if str == s {
			return true
		}
	}
	return false
}
type Type interface {
	fmt.Stringer
	SetRepeated(bool)
	IsRepeated() bool
	SetNullable(bool)
	IsNullable() bool
	TypeString() string
	UnqualifiedName() string
}
type BaseType struct {
	Repeated bool
	Nullable bool
}
func newBaseType() *BaseType {
	return &BaseType{
		Repeated: false,
		Nullable: false,
	}
}
func (t *BaseType) IsRepeated() bool { return t.Repeated }
func (t *BaseType) SetRepeated(v bool) { t.Repeated = v }
func (t *BaseType) IsNullable() bool { return t.Nullable }
func (t *BaseType) SetNullable(v bool) { t.Nullable = v }
func (t *BaseType) TypeString() string { panic("not implemented") }
func (t *BaseType) String() string { panic("not implemented") }
func (t *BaseType) UnqualifiedName() string { panic("not implemented") }
type Basic struct {
	*BaseType
	Name string
}
func NewBasic(name string) Type {
	return &Basic{
		newBaseType(),
		name,
	}
}
func (b Basic) IsNullable() bool { return true }
func (b Basic) String() string {
	return b.Name
}