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

package jobs

import (
	context "context"

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

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

type MockHistoryReader_Expecter struct {
	mock *mock.Mock
}

func (_m *MockHistoryReader) EXPECT() *MockHistoryReader_Expecter {
	return &MockHistoryReader_Expecter{mock: &_m.Mock}
}

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

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

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

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

	return r0, r1
}

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

// GetJob is a helper method to define mock.On call
//   - ctx context.Context
//   - namespace string
//   - repo string
//   - uid string
func (_e *MockHistoryReader_Expecter) GetJob(ctx interface{}, namespace interface{}, repo interface{}, uid interface{}) *MockHistoryReader_GetJob_Call {
	return &MockHistoryReader_GetJob_Call{Call: _e.mock.On("GetJob", ctx, namespace, repo, uid)}
}

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

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

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

// RecentJobs provides a mock function with given fields: ctx, namespace, repo
func (_m *MockHistoryReader) RecentJobs(ctx context.Context, namespace string, repo string) (*v0alpha1.JobList, error) {
	ret := _m.Called(ctx, namespace, repo)

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

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

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

	return r0, r1
}

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

// RecentJobs is a helper method to define mock.On call
//   - ctx context.Context
//   - namespace string
//   - repo string
func (_e *MockHistoryReader_Expecter) RecentJobs(ctx interface{}, namespace interface{}, repo interface{}) *MockHistoryReader_RecentJobs_Call {
	return &MockHistoryReader_RecentJobs_Call{Call: _e.mock.On("RecentJobs", ctx, namespace, repo)}
}

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

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

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

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

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

	return mock
}
