// newStdStaySetVariable creates a new stay-set variable out of a variable.
494741
func newStdStaySetVariable(v *stdSSVChange) *stdStaySetVariable {
	return &stdStaySetVariable{
		id:       v.id,
		count:    1,
		actValue: v.variable,
		minValue: v.variable,
		maxValue: v.variable,
		avgValue: v.variable,
	}
}
332238
func NewStringValue(v interface{}) Value {
	switch t := v.(type) {
	case string:
		return String(t)
	case []byte:
		return String(t)
	case bool:
		return String(fmt.Sprintf("%v", t))
	case int:
		return String(strconv.FormatInt(int64(t), 10))
	case int8:
		return String(strconv.FormatInt(int64(t), 10))
	case int16:
		return String(strconv.FormatInt(int64(t), 10))
	case int32:
		return String(strconv.FormatInt(int64(t), 10))
	case int64:
		return String(strconv.FormatInt(t, 10))
	case uint:
		return String(strconv.FormatUint(uint64(t), 10))
	case uint8: // byte is an alias for uint8
		return String(strconv.FormatUint(uint64(t), 10))
	case uint16:
		return String(strconv.FormatUint(uint64(t), 10))
	case uint32:
		return String(strconv.FormatUint(uint64(t), 10))
	case float32:
		return String(strconv.FormatFloat(float64(t), 'f', -1, 64))
	case float64:
		return String(strconv.FormatFloat(t, 'f', -1, 64))
	case time.Time:
		return String(t.String())
	case time.Duration:
		return String(t.String())
	default:
		panic(fmt.Errorf("%v(%T) is not supported yet", v, v))
	}
}
1223032
func NewSharedContentAddInviteesType(Description string) *SharedContentAddInviteesType {
	s := new(SharedContentAddInviteesType)
	s.Description = Description
	return s
}
1096106
func NewStringTypeParserToVar(variable *string) *StringTypeParser {
	parser := new(StringTypeParser)
	parser.setter = func(value string) {
		*variable = value
	}
	return parser
}
452652
func NewSharedStringRefTable() *RefTable {
	rt := RefTable{}
	rt.knownStrings = make(map[string]int)
	return &rt
}
659262
func NewStdDevForStreamWithSrcLen(sourceLength uint, priceStream gotrade.DOHLCVStreamSubscriber, timePeriod int, selectData gotrade.DOHLCVDataSelectionFunc) (indicator *StdDev, err error) {
	ind, err := NewStdDevWithSrcLen(sourceLength, timePeriod, selectData)
	priceStream.AddTickSubscription(ind)
	return ind, err
}
253793
func NewStdMultiStream(
	bindAddr string,
	lg *log.Logger,
	serviceCodes ...byte,
) (map[byte]raft.StreamLayer, error) {
	// Try to bind
	list, err := net.Listen("tcp", bindAddr)
	if err != nil {
		return nil, err
	}
	return NewMultiStream(list, defaultDialer,
		list.Addr(), lg, serviceCodes...)
}
612654
func NewSfTeamInviteDetails(TargetAssetIndex uint64, OriginalFolderName string) *SfTeamInviteDetails {
	s := new(SfTeamInviteDetails)
	s.TargetAssetIndex = TargetAssetIndex
	s.OriginalFolderName = OriginalFolderName
	return s
}
569624
func NewShareFolderArgBase(Path string) *ShareFolderArgBase {
	s := new(ShareFolderArgBase)
	s.Path = Path
	s.ForceAsync = false
	s.AccessInheritance = &AccessInheritance{Tagged: dropbox.Tagged{"inherit"}}
	return s
}
1152059
func NewSetNode(varName string, expr Expr, pos Pos) *SetNode {
	return &SetNode{pos, TrimmableNode{}, varName, expr}
}
999071
func NewSetLifecycleEventsEnabledArgs(enabled bool) *SetLifecycleEventsEnabledArgs {
	args := new(SetLifecycleEventsEnabledArgs)
	args.Enabled = enabled
	return args
}
448758
func NewSharedContentRemoveInviteesType(Description string) *SharedContentRemoveInviteesType {
	s := new(SharedContentRemoveInviteesType)
	s.Description = Description
	return s
}
294125
func NewServiceUnavailable(reason string) *StatusError {
	return &StatusError{metav1.Status{
		Status:  metav1.StatusFailure,
		Code:    http.StatusServiceUnavailable,
		Reason:  metav1.StatusReasonServiceUnavailable,
		Message: reason,
	}}
}
296890
func NewSetNavigatorOverridesArgs(platform string) *SetNavigatorOverridesArgs {
	args := new(SetNavigatorOverridesArgs)
	args.Platform = platform
	return args
}
1175135
func NewSsoAddCertType(Description string) *SsoAddCertType {
	s := new(SsoAddCertType)
	s.Description = Description
	return s
}
1278978
func NewSimpleSession(userData interface{}, sid string) *SimpleSession {
	var s = sid
	if sid == "" {
		s = UDID()
	}
	return &SimpleSession{s, userData}
}
401404
func NewSetVirtualTimePolicyArgs(policy VirtualTimePolicy) *SetVirtualTimePolicyArgs {
	args := new(SetVirtualTimePolicyArgs)
	args.Policy = policy
	return args
}