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

package mgt

import (
	job "github.com/goharbor/harbor/src/jobservice/job"

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

	query "github.com/goharbor/harbor/src/jobservice/common/query"
)

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

// GetJob provides a mock function with given fields: jobID
func (_m *MockManager) GetJob(jobID string) (*job.Stats, error) {
	ret := _m.Called(jobID)

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

	var r0 *job.Stats
	var r1 error
	if rf, ok := ret.Get(0).(func(string) (*job.Stats, error)); ok {
		return rf(jobID)
	}
	if rf, ok := ret.Get(0).(func(string) *job.Stats); ok {
		r0 = rf(jobID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*job.Stats)
		}
	}

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

	return r0, r1
}

// GetJobs provides a mock function with given fields: q
func (_m *MockManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error) {
	ret := _m.Called(q)

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

	var r0 []*job.Stats
	var r1 int64
	var r2 error
	if rf, ok := ret.Get(0).(func(*query.Parameter) ([]*job.Stats, int64, error)); ok {
		return rf(q)
	}
	if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok {
		r0 = rf(q)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*job.Stats)
		}
	}

	if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok {
		r1 = rf(q)
	} else {
		r1 = ret.Get(1).(int64)
	}

	if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok {
		r2 = rf(q)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// GetPeriodicExecution provides a mock function with given fields: pID, q
func (_m *MockManager) GetPeriodicExecution(pID string, q *query.Parameter) ([]*job.Stats, int64, error) {
	ret := _m.Called(pID, q)

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

	var r0 []*job.Stats
	var r1 int64
	var r2 error
	if rf, ok := ret.Get(0).(func(string, *query.Parameter) ([]*job.Stats, int64, error)); ok {
		return rf(pID, q)
	}
	if rf, ok := ret.Get(0).(func(string, *query.Parameter) []*job.Stats); ok {
		r0 = rf(pID, q)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*job.Stats)
		}
	}

	if rf, ok := ret.Get(1).(func(string, *query.Parameter) int64); ok {
		r1 = rf(pID, q)
	} else {
		r1 = ret.Get(1).(int64)
	}

	if rf, ok := ret.Get(2).(func(string, *query.Parameter) error); ok {
		r2 = rf(pID, q)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// GetScheduledJobs provides a mock function with given fields: q
func (_m *MockManager) GetScheduledJobs(q *query.Parameter) ([]*job.Stats, int64, error) {
	ret := _m.Called(q)

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

	var r0 []*job.Stats
	var r1 int64
	var r2 error
	if rf, ok := ret.Get(0).(func(*query.Parameter) ([]*job.Stats, int64, error)); ok {
		return rf(q)
	}
	if rf, ok := ret.Get(0).(func(*query.Parameter) []*job.Stats); ok {
		r0 = rf(q)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*job.Stats)
		}
	}

	if rf, ok := ret.Get(1).(func(*query.Parameter) int64); ok {
		r1 = rf(q)
	} else {
		r1 = ret.Get(1).(int64)
	}

	if rf, ok := ret.Get(2).(func(*query.Parameter) error); ok {
		r2 = rf(q)
	} else {
		r2 = ret.Error(2)
	}

	return r0, r1, r2
}

// SaveJob provides a mock function with given fields: _a0
func (_m *MockManager) SaveJob(_a0 *job.Stats) error {
	ret := _m.Called(_a0)

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

	var r0 error
	if rf, ok := ret.Get(0).(func(*job.Stats) error); ok {
		r0 = rf(_a0)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}

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

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

	return mock
}
