// AddInterval provides a mock function with given fields: interval
494062
func (_m *DBClient) AddInterval(interval models.Interval) (string, error) {
	ret := _m.Called(interval)

	var r0 string
	if rf, ok := ret.Get(0).(func(models.Interval) string); ok {
		r0 = rf(interval)
	} else {
		r0 = ret.Get(0).(string)
	}

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

	return r0, r1
}
807266
func (s *H265Settings) SetMinIInterval(v int64) *H265Settings {
	s.MinIInterval = &v
	return s
}
769273
func (mc MongoClient) IntervalActionsByIntervalName(name string) ([]contract.IntervalAction, error) {
	return mapIntervalActions(mc.getIntervalActions(bson.M{"interval": name}))
}
893871
func (s *FrameCaptureSettings) SetCaptureInterval(v int64) *FrameCaptureSettings {
	s.CaptureInterval = &v
	return s
}
112556
func ToInterval(ls orb.LineString, df orb.DistanceFunc, dist float64) orb.LineString {
	if dist <= 0 {
		return nil
	}

	// precomputes the total distance and intermediate distances
	total, dists := precomputeDistances(ls, df)

	totalPoints := int(total/dist) + 1
	ls, ret := resampleEdgeCases(ls, totalPoints)
	if ret {
		return ls
	}

	return resample(ls, dists, total, totalPoints)
}
385354
func (m *MockBackoff) NextInterval() time.Duration {
	r0 := m.NextIntervalFunc.nextHook()()
	m.NextIntervalFunc.history = append(m.NextIntervalFunc.history, BackoffNextIntervalFuncCall{r0})
	return r0
}
932000
func (c *Client) UpdateInterval(from contract.Interval) (err error) {
	check, err := c.IntervalByName(from.Name)
	if err != nil && err != redis.ErrNil {
		return err
	}
	if err == nil && from.ID != check.ID {
		// IDs are different -> name not unique
		return db.ErrNotUnique
	}

	from.Timestamps.Modified = db.MakeTimestamp()
	err = mergo.Merge(&from, check)
	if err != nil {
		return err
	}

	interval := models.NewInterval(from)
	data, err := json.Marshal(interval)
	if err != nil {
		return err
	}

	conn := c.Pool.Get()
	defer conn.Close()

	_ = conn.Send("MULTI")
	deleteObject(interval, interval.ID, conn)
	addObject(data, interval, interval.ID, conn)
	_, err = conn.Do("EXEC")

	return err
}
184620
func (mc MongoClient) UpdateIntervalAction(action contract.IntervalAction) error {
	var mapped models.IntervalAction
	id, err := mapped.FromContract(action)
	if err != nil {
		return err
	}

	mapped.TimestampForUpdate()

	return mc.updateId(db.IntervalAction, id, mapped)
}
1127489
func WithRefreshInterval(value time.Duration) coptions.Opt {
	return func(p coptions.Params) {
		logger.Debug("Checking refreshIntervalSetter")
		if setter, ok := p.(refreshIntervalSetter); ok {
			setter.SetDiscoveryRefreshInterval(value)
		}
	}
}
1050868
func (c *Profiler) SetSamplingInterval(interval int) (*gcdmessage.ChromeResponse, error) {
	var v ProfilerSetSamplingIntervalParams
	v.Interval = interval
	return c.SetSamplingIntervalWithParams(&v)
}
71571
func (_m *SchedulerQueueClient) AddIntervalToQueue(interval models.Interval) error {
	ret := _m.Called(interval)

	var r0 error
	if rf, ok := ret.Get(0).(func(models.Interval) error); ok {
		r0 = rf(interval)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
1062555
func (m *Manager) HistoricalInterval(ctx context.Context) (IntervalList, error) {
	var pm mo.PerformanceManager

	err := m.Properties(ctx, m.Reference(), []string{"historicalInterval"}, &pm)
	if err != nil {
		return nil, err
	}

	return IntervalList(pm.HistoricalInterval), nil
}
760288
func isIntervalStillInUse(s contract.Interval) (bool, error) {
	var intervalActions []contract.IntervalAction

	intervalActions, err := dbClient.IntervalActionsByIntervalName(s.Name)
	if err != nil {
		return false, err
	}
	if len(intervalActions) > 0 {
		return true, nil
	}

	return false, nil
}
1021218
func (mc MongoClient) getIntervals(q bson.M) ([]models.Interval, error) {
	s := mc.getSessionCopy()
	defer s.Close()

	var mi []models.Interval
	if err := s.DB(mc.database.Name).C(db.Interval).Find(q).All(&mi); err != nil {
		return []models.Interval{}, errorMap(err)
	}
	return mi, nil
}
290518
func RegisterInterval(t time.Duration) Option {
	return func(o *Options) {
		o.RegisterInterval = t
	}
}
865780
func mapIntervals(intervals []models.Interval, err error) ([]contract.Interval, error) {
	if err != nil {
		return []contract.Interval{}, err
	}
	mapped := make([]contract.Interval, 0)
	for _, interval := range intervals {
		mapped = append(mapped, interval.ToContract())
	}
	return mapped, nil
}
192599
func BreakerInterval(interval time.Duration) Option {
	return func(r *Rabbus) error {
		r.config.breaker.interval = interval
		return nil
	}
}