// 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"
)

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

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

	return mock
}

// MockReadOnlyService is an autogenerated mock type for the ReadOnlyService type
type MockReadOnlyService struct {
	mock.Mock
}

type MockReadOnlyService_Expecter struct {
	mock *mock.Mock
}

func (_m *MockReadOnlyService) EXPECT() *MockReadOnlyService_Expecter {
	return &MockReadOnlyService_Expecter{mock: &_m.Mock}
}

// GlobalRegistryFind provides a mock function for the type MockReadOnlyService
func (_mock *MockReadOnlyService) 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
}

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

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

func (_c *MockReadOnlyService_GlobalRegistryFind_Call) Run(run func(s string)) *MockReadOnlyService_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 *MockReadOnlyService_GlobalRegistryFind_Call) Return(registry *model.Registry, err error) *MockReadOnlyService_GlobalRegistryFind_Call {
	_c.Call.Return(registry, err)
	return _c
}

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

// GlobalRegistryList provides a mock function for the type MockReadOnlyService
func (_mock *MockReadOnlyService) 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
}

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

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

func (_c *MockReadOnlyService_GlobalRegistryList_Call) Run(run func(listOptions *model.ListOptions)) *MockReadOnlyService_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 *MockReadOnlyService_GlobalRegistryList_Call) Return(registrys []*model.Registry, err error) *MockReadOnlyService_GlobalRegistryList_Call {
	_c.Call.Return(registrys, err)
	return _c
}

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