// Code generated by mockery v2.42.2. DO NOT EDIT.

package mocks

import (
	context "context"

	mock "github.com/stretchr/testify/mock"
	metrics "gitlab.com/gitlab-org/fleeting/fleeting/metrics"

	taskscaler "gitlab.com/gitlab-org/fleeting/taskscaler"

	taskscalermetrics "gitlab.com/gitlab-org/fleeting/taskscaler/metrics"
)

// Taskscaler is an autogenerated mock type for the Taskscaler type
type Taskscaler struct {
	mock.Mock
}

type Taskscaler_Expecter struct {
	mock *mock.Mock
}

func (_m *Taskscaler) EXPECT() *Taskscaler_Expecter {
	return &Taskscaler_Expecter{mock: &_m.Mock}
}

// Acquire provides a mock function with given fields: ctx, key
func (_m *Taskscaler) Acquire(ctx context.Context, key string) (taskscaler.Acquisition, error) {
	ret := _m.Called(ctx, key)

	if len(ret) == 0 {
		panic("no return value specified for Acquire")
	}

	var r0 taskscaler.Acquisition
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string) (taskscaler.Acquisition, error)); ok {
		return rf(ctx, key)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string) taskscaler.Acquisition); ok {
		r0 = rf(ctx, key)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(taskscaler.Acquisition)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, string) error); ok {
		r1 = rf(ctx, key)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

// Taskscaler_Acquire_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Acquire'
type Taskscaler_Acquire_Call struct {
	*mock.Call
}

// Acquire is a helper method to define mock.On call
//   - ctx context.Context
//   - key string
func (_e *Taskscaler_Expecter) Acquire(ctx interface{}, key interface{}) *Taskscaler_Acquire_Call {
	return &Taskscaler_Acquire_Call{Call: _e.mock.On("Acquire", ctx, key)}
}

func (_c *Taskscaler_Acquire_Call) Run(run func(ctx context.Context, key string)) *Taskscaler_Acquire_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(string))
	})
	return _c
}

func (_c *Taskscaler_Acquire_Call) Return(_a0 taskscaler.Acquisition, _a1 error) *Taskscaler_Acquire_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *Taskscaler_Acquire_Call) RunAndReturn(run func(context.Context, string) (taskscaler.Acquisition, error)) *Taskscaler_Acquire_Call {
	_c.Call.Return(run)
	return _c
}

// Capacity provides a mock function with given fields:
func (_m *Taskscaler) Capacity() (int, int) {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for Capacity")
	}

	var r0 int
	var r1 int
	if rf, ok := ret.Get(0).(func() (int, int)); ok {
		return rf()
	}
	if rf, ok := ret.Get(0).(func() int); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(int)
	}

	if rf, ok := ret.Get(1).(func() int); ok {
		r1 = rf()
	} else {
		r1 = ret.Get(1).(int)
	}

	return r0, r1
}

// Taskscaler_Capacity_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Capacity'
type Taskscaler_Capacity_Call struct {
	*mock.Call
}

// Capacity is a helper method to define mock.On call
func (_e *Taskscaler_Expecter) Capacity() *Taskscaler_Capacity_Call {
	return &Taskscaler_Capacity_Call{Call: _e.mock.On("Capacity")}
}

func (_c *Taskscaler_Capacity_Call) Run(run func()) *Taskscaler_Capacity_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Taskscaler_Capacity_Call) Return(available int, potential int) *Taskscaler_Capacity_Call {
	_c.Call.Return(available, potential)
	return _c
}

func (_c *Taskscaler_Capacity_Call) RunAndReturn(run func() (int, int)) *Taskscaler_Capacity_Call {
	_c.Call.Return(run)
	return _c
}

// ConfigureSchedule provides a mock function with given fields: schedules
func (_m *Taskscaler) ConfigureSchedule(schedules ...taskscaler.Schedule) error {
	_va := make([]interface{}, len(schedules))
	for _i := range schedules {
		_va[_i] = schedules[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

	if len(ret) == 0 {
		panic("no return value specified for ConfigureSchedule")
	}

	var r0 error
	if rf, ok := ret.Get(0).(func(...taskscaler.Schedule) error); ok {
		r0 = rf(schedules...)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

// Taskscaler_ConfigureSchedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ConfigureSchedule'
type Taskscaler_ConfigureSchedule_Call struct {
	*mock.Call
}

// ConfigureSchedule is a helper method to define mock.On call
//   - schedules ...taskscaler.Schedule
func (_e *Taskscaler_Expecter) ConfigureSchedule(schedules ...interface{}) *Taskscaler_ConfigureSchedule_Call {
	return &Taskscaler_ConfigureSchedule_Call{Call: _e.mock.On("ConfigureSchedule",
		append([]interface{}{}, schedules...)...)}
}

func (_c *Taskscaler_ConfigureSchedule_Call) Run(run func(schedules ...taskscaler.Schedule)) *Taskscaler_ConfigureSchedule_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]taskscaler.Schedule, len(args)-0)
		for i, a := range args[0:] {
			if a != nil {
				variadicArgs[i] = a.(taskscaler.Schedule)
			}
		}
		run(variadicArgs...)
	})
	return _c
}

