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

package mocks

import (
	"crypto"

	mock "github.com/stretchr/testify/mock"
	"go.woodpecker-ci.org/woodpecker/v3/server/forge"
	"go.woodpecker-ci.org/woodpecker/v3/server/model"
	"go.woodpecker-ci.org/woodpecker/v3/server/services/config"
	"go.woodpecker-ci.org/woodpecker/v3/server/services/environment"
	"go.woodpecker-ci.org/woodpecker/v3/server/services/registry"
	"go.woodpecker-ci.org/woodpecker/v3/server/services/secret"
)

// 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
}

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

type MockManager_Expecter struct {
	mock *mock.Mock
}

func (_m *MockManager) EXPECT() *MockManager_Expecter {
	return &MockManager_Expecter{mock: &_m.Mock}
}

// ConfigServiceFromRepo provides a mock function for the type MockManager
func (_mock *MockManager) ConfigServiceFromRepo(repo *model.Repo) config.Service {
	ret := _mock.Called(repo)

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

	var r0 config.Service
	if returnFunc, ok := ret.Get(0).(func(*model.Repo) config.Service); ok {
		r0 = returnFunc(repo)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(config.Service)
		}
	}
	return r0
}

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

// ConfigServiceFromRepo is a helper method to define mock.On call
//   - repo *model.Repo
func (_e *MockManager_Expecter) ConfigServiceFromRepo(repo interface{}) *MockManager_ConfigServiceFromRepo_Call {
	return &MockManager_ConfigServiceFromRepo_Call{Call: _e.mock.On("ConfigServiceFromRepo", repo)}
}

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

func (_c *MockManager_ConfigServiceFromRepo_Call) Return(service config.Service) *MockManager_ConfigServiceFromRepo_Call {
	_c.Call.Return(service)
	return _c
}

func (_c *MockManager_ConfigServiceFromRepo_Call) RunAndReturn(run func(repo *model.Repo) config.Service) *MockManager_ConfigServiceFromRepo_Call {
	_c.Call.Return(run)
	return _c
}

// EnvironmentService provides a mock function for the type MockManager
func (_mock *MockManager) EnvironmentService() environment.Service {
	ret := _mock.Called()

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

	var r0 environment.Service
	if returnFunc, ok := ret.Get(0).(func() environment.Service); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(environment.Service)
		}
	}
	return r0
}

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

// EnvironmentService is a helper method to define mock.On call
func (_e *MockManager_Expecter) EnvironmentService() *MockManager_EnvironmentService_Call {
	return &MockManager_EnvironmentService_Call{Call: _e.mock.On("EnvironmentService")}
}

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

func (_c *MockManager_EnvironmentService_Call) Return(service environment.Service) *MockManager_EnvironmentService_Call {
	_c.Call.Return(service)
	return _c
}

func (_c *MockManager_EnvironmentService_Call) RunAndReturn(run func() environment.Service) *MockManager_EnvironmentService_Call {
	_c.Call.Return(run)
	return _c
}

// ForgeByID provides a mock function for the type MockManager
func (_mock *MockManager) ForgeByID(forgeID int64) (forge.Forge, error) {
	ret := _mock.Called(forgeID)

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

	var r0 forge.Forge
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(int64) (forge.Forge, error)); ok {
		return returnFunc(forgeID)
	}
	if returnFunc, ok := ret.Get(0).(func(int64) forge.Forge); ok {
		r0 = returnFunc(forgeID)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(forge.Forge)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(int64) error); ok {
		r1 = returnFunc(forgeID)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ForgeByID is a helper method to define mock.On call
//   - forgeID int64
func (_e *MockManager_Expecter) ForgeByID(forgeID interface{}) *MockManager_ForgeByID_Call {
	return &MockManager_ForgeByID_Call{Call: _e.mock.On("ForgeByID", forgeID)}
}

func (_c *MockManager_ForgeByID_Call) Run(run func(forgeID int64)) *MockManager_ForgeByID_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 *MockManager_ForgeByID_Call) Return(forge1 forge.Forge, err error) *MockManager_ForgeByID_Call {
	_c.Call.Return(forge1, err)
	return _c
}

