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

package mocks

import (
	"context"

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

// GlobalRegistryCreate provides a mock function for the type MockService
func (_mock *MockService) GlobalRegistryCreate(registry *model.Registry) error {
	ret := _mock.Called(registry)

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

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

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

// GlobalRegistryCreate is a helper method to define mock.On call
//   - registry *model.Registry
func (_e *MockService_Expecter) GlobalRegistryCreate(registry interface{}) *MockService_GlobalRegistryCreate_Call {
	return &MockService_GlobalRegistryCreate_Call{Call: _e.mock.On("GlobalRegistryCreate", registry)}
}

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

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

func (_c *MockService_GlobalRegistryCreate_Call) RunAndReturn(run func(registry *model.Registry) error) *MockService_GlobalRegistryCreate_Call {
	_c.Call.Return(run)
	return _c
}

// GlobalRegistryDelete provides a mock function for the type MockService
func (_mock *MockService) GlobalRegistryDelete(s string) error {
	ret := _mock.Called(s)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
		r0 = returnFunc(s)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// GlobalRegistryDelete is a helper method to define mock.On call
//   - s string
func (_e *MockService_Expecter) GlobalRegistryDelete(s interface{}) *MockService_GlobalRegistryDelete_Call {
	return &MockService_GlobalRegistryDelete_Call{Call: _e.mock.On("GlobalRegistryDelete", s)}
}

func (_c *MockService_GlobalRegistryDelete_Call) Run(run func(s string)) *MockService_GlobalRegistryDelete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *MockService_GlobalRegistryDelete_Call) RunAndReturn(run func(s string) error) *MockService_GlobalRegistryDelete_Call {
	_c.Call.Return(run)
	return _c
}

// GlobalRegistryFind provides a mock function for the type MockService
func (_mock *MockService) GlobalRegistryFind(s string) (*model.Registry, error) {
	ret := _mock.Called(s)

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

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

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

// GlobalRegistryFind is a helper method to define mock.On call
//   - s string
func (_e *MockService_Expecter) GlobalRegistryFind(s interface{}) *MockService_GlobalRegistryFind_Call {
	return &MockService_GlobalRegistryFind_Call{Call: _e.mock.On("GlobalRegistryFind", s)}
}

func (_c *MockService_GlobalRegistryFind_Call) Run(run func(s string)) *MockService_GlobalRegistryFind_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 string
		if args[0] != nil {
			arg0 = args[0].(string)
		}
		run(
			arg0,
		)
	})
	return _c
}

func (_c *MockService_GlobalRegistryFind_Call) Return(registry *model.Registry, err error) *MockService_GlobalRegistryFind_Call {
	_c.Call.Return(registry, err)
	return _c
}

func (_c *MockService_GlobalRegistryFind_Call) RunAndReturn(run func(s string) (*model.Registry, error)) *MockService_GlobalRegistryFind_Call {
	_c.Call.Return(run)
	return _c
}

