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

package mocks

import (
	"context"

	"github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
	"github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/search/v0"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type Searcher_Expecter struct {
	mock *mock.Mock
}

func (_m *Searcher) EXPECT() *Searcher_Expecter {
	return &Searcher_Expecter{mock: &_m.Mock}
}

// IndexSpace provides a mock function for the type Searcher
func (_mock *Searcher) IndexSpace(rID *providerv1beta1.StorageSpaceId, forceRescan bool) error {
	ret := _mock.Called(rID, forceRescan)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*providerv1beta1.StorageSpaceId, bool) error); ok {
		r0 = returnFunc(rID, forceRescan)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// IndexSpace is a helper method to define mock.On call
//   - rID *providerv1beta1.StorageSpaceId
//   - forceRescan bool
func (_e *Searcher_Expecter) IndexSpace(rID interface{}, forceRescan interface{}) *Searcher_IndexSpace_Call {
	return &Searcher_IndexSpace_Call{Call: _e.mock.On("IndexSpace", rID, forceRescan)}
}

func (_c *Searcher_IndexSpace_Call) Run(run func(rID *providerv1beta1.StorageSpaceId, forceRescan bool)) *Searcher_IndexSpace_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *providerv1beta1.StorageSpaceId
		if args[0] != nil {
			arg0 = args[0].(*providerv1beta1.StorageSpaceId)
		}
		var arg1 bool
		if args[1] != nil {
			arg1 = args[1].(bool)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

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

func (_c *Searcher_IndexSpace_Call) RunAndReturn(run func(rID *providerv1beta1.StorageSpaceId, forceRescan bool) error) *Searcher_IndexSpace_Call {
	_c.Call.Return(run)
	return _c
}

// MoveItem provides a mock function for the type Searcher
func (_mock *Searcher) MoveItem(ref *providerv1beta1.Reference) {
	_mock.Called(ref)
	return
}

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

// MoveItem is a helper method to define mock.On call
//   - ref *providerv1beta1.Reference
func (_e *Searcher_Expecter) MoveItem(ref interface{}) *Searcher_MoveItem_Call {
	return &Searcher_MoveItem_Call{Call: _e.mock.On("MoveItem", ref)}
}

func (_c *Searcher_MoveItem_Call) Run(run func(ref *providerv1beta1.Reference)) *Searcher_MoveItem_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *providerv1beta1.Reference
		if args[0] != nil {
			arg0 = args[0].(*providerv1beta1.Reference)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Searcher_MoveItem_Call) RunAndReturn(run func(ref *providerv1beta1.Reference)) *Searcher_MoveItem_Call {
	_c.Run(run)
	return _c
}

// PurgeDeleted provides a mock function for the type Searcher
func (_mock *Searcher) PurgeDeleted(spaceID *providerv1beta1.StorageSpaceId) error {
	ret := _mock.Called(spaceID)

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

	var r0 error
	if returnFunc, ok := ret.Get(0).(func(*providerv1beta1.StorageSpaceId) error); ok {
		r0 = returnFunc(spaceID)
	} else {
		r0 = ret.Error(0)
	}
	return r0
}

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

// PurgeDeleted is a helper method to define mock.On call
//   - spaceID *providerv1beta1.StorageSpaceId
func (_e *Searcher_Expecter) PurgeDeleted(spaceID interface{}) *Searcher_PurgeDeleted_Call {
	return &Searcher_PurgeDeleted_Call{Call: _e.mock.On("PurgeDeleted", spaceID)}
}

func (_c *Searcher_PurgeDeleted_Call) Run(run func(spaceID *providerv1beta1.StorageSpaceId)) *Searcher_PurgeDeleted_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *providerv1beta1.StorageSpaceId
		if args[0] != nil {
			arg0 = args[0].(*providerv1beta1.StorageSpaceId)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Searcher_PurgeDeleted_Call) RunAndReturn(run func(spaceID *providerv1beta1.StorageSpaceId) error) *Searcher_PurgeDeleted_Call {
	_c.Call.Return(run)
	return _c
}

// PurgeItem provides a mock function for the type Searcher
func (_mock *Searcher) PurgeItem(rID *providerv1beta1.Reference) {
	_mock.Called(rID)
	return
}

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

// PurgeItem is a helper method to define mock.On call
//   - rID *providerv1beta1.Reference
func (_e *Searcher_Expecter) PurgeItem(rID interface{}) *Searcher_PurgeItem_Call {
	return &Searcher_PurgeItem_Call{Call: _e.mock.On("PurgeItem", rID)}
}

func (_c *Searcher_PurgeItem_Call) Run(run func(rID *providerv1beta1.Reference)) *Searcher_PurgeItem_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *providerv1beta1.Reference
		if args[0] != nil {
			arg0 = args[0].(*providerv1beta1.Reference)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Searcher_PurgeItem_Call) RunAndReturn(run func(rID *providerv1beta1.Reference)) *Searcher_PurgeItem_Call {
	_c.Run(run)
	return _c
}

// RestoreItem provides a mock function for the type Searcher
func (_mock *Searcher) RestoreItem(ref *providerv1beta1.Reference) {
	_mock.Called(ref)
	return
}

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

// RestoreItem is a helper method to define mock.On call
//   - ref *providerv1beta1.Reference
func (_e *Searcher_Expecter) RestoreItem(ref interface{}) *Searcher_RestoreItem_Call {
	return &Searcher_RestoreItem_Call{Call: _e.mock.On("RestoreItem", ref)}
}

func (_c *Searcher_RestoreItem_Call) Run(run func(ref *providerv1beta1.Reference)) *Searcher_RestoreItem_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *providerv1beta1.Reference
		if args[0] != nil {
			arg0 = args[0].(*providerv1beta1.Reference)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Searcher_RestoreItem_Call) RunAndReturn(run func(ref *providerv1beta1.Reference)) *Searcher_RestoreItem_Call {
	_c.Run(run)
	return _c
}

// Search provides a mock function for the type Searcher
func (_mock *Searcher) Search(ctx context.Context, req *v0.SearchRequest) (*v0.SearchResponse, error) {
	ret := _mock.Called(ctx, req)

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

	var r0 *v0.SearchResponse
	var r1 error
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v0.SearchRequest) (*v0.SearchResponse, error)); ok {
		return returnFunc(ctx, req)
	}
	if returnFunc, ok := ret.Get(0).(func(context.Context, *v0.SearchRequest) *v0.SearchResponse); ok {
		r0 = returnFunc(ctx, req)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0.SearchResponse)
		}
	}
	if returnFunc, ok := ret.Get(1).(func(context.Context, *v0.SearchRequest) error); ok {
		r1 = returnFunc(ctx, req)
	} else {
		r1 = ret.Error(1)
	}
	return r0, r1
}

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