func (_c *MockManager_ForgeByID_Call) RunAndReturn(run func(forgeID int64) (forge.Forge, error)) *MockManager_ForgeByID_Call {
	_c.Call.Return(run)
	return _c
}

// ForgeFromRepo provides a mock function for the type MockManager
func (_mock *MockManager) ForgeFromRepo(repo *model.Repo) (forge.Forge, error) {
	ret := _mock.Called(repo)

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

	var r0 forge.Forge
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*model.Repo) (forge.Forge, error)); ok {
		return returnFunc(repo)
	}
	if returnFunc, ok := ret.Get(0).(func(*model.Repo) forge.Forge); ok {
		r0 = returnFunc(repo)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(forge.Forge)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*model.Repo) error); ok {
		r1 = returnFunc(repo)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ForgeFromRepo is a helper method to define mock.On call
//   - repo *model.Repo
func (_e *MockManager_Expecter) ForgeFromRepo(repo interface{}) *MockManager_ForgeFromRepo_Call {
	return &MockManager_ForgeFromRepo_Call{Call: _e.mock.On("ForgeFromRepo", repo)}
}

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

func (_c *MockManager_ForgeFromRepo_Call) Return(forge1 forge.Forge, err error) *MockManager_ForgeFromRepo_Call {
	_c.Call.Return(forge1, err)
	return _c
}

func (_c *MockManager_ForgeFromRepo_Call) RunAndReturn(run func(repo *model.Repo) (forge.Forge, error)) *MockManager_ForgeFromRepo_Call {
	_c.Call.Return(run)
	return _c
}

// ForgeFromUser provides a mock function for the type MockManager
func (_mock *MockManager) ForgeFromUser(user *model.User) (forge.Forge, error) {
	ret := _mock.Called(user)

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

	var r0 forge.Forge
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(*model.User) (forge.Forge, error)); ok {
		return returnFunc(user)
	}
	if returnFunc, ok := ret.Get(0).(func(*model.User) forge.Forge); ok {
		r0 = returnFunc(user)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(forge.Forge)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(*model.User) error); ok {
		r1 = returnFunc(user)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// ForgeFromUser is a helper method to define mock.On call
//   - user *model.User
func (_e *MockManager_Expecter) ForgeFromUser(user interface{}) *MockManager_ForgeFromUser_Call {
	return &MockManager_ForgeFromUser_Call{Call: _e.mock.On("ForgeFromUser", user)}
}

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

func (_c *MockManager_ForgeFromUser_Call) Return(forge1 forge.Forge, err error) *MockManager_ForgeFromUser_Call {
	_c.Call.Return(forge1, err)
	return _c
}

func (_c *MockManager_ForgeFromUser_Call) RunAndReturn(run func(user *model.User) (forge.Forge, error)) *MockManager_ForgeFromUser_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryService provides a mock function for the type MockManager
func (_mock *MockManager) RegistryService() registry.Service {
	ret := _mock.Called()

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

	var r0 registry.Service
	if returnFunc, ok := ret.Get(0).(func() registry.Service); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(registry.Service)
		}
	}
	return r0
}

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

// RegistryService is a helper method to define mock.On call
func (_e *MockManager_Expecter) RegistryService() *MockManager_RegistryService_Call {
	return &MockManager_RegistryService_Call{Call: _e.mock.On("RegistryService")}
}

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

func (_c *MockManager_RegistryService_Call) Return(service registry.Service) *MockManager_RegistryService_Call {
	_c.Call.Return(service)
	return _c
}

func (_c *MockManager_RegistryService_Call) RunAndReturn(run func() registry.Service) *MockManager_RegistryService_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryServiceFromRepo provides a mock function for the type MockManager
func (_mock *MockManager) RegistryServiceFromRepo(repo *model.Repo) registry.Service {
	ret := _mock.Called(repo)

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

	var r0 registry.Service
	if returnFunc, ok := ret.Get(0).(func(*model.Repo) registry.Service); ok {
		r0 = returnFunc(repo)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(registry.Service)
		}
	}
	return r0
}

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