func (_c *Taskscaler_ConfigureSchedule_Call) Return(_a0 error) *Taskscaler_ConfigureSchedule_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Taskscaler_ConfigureSchedule_Call) RunAndReturn(run func(...taskscaler.Schedule) error) *Taskscaler_ConfigureSchedule_Call {
	_c.Call.Return(run)
	return _c
}

// FleetingMetricsCollector provides a mock function with given fields:
func (_m *Taskscaler) FleetingMetricsCollector() metrics.Collector {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for FleetingMetricsCollector")
	}

	var r0 metrics.Collector
	if rf, ok := ret.Get(0).(func() metrics.Collector); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(metrics.Collector)
		}
	}

	return r0
}

// Taskscaler_FleetingMetricsCollector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FleetingMetricsCollector'
type Taskscaler_FleetingMetricsCollector_Call struct {
	*mock.Call
}

// FleetingMetricsCollector is a helper method to define mock.On call
func (_e *Taskscaler_Expecter) FleetingMetricsCollector() *Taskscaler_FleetingMetricsCollector_Call {
	return &Taskscaler_FleetingMetricsCollector_Call{Call: _e.mock.On("FleetingMetricsCollector")}
}

func (_c *Taskscaler_FleetingMetricsCollector_Call) Run(run func()) *Taskscaler_FleetingMetricsCollector_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Taskscaler_FleetingMetricsCollector_Call) Return(_a0 metrics.Collector) *Taskscaler_FleetingMetricsCollector_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Taskscaler_FleetingMetricsCollector_Call) RunAndReturn(run func() metrics.Collector) *Taskscaler_FleetingMetricsCollector_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function with given fields: key
func (_m *Taskscaler) Get(key string) taskscaler.Acquisition {
	ret := _m.Called(key)

	if len(ret) == 0 {
		panic("no return value specified for Get")
	}

	var r0 taskscaler.Acquisition
	if rf, ok := ret.Get(0).(func(string) taskscaler.Acquisition); ok {
		r0 = rf(key)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(taskscaler.Acquisition)
		}
	}

	return r0
}

// Taskscaler_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type Taskscaler_Get_Call struct {
	*mock.Call
}

// Get is a helper method to define mock.On call
//   - key string
func (_e *Taskscaler_Expecter) Get(key interface{}) *Taskscaler_Get_Call {
	return &Taskscaler_Get_Call{Call: _e.mock.On("Get", key)}
}

func (_c *Taskscaler_Get_Call) Run(run func(key string)) *Taskscaler_Get_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *Taskscaler_Get_Call) Return(_a0 taskscaler.Acquisition) *Taskscaler_Get_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Taskscaler_Get_Call) RunAndReturn(run func(string) taskscaler.Acquisition) *Taskscaler_Get_Call {
	_c.Call.Return(run)
	return _c
}

// MetricsCollector provides a mock function with given fields:
func (_m *Taskscaler) MetricsCollector() taskscalermetrics.Collector {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for MetricsCollector")
	}

	var r0 taskscalermetrics.Collector
	if rf, ok := ret.Get(0).(func() taskscalermetrics.Collector); ok {
		r0 = rf()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(taskscalermetrics.Collector)
		}
	}

	return r0
}

// Taskscaler_MetricsCollector_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MetricsCollector'
type Taskscaler_MetricsCollector_Call struct {
	*mock.Call
}

// MetricsCollector is a helper method to define mock.On call
func (_e *Taskscaler_Expecter) MetricsCollector() *Taskscaler_MetricsCollector_Call {
	return &Taskscaler_MetricsCollector_Call{Call: _e.mock.On("MetricsCollector")}
}

func (_c *Taskscaler_MetricsCollector_Call) Run(run func()) *Taskscaler_MetricsCollector_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Taskscaler_MetricsCollector_Call) Return(_a0 taskscalermetrics.Collector) *Taskscaler_MetricsCollector_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Taskscaler_MetricsCollector_Call) RunAndReturn(run func() taskscalermetrics.Collector) *Taskscaler_MetricsCollector_Call {
	_c.Call.Return(run)
	return _c
}

// Release provides a mock function with given fields: key
func (_m *Taskscaler) Release(key string) {
	_m.Called(key)
}

// Taskscaler_Release_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Release'
type Taskscaler_Release_Call struct {
	*mock.Call
}

// Release is a helper method to define mock.On call
//   - key string
func (_e *Taskscaler_Expecter) Release(key interface{}) *Taskscaler_Release_Call {
	return &Taskscaler_Release_Call{Call: _e.mock.On("Release", key)}
}

func (_c *Taskscaler_Release_Call) Run(run func(key string)) *Taskscaler_Release_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *Taskscaler_Release_Call) Return() *Taskscaler_Release_Call {
	_c.Call.Return()
	return _c
}

