// Code generated by mockery; DO NOT EDIT.
// github.com/vektra/mockery
// template: testify

package mocks

import (
	"context"

	mock "github.com/stretchr/testify/mock"
	"go.woodpecker-ci.org/woodpecker/v3/server/model"
	"go.woodpecker-ci.org/woodpecker/v3/server/queue"
)

// NewMockQueue creates a new instance of MockQueue. 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 NewMockQueue(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockQueue {
	mock := &MockQueue{}
	mock.Mock.Test(t)

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

	return mock
}

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

type MockQueue_Expecter struct {
	mock *mock.Mock
}

func (_m *MockQueue) EXPECT() *MockQueue_Expecter {
	return &MockQueue_Expecter{mock: &_m.Mock}
}

// Done provides a mock function for the type MockQueue
func (_mock *MockQueue) Done(c context.Context, id string, exitStatus model.StatusValue) error {
	ret := _mock.Called(c, id, exitStatus)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, model.StatusValue) error); ok {
		r0 = returnFunc(c, id, exitStatus)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Done is a helper method to define mock.On call
//   - c context.Context
//   - id string
//   - exitStatus model.StatusValue
func (_e *MockQueue_Expecter) Done(c interface{}, id interface{}, exitStatus interface{}) *MockQueue_Done_Call {
	return &MockQueue_Done_Call{Call: _e.mock.On("Done", c, id, exitStatus)}
}

func (_c *MockQueue_Done_Call) Run(run func(c context.Context, id string, exitStatus model.StatusValue)) *MockQueue_Done_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 model.StatusValue
		if args[2] != nil {
			arg2 = args[2].(model.StatusValue)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockQueue_Done_Call) Return(err error) *MockQueue_Done_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockQueue_Done_Call) RunAndReturn(run func(c context.Context, id string, exitStatus model.StatusValue) error) *MockQueue_Done_Call {
	_c.Call.Return(run)
	return _c
}

// Error provides a mock function for the type MockQueue
func (_mock *MockQueue) Error(c context.Context, id string, err error) error {
	ret := _mock.Called(c, id, err)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string, error) error); ok {
		r0 = returnFunc(c, id, err)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Error is a helper method to define mock.On call
//   - c context.Context
//   - id string
//   - err error
func (_e *MockQueue_Expecter) Error(c interface{}, id interface{}, err interface{}) *MockQueue_Error_Call {
	return &MockQueue_Error_Call{Call: _e.mock.On("Error", c, id, err)}
}

func (_c *MockQueue_Error_Call) Run(run func(c context.Context, id string, err error)) *MockQueue_Error_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		var arg2 error
		if args[2] != nil {
			arg2 = args[2].(error)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockQueue_Error_Call) Return(err1 error) *MockQueue_Error_Call {
	_c.Call.Return(err1)
	return _c
}

func (_c *MockQueue_Error_Call) RunAndReturn(run func(c context.Context, id string, err error) error) *MockQueue_Error_Call {
	_c.Call.Return(run)
	return _c
}

// ErrorAtOnce provides a mock function for the type MockQueue
func (_mock *MockQueue) ErrorAtOnce(c context.Context, ids []string, err error) error {
	ret := _mock.Called(c, ids, err)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []string, error) error); ok {
		r0 = returnFunc(c, ids, err)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// ErrorAtOnce is a helper method to define mock.On call
//   - c context.Context
//   - ids []string
//   - err error
func (_e *MockQueue_Expecter) ErrorAtOnce(c interface{}, ids interface{}, err interface{}) *MockQueue_ErrorAtOnce_Call {
	return &MockQueue_ErrorAtOnce_Call{Call: _e.mock.On("ErrorAtOnce", c, ids, err)}
}

func (_c *MockQueue_ErrorAtOnce_Call) Run(run func(c context.Context, ids []string, err error)) *MockQueue_ErrorAtOnce_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []string
		if args[1] != nil {
			arg1 = args[1].([]string)
		}
		var arg2 error
		if args[2] != nil {
			arg2 = args[2].(error)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockQueue_ErrorAtOnce_Call) Return(err1 error) *MockQueue_ErrorAtOnce_Call {
	_c.Call.Return(err1)
	return _c
}

func (_c *MockQueue_ErrorAtOnce_Call) RunAndReturn(run func(c context.Context, ids []string, err error) error) *MockQueue_ErrorAtOnce_Call {
	_c.Call.Return(run)
	return _c
}

// Extend provides a mock function for the type MockQueue
func (_mock *MockQueue) Extend(c context.Context, agentID int64, workflowID string) error {
	ret := _mock.Called(c, agentID, workflowID)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, string) error); ok {
		r0 = returnFunc(c, agentID, workflowID)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Extend is a helper method to define mock.On call
//   - c context.Context
//   - agentID int64
//   - workflowID string
func (_e *MockQueue_Expecter) Extend(c interface{}, agentID interface{}, workflowID interface{}) *MockQueue_Extend_Call {
	return &MockQueue_Extend_Call{Call: _e.mock.On("Extend", c, agentID, workflowID)}
}

func (_c *MockQueue_Extend_Call) Run(run func(c context.Context, agentID int64, workflowID string)) *MockQueue_Extend_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 int64
		if args[1] != nil {
			arg1 = args[1].(int64)
		}
		var arg2 string
		if args[2] != nil {
			arg2 = args[2].(string)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockQueue_Extend_Call) Return(err error) *MockQueue_Extend_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockQueue_Extend_Call) RunAndReturn(run func(c context.Context, agentID int64, workflowID string) error) *MockQueue_Extend_Call {
	_c.Call.Return(run)
	return _c
}

