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

package mocks

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

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

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

	return mock
}

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

type MockService_Expecter struct {
	mock *mock.Mock
}

func (_m *MockService) EXPECT() *MockService_Expecter {
	return &MockService_Expecter{mock: &_m.Mock}
}

// LogAppend provides a mock function for the type MockService
func (_mock *MockService) LogAppend(step *model.Step, logEntries []*model.LogEntry) error {
	ret := _mock.Called(step, logEntries)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*model.Step, []*model.LogEntry) error); ok {
		r0 = returnFunc(step, logEntries)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// LogAppend is a helper method to define mock.On call
//   - step *model.Step
//   - logEntries []*model.LogEntry
func (_e *MockService_Expecter) LogAppend(step interface{}, logEntries interface{}) *MockService_LogAppend_Call {
	return &MockService_LogAppend_Call{Call: _e.mock.On("LogAppend", step, logEntries)}
}

func (_c *MockService_LogAppend_Call) Run(run func(step *model.Step, logEntries []*model.LogEntry)) *MockService_LogAppend_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *model.Step
		if args[0] != nil {
			arg0 = args[0].(*model.Step)
		}
		var arg1 []*model.LogEntry
		if args[1] != nil {
			arg1 = args[1].([]*model.LogEntry)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *MockService_LogAppend_Call) RunAndReturn(run func(step *model.Step, logEntries []*model.LogEntry) error) *MockService_LogAppend_Call {
	_c.Call.Return(run)
	return _c
}

// LogDelete provides a mock function for the type MockService
func (_mock *MockService) LogDelete(step *model.Step) error {
	ret := _mock.Called(step)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*model.Step) error); ok {
		r0 = returnFunc(step)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// LogDelete is a helper method to define mock.On call
//   - step *model.Step
func (_e *MockService_Expecter) LogDelete(step interface{}) *MockService_LogDelete_Call {
	return &MockService_LogDelete_Call{Call: _e.mock.On("LogDelete", step)}
}

func (_c *MockService_LogDelete_Call) Run(run func(step *model.Step)) *MockService_LogDelete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *model.Step
		if args[0] != nil {
			arg0 = args[0].(*model.Step)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *MockService_LogDelete_Call) RunAndReturn(run func(step *model.Step) error) *MockService_LogDelete_Call {
	_c.Call.Return(run)
	return _c
}

// LogFind provides a mock function for the type MockService
func (_mock *MockService) LogFind(step *model.Step) ([]*model.LogEntry, error) {
	ret := _mock.Called(step)

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

	var r0 []*model.LogEntry
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*model.Step) ([]*model.LogEntry, error)); ok {
		return returnFunc(step)
	}
	if returnFunc, ok := ret.Get(0).(func(*model.Step) []*model.LogEntry); ok {
		r0 = returnFunc(step)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.LogEntry)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*model.Step) error); ok {
		r1 = returnFunc(step)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// LogFind is a helper method to define mock.On call
//   - step *model.Step
func (_e *MockService_Expecter) LogFind(step interface{}) *MockService_LogFind_Call {
	return &MockService_LogFind_Call{Call: _e.mock.On("LogFind", step)}
}

func (_c *MockService_LogFind_Call) Run(run func(step *model.Step)) *MockService_LogFind_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *model.Step
		if args[0] != nil {
			arg0 = args[0].(*model.Step)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockService_LogFind_Call) Return(logEntrys []*model.LogEntry, err error) *MockService_LogFind_Call {
	_c.Call.Return(logEntrys, err)
	return _c
}

func (_c *MockService_LogFind_Call) RunAndReturn(run func(step *model.Step) ([]*model.LogEntry, error)) *MockService_LogFind_Call {
	_c.Call.Return(run)
	return _c
}

// StepFinished provides a mock function for the type MockService
func (_mock *MockService) StepFinished(step *model.Step) {
	_mock.Called(step)
	return
}

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

// StepFinished is a helper method to define mock.On call
//   - step *model.Step
func (_e *MockService_Expecter) StepFinished(step interface{}) *MockService_StepFinished_Call {
	return &MockService_StepFinished_Call{Call: _e.mock.On("StepFinished", step)}
}

func (_c *MockService_StepFinished_Call) Run(run func(step *model.Step)) *MockService_StepFinished_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *model.Step
		if args[0] != nil {
			arg0 = args[0].(*model.Step)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *MockService_StepFinished_Call) RunAndReturn(run func(step *model.Step)) *MockService_StepFinished_Call {
	_c.Run(run)
	return _c
}
