// GetType returns the type of datastore
504573
func (ds *Datastore) GetType(ctx context.Context) (string, error) {
	var dsMo mo.Datastore
	pc := property.DefaultCollector(ds.Client())
	err := pc.RetrieveOne(ctx, ds.Datastore.Reference(), []string{"summary"}, &dsMo)
	if err != nil {
		klog.Errorf("Failed to retrieve datastore summary property. err: %v", err)
		return "", err
	}
	return dsMo.Summary.Type, nil
}
1138217
func (p *Packfile) GetByType(typ plumbing.ObjectType) (storer.EncodedObjectIter, error) {
	switch typ {
	case plumbing.AnyObject,
		plumbing.BlobObject,
		plumbing.TreeObject,
		plumbing.CommitObject,
		plumbing.TagObject:
		entries, err := p.EntriesByOffset()
		if err != nil {
			return nil, err
		}

		return &objectIter{
			// Easiest way to provide an object decoder is just to pass a Packfile
			// instance. To not mess with the seeks, it's a new instance with a
			// different scanner but the same cache and offset to hash map for
			// reusing as much cache as possible.
			p:    p,
			iter: entries,
			typ:  typ,
		}, nil
	default:
		return nil, plumbing.ErrInvalidType
	}
}
840319
func GetKeyType(typename string) (keytype KeyType) {
	switch {
	case typename == "none":
		keytype = RT_NONE
	case typename == "string":
		keytype = RT_STRING
	case typename == "list":
		keytype = RT_LIST
	case typename == "set":
		keytype = RT_SET
	case typename == "zset":
		keytype = RT_ZSET
	default:
		panic("BUG - unknown type: " + string(keytype))
	}
	return
}
42753
func (af *avgFunction) GetType() *types.FieldType {
	ft := types.NewFieldType(mysql.TypeNewDecimal)
	ft.Charset = charset.CharsetBin
	ft.Collate = charset.CollationBin
	ft.Decimal = af.Args[0].GetType().Decimal
	return ft
}
1094730
func (q *Query) GetType() QueryType {
	if q.GetCcQuery() != nil {
		return ChaincodeQueryType
	}
	if q.GetConfigQuery() != nil {
		return ConfigQueryType
	}
	if q.GetPeerQuery() != nil {
		return PeerMembershipQueryType
	}
	if q.GetLocalPeers() != nil {
		return LocalMembershipQueryType
	}
	return InvalidQueryType
}
1190565
func (e *Element) GetNodeType() (int, error) {
	e.lock.RLock()
	defer e.lock.RUnlock()

	if !e.ready {
		return -1, &ElementNotReadyErr{}
	}
	return e.nodeType, nil
}
534406
func (e *Event) GetType() string {
	if e == nil || e.Type == nil {
		return ""
	}
	return *e.Type
}
956588
func (r User_Customer_MobileDevice) GetType() (resp datatypes.User_Customer_MobileDevice_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_User_Customer_MobileDevice", "getType", nil, &r.Options, &resp)
	return
}
1365313
func (_class VBDClass) GetType(sessionID SessionRef, self VBDRef) (_retval VbdType, _err error) {
	_method := "VBD.get_type"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVBDRefToXen(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 = convertEnumVbdTypeToGo(_method + " -> ", _result.Value)
	return
}
1321804
func (c *TsCell) GetDataType() string {
	var dType string
	switch {
	case c.cell.VarcharValue != nil:
		switch c.columnType {
		case riak_ts.TsColumnType_VARCHAR:
			dType = riak_ts.TsColumnType_VARCHAR.String()
		case riak_ts.TsColumnType_BLOB:
			dType = riak_ts.TsColumnType_BLOB.String()
		default:
			dType = riak_ts.TsColumnType_VARCHAR.String()
		}
	case c.cell.Sint64Value != nil:
		dType = riak_ts.TsColumnType_SINT64.String()
	case c.cell.TimestampValue != nil:
		dType = riak_ts.TsColumnType_TIMESTAMP.String()
	case c.cell.BooleanValue != nil:
		dType = riak_ts.TsColumnType_BOOLEAN.String()
	case c.cell.DoubleValue != nil:
		dType = riak_ts.TsColumnType_DOUBLE.String()
	}

	return dType
}
726730
func getKeyType(ctx *cli.Context) certcrypto.KeyType {
	keyType := ctx.GlobalString("key-type")
	switch strings.ToUpper(keyType) {
	case "RSA2048":
		return certcrypto.RSA2048
	case "RSA4096":
		return certcrypto.RSA4096
	case "RSA8192":
		return certcrypto.RSA8192
	case "EC256":
		return certcrypto.EC256
	case "EC384":
		return certcrypto.EC384
	}

	log.Fatalf("Unsupported KeyType: %s", keyType)
	return ""
}
127487
func (*MysqlDB) GetGoDataType(sqlType string) (string, error) {
	if v, ok := typeMappingMysql[sqlType]; ok {
		return v, nil
	}
	return "", fmt.Errorf("data type '%s' not found", sqlType)
}
1049948
func getSchemaType(schema proto.Schema) string {
	if schema == nil {
		return ""
	}
	visitor := &baseSchemaVisitor{}
	schema.Accept(visitor)
	return visitor.Kind
}
1298304
func (c Control) GetType() string {
	if idx := strings.Index(c.Type, ":"); idx >= 0 {
		return c.Type[:idx]
	}
	return c.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
}
120312
func GetType(err error, v interface{}) error {
	es := GetAllType(err, v)
	if len(es) > 0 {
		return es[len(es)-1]
	}

	return nil
}
158950
func (r *BulkDeleteRequest) Type(typ string) *BulkDeleteRequest {
	r.typ = typ
	r.source = nil
	return r
}