// Info provides a mock function for the type MockQueue
func (_mock *MockQueue) Info(c context.Context) queue.InfoT {
	ret := _mock.Called(c)

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

	var r0 queue.InfoT
	if returnFunc, ok := ret.Get(0).(func(context.Context) queue.InfoT); ok {
		r0 = returnFunc(c)
	} else {
		r0 = ret.Get(0).(queue.InfoT)
	}
	return r0
}

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

// Info is a helper method to define mock.On call
//   - c context.Context
func (_e *MockQueue_Expecter) Info(c interface{}) *MockQueue_Info_Call {
	return &MockQueue_Info_Call{Call: _e.mock.On("Info", c)}
}

func (_c *MockQueue_Info_Call) Run(run func(c context.Context)) *MockQueue_Info_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockQueue_Info_Call) Return(infoT queue.InfoT) *MockQueue_Info_Call {
	_c.Call.Return(infoT)
	return _c
}

func (_c *MockQueue_Info_Call) RunAndReturn(run func(c context.Context) queue.InfoT) *MockQueue_Info_Call {
	_c.Call.Return(run)
	return _c
}

// KickAgentWorkers provides a mock function for the type MockQueue
func (_mock *MockQueue) KickAgentWorkers(agentID int64) {
	_mock.Called(agentID)
	return
}

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

// KickAgentWorkers is a helper method to define mock.On call
//   - agentID int64
func (_e *MockQueue_Expecter) KickAgentWorkers(agentID interface{}) *MockQueue_KickAgentWorkers_Call {
	return &MockQueue_KickAgentWorkers_Call{Call: _e.mock.On("KickAgentWorkers", agentID)}
}

func (_c *MockQueue_KickAgentWorkers_Call) Run(run func(agentID int64)) *MockQueue_KickAgentWorkers_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *MockQueue_KickAgentWorkers_Call) RunAndReturn(run func(agentID int64)) *MockQueue_KickAgentWorkers_Call {
	_c.Run(run)
	return _c
}

// Pause provides a mock function for the type MockQueue
func (_mock *MockQueue) Pause() {
	_mock.Called()
	return
}

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

// Pause is a helper method to define mock.On call
func (_e *MockQueue_Expecter) Pause() *MockQueue_Pause_Call {
	return &MockQueue_Pause_Call{Call: _e.mock.On("Pause")}
}

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

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

func (_c *MockQueue_Pause_Call) RunAndReturn(run func()) *MockQueue_Pause_Call {
	_c.Run(run)
	return _c
}