// RegistryServiceFromRepo is a helper method to define mock.On call
//   - repo *model.Repo
func (_e *MockManager_Expecter) RegistryServiceFromRepo(repo interface{}) *MockManager_RegistryServiceFromRepo_Call {
	return &MockManager_RegistryServiceFromRepo_Call{Call: _e.mock.On("RegistryServiceFromRepo", repo)}
}

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

func (_c *MockManager_RegistryServiceFromRepo_Call) Return(service registry.Service) *MockManager_RegistryServiceFromRepo_Call {
	_c.Call.Return(service)
	return _c
}

func (_c *MockManager_RegistryServiceFromRepo_Call) RunAndReturn(run func(repo *model.Repo) registry.Service) *MockManager_RegistryServiceFromRepo_Call {
	_c.Call.Return(run)
	return _c
}

// SecretService provides a mock function for the type MockManager
func (_mock *MockManager) SecretService() secret.Service {
	ret := _mock.Called()

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

	var r0 secret.Service
	if returnFunc, ok := ret.Get(0).(func() secret.Service); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(secret.Service)
		}
	}
	return r0
}

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

// SecretService is a helper method to define mock.On call
func (_e *MockManager_Expecter) SecretService() *MockManager_SecretService_Call {
	return &MockManager_SecretService_Call{Call: _e.mock.On("SecretService")}
}

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

func (_c *MockManager_SecretService_Call) Return(service secret.Service) *MockManager_SecretService_Call {
	_c.Call.Return(service)
	return _c
}

func (_c *MockManager_SecretService_Call) RunAndReturn(run func() secret.Service) *MockManager_SecretService_Call {
	_c.Call.Return(run)
	return _c
}

// SecretServiceFromRepo provides a mock function for the type MockManager
func (_mock *MockManager) SecretServiceFromRepo(repo *model.Repo) secret.Service {
	ret := _mock.Called(repo)

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

	var r0 secret.Service
	if returnFunc, ok := ret.Get(0).(func(*model.Repo) secret.Service); ok {
		r0 = returnFunc(repo)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(secret.Service)
		}
	}
	return r0
}

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

// SecretServiceFromRepo is a helper method to define mock.On call
//   - repo *model.Repo
func (_e *MockManager_Expecter) SecretServiceFromRepo(repo interface{}) *MockManager_SecretServiceFromRepo_Call {
	return &MockManager_SecretServiceFromRepo_Call{Call: _e.mock.On("SecretServiceFromRepo", repo)}
}

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

func (_c *MockManager_SecretServiceFromRepo_Call) Return(service secret.Service) *MockManager_SecretServiceFromRepo_Call {
	_c.Call.Return(service)
	return _c
}

func (_c *MockManager_SecretServiceFromRepo_Call) RunAndReturn(run func(repo *model.Repo) secret.Service) *MockManager_SecretServiceFromRepo_Call {
	_c.Call.Return(run)
	return _c
}

// SignaturePublicKey provides a mock function for the type MockManager
func (_mock *MockManager) SignaturePublicKey() crypto.PublicKey {
	ret := _mock.Called()

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

	var r0 crypto.PublicKey
	if returnFunc, ok := ret.Get(0).(func() crypto.PublicKey); ok {
		r0 = returnFunc()
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(crypto.PublicKey)
		}
	}
	return r0
}

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

// SignaturePublicKey is a helper method to define mock.On call
func (_e *MockManager_Expecter) SignaturePublicKey() *MockManager_SignaturePublicKey_Call {
	return &MockManager_SignaturePublicKey_Call{Call: _e.mock.On("SignaturePublicKey")}
}

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

func (_c *MockManager_SignaturePublicKey_Call) Return(publicKey crypto.PublicKey) *MockManager_SignaturePublicKey_Call {
	_c.Call.Return(publicKey)
	return _c
}

func (_c *MockManager_SignaturePublicKey_Call) RunAndReturn(run func() crypto.PublicKey) *MockManager_SignaturePublicKey_Call {
	_c.Call.Return(run)
	return _c
}
