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

package jobs

import (
	context "context"
	time "time"

	mock "github.com/stretchr/testify/mock"

	v0alpha1 "github.com/grafana/grafana/apps/provisioning/pkg/apis/provisioning/v0alpha1"
)

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

type MockStore_Expecter struct {
	mock *mock.Mock
}

func (_m *MockStore) EXPECT() *MockStore_Expecter {
	return &MockStore_Expecter{mock: &_m.Mock}
}

// Claim provides a mock function with given fields: ctx
func (_m *MockStore) Claim(ctx context.Context) (*v0alpha1.Job, func(), error) {
	ret := _m.Called(ctx)

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

	var r0 *v0alpha1.Job
	var r1 func()
	var r2 error
	if rf, ok := ret.Get(0).(func(context.Context) (*v0alpha1.Job, func(), error)); ok {
		return rf(ctx)
	}
	if rf, ok := ret.Get(0).(func(context.Context) *v0alpha1.Job); ok {
		r0 = rf(ctx)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0alpha1.Job)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context) func()); ok {
		r1 = rf(ctx)
	} else {
		if ret.Get(1) != nil {
			r1 = ret.Get(1).(func())
		}
	}

	if rf, ok := ret.Get(2).(func(context.Context) error); ok {
		r2 = rf(ctx)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

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

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

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

func (_c *MockStore_Claim_Call) Return(job *v0alpha1.Job, rollback func(), err error) *MockStore_Claim_Call {
	_c.Call.Return(job, rollback, err)
	return _c
}

func (_c *MockStore_Claim_Call) RunAndReturn(run func(context.Context) (*v0alpha1.Job, func(), error)) *MockStore_Claim_Call {
	_c.Call.Return(run)
	return _c
}

// Complete provides a mock function with given fields: ctx, job
func (_m *MockStore) Complete(ctx context.Context, job *v0alpha1.Job) error {
	ret := _m.Called(ctx, job)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0alpha1.Job) error); ok {
		r0 = rf(ctx, job)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// Complete is a helper method to define mock.On call
//   - ctx context.Context
//   - job *v0alpha1.Job
func (_e *MockStore_Expecter) Complete(ctx interface{}, job interface{}) *MockStore_Complete_Call {
	return &MockStore_Complete_Call{Call: _e.mock.On("Complete", ctx, job)}
}

func (_c *MockStore_Complete_Call) Run(run func(ctx context.Context, job *v0alpha1.Job)) *MockStore_Complete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*v0alpha1.Job))
	})
	return _c
}

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

func (_c *MockStore_Complete_Call) RunAndReturn(run func(context.Context, *v0alpha1.Job) error) *MockStore_Complete_Call {
	_c.Call.Return(run)
	return _c
}

// Get provides a mock function with given fields: ctx, namespace, name
func (_m *MockStore) Get(ctx context.Context, namespace string, name string) (*v0alpha1.Job, error) {
	ret := _m.Called(ctx, namespace, name)

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

	var r0 *v0alpha1.Job
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string) (*v0alpha1.Job, error)); ok {
		return rf(ctx, namespace, name)
	}
	if rf, ok := ret.Get(0).(func(context.Context, string, string) *v0alpha1.Job); ok {
		r0 = rf(ctx, namespace, name)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0alpha1.Job)
		}
	}

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

	return r0, r1
}

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

// Get is a helper method to define mock.On call
//   - ctx context.Context
//   - namespace string
//   - name string
func (_e *MockStore_Expecter) Get(ctx interface{}, namespace interface{}, name interface{}) *MockStore_Get_Call {
	return &MockStore_Get_Call{Call: _e.mock.On("Get", ctx, namespace, name)}
}

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

func (_c *MockStore_Get_Call) Return(_a0 *v0alpha1.Job, _a1 error) *MockStore_Get_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockStore_Get_Call) RunAndReturn(run func(context.Context, string, string) (*v0alpha1.Job, error)) *MockStore_Get_Call {
	_c.Call.Return(run)
	return _c
}

