// GetType returns the Type field if it's non-nil, zero value otherwise.
765148
func (g *GitObject) GetType() string {
	if g == nil || g.Type == nil {
		return ""
	}
	return *g.Type
}
599884
func (c *Connect) GetType() (string, error) {
	var err C.virError
	str := C.virConnectGetTypeWrapper(c.ptr, &err)
	if str == nil {
		return "", makeError(&err)
	}
	hypDriver := C.GoString(str)
	return hypDriver, nil
}
330287
func (r Scale_Policy_Action) GetType() (resp datatypes.Scale_Policy_Action_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Scale_Policy_Action", "getType", nil, &r.Options, &resp)
	return
}
372573
func (p *TCompactProtocol) getTType(t tCompactType) (TType, error) {
	switch byte(t) & 0x0f {
	case STOP:
		return STOP, nil
	case COMPACT_BOOLEAN_FALSE:
	case COMPACT_BOOLEAN_TRUE:
		return BOOL, nil
	case COMPACT_BYTE:
		return BYTE, nil
	case COMPACT_I16:
		return I16, nil
	case COMPACT_I32:
		return I32, nil
	case COMPACT_I64:
		return I64, nil
	case COMPACT_DOUBLE:
		return DOUBLE, nil
	case COMPACT_BINARY:
		return STRING, nil
	case COMPACT_LIST:
		return LIST, nil
	case COMPACT_SET:
		return SET, nil
	case COMPACT_MAP:
		return MAP, nil
	case COMPACT_STRUCT:
		return STRUCT, nil
	}
	return STOP, TException(fmt.Errorf("don't know what type: %s", t&0x0f))
}
914477
func (g *Generator) getType(t reflect.Type) string {
	if t.Name() == "" {
		switch t.Kind() {
		case reflect.Ptr:
			return "*" + g.getType(t.Elem())
		case reflect.Slice:
			return "[]" + g.getType(t.Elem())
		case reflect.Array:
			return "[" + strconv.Itoa(t.Len()) + "]" + g.getType(t.Elem())
		case reflect.Map:
			return "map[" + g.getType(t.Key()) + "]" + g.getType(t.Elem())
		}
	}

	if t.Name() == "" || t.PkgPath() == "" {
		if t.Kind() == reflect.Struct {
			// the fields of an anonymous struct can have named types,
			// and t.String() will not be sufficient because it does not
			// remove the package name when it matches g.pkgPath.
			// so we convert by hand
			nf := t.NumField()
			lines := make([]string, 0, nf)
			for i := 0; i < nf; i++ {
				f := t.Field(i)
				var line string
				if !f.Anonymous {
					line = f.Name + " "
				} // else the field is anonymous (an embedded type)
				line += g.getType(f.Type)
				t := f.Tag
				if t != "" {
					line += " " + escapeTag(t)
				}
				lines = append(lines, line)
			}
			return strings.Join([]string{"struct { ", strings.Join(lines, "; "), " }"}, "")
		}
		return t.String()
	} else if t.PkgPath() == g.pkgPath {
		return t.Name()
	}
	return g.pkgAlias(t.PkgPath()) + "." + t.Name()
}
177483
func (r *RepositoryContent) GetType() string {
	if r == nil || r.Type == nil {
		return ""
	}
	return *r.Type
}
1256044
func (s *GetService) Type(typ string) *GetService {
	s.typ = typ
	return s
}
1353641
func (fontFace *FontFace) GetType() FontType {
	ret := FontType(C.cairo_font_face_get_type(fontFace.Ptr))
	if err := fontFace.status(); err != nil {
		panic(err)
	}
	return ret
}
215484
func (i *InitContext) GetByType(t Type) (map[string]*Plugin, error) {
	p, ok := i.plugins.byTypeAndID[t]
	if !ok {
		return nil, errors.Wrapf(errdefs.ErrNotFound, "no plugins registered for %s", t)
	}

	return p, nil
}
266158
func (s *PutMappingService) Type(typ string) *PutMappingService {
	s.typ = typ
	return s
}
840503
func (s *GetMappingService) Type(typ ...string) *GetMappingService {
	s.typ = append(s.typ, typ...)
	return s
}
1049948
func getSchemaType(schema proto.Schema) string {
	if schema == nil {
		return ""
	}
	visitor := &baseSchemaVisitor{}
	schema.Accept(visitor)
	return visitor.Kind
}
367235
func (r *Resource) getResourceType(resourceTypes map[string]ResourceType) (*ResourceType, error) {
	// check if it's specify a resource type to inherit
	if r.Type == nil || r.Type.Name == "" {
		return nil, nil
	}

	// get resource type from array of resource type map
	for k, rt := range resourceTypes {
		if k == r.Type.Name {
			return &rt, nil
		}
	}
	return nil, fmt.Errorf("can't find resource type named :%v", r.Type.Name)
}
735216
func (v *TApplicationException) GetType() (o ExceptionType) {
	if v != nil && v.Type != nil {
		return *v.Type
	}

	return
}
1202758
func (sensor *Sensor) GetType() (typ SensorType) {
	typ = SensorType(C.SDL_SensorGetType((*C.SDL_Sensor)(sensor)))
	return
}
568848
func (v *Function) GetReturnType() (o *Type) {
	if v != nil && v.ReturnType != nil {
		return v.ReturnType
	}

	return
}
1131501
func (r Account_Media) GetType() (resp datatypes.Account_Media_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Account_Media", "getType", nil, &r.Options, &resp)
	return
}