// Search is a helper method to define mock.On call
//   - ctx context.Context
//   - req *v0.SearchRequest
func (_e *Searcher_Expecter) Search(ctx interface{}, req interface{}) *Searcher_Search_Call {
	return &Searcher_Search_Call{Call: _e.mock.On("Search", ctx, req)}
}

func (_c *Searcher_Search_Call) Run(run func(ctx context.Context, req *v0.SearchRequest)) *Searcher_Search_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 context.Context
		if args[0] != nil {
			arg0 = args[0].(context.Context)
		}
		var arg1 *v0.SearchRequest
		if args[1] != nil {
			arg1 = args[1].(*v0.SearchRequest)
		}
		run(
			arg0,
			arg1,
		)
	})
	return _c
}

func (_c *Searcher_Search_Call) Return(searchResponse *v0.SearchResponse, err error) *Searcher_Search_Call {
	_c.Call.Return(searchResponse, err)
	return _c
}

func (_c *Searcher_Search_Call) RunAndReturn(run func(ctx context.Context, req *v0.SearchRequest) (*v0.SearchResponse, error)) *Searcher_Search_Call {
	_c.Call.Return(run)
	return _c
}

// TrashItem provides a mock function for the type Searcher
func (_mock *Searcher) TrashItem(rID *providerv1beta1.ResourceId) {
	_mock.Called(rID)
	return
}

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

// TrashItem is a helper method to define mock.On call
//   - rID *providerv1beta1.ResourceId
func (_e *Searcher_Expecter) TrashItem(rID interface{}) *Searcher_TrashItem_Call {
	return &Searcher_TrashItem_Call{Call: _e.mock.On("TrashItem", rID)}
}

func (_c *Searcher_TrashItem_Call) Run(run func(rID *providerv1beta1.ResourceId)) *Searcher_TrashItem_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *providerv1beta1.ResourceId
		if args[0] != nil {
			arg0 = args[0].(*providerv1beta1.ResourceId)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Searcher_TrashItem_Call) RunAndReturn(run func(rID *providerv1beta1.ResourceId)) *Searcher_TrashItem_Call {
	_c.Run(run)
	return _c
}

// UpsertItem provides a mock function for the type Searcher
func (_mock *Searcher) UpsertItem(ref *providerv1beta1.Reference) {
	_mock.Called(ref)
	return
}

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

// UpsertItem is a helper method to define mock.On call
//   - ref *providerv1beta1.Reference
func (_e *Searcher_Expecter) UpsertItem(ref interface{}) *Searcher_UpsertItem_Call {
	return &Searcher_UpsertItem_Call{Call: _e.mock.On("UpsertItem", ref)}
}

func (_c *Searcher_UpsertItem_Call) Run(run func(ref *providerv1beta1.Reference)) *Searcher_UpsertItem_Call {
	_c.Call.Run(func(args mock.Arguments) {
		var arg0 *providerv1beta1.Reference
		if args[0] != nil {
			arg0 = args[0].(*providerv1beta1.Reference)
		}
		run(
			arg0,
		)
	})
	return _c
}

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

func (_c *Searcher_UpsertItem_Call) RunAndReturn(run func(ref *providerv1beta1.Reference)) *Searcher_UpsertItem_Call {
	_c.Run(run)
	return _c
}
