// Type returns a string representation of the type of the key specified.
//
// Type will return the empty string if given an empty key or a key that
// does not exist. Keys are case sensitive.
492131
func (md *MetaData) Type(key ...string) string {
	fullkey := strings.Join(key, ".")
	if typ, ok := md.types[fullkey]; ok {
		return typ.typeString()
	}
	return ""
}
1249081
func (c *asyncClient) Type(arg0 string) (result FutureKeyType, err Error) {
	arg0bytes := []byte(arg0)

	var resp *PendingResponse
	resp, err = c.conn.QueueRequest(&TYPE, [][]byte{arg0bytes})
	if err == nil {
		result = newFutureKeyType(resp.future.(FutureString))
	}
	return result, err
}
148464
func (c *syncClient) Type(arg0 string) (result KeyType, err Error) {
	arg0bytes := []byte(arg0)

	var resp Response
	resp, err = c.conn.ServiceRequest(&TYPE, [][]byte{arg0bytes})
	if err == nil {
		result = GetKeyType(resp.GetStringValue())
	}
	return result, err
}
840503
func (s *GetMappingService) Type(typ ...string) *GetMappingService {
	s.typ = append(s.typ, typ...)
	return s
}
1279910
func (s *IndicesStatsService) Types(types ...string) *IndicesStatsService {
	s.types = append(s.types, types...)
	return s
}
67979
func (e *Env) Type(k string) (reflect.Type, error) {
	e.RLock()
	defer e.RUnlock()

	if v, ok := e.typ[k]; ok {
		return v, nil
	}
	if e.external != nil {
		v, err := e.external.Type(k)
		if err == nil {
			return v, nil
		}
	}
	if e.parent == nil {
		if v, ok := basicTypes[k]; ok {
			return v, nil
		}
		return nilType, fmt.Errorf("undefined type '%s'", k)
	}
	return e.parent.Type(k)
}
1065420
func (v *Variable) Type() VariableType {
	if v.DeclaredType != "" {
		declaredType, ok := typeStringMap[v.DeclaredType]
		if !ok {
			return VariableTypeUnknown
		}

		return declaredType
	}

	return v.inferTypeFromDefault()
}
1345888
func (id ID) Type() Type {
	t, err := id.SafeType()
	if err != nil {
		panic(err)
	}
	return t
}
869597
func (s *Script) Type(typ string) *Script {
	s.typ = typ
	return s
}
969108
func (db *RedisDB) Type(k string) string {
	db.master.Lock()
	defer db.master.Unlock()
	return db.t(k)
}
1131550
func (r *Response) Type(kind string) *Response {
	mime := BodyTypeAliases[kind]
	if mime != "" {
		kind = mime
	}
	r.Header.Set("Content-Type", kind)
	return r
}
1370449
func (r *BulkIndexRequest) Type(typ string) *BulkIndexRequest {
	r.typ = typ
	r.source = nil
	return r
}
500570
func (ftp *FTP) Type(t TypeCode) error {
	_, err := ftp.cmd(StatusOK, "TYPE %s", t)
	return err
}
1055477
func (s *DeleteByQueryService) Types(types ...string) *DeleteByQueryService {
	if s.types == nil {
		s.types = make([]string, 0)
	}
	s.types = append(s.types, types...)
	return s
}
1016777
func (c *Context) Type() string {
	head := c.Request().Header().Get("Content-Type")
	cont, _, _ := mime.ParseMediaType(head)
	return cont
}
134007
func (s *SearchDsl) Type(indexType string) *SearchDsl {
	if len(s.types) == 0 {
		s.types = make([]string, 0)
	}
	s.types = append(s.types, indexType)
	return s
}
135060
func (c *Client) Type(ctx context.Context) (string, error) {
	_, tsdbType, err := c.pingTimeout(ctx)
	return tsdbType, err
}