// GoType returns the Go representation for a protocol type.
437103
func (at AnyType) GoType(pkg string, d Domain) string {
	switch at.getType() {
	case "any":
		return "json.RawMessage"
	case "boolean":
		return "bool"
	case "string":
		return "string"
	case "number":
		return "float64"
	case "integer":
		return "int"
	case "object":
		return "struct"
	case "array":
		return "[]" + at.Items.GoType(pkg, d)
	case "reference":
		return at.refType(d)
	case "time":
		return "time.Time"
	case "enum":
		// Enums are handled specially.
		return "enum"
	case "base64":
		// By using a []byte here, Base64-encoded images are
		// automatically decoded by json.Unmarshal.
		return "[]byte"
	case "raw":
		// Special []byte, without bas64 decoding.
		return "RawMessage"
	default:
		log.Panicf("unhandled type: %#v", at)
	}

	panic("unreachable")
}
497270
func (fixedHeader FixedHeader) ptype() (byte, error) {
	// Check the length of the fixed header.
	if len(fixedHeader) < 1 {
		return 0x00, ErrInvalidFixedHeaderLen
	}

	// Extract the MQTT Control Packet type from
	// the fixed header and return it.
	return fixedHeader[0] >> 4, nil
}
412564
func (c *Contributor) GetType() string {
	if c == nil || c.Type == nil {
		return ""
	}
	return *c.Type
}
311687
func (p *Packet) GetUDPType() byte {
	// Every UDP control packet has a 20 byte packet signature. The
	// first 2 bytes represent the following control information.
	// Byte 0 : Bits 0,1 are reserved fields.
	//          Bits 2,3,4 represent version information.
	//          Bits 5,6 represent udp packet type,
	//          Bit 7 represents encryption. (currently unused).
	// Byte 1: reserved for future use.
	// Bytes [2:20]: Packet signature.
	return GetUDPTypeFromBuffer(p.ipHdr.Buffer[p.ipHdr.ipHeaderLen:])
}
1069712
func (c *TsColumnDescription) GetType() string {
	return riak_ts.TsColumnType_name[int32(c.column.GetType())]
}
374070
func (s *PercolateService) Type(typ string) *PercolateService {
	s.typ = typ
	return s
}
806005
func (d *Domain) GetOSType() (string, error) {
	var err C.virError
	ret := C.virDomainGetOSTypeWrapper(d.ptr, &err)
	if ret == nil {
		return "", makeError(&err)
	}

	defer C.free(unsafe.Pointer(ret))

	return C.GoString(ret), nil
}
1274792
func (tmpl *Template) GetType() TemplateType {
	if tmpl.Container != nil {
		return TemplateTypeContainer
	}
	if tmpl.Steps != nil {
		return TemplateTypeSteps
	}
	if tmpl.DAG != nil {
		return TemplateTypeDAG
	}
	if tmpl.Script != nil {
		return TemplateTypeScript
	}
	if tmpl.Resource != nil {
		return TemplateTypeResource
	}
	if tmpl.Suspend != nil {
		return TemplateTypeSuspend
	}
	return "Unknown"
}
703117
func (ctx *Context) Type(str string) {
	ctx.Res.Set(HeaderContentType, str)
}
1009788
func (n *NotificationSubject) GetType() string {
	if n == nil || n.Type == nil {
		return ""
	}
	return *n.Type
}
223594
func (device *Device) GetType() DeviceType {
	ret := DeviceType(C.cairo_device_get_type(device.Ptr))
	if err := device.status(); err != nil {
		panic(err)
	}
	return ret
}
1183852
func GoTypeDesc(t design.DataType, upper bool) string {
	switch actual := t.(type) {
	case *design.UserTypeDefinition:
		if actual.Description != "" {
			return strings.Replace(actual.Description, "\n", "\n// ", -1)
		}

		return Goify(actual.TypeName, upper) + " user type."
	case *design.MediaTypeDefinition:
		if actual.Description != "" {
			return strings.Replace(actual.Description, "\n", "\n// ", -1)
		}
		name := Goify(actual.TypeName, upper)
		if actual.View != "default" {
			name += Goify(actual.View, true)
		}

		switch elem := actual.UserTypeDefinition.AttributeDefinition.Type.(type) {
		case *design.Array:
			elemName := GoTypeName(elem.ElemType.Type, nil, 0, !upper)
			if actual.View != "default" {
				elemName += Goify(actual.View, true)
			}
			return fmt.Sprintf("%s media type is a collection of %s.", name, elemName)
		default:
			return name + " media type."
		}
	default:
		return ""
	}
}
553440
func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.IsType(t, expectedType, object, msgAndArgs...) {
		return
	}
	t.FailNow()
}
1244095
func (_class VGPUClass) GetType(sessionID SessionRef, self VGPURef) (_retval VGPUTypeRef, _err error) {
	_method := "VGPU.get_type"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVGPURefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVGPUTypeRefToGo(_method + " -> ", _result.Value)
	return
}
916716
func (s *DeleteService) Type(typ string) *DeleteService {
	s.typ = typ
	return s
}
11056
func (f *FeedLink) GetType() string {
	if f == nil || f.Type == nil {
		return ""
	}
	return *f.Type
}
517535
func (ref *ShapeRef) GoTypeElem() string {
	if ref.Shape == nil {
		panic(fmt.Errorf("missing shape definition on reference for %#v", ref))
	}

	return ref.Shape.GoTypeElem()
}