// GetSliceType returns the value of SliceType if it is set or its
// zero value if it is unset.
968763
func (v *Type) GetSliceType() (o *Type) {
	if v != nil && v.SliceType != nil {
		return v.SliceType
	}

	return
}
1202758
func (sensor *Sensor) GetType() (typ SensorType) {
	typ = SensorType(C.SDL_SensorGetType((*C.SDL_Sensor)(sensor)))
	return
}
1172610
func NewSliceType(elem Type) *SliceType {
	t, ok := sliceTypes[elem]
	if !ok {
		t = &SliceType{commonType{}, elem}
		sliceTypes[elem] = t
	}
	return t
}
748756
func getType(args ...interface{}) (reflect.Type, error) {
	var last interface{}
	for _, next := range args {
		// Skip nil values
		if next == nil {
			continue
		}

		// Set the first non-nil value we find and continue
		if last == nil {
			last = next
			continue
		}

		// Verify the types of the values match
		if reflect.TypeOf(last).Kind() != reflect.TypeOf(next).Kind() {
			return nil, fmt.Errorf("missmatching non-nil types for the same field: %T %T", last, next)
		}
	}

	return reflect.TypeOf(last), nil
}
1190565
func (e *Element) GetNodeType() (int, error) {
	e.lock.RLock()
	defer e.lock.RUnlock()

	if !e.ready {
		return -1, &ElementNotReadyErr{}
	}
	return e.nodeType, nil
}
198176
func (db *DB) GetSlice(key []byte) (store.Slice, error) {
	if err := checkKeySize(key); err != nil {
		return nil, err
	}

	key = db.encodeKVKey(key)

	return db.bucket.GetSlice(key)
}
350738
func sliceTypeCheck(t Type, val reflect.Value) error {
	if val.Kind() != reflect.Slice && val.Kind() != reflect.Array {
		return typeErr(formatSliceString(t.Kind, t.Size), val.Type())
	}

	if t.T == ArrayTy && val.Len() != t.Size {
		return typeErr(formatSliceString(t.Elem.Kind, t.Size), formatSliceString(val.Type().Elem().Kind(), val.Len()))
	}

	if t.Elem.T == SliceTy {
		if val.Len() > 0 {
			return sliceTypeCheck(*t.Elem, val.Index(0))
		}
	} else if t.Elem.T == ArrayTy {
		return sliceTypeCheck(*t.Elem, val.Index(0))
	}

	if elemKind := val.Type().Elem().Kind(); elemKind != t.Elem.Kind {
		return typeErr(formatSliceString(t.Elem.Kind, t.Size), val.Type())
	}
	return nil
}
881580
func IsSlice(s interface{}) bool {
	return s != nil && reflect.TypeOf(s).Kind() == reflect.Slice
}
735216
func (v *TApplicationException) GetType() (o ExceptionType) {
	if v != nil && v.Type != nil {
		return *v.Type
	}

	return
}
669723
func (u *UserLDAPMapping) GetType() string {
	if u == nil || u.Type == nil {
		return ""
	}
	return *u.Type
}
1246160
func (soc *Socket) GetType() (Type, error) {
	v, err := soc.getInt(C.ZMQ_TYPE)
	return Type(v), err
}
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
}
228004
func StringSlice(s string) Slice {
	raw := []byte(s)
	l := len(raw)
	if l <= 126 {
		return Slice(append([]byte{byte(0x40 + l)}, raw...))
	}
	buf := make([]byte, 1+8+l)
	buf[0] = 0xbf
	binary.LittleEndian.PutUint64(buf[1:], uint64(l))
	copy(buf[1+8:], raw)
	return buf
}
774088
func (t *TreeEntry) GetType() string {
	if t == nil || t.Type == nil {
		return ""
	}
	return *t.Type
}
534406
func (e *Event) GetType() string {
	if e == nil || e.Type == nil {
		return ""
	}
	return *e.Type
}
1270172
func (o *Organization) GetType() string {
	if o == nil || o.Type == nil {
		return ""
	}
	return *o.Type
}
629705
func ReadSliceNoNest(rd io.Reader) (s Slice, err error) {
	// Just in case of programming mistake. Not intentionally used.
	defer func() {
		if r := recover(); r != nil {
			err = errors.New(fmt.Sprint(r))
		}
	}()

	return decodeSlice(rd, "", false)
}