func (_c *Taskscaler_Release_Call) RunAndReturn(run func(string)) *Taskscaler_Release_Call {
	_c.Call.Return(run)
	return _c
}

// Reserve provides a mock function with given fields: key
func (_m *Taskscaler) Reserve(key string) error {
	ret := _m.Called(key)

	if len(ret) == 0 {
		panic("no return value specified for Reserve")
	}

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

	return r0
}

// Taskscaler_Reserve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reserve'
type Taskscaler_Reserve_Call struct {
	*mock.Call
}

// Reserve is a helper method to define mock.On call
//   - key string
func (_e *Taskscaler_Expecter) Reserve(key interface{}) *Taskscaler_Reserve_Call {
	return &Taskscaler_Reserve_Call{Call: _e.mock.On("Reserve", key)}
}

func (_c *Taskscaler_Reserve_Call) Run(run func(key string)) *Taskscaler_Reserve_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *Taskscaler_Reserve_Call) Return(_a0 error) *Taskscaler_Reserve_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Taskscaler_Reserve_Call) RunAndReturn(run func(string) error) *Taskscaler_Reserve_Call {
	_c.Call.Return(run)
	return _c
}

// Schedule provides a mock function with given fields:
func (_m *Taskscaler) Schedule() taskscaler.Schedule {
	ret := _m.Called()

	if len(ret) == 0 {
		panic("no return value specified for Schedule")
	}

	var r0 taskscaler.Schedule
	if rf, ok := ret.Get(0).(func() taskscaler.Schedule); ok {
		r0 = rf()
	} else {
		r0 = ret.Get(0).(taskscaler.Schedule)
	}

	return r0
}

// Taskscaler_Schedule_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Schedule'
type Taskscaler_Schedule_Call struct {
	*mock.Call
}

// Schedule is a helper method to define mock.On call
func (_e *Taskscaler_Expecter) Schedule() *Taskscaler_Schedule_Call {
	return &Taskscaler_Schedule_Call{Call: _e.mock.On("Schedule")}
}

func (_c *Taskscaler_Schedule_Call) Run(run func()) *Taskscaler_Schedule_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run()
	})
	return _c
}

func (_c *Taskscaler_Schedule_Call) Return(_a0 taskscaler.Schedule) *Taskscaler_Schedule_Call {
	_c.Call.Return(_a0)
	return _c
}

func (_c *Taskscaler_Schedule_Call) RunAndReturn(run func() taskscaler.Schedule) *Taskscaler_Schedule_Call {
	_c.Call.Return(run)
	return _c
}

// Shutdown provides a mock function with given fields: ctx
func (_m *Taskscaler) Shutdown(ctx context.Context) {
	_m.Called(ctx)
}

// Taskscaler_Shutdown_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Shutdown'
type Taskscaler_Shutdown_Call struct {
	*mock.Call
}

// Shutdown is a helper method to define mock.On call
//   - ctx context.Context
func (_e *Taskscaler_Expecter) Shutdown(ctx interface{}) *Taskscaler_Shutdown_Call {
	return &Taskscaler_Shutdown_Call{Call: _e.mock.On("Shutdown", ctx)}
}

func (_c *Taskscaler_Shutdown_Call) Run(run func(ctx context.Context)) *Taskscaler_Shutdown_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context))
	})
	return _c
}

func (_c *Taskscaler_Shutdown_Call) Return() *Taskscaler_Shutdown_Call {
	_c.Call.Return()
	return _c
}

func (_c *Taskscaler_Shutdown_Call) RunAndReturn(run func(context.Context)) *Taskscaler_Shutdown_Call {
	_c.Call.Return(run)
	return _c
}

// Unreserve provides a mock function with given fields: key
func (_m *Taskscaler) Unreserve(key string) {
	_m.Called(key)
}

// Taskscaler_Unreserve_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unreserve'
type Taskscaler_Unreserve_Call struct {
	*mock.Call
}

// Unreserve is a helper method to define mock.On call
//   - key string
func (_e *Taskscaler_Expecter) Unreserve(key interface{}) *Taskscaler_Unreserve_Call {
	return &Taskscaler_Unreserve_Call{Call: _e.mock.On("Unreserve", key)}
}

func (_c *Taskscaler_Unreserve_Call) Run(run func(key string)) *Taskscaler_Unreserve_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(string))
	})
	return _c
}

func (_c *Taskscaler_Unreserve_Call) Return() *Taskscaler_Unreserve_Call {
	_c.Call.Return()
	return _c
}

func (_c *Taskscaler_Unreserve_Call) RunAndReturn(run func(string)) *Taskscaler_Unreserve_Call {
	_c.Call.Return(run)
	return _c
}

// NewTaskscaler creates a new instance of Taskscaler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewTaskscaler(t interface {
	mock.TestingT
	Cleanup(func())
}) *Taskscaler {
	mock := &Taskscaler{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}
