// Code generated by mockery v2.50.2. DO NOT EDIT.

package mocks

import (
	context "context"

	client "go-micro.dev/v4/client"

	mock "github.com/stretchr/testify/mock"

	v0 "github.com/opencloud-eu/opencloud/protogen/gen/opencloud/services/search/v0"
)

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

type SearchProviderService_Expecter struct {
	mock *mock.Mock
}

func (_m *SearchProviderService) EXPECT() *SearchProviderService_Expecter {
	return &SearchProviderService_Expecter{mock: &_m.Mock}
}

// IndexSpace provides a mock function with given fields: ctx, in, opts
func (_m *SearchProviderService) IndexSpace(ctx context.Context, in *v0.IndexSpaceRequest, opts ...client.CallOption) (*v0.IndexSpaceResponse, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, in)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 *v0.IndexSpaceResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0.IndexSpaceRequest, ...client.CallOption) (*v0.IndexSpaceResponse, error)); ok {
		return rf(ctx, in, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v0.IndexSpaceRequest, ...client.CallOption) *v0.IndexSpaceResponse); ok {
		r0 = rf(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0.IndexSpaceResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v0.IndexSpaceRequest, ...client.CallOption) error); ok {
		r1 = rf(ctx, in, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// IndexSpace is a helper method to define mock.On call
//   - ctx context.Context
//   - in *v0.IndexSpaceRequest
//   - opts ...client.CallOption
func (_e *SearchProviderService_Expecter) IndexSpace(ctx interface{}, in interface{}, opts ...interface{}) *SearchProviderService_IndexSpace_Call {
	return &SearchProviderService_IndexSpace_Call{Call: _e.mock.On("IndexSpace",
		append([]interface{}{ctx, in}, opts...)...)}
}

func (_c *SearchProviderService_IndexSpace_Call) Run(run func(ctx context.Context, in *v0.IndexSpaceRequest, opts ...client.CallOption)) *SearchProviderService_IndexSpace_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]client.CallOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(client.CallOption)
			}
		}
		run(args[0].(context.Context), args[1].(*v0.IndexSpaceRequest), variadicArgs...)
	})
	return _c
}

func (_c *SearchProviderService_IndexSpace_Call) Return(_a0 *v0.IndexSpaceResponse, _a1 error) *SearchProviderService_IndexSpace_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *SearchProviderService_IndexSpace_Call) RunAndReturn(run func(context.Context, *v0.IndexSpaceRequest, ...client.CallOption) (*v0.IndexSpaceResponse, error)) *SearchProviderService_IndexSpace_Call {
	_c.Call.Return(run)
	return _c
}

// Search provides a mock function with given fields: ctx, in, opts
func (_m *SearchProviderService) Search(ctx context.Context, in *v0.SearchRequest, opts ...client.CallOption) (*v0.SearchResponse, error) {
	_va := make([]interface{}, len(opts))
	for _i := range opts {
		_va[_i] = opts[_i]
	}
	var _ca []interface{}
	_ca = append(_ca, ctx, in)
	_ca = append(_ca, _va...)
	ret := _m.Called(_ca...)

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

	var r0 *v0.SearchResponse
	var r1 error
	if rf, ok := ret.Get(0).(func(context.Context, *v0.SearchRequest, ...client.CallOption) (*v0.SearchResponse, error)); ok {
		return rf(ctx, in, opts...)
	}
	if rf, ok := ret.Get(0).(func(context.Context, *v0.SearchRequest, ...client.CallOption) *v0.SearchResponse); ok {
		r0 = rf(ctx, in, opts...)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(*v0.SearchResponse)
		}
	}

	if rf, ok := ret.Get(1).(func(context.Context, *v0.SearchRequest, ...client.CallOption) error); ok {
		r1 = rf(ctx, in, opts...)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}

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

// Search is a helper method to define mock.On call
//   - ctx context.Context
//   - in *v0.SearchRequest
//   - opts ...client.CallOption
func (_e *SearchProviderService_Expecter) Search(ctx interface{}, in interface{}, opts ...interface{}) *SearchProviderService_Search_Call {
	return &SearchProviderService_Search_Call{Call: _e.mock.On("Search",
		append([]interface{}{ctx, in}, opts...)...)}
}

func (_c *SearchProviderService_Search_Call) Run(run func(ctx context.Context, in *v0.SearchRequest, opts ...client.CallOption)) *SearchProviderService_Search_Call {
	_c.Call.Run(func(args mock.Arguments) {
		variadicArgs := make([]client.CallOption, len(args)-2)
		for i, a := range args[2:] {
			if a != nil {
				variadicArgs[i] = a.(client.CallOption)
			}
		}
		run(args[0].(context.Context), args[1].(*v0.SearchRequest), variadicArgs...)
	})
	return _c
}

func (_c *SearchProviderService_Search_Call) Return(_a0 *v0.SearchResponse, _a1 error) *SearchProviderService_Search_Call {
	_c.Call.Return(_a0, _a1)
	return _c
}

func (_c *SearchProviderService_Search_Call) RunAndReturn(run func(context.Context, *v0.SearchRequest, ...client.CallOption) (*v0.SearchResponse, error)) *SearchProviderService_Search_Call {
	_c.Call.Return(run)
	return _c
}

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

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

	return mock
}
