// MultiValueMode specifies how the decay function should be calculated
// on a field that has multiple values.
// Valid modes are: min, max, avg, and sum.
12044
func (fn *LinearDecayFunction) MultiValueMode(mode string) *LinearDecayFunction {
	fn.multiValueMode = mode
	return fn
}
1190828
func (ta *TrackAttributes) TargetMode(mode int) *TrackAttributes {
	ta.intAttributes["target_mode"] = mode
	return ta
}
1331345
func accessModesIndexFunc(obj interface{}) ([]string, error) {
	if pv, ok := obj.(*v1.PersistentVolume); ok {
		modes := v1helper.GetAccessModesAsString(pv.Spec.AccessModes)
		return []string{modes}, nil
	}
	return []string{""}, fmt.Errorf("object is not a persistent volume: %v", obj)
}
125119
func (t Type) MultipleInheritance() ([]string, bool) {
	if t.IsJSONType() {
		return nil, false
	}
	tStr := t.TypeString()
	if !strings.HasPrefix(tStr, "[") || !strings.HasSuffix(tStr, "]") {
		return nil, false
	}
	tStr = strings.TrimPrefix(strings.TrimSuffix(tStr, "]"), "[")
	splitted := strings.Split(tStr, ",")
	return splitted, len(splitted) > 1
}
311617
func (ta *TrackAttributes) MinMode(mode int) *TrackAttributes {
	ta.intAttributes["min_mode"] = mode
	return ta
}
262400
func (s *S3Encryption) SetS3EncryptionMode(v string) *S3Encryption {
	s.S3EncryptionMode = &v
	return s
}
971646
func (p *pinner) PinWithMode(c cid.Cid, mode Mode) {
	p.lock.Lock()
	defer p.lock.Unlock()
	switch mode {
	case Recursive:
		p.recursePin.Add(c)
	case Direct:
		p.directPin.Add(c)
	}
}
1187391
func (s *AutomationExecution) SetMode(v string) *AutomationExecution {
	s.Mode = &v
	return s
}
1000794
func (t *Terminal) EchoMode(echo bool) error {
	if !echo {
		//t.lastState.Lflag &^= (sys.ECHO | sys.ECHOE | sys.ECHOK | sys.ECHONL)
		t.lastState.Lflag &^= sys.ECHO
	} else {
		//t.lastState.Lflag |= (sys.ECHO | sys.ECHOE | sys.ECHOK | sys.ECHONL)
		t.lastState.Lflag |= sys.ECHO
	}

	if err := sys.Setattr(t.fd, sys.TCSANOW, &t.lastState); err != nil {
		return os.NewSyscallError("sys.Setattr", err)
	}

	if echo {
		t.mode |= EchoMode
	} else {
		t.mode &^= EchoMode
	}
	return nil
}
322326
func RawMode(t *Term) error {
	var a attr
	if err := termios.Tcgetattr(uintptr(t.fd), (*syscall.Termios)(&a)); err != nil {
		return err
	}
	termios.Cfmakeraw((*syscall.Termios)(&a))
	return termios.Tcsetattr(uintptr(t.fd), termios.TCSANOW, (*syscall.Termios)(&a))
}
1315638
func ToGroupMode(fluxMode functions.GroupMode) GroupMode {
	switch fluxMode {
	case functions.GroupModeNone:
		return GroupModeDefault
	case functions.GroupModeBy:
		return GroupModeBy
	case functions.GroupModeExcept:
		return GroupModeExcept
	default:
		panic(fmt.Sprint("unknown group mode: ", fluxMode))
	}
}
1171152
func SetMode(value string) {
	switch value {
	case DebugMode, "":
		ginMode = debugCode
	case ReleaseMode:
		ginMode = releaseCode
	case TestMode:
		ginMode = testCode
	default:
		panic("gin mode unknown: " + value)
	}
	if value == "" {
		value = DebugMode
	}
	modeName = value
}
554065
func (s *Encryption) SetMode(v string) *Encryption {
	s.Mode = &v
	return s
}
541410
func (t *TreeEntry) GetMode() string {
	if t == nil || t.Mode == nil {
		return ""
	}
	return *t.Mode
}
1032276
func ColValue(opt operator, value interface{}) interface{} {
	switch opt {
	case ColAdd, ColMinus, ColMultiply, ColExcept:
	default:
		panic(fmt.Errorf("orm.ColValue wrong operator"))
	}
	v, err := StrTo(ToStr(value)).Int64()
	if err != nil {
		panic(fmt.Errorf("orm.ColValue doesn't support non string/numeric type, %s", err))
	}
	var val colValue
	val.value = v
	val.opt = opt
	return val
}
732843
func (s *HlsGroupSettings) SetMode(v string) *HlsGroupSettings {
	s.Mode = &v
	return s
}
887683
func (st *stateTracker) NickModes(n, modes string) *Nick {
	st.mu.Lock()
	defer st.mu.Unlock()
	nk, ok := st.nicks[n]
	if !ok {
		return nil
	}
	nk.parseModes(modes)
	return nk.Nick()
}