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

package mocks

import (
	"context"

	"github.com/meilisearch/meilisearch-go"
	mock "github.com/stretchr/testify/mock"
)

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

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

	return mock
}

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

type MockmeilisearchIndexReader_Expecter struct {
	mock *mock.Mock
}

func (_m *MockmeilisearchIndexReader) EXPECT() *MockmeilisearchIndexReader_Expecter {
	return &MockmeilisearchIndexReader_Expecter{mock: &_m.Mock}
}

// FetchInfo provides a mock function for the type MockmeilisearchIndexReader
func (_mock *MockmeilisearchIndexReader) FetchInfo() (*meilisearch.IndexResult, error) {
	ret := _mock.Called()

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

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

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

// FetchInfo is a helper method to define mock.On call
func (_e *MockmeilisearchIndexReader_Expecter) FetchInfo() *MockmeilisearchIndexReader_FetchInfo_Call {
	return &MockmeilisearchIndexReader_FetchInfo_Call{Call: _e.mock.On("FetchInfo")}
}

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

func (_c *MockmeilisearchIndexReader_FetchInfo_Call) Return(indexResult *meilisearch.IndexResult, err error) *MockmeilisearchIndexReader_FetchInfo_Call {
	_c.Call.Return(indexResult, err)
	return _c
}

func (_c *MockmeilisearchIndexReader_FetchInfo_Call) RunAndReturn(run func() (*meilisearch.IndexResult, error)) *MockmeilisearchIndexReader_FetchInfo_Call {
	_c.Call.Return(run)
	return _c
}

// FetchInfoWithContext provides a mock function for the type MockmeilisearchIndexReader
func (_mock *MockmeilisearchIndexReader) FetchInfoWithContext(ctx context.Context) (*meilisearch.IndexResult, error) {
	ret := _mock.Called(ctx)

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

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

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

// FetchInfoWithContext is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockmeilisearchIndexReader_Expecter) FetchInfoWithContext(ctx interface{}) *MockmeilisearchIndexReader_FetchInfoWithContext_Call {
	return &MockmeilisearchIndexReader_FetchInfoWithContext_Call{Call: _e.mock.On("FetchInfoWithContext", ctx)}
}

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

func (_c *MockmeilisearchIndexReader_FetchInfoWithContext_Call) Return(indexResult *meilisearch.IndexResult, err error) *MockmeilisearchIndexReader_FetchInfoWithContext_Call {
	_c.Call.Return(indexResult, err)
	return _c
}

func (_c *MockmeilisearchIndexReader_FetchInfoWithContext_Call) RunAndReturn(run func(ctx context.Context) (*meilisearch.IndexResult, error)) *MockmeilisearchIndexReader_FetchInfoWithContext_Call {
	_c.Call.Return(run)
	return _c
}

// FetchPrimaryKey provides a mock function for the type MockmeilisearchIndexReader
func (_mock *MockmeilisearchIndexReader) FetchPrimaryKey() (*string, error) {
	ret := _mock.Called()

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

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

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

// FetchPrimaryKey is a helper method to define mock.On call
func (_e *MockmeilisearchIndexReader_Expecter) FetchPrimaryKey() *MockmeilisearchIndexReader_FetchPrimaryKey_Call {
	return &MockmeilisearchIndexReader_FetchPrimaryKey_Call{Call: _e.mock.On("FetchPrimaryKey")}
}

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

func (_c *MockmeilisearchIndexReader_FetchPrimaryKey_Call) Return(s *string, err error) *MockmeilisearchIndexReader_FetchPrimaryKey_Call {
	_c.Call.Return(s, err)
	return _c
}

func (_c *MockmeilisearchIndexReader_FetchPrimaryKey_Call) RunAndReturn(run func() (*string, error)) *MockmeilisearchIndexReader_FetchPrimaryKey_Call {
	_c.Call.Return(run)
	return _c
}

// FetchPrimaryKeyWithContext provides a mock function for the type MockmeilisearchIndexReader
func (_mock *MockmeilisearchIndexReader) FetchPrimaryKeyWithContext(ctx context.Context) (*string, error) {
	ret := _mock.Called(ctx)

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

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

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

// FetchPrimaryKeyWithContext is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockmeilisearchIndexReader_Expecter) FetchPrimaryKeyWithContext(ctx interface{}) *MockmeilisearchIndexReader_FetchPrimaryKeyWithContext_Call {
	return &MockmeilisearchIndexReader_FetchPrimaryKeyWithContext_Call{Call: _e.mock.On("FetchPrimaryKeyWithContext", ctx)}
}

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

func (_c *MockmeilisearchIndexReader_FetchPrimaryKeyWithContext_Call) Return(s *string, err error) *MockmeilisearchIndexReader_FetchPrimaryKeyWithContext_Call {
	_c.Call.Return(s, err)
	return _c
}

func (_c *MockmeilisearchIndexReader_FetchPrimaryKeyWithContext_Call) RunAndReturn(run func(ctx context.Context) (*string, error)) *MockmeilisearchIndexReader_FetchPrimaryKeyWithContext_Call {
	_c.Call.Return(run)
	return _c
}

// GetStats provides a mock function for the type MockmeilisearchIndexReader
func (_mock *MockmeilisearchIndexReader) GetStats() (*meilisearch.StatsIndex, error) {
	ret := _mock.Called()

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

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

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

// GetStats is a helper method to define mock.On call
func (_e *MockmeilisearchIndexReader_Expecter) GetStats() *MockmeilisearchIndexReader_GetStats_Call {
	return &MockmeilisearchIndexReader_GetStats_Call{Call: _e.mock.On("GetStats")}
}

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

func (_c *MockmeilisearchIndexReader_GetStats_Call) Return(statsIndex *meilisearch.StatsIndex, err error) *MockmeilisearchIndexReader_GetStats_Call {
	_c.Call.Return(statsIndex, err)
	return _c
}

func (_c *MockmeilisearchIndexReader_GetStats_Call) RunAndReturn(run func() (*meilisearch.StatsIndex, error)) *MockmeilisearchIndexReader_GetStats_Call {
	_c.Call.Return(run)
	return _c
}

// GetStatsWithContext provides a mock function for the type MockmeilisearchIndexReader
func (_mock *MockmeilisearchIndexReader) GetStatsWithContext(ctx context.Context) (*meilisearch.StatsIndex, error) {
	ret := _mock.Called(ctx)

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

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

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

// GetStatsWithContext is a helper method to define mock.On call
//   - ctx context.Context
func (_e *MockmeilisearchIndexReader_Expecter) GetStatsWithContext(ctx interface{}) *MockmeilisearchIndexReader_GetStatsWithContext_Call {
	return &MockmeilisearchIndexReader_GetStatsWithContext_Call{Call: _e.mock.On("GetStatsWithContext", ctx)}
}

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

func (_c *MockmeilisearchIndexReader_GetStatsWithContext_Call) Return(statsIndex *meilisearch.StatsIndex, err error) *MockmeilisearchIndexReader_GetStatsWithContext_Call {
	_c.Call.Return(statsIndex, err)
	return _c
}

func (_c *MockmeilisearchIndexReader_GetStatsWithContext_Call) RunAndReturn(run func(ctx context.Context) (*meilisearch.StatsIndex, error)) *MockmeilisearchIndexReader_GetStatsWithContext_Call {
	_c.Call.Return(run)
	return _c
}