// GlobalRegistryList provides a mock function for the type MockService
func (_mock *MockService) GlobalRegistryList(listOptions *model.ListOptions) ([]*model.Registry, error) {
	ret := _mock.Called(listOptions)

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

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

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

// GlobalRegistryList is a helper method to define mock.On call
//   - listOptions *model.ListOptions
func (_e *MockService_Expecter) GlobalRegistryList(listOptions interface{}) *MockService_GlobalRegistryList_Call {
	return &MockService_GlobalRegistryList_Call{Call: _e.mock.On("GlobalRegistryList", listOptions)}
}

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

func (_c *MockService_GlobalRegistryList_Call) Return(registrys []*model.Registry, err error) *MockService_GlobalRegistryList_Call {
	_c.Call.Return(registrys, err)
	return _c
}

func (_c *MockService_GlobalRegistryList_Call) RunAndReturn(run func(listOptions *model.ListOptions) ([]*model.Registry, error)) *MockService_GlobalRegistryList_Call {
	_c.Call.Return(run)
	return _c
}

// GlobalRegistryUpdate provides a mock function for the type MockService
func (_mock *MockService) GlobalRegistryUpdate(registry *model.Registry) error {
	ret := _mock.Called(registry)

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

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

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

// GlobalRegistryUpdate is a helper method to define mock.On call
//   - registry *model.Registry
func (_e *MockService_Expecter) GlobalRegistryUpdate(registry interface{}) *MockService_GlobalRegistryUpdate_Call {
	return &MockService_GlobalRegistryUpdate_Call{Call: _e.mock.On("GlobalRegistryUpdate", registry)}
}

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

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

func (_c *MockService_GlobalRegistryUpdate_Call) RunAndReturn(run func(registry *model.Registry) error) *MockService_GlobalRegistryUpdate_Call {
	_c.Call.Return(run)
	return _c
}

// OrgRegistryCreate provides a mock function for the type MockService
func (_mock *MockService) OrgRegistryCreate(n int64, registry *model.Registry) error {
	ret := _mock.Called(n, registry)

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

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

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

// OrgRegistryCreate is a helper method to define mock.On call
//   - n int64
//   - registry *model.Registry
func (_e *MockService_Expecter) OrgRegistryCreate(n interface{}, registry interface{}) *MockService_OrgRegistryCreate_Call {
	return &MockService_OrgRegistryCreate_Call{Call: _e.mock.On("OrgRegistryCreate", n, registry)}
}

func (_c *MockService_OrgRegistryCreate_Call) Run(run func(n int64, registry *model.Registry)) *MockService_OrgRegistryCreate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		var arg1 *model.Registry
		if args[1] != nil {
			arg1 = args[1].(*model.Registry)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *MockService_OrgRegistryCreate_Call) RunAndReturn(run func(n int64, registry *model.Registry) error) *MockService_OrgRegistryCreate_Call {
	_c.Call.Return(run)
	return _c
}

// OrgRegistryDelete provides a mock function for the type MockService
func (_mock *MockService) OrgRegistryDelete(n int64, s string) error {
	ret := _mock.Called(n, s)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(int64, string) error); ok {
		r0 = returnFunc(n, s)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// OrgRegistryDelete is a helper method to define mock.On call
//   - n int64
//   - s string
func (_e *MockService_Expecter) OrgRegistryDelete(n interface{}, s interface{}) *MockService_OrgRegistryDelete_Call {
	return &MockService_OrgRegistryDelete_Call{Call: _e.mock.On("OrgRegistryDelete", n, s)}
}

func (_c *MockService_OrgRegistryDelete_Call) Run(run func(n int64, s string)) *MockService_OrgRegistryDelete_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *MockService_OrgRegistryDelete_Call) RunAndReturn(run func(n int64, s string) error) *MockService_OrgRegistryDelete_Call {
	_c.Call.Return(run)
	return _c
}

// OrgRegistryFind provides a mock function for the type MockService
func (_mock *MockService) OrgRegistryFind(n int64, s string) (*model.Registry, error) {
	ret := _mock.Called(n, s)

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

	var r0 *model.Registry
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(int64, string) (*model.Registry, error)); ok {
		return returnFunc(n, s)
	}
	if returnFunc, ok := ret.Get(0).(func(int64, string) *model.Registry); ok {
		r0 = returnFunc(n, s)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*model.Registry)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(int64, string) error); ok {
		r1 = returnFunc(n, s)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// OrgRegistryFind is a helper method to define mock.On call
//   - n int64
//   - s string
func (_e *MockService_Expecter) OrgRegistryFind(n interface{}, s interface{}) *MockService_OrgRegistryFind_Call {
	return &MockService_OrgRegistryFind_Call{Call: _e.mock.On("OrgRegistryFind", n, s)}
}

func (_c *MockService_OrgRegistryFind_Call) Run(run func(n int64, s string)) *MockService_OrgRegistryFind_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		var arg1 string
		if args[1] != nil {
			arg1 = args[1].(string)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockService_OrgRegistryFind_Call) Return(registry *model.Registry, err error) *MockService_OrgRegistryFind_Call {
	_c.Call.Return(registry, err)
	return _c
}

func (_c *MockService_OrgRegistryFind_Call) RunAndReturn(run func(n int64, s string) (*model.Registry, error)) *MockService_OrgRegistryFind_Call {
	_c.Call.Return(run)
	return _c
}

// OrgRegistryList provides a mock function for the type MockService
func (_mock *MockService) OrgRegistryList(n int64, listOptions *model.ListOptions) ([]*model.Registry, error) {
	ret := _mock.Called(n, listOptions)

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

	var r0 []*model.Registry
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) ([]*model.Registry, error)); ok {
		return returnFunc(n, listOptions)
	}
	if returnFunc, ok := ret.Get(0).(func(int64, *model.ListOptions) []*model.Registry); ok {
		r0 = returnFunc(n, listOptions)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.Registry)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(int64, *model.ListOptions) error); ok {
		r1 = returnFunc(n, listOptions)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// OrgRegistryList is a helper method to define mock.On call
//   - n int64
//   - listOptions *model.ListOptions
func (_e *MockService_Expecter) OrgRegistryList(n interface{}, listOptions interface{}) *MockService_OrgRegistryList_Call {
	return &MockService_OrgRegistryList_Call{Call: _e.mock.On("OrgRegistryList", n, listOptions)}
}

func (_c *MockService_OrgRegistryList_Call) Run(run func(n int64, listOptions *model.ListOptions)) *MockService_OrgRegistryList_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		var arg1 *model.ListOptions
		if args[1] != nil {
			arg1 = args[1].(*model.ListOptions)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *MockService_OrgRegistryList_Call) Return(registrys []*model.Registry, err error) *MockService_OrgRegistryList_Call {
	_c.Call.Return(registrys, err)
	return _c
}

func (_c *MockService_OrgRegistryList_Call) RunAndReturn(run func(n int64, listOptions *model.ListOptions) ([]*model.Registry, error)) *MockService_OrgRegistryList_Call {
	_c.Call.Return(run)
	return _c
}

// OrgRegistryUpdate provides a mock function for the type MockService
func (_mock *MockService) OrgRegistryUpdate(n int64, registry *model.Registry) error {
	ret := _mock.Called(n, registry)

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

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

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

// OrgRegistryUpdate is a helper method to define mock.On call
//   - n int64
//   - registry *model.Registry
func (_e *MockService_Expecter) OrgRegistryUpdate(n interface{}, registry interface{}) *MockService_OrgRegistryUpdate_Call {
	return &MockService_OrgRegistryUpdate_Call{Call: _e.mock.On("OrgRegistryUpdate", n, registry)}
}

func (_c *MockService_OrgRegistryUpdate_Call) Run(run func(n int64, registry *model.Registry)) *MockService_OrgRegistryUpdate_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 int64
		if args[0] != nil {
			arg0 = args[0].(int64)
		}
		var arg1 *model.Registry
		if args[1] != nil {
			arg1 = args[1].(*model.Registry)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *MockService_OrgRegistryUpdate_Call) RunAndReturn(run func(n int64, registry *model.Registry) error) *MockService_OrgRegistryUpdate_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryCreate provides a mock function for the type MockService
func (_mock *MockService) RegistryCreate(repo *model.Repo, registry *model.Registry) error {
	ret := _mock.Called(repo, registry)

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

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

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

// RegistryCreate is a helper method to define mock.On call
//   - repo *model.Repo
//   - registry *model.Registry
func (_e *MockService_Expecter) RegistryCreate(repo interface{}, registry interface{}) *MockService_RegistryCreate_Call {
	return &MockService_RegistryCreate_Call{Call: _e.mock.On("RegistryCreate", repo, registry)}
}

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

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

func (_c *MockService_RegistryCreate_Call) RunAndReturn(run func(repo *model.Repo, registry *model.Registry) error) *MockService_RegistryCreate_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryDelete provides a mock function for the type MockService
func (_mock *MockService) RegistryDelete(repo *model.Repo, s string) error {
	ret := _mock.Called(repo, s)

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

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

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

// RegistryDelete is a helper method to define mock.On call
//   - repo *model.Repo
//   - s string
func (_e *MockService_Expecter) RegistryDelete(repo interface{}, s interface{}) *MockService_RegistryDelete_Call {
	return &MockService_RegistryDelete_Call{Call: _e.mock.On("RegistryDelete", repo, s)}
}

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

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

func (_c *MockService_RegistryDelete_Call) RunAndReturn(run func(repo *model.Repo, s string) error) *MockService_RegistryDelete_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryFind provides a mock function for the type MockService
func (_mock *MockService) RegistryFind(repo *model.Repo, s string) (*model.Registry, error) {
	ret := _mock.Called(repo, s)

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

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

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

// RegistryFind is a helper method to define mock.On call
//   - repo *model.Repo
//   - s string
func (_e *MockService_Expecter) RegistryFind(repo interface{}, s interface{}) *MockService_RegistryFind_Call {
	return &MockService_RegistryFind_Call{Call: _e.mock.On("RegistryFind", repo, s)}
}

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

func (_c *MockService_RegistryFind_Call) Return(registry *model.Registry, err error) *MockService_RegistryFind_Call {
	_c.Call.Return(registry, err)
	return _c
}

func (_c *MockService_RegistryFind_Call) RunAndReturn(run func(repo *model.Repo, s string) (*model.Registry, error)) *MockService_RegistryFind_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryList provides a mock function for the type MockService
func (_mock *MockService) RegistryList(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Registry, error) {
	ret := _mock.Called(repo, listOptions)

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

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

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

// RegistryList is a helper method to define mock.On call
//   - repo *model.Repo
//   - listOptions *model.ListOptions
func (_e *MockService_Expecter) RegistryList(repo interface{}, listOptions interface{}) *MockService_RegistryList_Call {
	return &MockService_RegistryList_Call{Call: _e.mock.On("RegistryList", repo, listOptions)}
}

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

func (_c *MockService_RegistryList_Call) Return(registrys []*model.Registry, err error) *MockService_RegistryList_Call {
	_c.Call.Return(registrys, err)
	return _c
}

func (_c *MockService_RegistryList_Call) RunAndReturn(run func(repo *model.Repo, listOptions *model.ListOptions) ([]*model.Registry, error)) *MockService_RegistryList_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryListPipeline provides a mock function for the type MockService
func (_mock *MockService) RegistryListPipeline(context1 context.Context, repo *model.Repo, pipeline *model.Pipeline, netrc *model.Netrc) ([]*model.Registry, error) {
	ret := _mock.Called(context1, repo, pipeline, netrc)

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

	var r0 []*model.Registry
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *model.Repo, *model.Pipeline, *model.Netrc) ([]*model.Registry, error)); ok {
		return returnFunc(context1, repo, pipeline, netrc)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *model.Repo, *model.Pipeline, *model.Netrc) []*model.Registry); ok {
		r0 = returnFunc(context1, repo, pipeline, netrc)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).([]*model.Registry)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *model.Repo, *model.Pipeline, *model.Netrc) error); ok {
		r1 = returnFunc(context1, repo, pipeline, netrc)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// RegistryListPipeline is a helper method to define mock.On call
//   - context1 context.Context
//   - repo *model.Repo
//   - pipeline *model.Pipeline
//   - netrc *model.Netrc
func (_e *MockService_Expecter) RegistryListPipeline(context1 interface{}, repo interface{}, pipeline interface{}, netrc interface{}) *MockService_RegistryListPipeline_Call {
	return &MockService_RegistryListPipeline_Call{Call: _e.mock.On("RegistryListPipeline", context1, repo, pipeline, netrc)}
}

func (_c *MockService_RegistryListPipeline_Call) Run(run func(context1 context.Context, repo *model.Repo, pipeline *model.Pipeline, netrc *model.Netrc)) *MockService_RegistryListPipeline_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *model.Repo
		if args[1] != nil {
			arg1 = args[1].(*model.Repo)
		}
		var arg2 *model.Pipeline
		if args[2] != nil {
			arg2 = args[2].(*model.Pipeline)
		}
		var arg3 *model.Netrc
		if args[3] != nil {
			arg3 = args[3].(*model.Netrc)
		}
		run(
			arg0,
			arg1,
			arg2,
			arg3,
		)
	})
	return _c
}

func (_c *MockService_RegistryListPipeline_Call) Return(registrys []*model.Registry, err error) *MockService_RegistryListPipeline_Call {
	_c.Call.Return(registrys, err)
	return _c
}

func (_c *MockService_RegistryListPipeline_Call) RunAndReturn(run func(context1 context.Context, repo *model.Repo, pipeline *model.Pipeline, netrc *model.Netrc) ([]*model.Registry, error)) *MockService_RegistryListPipeline_Call {
	_c.Call.Return(run)
	return _c
}

// RegistryUpdate provides a mock function for the type MockService
func (_mock *MockService) RegistryUpdate(repo *model.Repo, registry *model.Registry) error {
	ret := _mock.Called(repo, registry)

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

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

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

// RegistryUpdate is a helper method to define mock.On call
//   - repo *model.Repo
//   - registry *model.Registry
func (_e *MockService_Expecter) RegistryUpdate(repo interface{}, registry interface{}) *MockService_RegistryUpdate_Call {
	return &MockService_RegistryUpdate_Call{Call: _e.mock.On("RegistryUpdate", repo, registry)}
}

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

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

func (_c *MockService_RegistryUpdate_Call) RunAndReturn(run func(repo *model.Repo, registry *model.Registry) error) *MockService_RegistryUpdate_Call {
	_c.Call.Return(run)
	return _c
}
