// NewSubStatter provides a mock function with given fields: _a0
483285
func (_m *Statter) NewSubStatter(_a0 string) statsd.SubStatter {
	ret := _m.Called(_a0)

	var r0 statsd.SubStatter
	if rf, ok := ret.Get(0).(func(string) statsd.SubStatter); ok {
		r0 = rf(_a0)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(statsd.SubStatter)
		}
	}

	return r0
}
654778
func NewSubscriberWrapper(ot opentracing.Tracer) server.SubscriberWrapper {
	return func(next server.SubscriberFunc) server.SubscriberFunc {
		return func(ctx context.Context, msg server.Message) error {
			name := "Pub to " + msg.Topic()
			if ot == nil {
				ot = opentracing.GlobalTracer()
			}
			ctx, span, err := StartSpanFromContext(ctx, ot, name)
			if err != nil {
				return err
			}
			defer span.Finish()
			return next(ctx, msg)
		}
	}
}
1352144
func NewSubCommand(name string, desc string, fn func(Command), paramNames ...string) *SubCommand {
	var cmd SubCommand
	cmd.init(name, desc, fn, paramNames...)
	return &cmd
}
718823
func NewSvcStatus(s string) (svcStatus, error) {
	var e svcStatus
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}
1187905
func NewStatRepo(rawStats <-chan *stat.Stat, shutdown <-chan bool) *StatRepo {
	return &StatRepo{
		rawStats: rawStats,
		shutdown: shutdown,
	}
}
790294
func (m *MockProvideriface) NewService(arg0 *aws.Config) lambdaiface.LambdaAPI {
	if m.ctrl == nil {
		return nil
	}

	ret := m.ctrl.Call(m, "NewService", arg0)
	ret0, _ := ret[0].(lambdaiface.LambdaAPI)
	return ret0
}
1309199
func newSubscription(db *Database) (*Subscription, error) {
	sub := &Subscription{
		database: db,
	}
	err := sub.ensureProtocol()
	if err != nil {
		return nil, err
	}
	// Perform authentication and database selection.
	err = sub.resp.authenticate()
	if err != nil {
		sub.database.pool.kill(sub.resp)
		return nil, err
	}
	return sub, nil
}
294665
func newSubscriber() *Subscriber {
	return &Subscriber{
		publish:  make(chan PubsubMessage),
		channels: map[string]struct{}{},
		patterns: map[string]*regexp.Regexp{},
	}
}
913177
func NewSubnet() *Subnet {

	return &Subnet{
		PATEnabled:                "INHERITED",
		DPI:                       "INHERITED",
		IPType:                    "IPV4",
		EVPNEnabled:               true,
		MaintenanceMode:           "DISABLED",
		AccessRestrictionEnabled:  false,
		Advertise:                 true,
		ResourceType:              "STANDARD",
		Encryption:                "INHERITED",
		UnderlayEnabled:           "INHERITED",
		IngressReplicationEnabled: false,
		UseGlobalMAC:              "ENTERPRISE_DEFAULT",
		MultiHomeEnabled:          false,
		Multicast:                 "INHERITED",
		DynamicIpv6Address:        false,
	}
}
568666
func NewStatus(code Code, msg string) *Status {
	return &Status{
		code:    code,
		message: msg,
	}
}
739898
func (s *Application) NewStatic(urlPath string, absPath string, f ...map[string]interface{}) *resource.Static {
	st := resource.NewStatic(urlPath, absPath)
	if len(f) > 0 {
		f[0] = st.Register(f[0])
	}
	return st
}
1225268
func NewSubscriptionsFormat(source string, quiet bool) formatter.Format {
	switch source {
	case formatter.TableFormatKey:
		if quiet {
			return defaultSubscriptionsQuietFormat
		}
		return defaultSubscriptionsTableFormat
	case formatter.RawFormatKey:
		if quiet {
			return `license: {{.ID}}`
		}
		return `license: {{.ID}}\nname: {{.Name}}\nowner: {{.Owner}}\ncomponents: {{.ComponentsString}}\n`
	}
	return formatter.Format(source)
}
628157
func (s *SubscriptionProvider) Subscribe() *Subscription {
	s.Lock()
	defer s.Unlock()
	if s.subscriptions == nil {
		s.subscriptions = make(map[string]*Subscription)
	}
	sub := newSubscription(s)
	s.subscriptions[sub.id.String()] = sub

	return sub
}
239081
func NewSubnet(a Address, m AddressMask) (Subnet, error) {
	if len(a) != len(m) {
		return Subnet{}, errSubnetLengthMismatch
	}
	for i := 0; i < len(a); i++ {
		if a[i]&^m[i] != 0 {
			return Subnet{}, errSubnetAddressMasked
		}
	}
	return Subnet{a, m}, nil
}
158336
func NewMockSubscription(ctrl *gomock.Controller) *MockSubscription {
	mock := &MockSubscription{ctrl: ctrl}
	mock.recorder = &MockSubscriptionMockRecorder{mock}
	return mock
}
1134277
func NewStatsReader(v *expvar.Int, r io.Reader) io.Reader {
	return &varStatReader{v, r}
}
1359249
func NewSubAcctType(s string) (subAcctType, error) {
	var e subAcctType
	err := e.FromString(s)
	if err != nil {
		return 0, err
	}
	return e, nil
}