// Poll provides a mock function for the type MockQueue
func (_mock *MockQueue) Poll(c context.Context, agentID int64, f queue.FilterFn) (*model.Task, error) {
	ret := _mock.Called(c, agentID, f)

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

	var r0 *model.Task
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, queue.FilterFn) (*model.Task, error)); ok {
		return returnFunc(c, agentID, f)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, int64, queue.FilterFn) *model.Task); ok {
		r0 = returnFunc(c, agentID, f)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Task)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, int64, queue.FilterFn) error); ok {
		r1 = returnFunc(c, agentID, f)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Poll is a helper method to define mock.On call
//   - c context.Context
//   - agentID int64
//   - f queue.FilterFn
func (_e *MockQueue_Expecter) Poll(c interface{}, agentID interface{}, f interface{}) *MockQueue_Poll_Call {
	return &MockQueue_Poll_Call{Call: _e.mock.On("Poll", c, agentID, f)}
}

func (_c *MockQueue_Poll_Call) Run(run func(c context.Context, agentID int64, f queue.FilterFn)) *MockQueue_Poll_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 int64
		if args[1] != nil {
			arg1 = args[1].(int64)
		}
		var arg2 queue.FilterFn
		if args[2] != nil {
			arg2 = args[2].(queue.FilterFn)
		}
		run(
			arg0,
			arg1,
			arg2,
		)
	})
	return _c
}

func (_c *MockQueue_Poll_Call) Return(task *model.Task, err error) *MockQueue_Poll_Call {
	_c.Call.Return(task, err)
	return _c
}

func (_c *MockQueue_Poll_Call) RunAndReturn(run func(c context.Context, agentID int64, f queue.FilterFn) (*model.Task, error)) *MockQueue_Poll_Call {
	_c.Call.Return(run)
	return _c
}

// PushAtOnce provides a mock function for the type MockQueue
func (_mock *MockQueue) PushAtOnce(c context.Context, tasks []*model.Task) error {
	ret := _mock.Called(c, tasks)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, []*model.Task) error); ok {
		r0 = returnFunc(c, tasks)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// PushAtOnce is a helper method to define mock.On call
//   - c context.Context
//   - tasks []*model.Task
func (_e *MockQueue_Expecter) PushAtOnce(c interface{}, tasks interface{}) *MockQueue_PushAtOnce_Call {
	return &MockQueue_PushAtOnce_Call{Call: _e.mock.On("PushAtOnce", c, tasks)}
}

func (_c *MockQueue_PushAtOnce_Call) Run(run func(c context.Context, tasks []*model.Task)) *MockQueue_PushAtOnce_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 []*model.Task
		if args[1] != nil {
			arg1 = args[1].([]*model.Task)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockQueue_PushAtOnce_Call) Return(err error) *MockQueue_PushAtOnce_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockQueue_PushAtOnce_Call) RunAndReturn(run func(c context.Context, tasks []*model.Task) error) *MockQueue_PushAtOnce_Call {
	_c.Call.Return(run)
	return _c
}

// Resume provides a mock function for the type MockQueue
func (_mock *MockQueue) Resume() {
	_mock.Called()
	return
}

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

// Resume is a helper method to define mock.On call
func (_e *MockQueue_Expecter) Resume() *MockQueue_Resume_Call {
	return &MockQueue_Resume_Call{Call: _e.mock.On("Resume")}
}

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

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

func (_c *MockQueue_Resume_Call) RunAndReturn(run func()) *MockQueue_Resume_Call {
	_c.Run(run)
	return _c
}

// Wait provides a mock function for the type MockQueue
func (_mock *MockQueue) Wait(c context.Context, id string) error {
	ret := _mock.Called(c, id)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
		r0 = returnFunc(c, id)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// Wait is a helper method to define mock.On call
//   - c context.Context
//   - id string
func (_e *MockQueue_Expecter) Wait(c interface{}, id interface{}) *MockQueue_Wait_Call {
	return &MockQueue_Wait_Call{Call: _e.mock.On("Wait", c, id)}
}

func (_c *MockQueue_Wait_Call) Run(run func(c context.Context, id string)) *MockQueue_Wait_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockQueue_Wait_Call) Return(err error) *MockQueue_Wait_Call {
	_c.Call.Return(err)
	return _c
}

func (_c *MockQueue_Wait_Call) RunAndReturn(run func(c context.Context, id string) error) *MockQueue_Wait_Call {
	_c.Call.Return(run)
	return _c
}
