// Type returns the ValueType of the MrbValue. See the constants table.
336305
func (v *MrbValue) Type() ValueType {
	if C._go_mrb_nil_p(v.value) == 1 {
		return TypeNil
	}

	return ValueType(C._go_mrb_type(v.value))
}
1141894
func (_m *DBClient) ValueDescriptorsByType(t string) ([]models.ValueDescriptor, error) {
	ret := _m.Called(t)

	var r0 []models.ValueDescriptor
	if rf, ok := ret.Get(0).(func(string) []models.ValueDescriptor); ok {
		r0 = rf(t)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]models.ValueDescriptor)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(string) error); ok {
		r1 = rf(t)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
437230
func (s *ScriptSort) Type(typ string) *ScriptSort {
	s.typ = typ
	return s
}
916716
func (s *DeleteService) Type(typ string) *DeleteService {
	s.typ = typ
	return s
}
775224
func (q *MultiMatchQuery) Type(typ string) *MultiMatchQuery {
	var zero = float64(0.0)
	var one = float64(1.0)

	switch strings.ToLower(typ) {
	default: // best_fields / boolean
		q.typ = "best_fields"
		q.tieBreaker = &zero
	case "most_fields":
		q.typ = "most_fields"
		q.tieBreaker = &one
	case "cross_fields":
		q.typ = "cross_fields"
		q.tieBreaker = &zero
	case "phrase":
		q.typ = "phrase"
		q.tieBreaker = &zero
	case "phrase_prefix":
		q.typ = "phrase_prefix"
		q.tieBreaker = &zero
	}
	return q
}
1004615
func (s *ScanService) Type(typ string) *ScanService {
	if s.types == nil {
		s.types = make([]string, 0)
	}
	s.types = append(s.types, typ)
	return s
}
546738
func (a *CompositeAggregationHistogramValuesSource) ValueType(valueType string) *CompositeAggregationHistogramValuesSource {
	a.valueType = valueType
	return a
}
1370449
func (r *BulkIndexRequest) Type(typ string) *BulkIndexRequest {
	r.typ = typ
	r.source = nil
	return r
}
1256044
func (s *GetService) Type(typ string) *GetService {
	s.typ = typ
	return s
}
306966
func (a TermsAggregation) ValueType(valueType string) TermsAggregation {
	a.valueType = valueType
	return a
}
478621
func (s *ExistsService) Type(typ string) *ExistsService {
	s.typ = typ
	return s
}
977722
func (s *SearchService) Type(typ ...string) *SearchService {
	s.typ = append(s.typ, typ...)
	return s
}
861950
func (t *TSMReader) Type(key []byte) (byte, error) {
	return t.index.Type(key)
}
462229
func (s *MultiTermvectorService) Type(typ string) *MultiTermvectorService {
	s.typ = typ
	return s
}
604305
func (s *UnionSchema) GetType(v reflect.Value) int {
	if s.Types != nil {
		for i := range s.Types {
			if t := s.Types[i]; t.Validate(v) {
				return i
			}
		}
	}

	return -1
}
487803
func (m *Miniredis) Type(k string) string {
	return m.DB(m.selectedDB).Type(k)
}
596541
func Type(msg proto.Message) uint16 {
	return uint16(MessageType_value["MessageType_"+reflect.TypeOf(msg).Elem().Name()])
}