// ListExpiredJobs provides a mock function with given fields: ctx, expiredBefore, limit
func (_m *MockStore) ListExpiredJobs(ctx context.Context, expiredBefore time.Time, limit int) ([]*v0alpha1.Job, error) {
	ret := _m.Called(ctx, expiredBefore, limit)

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

	var r0 []*v0alpha1.Job
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, time.Time, int) ([]*v0alpha1.Job, error)); ok {
		return rf(ctx, expiredBefore, limit)
	}
	if rf, ok := ret.Get(0).(func(context.Context, time.Time, int) []*v0alpha1.Job); ok {
		r0 = rf(ctx, expiredBefore, limit)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*v0alpha1.Job)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, time.Time, int) error); ok {
		r1 = rf(ctx, expiredBefore, limit)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// ListExpiredJobs is a helper method to define mock.On call
//   - ctx context.Context
//   - expiredBefore time.Time
//   - limit int
func (_e *MockStore_Expecter) ListExpiredJobs(ctx interface{}, expiredBefore interface{}, limit interface{}) *MockStore_ListExpiredJobs_Call {
	return &MockStore_ListExpiredJobs_Call{Call: _e.mock.On("ListExpiredJobs", ctx, expiredBefore, limit)}
}

func (_c *MockStore_ListExpiredJobs_Call) Run(run func(ctx context.Context, expiredBefore time.Time, limit int)) *MockStore_ListExpiredJobs_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(time.Time), args[2].(int))
	})
	return _c
}

func (_c *MockStore_ListExpiredJobs_Call) Return(_a0 []*v0alpha1.Job, _a1 error) *MockStore_ListExpiredJobs_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockStore_ListExpiredJobs_Call) RunAndReturn(run func(context.Context, time.Time, int) ([]*v0alpha1.Job, error)) *MockStore_ListExpiredJobs_Call {
	_c.Call.Return(run)
	return _c
}

// RenewLease provides a mock function with given fields: ctx, job
func (_m *MockStore) RenewLease(ctx context.Context, job *v0alpha1.Job) error {
	ret := _m.Called(ctx, job)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0alpha1.Job) error); ok {
		r0 = rf(ctx, job)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

// RenewLease is a helper method to define mock.On call
//   - ctx context.Context
//   - job *v0alpha1.Job
func (_e *MockStore_Expecter) RenewLease(ctx interface{}, job interface{}) *MockStore_RenewLease_Call {
	return &MockStore_RenewLease_Call{Call: _e.mock.On("RenewLease", ctx, job)}
}

func (_c *MockStore_RenewLease_Call) Run(run func(ctx context.Context, job *v0alpha1.Job)) *MockStore_RenewLease_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*v0alpha1.Job))
	})
	return _c
}

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

func (_c *MockStore_RenewLease_Call) RunAndReturn(run func(context.Context, *v0alpha1.Job) error) *MockStore_RenewLease_Call {
	_c.Call.Return(run)
	return _c
}

// Update provides a mock function with given fields: ctx, job
func (_m *MockStore) Update(ctx context.Context, job *v0alpha1.Job) (*v0alpha1.Job, error) {
	ret := _m.Called(ctx, job)

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

	var r0 *v0alpha1.Job
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0alpha1.Job) (*v0alpha1.Job, error)); ok {
		return rf(ctx, job)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v0alpha1.Job) *v0alpha1.Job); ok {
		r0 = rf(ctx, job)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0alpha1.Job)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v0alpha1.Job) error); ok {
		r1 = rf(ctx, job)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Update is a helper method to define mock.On call
//   - ctx context.Context
//   - job *v0alpha1.Job
func (_e *MockStore_Expecter) Update(ctx interface{}, job interface{}) *MockStore_Update_Call {
	return &MockStore_Update_Call{Call: _e.mock.On("Update", ctx, job)}
}

func (_c *MockStore_Update_Call) Run(run func(ctx context.Context, job *v0alpha1.Job)) *MockStore_Update_Call {
	_c.Call.Run(func(args mock.Arguments) {
		run(args[0].(context.Context), args[1].(*v0alpha1.Job))
	})
	return _c
}

func (_c *MockStore_Update_Call) Return(_a0 *v0alpha1.Job, _a1 error) *MockStore_Update_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *MockStore_Update_Call) RunAndReturn(run func(context.Context, *v0alpha1.Job) (*v0alpha1.Job, error)) *MockStore_Update_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
